diff --git a/README.md b/README.md index 0234164eea..c860692a26 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Talk is cheap, show me the code. -- linus ``` - [兼容性测试报告](/compatibility.md) -- [常用命令说明](/cmd.md) [ mw default ] +- [常用命令说明](/cmd.md) [ mw default ] [ mw update_dev ] ### 主要插件介绍 @@ -110,12 +110,9 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443: ``` -### 版本更新 0.16.4 +### 版本更新 0.16.5 -* 二次验证。 -* OP防火墙修复。 -* 任务日志查看优化。 -* 优化MySQL打开phpMyAdmin速度。 +* 文件管理,增加排序。 ### JSDelivr安装地址 diff --git a/class/core/cert_api.py b/class/core/cert_api.py index 831e82363a..d9a589e79e 100644 --- a/class/core/cert_api.py +++ b/class/core/cert_api.py @@ -441,19 +441,7 @@ def getSiteRunPathByid(self, site_id): return None if not os.path.exists(site_path): return None - args = mw.dict_obj() - args.id = site_id - import panelSite - run_path = panelSite.panelSite().GetRunPath(args) - if run_path in ['/']: - run_path = '' - if run_path: - if run_path[0] == '/': - run_path = run_path[1:] - site_run_path = os.path.join(site_path, run_path) - if not os.path.exists(site_run_path): - return site_path - return site_run_path + return site_path else: return False @@ -1283,85 +1271,6 @@ def extractZone(self, domain_name): root = old_domain_name return root, zone - # 获取当前正在使用此证书的网站目录 - def getSslUsedSite(self, save_path): - pkey_file = '{}/privkey.pem'.format(save_path) - pkey = mw.readFile(pkey_file) - if not pkey: - return False - cert_paths = 'vhost/cert' - import panelSite - args = mw.dict_obj() - args.siteName = '' - for c_name in os.listdir(cert_paths): - skey_file = '{}/{}/privkey.pem'.format(cert_paths, c_name) - skey = mw.readFile(skey_file) - if not skey: - continue - if skey == pkey: - args.siteName = c_name - run_path = panelSite.panelSite().GetRunPath(args) - if not run_path: - continue - sitePath = mw.M('sites').where( - 'name=?', c_name).getField('path') - if not sitePath: - continue - to_path = "{}/{}".format(sitePath, run_path) - return to_path - return False - - def renewCertOther(self): - cert_path = "{}/vhost/cert".format(mw.getRunDir()) - if not os.path.exists(cert_path): - return - new_time = time.time() + (86400 * 30) - n = 0 - if not 'orders' in self.__config: - self.__config['orders'] = {} - import panelSite - siteObj = panelSite.panelSite() - args = mw.dict_obj() - for siteName in os.listdir(cert_path): - try: - cert_file = '{}/{}/fullchain.pem'.format(cert_path, siteName) - if not os.path.exists(cert_file): - continue # 无证书文件 - siteInfo = mw.M('sites').where('name=?', siteName).find() - if not siteInfo: - continue # 无网站信息 - cert_init = self.getCertInit(cert_file) - if not cert_init: - continue # 无法获取证书 - end_time = time.mktime(time.strptime( - cert_init['notAfter'], '%Y-%m-%d')) - if end_time > new_time: - continue # 未到期 - try: - if not cert_init['issuer'] in ['R3', "Let's Encrypt"] and cert_init['issuer'].find("Let's Encrypt") == -1: - continue # 非同品牌证书 - except: - continue - - if isinstance(cert_init['dns'], str): - cert_init['dns'] = [cert_init['dns']] - index = self.getIndex(cert_init['dns']) - if index in self.__config['orders'].keys(): - continue # 已在订单列表 - - n += 1 - writeLog( - "|-正在续签第 {} 张其它证书,域名: {}..".format(n, cert_init['subject'])) - writeLog("|-正在创建订单..") - args.id = siteInfo['id'] - runPath = siteObj.GetRunPath(args) - if runPath and not runPath in ['/']: - path = siteInfo['path'] + '/' + runPath - else: - path = siteInfo['path'] - except: - writeLog("|-[{}]续签失败".format(siteName)) - # 外部API - START ---------------------------------------------------------- def getHostConf(self, siteName): return mw.getServerDir() + '/web_conf/nginx/vhost/' + siteName + '.conf' @@ -1509,8 +1418,7 @@ def renewCert(self, index): # 已删除的网站直接跳过续签 if self.__config['orders'][i]['auth_to'].find('|') == -1 and self.__config['orders'][i]['auth_to'].find('/') != -1: if not os.path.exists(self.__config['orders'][i]['auth_to']): - auth_to = self.getSslUsedSite( - self.__config['orders'][i]['save_path']) + auth_to = self.__config['orders'][i]['auth_to'] if not auth_to: continue @@ -1549,9 +1457,6 @@ def renewCert(self, index): # 加入到续签订单 order_index.append(i) if not order_index: - writeLog("|-没有找到30天内到期的SSL证书,正在尝试去寻找其它可续签证书!") - # self.getApis() - # self.renewCertOther() writeLog("|-所有任务已处理完成!") return writeLog("|-共需要续签 {} 张证书".format(len(order_index))) diff --git a/class/core/cert_request.py b/class/core/cert_request.py index 9da8ace5f0..2a2ccc8d36 100644 --- a/class/core/cert_request.py +++ b/class/core/cert_request.py @@ -242,7 +242,7 @@ def getAccountKey(self): # 注册acme帐户 def register(self, existing=False): if not 'email' in self.__config: - self.__config['email'] = 'mdioks@163.com' + self.__config['email'] = 'xxxx.xxxx@gmail.com' if existing: payload = {"onlyReturnExisting": True} elif self.__config['email']: diff --git a/class/core/config_api.py b/class/core/config_api.py index 2a4d550033..dc1b2cde46 100755 --- a/class/core/config_api.py +++ b/class/core/config_api.py @@ -28,7 +28,7 @@ class config_api: - __version = '0.16.4' + __version = '0.16.5' __api_addr = 'data/api.json' # 统一默认配置文件 diff --git a/class/core/files_api.py b/class/core/files_api.py index 0260d023ff..3c88432011 100755 --- a/class/core/files_api.py +++ b/class/core/files_api.py @@ -161,15 +161,12 @@ def getDirApi(self): search = request.args.get('search', '').strip().lower() search_all = request.args.get('all', '').strip().lower() page = request.args.get('p', '1').strip().lower() - row = request.args.get('showRow', '10') - disk = request.form.get('disk', '') - if disk == 'True': - row = 1000 + row = request.args.get('row', '10') + order = request.form.get('order', '') - # return self.getAllDir(path, int(page), int(row), "wp-inlcude") if search_all == 'yes' and search != '': - return self.getAllDir(path, int(page), int(row), search) - return self.getDir(path, int(page), int(row), search) + return self.getAllDir(path, int(page), int(row), order, search) + return self.getDir(path, int(page), int(row), order, search) def createFileApi(self): file = request.form.get('path', '') @@ -948,16 +945,64 @@ def getCount(self, path, search): i += 1 return i - def getAllDir(self, path, page=1, page_size=10, search=None): + def getAllDir(self, path, page=1, page_size=10, order='', search=None): # print("search:", search) data = {} dirnames = [] filenames = [] + info = {} + + i = 0 + n = 0 count = 0 max_limit = 3000 + order_arr = order.split(' ') + if len(order_arr) < 2: + plist = mw.sortAllFileList(path, order_arr[0],'',search, max_limit) + else: + plist = mw.sortAllFileList(path, order_arr[0], order_arr[1], search,max_limit) + + info['count'] = len(plist) + info['row'] = page_size + info['p'] = page + info['tojs'] = 'getFiles' + pageObj = mw.getPageObject(info, '1,2,3,4,5,6,7,8') + data['PAGE'] = pageObj[0] + + for dst_file in plist: + + if not os.path.exists(dst_file): + continue + + i += 1 + if n >= pageObj[1].ROW: + break + if i < pageObj[1].SHIFT: + continue + + if os.path.isdir(dst_file): + dirnames.append(self.__get_stats(dst_file, path)) + else: + filenames.append(self.__get_stats(dst_file, path)) + n += 1 + + data['DIR'] = dirnames + data['FILES'] = filenames + data['PATH'] = path.replace('//', '/') + + return mw.getJson(data) + + #备份 + def getAllDirBk(self, path, page=1, page_size=10, order='', search=None): + data = {} + dirnames = [] + filenames = [] + count = 0 + max_limit = 3000 for d_list in os.walk(path): + if count >= max_limit: break @@ -996,7 +1041,7 @@ def getAllDir(self, path, page=1, page_size=10, search=None): return mw.getJson(data) - def getDir(self, path, page=1, page_size=10, search=None): + def getDir(self, path, page=1, page_size=10, order = '', search=None): data = {} dirnames = [] filenames = [] @@ -1011,7 +1056,14 @@ def getDir(self, path, page=1, page_size=10, search=None): i = 0 n = 0 - for filename in os.listdir(path): + + order_arr = order.split(' ') + if len(order_arr) < 2: + plist = mw.sortFileList(path, order_arr[0],'') + else: + plist = mw.sortFileList(path, order_arr[0],order_arr[1]) + + for filename in plist: if search: if filename.lower().find(search) == -1: continue @@ -1033,8 +1085,8 @@ def getDir(self, path, page=1, page_size=10, search=None): n += 1 except Exception as e: continue - data['DIR'] = sorted(dirnames) - data['FILES'] = sorted(filenames) + data['DIR'] = dirnames + data['FILES'] = filenames data['PATH'] = path.replace('//', '/') return mw.getJson(data) @@ -1067,6 +1119,7 @@ def getExecShellMsgApi(self): return mw.returnJson(status, mw.getNumLines(fileName, 200)) def __get_stats(self, filename, path=None): + # print(filename,path) filename = filename.replace('//', '/') try: stat = os.stat(filename) diff --git a/class/core/mw.py b/class/core/mw.py index 4d12d2f256..d06be15d28 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -1598,6 +1598,63 @@ def checkCert(certPath='ssl/certificate.pem'): return True +def sortFileList(path, ftype = 'mtime', sort = 'desc'): + flist = os.listdir(path) + if ftype == 'mtime': + if sort == 'desc': + flist = sorted(flist, key=lambda f: os.path.getmtime(os.path.join(path,f)), reverse=True) + if sort == 'asc': + flist = sorted(flist, key=lambda f: os.path.getmtime(os.path.join(path,f)), reverse=False) + + if ftype == 'size': + if sort == 'desc': + flist = sorted(flist, key=lambda f: os.path.getsize(os.path.join(path,f)), reverse=True) + if sort == 'asc': + flist = sorted(flist, key=lambda f: os.path.getsize(os.path.join(path,f)), reverse=False) + return flist + + +def sortAllFileList(path, ftype = 'mtime', sort = 'desc', search = '',limit = 3000): + count = 0 + flist = [] + for d_list in os.walk(path): + if count >= limit: + break + + for d in d_list[1]: + if count >= limit: + break + if d.lower().find(search) != -1: + filename = d_list[0] + '/' + d + if not os.path.exists(filename): + continue + count += 1 + flist.append(filename) + + for f in d_list[2]: + if count >= limit: + break + + if f.lower().find(search) != -1: + filename = d_list[0] + '/' + f + if not os.path.exists(filename): + continue + count += 1 + flist.append(filename) + + if ftype == 'mtime': + if sort == 'desc': + flist = sorted(flist, key=lambda f: os.path.getmtime(f), reverse=True) + if sort == 'asc': + flist = sorted(flist, key=lambda f: os.path.getmtime(f), reverse=False) + + if ftype == 'size': + if sort == 'desc': + flist = sorted(flist, key=lambda f: os.path.getsize(f), reverse=True) + if sort == 'asc': + flist = sorted(flist, key=lambda f: os.path.getsize(f), reverse=False) + return flist + def getPathSize(path): # 取文件或目录大小 if not os.path.exists(path): diff --git a/plugins/mariadb/versions/10.11/install.sh b/plugins/mariadb/versions/10.11/install.sh index 268a58f5a1..87e990cecc 100755 --- a/plugins/mariadb/versions/10.11/install.sh +++ b/plugins/mariadb/versions/10.11/install.sh @@ -14,7 +14,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=10.11.6 +MY_VER=10.11.7 Install_app() { diff --git a/plugins/mariadb/versions/10.6/install.sh b/plugins/mariadb/versions/10.6/install.sh index 585928bd19..9a49f246ed 100755 --- a/plugins/mariadb/versions/10.6/install.sh +++ b/plugins/mariadb/versions/10.6/install.sh @@ -13,7 +13,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=10.6.16 +MY_VER=10.6.17 Install_app() { diff --git a/plugins/mariadb/versions/11.0/install.sh b/plugins/mariadb/versions/11.0/install.sh index 2564badba6..da388b57d3 100755 --- a/plugins/mariadb/versions/11.0/install.sh +++ b/plugins/mariadb/versions/11.0/install.sh @@ -14,7 +14,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=11.0.4 +MY_VER=11.0.5 Install_app() { diff --git a/plugins/mariadb/versions/11.1/install.sh b/plugins/mariadb/versions/11.1/install.sh index 5c5bdc7d4a..b0e40cb0d3 100755 --- a/plugins/mariadb/versions/11.1/install.sh +++ b/plugins/mariadb/versions/11.1/install.sh @@ -14,7 +14,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=11.1.3 +MY_VER=11.1.4 Install_app() { diff --git a/plugins/mariadb/versions/11.2/install.sh b/plugins/mariadb/versions/11.2/install.sh index f9c505ffa7..9ab49f167a 100755 --- a/plugins/mariadb/versions/11.2/install.sh +++ b/plugins/mariadb/versions/11.2/install.sh @@ -14,7 +14,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=11.2.2 +MY_VER=11.2.3 Install_app() { diff --git a/plugins/mariadb/versions/11.3/install.sh b/plugins/mariadb/versions/11.3/install.sh index f8fa5cfba7..6e32205e2e 100755 --- a/plugins/mariadb/versions/11.3/install.sh +++ b/plugins/mariadb/versions/11.3/install.sh @@ -14,7 +14,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mariadbDir=${serverPath}/source/mariadb -MY_VER=11.3.1 +MY_VER=11.3.2 Install_app() { diff --git a/plugins/openresty/info.json b/plugins/openresty/info.json index 2693505e94..43081102c1 100755 --- a/plugins/openresty/info.json +++ b/plugins/openresty/info.json @@ -8,7 +8,7 @@ "install_pre_inspection":true, "checks":"server/openresty", "path":"server/openresty", - "author":"agentzh", + "author":"nginx/agentzh", "home":"http://openresty.org", "date":"2017-11-24", "pid": "1", diff --git a/plugins/php/versions/common/zip.sh b/plugins/php/versions/common/zip.sh index b346d6766d..ce0238147b 100755 --- a/plugins/php/versions/common/zip.sh +++ b/plugins/php/versions/common/zip.sh @@ -20,7 +20,7 @@ LIBNAME=zip LIBV=0 -if [ "$version" -lt "73" ];then +if [ "$version" -lt "72" ];then echo "not need" exit 1 fi diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index e40851390c..8b5c5f2b7d 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -724,6 +724,7 @@ { "name": "zip", "versions": [ + "72", "83" ], "type": "压缩", diff --git a/plugins/webstats/conf/config.json b/plugins/webstats/conf/config.json index 7e8e00f163..b897a91af8 100644 --- a/plugins/webstats/conf/config.json +++ b/plugins/webstats/conf/config.json @@ -1,7 +1,7 @@ { "global": { "monitor": true, - "save_day": 180, + "save_day": 1, "autorefresh": false, "refresh_interval": 3, "cdn": true, diff --git a/route/static/app/files.js b/route/static/app/files.js index 415502ac8c..9586893589 100755 --- a/route/static/app/files.js +++ b/route/static/app/files.js @@ -26,15 +26,15 @@ function recycleBin(type){ if(shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; if(shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; body += '\ - '+shortwebname+'\ - '+shortpath+'\ - '+toSize(rdata.dirs[i].size)+'\ - '+getLocalTime(rdata.dirs[i].time)+'\ - \ - '+lan.files.recycle_bin_re+'\ - | '+lan.files.recycle_bin_del+'\ - \ - ' + '+shortwebname+'\ + '+shortpath+'\ + '+toSize(rdata.dirs[i].size)+'\ + '+getLocalTime(rdata.dirs[i].time)+'\ + \ + '+lan.files.recycle_bin_re+'\ + | '+lan.files.recycle_bin_del+'\ + \ + '; } for(var i=0;i 20) shortwebname = shortwebname.substring(0, 20) + "..."; if(shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; body += '\ - '+shortwebname.replace('BTDB_','')+'\ - mysql://'+shortpath.replace('BTDB_','')+'\ - -\ - '+getLocalTime(rdata.files[i].time)+'\ - \ - '+lan.files.recycle_bin_re+'\ - | '+lan.files.recycle_bin_del+'\ - \ - ' + '+shortwebname.replace('BTDB_','')+'\ + mysql://'+shortpath.replace('BTDB_','')+'\ + -\ + '+getLocalTime(rdata.files[i].time)+'\ + \ + '+lan.files.recycle_bin_re+'\ + | '+lan.files.recycle_bin_del+'\ + \ + '; continue; } @@ -80,15 +80,15 @@ function recycleBin(type){ if(shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; if(shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; body += '\ - '+shortwebname+'\ - '+shortpath+'\ - '+toSize(rdata.dirs[i].size)+'\ - '+getLocalTime(rdata.dirs[i].time)+'\ - \ - '+lan.files.recycle_bin_re+'\ - | '+lan.files.recycle_bin_del+'\ - \ - ' + '+shortwebname+'\ + '+shortpath+'\ + '+toSize(rdata.dirs[i].size)+'\ + '+getLocalTime(rdata.dirs[i].time)+'\ + \ + '+lan.files.recycle_bin_re+'\ + | '+lan.files.recycle_bin_del+'\ + \ + ' } $("#RecycleBody").html(body); return; @@ -101,15 +101,15 @@ function recycleBin(type){ if(shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; if(shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; body += '\ - '+shortwebname+'\ - '+shortpath+'\ - '+toSize(rdata.files[i].size)+'\ - '+getLocalTime(rdata.files[i].time)+'\ - \ - '+lan.files.recycle_bin_re+'\ - | '+lan.files.recycle_bin_del+'\ - \ - ' + '+shortwebname+'\ + '+shortpath+'\ + '+toSize(rdata.files[i].size)+'\ + '+getLocalTime(rdata.files[i].time)+'\ + \ + '+lan.files.recycle_bin_re+'\ + | '+lan.files.recycle_bin_del+'\ + \ + '; } $("#RecycleBody").html(body); return; @@ -122,15 +122,15 @@ function recycleBin(type){ if(shortwebname.length > 20) shortwebname = shortwebname.substring(0, 20) + "..."; if(shortpath.length > 20) shortpath = shortpath.substring(0, 20) + "..."; body += '\ - '+shortwebname+'\ - '+shortpath+'\ - '+toSize(rdata.files[i].size)+'\ - '+getLocalTime(rdata.files[i].time)+'\ - \ - '+lan.files.recycle_bin_re+'\ - | '+lan.files.recycle_bin_del+'\ - \ - ' + '+shortwebname+'\ + '+shortpath+'\ + '+toSize(rdata.files[i].size)+'\ + '+getLocalTime(rdata.files[i].time)+'\ + \ + '+lan.files.recycle_bin_re+'\ + | '+lan.files.recycle_bin_del+'\ + \ + '; } } $("#RecycleBody").html(body); @@ -222,6 +222,7 @@ function getFileName(name){ text = text[n]; return text; } + //判断图片文件 function reisImage(fileName){ var exts = ['jpg','jpeg','png','bmp','gif','tiff','ico']; @@ -328,87 +329,142 @@ function searchFile(p){ getFiles(p); } +//处理排序 +function listFileOrder(skey, obj){ + var or = getCookie('file_order'); + var orderType = 'desc'; + if(or){ + var or_arr = or.split('|'); + if(or.split('|')[1] == 'desc'){ + orderType = 'asc'; + } else if (or_arr[1] == 'asc'){ + orderType = 'none'; + } else { + orderType = 'desc'; + } + } + setCookie('file_order',skey + '|' + orderType); + getFiles(1); + // console.log(obj,orderType); + // if(orderType == 'desc'){ + // $(obj).find(".glyphicon-triangle-top").remove(); + // $(obj).append(""); + // } else { + // $(obj).find(".glyphicon-triangle-bottom").remove(); + // $(obj).append(""); + // } +} + +function makeFilePage(showRow, page = ''){ + var rows = ['10','50','100','200','500','1000','2000']; + var rowOption = ''; + for(var i=0;i'+rows[i]+''; + } + + //分页 + $("#filePage").html(page); + $("#filePage div").append("每页"); + $("#filePage .Pcount").css("left","16px"); +} + //取数据 function getFiles(Path) { - var searchtype = Path; if(isNaN(Path)){ var p = 1; - Path = encodeURIComponent(Path); } else { var p = Path; Path = getCookie('open_dir_path'); - Path = encodeURIComponent(Path); - } - - var search = ''; - var searchV = $("#SearchValue").val(); - if(searchV.length > 1 && searchtype == '1'){ - search = "&search="+searchV; } - var showRow = getCookie('showRow'); - if(!showRow) { - showRow = '100'; + + var args = {}; + args['p'] = p; + var post = {}; + post['path'] = Path; + + + var file_row = $.cookie('file_row'); + if(!file_row) { + file_row = '100'; + args['row'] = file_row; } + var body = ''; - var data = 'path=' + Path; var totalSize = 0; + var search = ''; + var search_file = $("#search_file").val(); + + if(search_file.length > 0){ + args['search'] = search_file; + } + var search_all = ''; var all = $('#search_all').hasClass('active'); if(all){ - search_all = "&all=yes"; + args['all'] = 'yes'; } + var file_order = $.cookie('file_order'); + if (file_order){ + post['order'] = file_order.replace('|',' '); + } + + var query_str = toUrlParam(args); + var loadT = layer.load(); - $.post('/files/get_dir?p=' + p + '&showRow=' + showRow + search + search_all, data, function(rdata) { + $.post('/files/get_dir?' + query_str, post, function(rdata) { layer.close(loadT); - var rows = ['10','50','100','200','500','1000','2000']; - var rowOption = ''; - for(var i=0;i'+rows[i]+''; + //构建分页 + makeFilePage(file_row,rdata.PAGE); + + if(rdata.DIR == null) { + rdata.DIR = []; } - - $("#filePage").html(rdata.PAGE); - $("#filePage div").append("每页"); - $("#filePage .Pcount").css("left","16px"); - if(rdata.DIR == null) rdata.DIR = []; + for (var i = 0; i < rdata.DIR.length; i++) { + var fmp = rdata.DIR[i].split(";"); var cnametext =fmp[0] + fmp[5]; + fmp[0] = fmp[0].replace(/'/, "\\'"); if(cnametext.length>20){ cnametext = cnametext.substring(0,20) + '...'; } + if(isChineseChar(cnametext)){ if(cnametext.length>10){ cnametext = cnametext.substring(0,10) + '...'; } } + var timetext ='--'; if(getCookie('rank') == 'a'){ - $("#set_list").addClass("active"); - $("#set_icon").removeClass("active"); - body += "\ - \ - \ - " + cnametext + "\ - "+toSize(fmp[1])+"\ - "+getLocalTime(fmp[2])+"\ - "+fmp[3]+"\ - "+fmp[4]+"\ - \ - 复制 | \ - 剪切 | \ - 重命名 | \ - 权限 | \ - 压缩 | \ - 删除\ - \ - "; + //列表展示 + $("#set_list").addClass("active"); + $("#set_icon").removeClass("active"); + body += "\ + \ + \ + " + cnametext + "\ + "+toSize(fmp[1])+"\ + "+getLocalTime(fmp[2])+"\ + "+fmp[3]+"\ + "+fmp[4]+"\ + \ + 复制 | \ + 剪切 | \ + 重命名 | \ + 权限 | \ + 压缩 | \ + 删除\ + \ + "; } else { + //图标展示 $("#set_icon").addClass("active"); $("#set_list").removeClass("active"); body += "