def init(self): panel_path = public.get_panel_path() if os.getcwd() != panel_path: os.chdir(panel_path) g.ua = request.headers.get('User-Agent', '') if g.ua: ua = g.ua.lower() if ua.find('spider') != -1 or g.ua.find('bot') != -1: return redirect('https://www.google.com') g.version = '6.8.21' g.title = public.GetConfigValue('title') g.uri = request.path g.debug = os.path.exists('data/debug.pl') g.pyversion = sys.version_info[0] session['version'] = g.version if request.method == 'GET': if not g.debug: g.cdn_url = public.get_cdn_url() if not g.cdn_url: g.cdn_url = '/static' else: g.cdn_url = '//' + g.cdn_url + '/' + g.version else: g.cdn_url = '/static' session['title'] = g.title g.recycle_bin_open = 0 if os.path.exists("data/recycle_bin.pl"): g.recycle_bin_open = 1 g.recycle_bin_db_open = 0 if os.path.exists("data/recycle_bin_db.pl"): g.recycle_bin_db_open = 1 g.is_aes = False self.other_import() return None
def init(self): ua = request.headers.get('User-Agent','') if ua: ua = ua.lower() if ua.find('spider') != -1 or ua.find('bot') != -1: return redirect('https://www.google.com') g.version = '6.8.12' g.title = public.GetConfigValue('title') g.uri = request.path g.debug = os.path.exists('data/debug.pl') g.pyversion = sys.version_info[0] session['version'] = g.version if request.method == 'GET': if not g.debug: g.cdn_url = public.get_cdn_url() if not g.cdn_url: g.cdn_url = '/static' else: g.cdn_url = '//' + g.cdn_url + '/' + g.version else: g.cdn_url = '/static' session['title'] = g.title g.is_aes = False self.other_import() return None
def set_cdn_host(self,get): try: if not 'cdn_url' in get: return True plugin_path = 'plugin/static_cdn' if not os.path.exists(plugin_path): return True cdn_url = public.get_cdn_url() if not cdn_url or cdn_url == get.cdn_url: return True public.set_cdn_url(get.cdn_url) except: return False
def init(self): ua = request.headers.get('User-Agent') if ua: ua = ua.lower() if ua.find('spider') != -1 or ua.find('bot') != -1: return redirect('https://www.google.com') g.version = '6.6.7' g.title = public.GetConfigValue('title') g.uri = request.path if not os.path.exists('data/debug.pl'): g.cdn_url = public.get_cdn_url() if not g.cdn_url: g.cdn_url = '/static' else: g.cdn_url = '//' + g.cdn_url + '/' + g.version else: g.cdn_url = '/static' session['version'] = g.version session['title'] = g.title g.is_aes = False return None
def init(self): ua = request.headers.get('User-Agent', '') if ua: ua = ua.lower() if ua.find('spider') != -1 or ua.find('bot') != -1: return redirect('https://www.google.com') g.version = '6.8.4' g.title = public.GetConfigValue('title') g.uri = request.path g.debug = os.path.exists('data/debug.pl') g.pyversion = sys.version_info[0] if not g.debug: g.cdn_url = public.get_cdn_url() if not g.cdn_url: g.cdn_url = '/static' else: g.cdn_url = '//' + g.cdn_url + '/' + g.version else: g.cdn_url = '/static' session['version'] = g.version session['title'] = g.title g.is_aes = False dirPath = '/www/server/phpmyadmin/pma' if os.path.exists(dirPath): public.ExecShell("rm -rf {}".format(dirPath)) dirPath = '/www/server/adminer' if os.path.exists(dirPath): public.ExecShell("rm -rf {}".format(dirPath)) dirPath = '/www/server/panel/adminer' if os.path.exists(dirPath): public.ExecShell("rm -rf {}".format(dirPath)) return None