Ejemplo n.º 1
0
 def setSession(self):
     session['menus'] = sorted(json.loads(
         public.ReadFile('config/menu.json')),
                               key=lambda x: x['sort'])
     session['yaer'] = datetime.now().year
     session['download_url'] = 'http://download.bt.cn'
     session["top_tips"] = public.GetMsg("TOP_TIPS")
     session["bt_help"] = public.GetMsg("BT_HELP")
     # session["manual"] = public.GetMsg("MANUAL")
     session["download"] = public.GetMsg("DOWNLOAD")
     if not 'brand' in session:
         session['brand'] = public.GetConfigValue('brand')
         session['product'] = public.GetConfigValue('product')
         session['rootPath'] = '/www'
         session['download_url'] = 'http://download.bt.cn'
         session['setupPath'] = session['rootPath'] + '/server'
         session['logsPath'] = '/www/wwwlogs'
         session['yaer'] = datetime.now().year
     if not 'menu' in session:
         session['menu'] = public.GetLan('menu')
     if not 'lan' in session:
         session['lan'] = public.GetLanguage()
     if not 'home' in session:
         session['home'] = 'https://console.aapanel.com'
     return None
Ejemplo n.º 2
0
 def setSession(self):
     session['menus'] = sorted(json.loads(public.ReadFile('config/menu.json')),key=lambda x:x['sort'])
     session['yaer'] = datetime.now().year
     session['download_url'] = 'http://download.bt.cn';
     if not 'brand' in session:
         session['brand'] = public.GetConfigValue('brand');
         session['product'] = public.GetConfigValue('product');
         session['rootPath'] = '/www'
         session['download_url'] = 'http://download.bt.cn';
         session['setupPath'] = session['rootPath'] + '/server';
         session['logsPath'] = '/www/wwwlogs';
         session['yaer'] = datetime.now().year
     if not 'menu' in session:
         session['menu'] = public.GetLan('menu');
     if not 'lan' in session:
         session['lan'] = public.GetLanguage();
     if not 'home' in session:
         session['home'] = 'http://www.bt.cn';
Ejemplo n.º 3
0
 def setSession(self):
     if request.method == 'GET':
         g.menus = public.get_menus()
         g.yaer = datetime.now().year
     session["top_tips"] = public.GetMsg("TOP_TIPS")
     session["bt_help"] = public.GetMsg("BT_HELP")
     session["download"] = public.GetMsg("DOWNLOAD")
     if not 'brand' in session:
         session['brand'] = public.GetConfigValue('brand')
         session['product'] = public.GetConfigValue('product')
         session['rootPath'] = '/www'
         session['download_url'] = 'https://node.aapanel.com'
         session['setupPath'] = session['rootPath'] + '/server'
         session['logsPath'] = '/www/wwwlogs'
         session['yaer'] = datetime.now().year
     if not 'menu' in session:
         session['menu'] = public.GetLan('menu')
     if not 'lan' in session:
         session['lan'] = public.GetLanguage()
     if not 'home' in session:
         session['home'] = 'https://brandnew.aapanel.com'
     return False