diff --git a/app/command/CleanViteJs.php b/app/command/CleanViteJs.php index 961e164..b356113 100644 --- a/app/command/CleanViteJs.php +++ b/app/command/CleanViteJs.php @@ -67,7 +67,7 @@ class CleanViteJs extends Command $end = $start + strlen($code); for($i=$start;$i>=0;$i--){ $char = substr($content,$i,1); - if(!ctype_alpha($char)){ + if(!ctype_alpha($char)&&$char!='_'){ $start = $i+1; break; } @@ -108,18 +108,20 @@ class CleanViteJs extends Command if(strpos($file, 'window.location.protocol.indexOf("https")>=0')!==false){ //index $file = str_replace('(window.location.protocol.indexOf("https")>=0)', '1', $file); - $file = preg_replace('!setTimeout\(\(\(\)=>\{\w+\(\)\}\),3e3\)!', '', $file); - $file = preg_replace('!setTimeout\(\(function\(\)\{\w+\(\)\}\),3e3\)!', '', $file); - $file = preg_replace('!recommendShow:\w+,!', 'recommendShow:!1,', $file); - $code = $this->getExtendCode($file, '"需求反馈"', 2); + $code = $this->getExtendCode($file, 'isGetCoupon:', 2); if($code){ $file = str_replace($code, '{}', $file); } + $file = preg_replace('!recommendShow:\w+,!', 'recommendShow:!1,', $file, 1); + $code = $this->getExtendCode($file, '"需求反馈"', 1, '[', ']'); + if($code){ + $file = str_replace($code, '[]', $file); + } $flag = true; } - if(strpos($file, '"WechatOfficial"')!==false){ //main - $code = $this->getExtendCode($file, '"WechatOfficial"', 5); + if(strpos($file, '售后QQ群:')!==false){ //main + $code = $this->getExtendCode($file, '"微信公众号"', 1); $code = $this->getExtendFunction($file, $code); $start = strpos($file, $code) - 1; for($i=$start;$i>=0;$i--){ @@ -129,36 +131,43 @@ class CleanViteJs extends Command } } $code = $this->getExtendCode($file, '"/other/customer-service.png"', 2); - $code = $this->getExtendCode($file, $code, 2, '[', ']'); + $code = $this->getExtendFunction($file, $code); $end = strpos($file, $code)+strlen($code); - $code = substr($file, $start, $end - $start + 1); + $code = substr($file, $start, $end - $start); $file = str_replace($code, '', $file); - $file = str_replace('startNegotiate(),', '', $file); $flag = true; } - - if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2 - $file = preg_replace('!,isCalc:\w+,isInput:\w+,!', ',isCalc:!1,isInput:!1,', $file); - $file = preg_replace('!"calc"===\w+\.type!', '!1', $file); - $file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file); - $file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file); + + if(strpos($file, 'useNegotiate')!==false){ //utils + $code = $this->getExtendCode($file, 'createPeerConnection()', 1); + if($code){ + $file = str_replace($code, '{}', $file); + } + $file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.\w+\.type\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.\w+\.type\}\)\)!', '!1', $file); + $file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.\w+\.type\}\)\)!', '!1', $file); $flag = true; } if(strpos($file, '请冷静几秒钟,确认以下要删除的数据')!==false && strpos($file, '"计算结果:"')!==false){ //site - $code = $this->getExtendCode($file, '"计算结果:"', 2, '[', ']'); + $code = $this->getExtendCode($file, '"计算结果:"', 1, '[', ']'); $code = $this->getExtendFunction($file, $code); $file = str_replace($code, '', $file); $file = preg_replace('!\w+\.sum===\w+\.addend1\+\w+\.addend2!', '!0', $file); - $file = preg_replace('!\w+\.sum\!==\w+\.addend1\+\w+\.addend2!', '!1', $file); - $file = preg_replace('!,disableDeleteButton:\w+,countdown:\w+,!', ',disableDeleteButton:!1,countdown:!1,', $file); - if(preg_match('/startCountdown:(\w+),/', $file, $matchs)){ - $file = str_replace([';'.$matchs[1].'()', $matchs[1].'(),'], '', $file); - } + $file = preg_replace('!value=\!0,(\w+)\.value=5;!', 'value=!1,$1.value=0;', $file); $flag = true; } - if(strpos($file, 'svgtofont-left-waf')!==false){ //site.table + if(strpos($file, '"left-waf"')!==false && strpos($file, '"iconWaf"')!==false){ //site.table + $code = $this->getExtendCode($file, '"left-waf"'); + $code = $this->getExtendCode($file, $code, 1, '[', ']'); + $code = $this->getExtendFunction($file, $code); + $file = str_replace($code, '""', $file); + $flag = true; + } + + if(strpos($file, 'svgtofont-left-waf')!==false && strpos($file, '"iconWaf"')!==false){ //site.table $code = $this->getExtendCode($file, 'svgtofont-left-waf'); $code = $this->getExtendCode($file, $code, 1, '[', ']'); $code = $this->getExtendFunction($file, $code); @@ -169,11 +178,19 @@ class CleanViteJs extends Command if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl $code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}'); $file = str_replace($code, '', $file); - $code = $this->getExtendFunction($file, '"测试证书"', '{', '}'); + $code = $this->getExtendFunction($file, '"宝塔证书"', '{', '}'); $file = str_replace($code, '', $file); - $file = str_replace('"currentCertInfo":"busSslList"', '"currentCertInfo":"currentCertInfo"', $file); - $file = preg_replace('!\{(\w+)\.value="busSslList",\w+\(\)\}!', '{$1.value="letsEncryptList"}', $file); - $file = preg_replace('!defaultActive:(\w+)\("sslCertificate"\)!', 'defaultActive:$1("EncryptCertificate")', $file); + $code = $this->getExtendCode($file, '"购买商业证书"', 2); + if($code){ + $code2 = str_replace('"busSslList"', '"letsEncryptList"', $code); + $code2 = str_replace($this->getExtendFunction($code, '"购买商业证书"'), '', $code2); + $file = str_replace($code, $code2, $file); + } + $file = preg_replace('!(\w+)\("sslCertificate"\)!', '$1("EncryptCertificate")', $file); + $flag = true; + } + if(strpos($file, '"busSslList"')!==false && strpos($filepath, '/useStore')){ //site-ssl + $file = str_replace('"busSslList"', '"currentCertInfo"', $file); $flag = true; } @@ -185,50 +202,36 @@ class CleanViteJs extends Command } if(strpos($file, '"recom-view"')!==false){ //soft - $code = $this->getExtendFunction($file, '"recom-view"'); - $file = str_replace($code, 'void(0)', $file); + $code = $this->getExtendCode($file, '"recom-view"'); + $code = $this->getExtendFunction($file, $code); + $file = str_replace($code, '', $file); $flag = true; } if(strpos($file, '"打开插件文件目录"')!==false){ //soft.table - $code = $this->getExtendFunction($file, '"(续费)"'); - $file = str_replace($code, '""', $file); $code = $this->getExtendFunction($file, '"(续费)"'); $file = str_replace($code, '""', $file); $flag = true; } - if(strpos($file, '检测到同名文件')!==false){ //file. - $code = $this->getExtendCode($file, '计算结果:', 3, '[', ']'); - $code = $this->getExtendFunction($file, $code); - $file = str_replace($code, '', $file); - $file = preg_replace('!\w+\.sum===\w+\.addend1\+\w+\.addend2!', '!0', $file); - $flag = true; - } - for($i=0;$i<5;$i++){ - $code = $this->getExtendCode($file, 'content:"需求反馈"', 2); + $code = $this->getExtendCode($file, ',"需求反馈"', 1, '[', ']'); if($code){ - $code = $this->getExtendFunction($file, $code); - $start = strpos($file, $code); - if(substr($file,$start-1,1) == ':'){ - $file = $this->str_replace_once($code, '{}', $file); - }else{ - $file = $this->str_replace_once($code, '', $file); - } + $file = str_replace($code, '[]', $file); $flag = true; } } - $code = $this->getExtendFunction($file, '("需求反馈")'); + $code = $this->getExtendCode($file, '("需求反馈")', 1, '[', ']'); if($code){ - $file = str_replace($code, '', $file); + $file = str_replace($code, '[]', $file); $flag = true; } - $code = $this->getExtendFunction($file, '(" 需求反馈 ")'); - if($code){ - $file = str_replace($code, '', $file); + $code = $this->getExtendCode($file, '(" 需求反馈 ")', 1, '[', ']'); + if($code && strpos($filepath, 'vue_vue_type_') === false){ + $file = str_replace($code, '[]', $file); $flag = true; } + if(strpos('暂无搜索结果,提交需求反馈', $file)!==false){ $file = str_replace('暂无搜索结果,提交需求反馈', '暂无搜索结果', $file); $flag = true; diff --git a/app/script/convert.sh b/app/script/convert.sh index 6d909f2..261dcdc 100644 --- a/app/script/convert.sh +++ b/app/script/convert.sh @@ -1,7 +1,7 @@ #!/bin/bash -Linux_Version="9.2.0" -Windows_Version="8.2.0" +Linux_Version="9.3.0" +Windows_Version="8.2.1" Btm_Version="2.3.0" FILES=( diff --git a/install.sql b/install.sql index 1eac1db..14af54f 100644 --- a/install.sql +++ b/install.sql @@ -12,12 +12,12 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES ('bt_key', ''), ('whitelist', '0'), ('download_page', '1'), -('new_version', '9.2.0'), +('new_version', '9.3.0'), ('update_msg', '暂无更新日志'), -('update_date', '2024-09-13'), -('new_version_win', '8.1.0'), +('update_date', '2024-12-06'), +('new_version_win', '8.2.1'), ('update_msg_win', '暂无更新日志'), -('update_date_win', '2024-07-17'), +('update_date_win', '2024-12-06'), ('new_version_btm', '2.3.0'), ('update_msg_btm', '暂无更新日志'), ('update_date_btm', '2024-04-24'), diff --git a/public/install/install_6.0.sh b/public/install/install_6.0.sh index 8aa70fd..ea899c5 100644 --- a/public/install/install_6.0.sh +++ b/public/install/install_6.0.sh @@ -483,7 +483,7 @@ Install_RPM_Pack(){ sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config #yum remove -y python-requests python3-requests python-greenlet python3-greenlet - yumPacks="libcurl-devel wget tar gcc make zip unzip openssl openssl-devel gcc libxml2 libxml2-devel libxslt* zlib zlib-devel libjpeg-devel libpng-devel libwebp libwebp-devel freetype freetype-devel lsof pcre pcre-devel vixie-cron crontabs icu libicu-devel c-ares libffi-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel qrencode" + yumPacks="libcurl-devel wget tar gcc make zip unzip openssl openssl-devel gcc libxml2 libxml2-devel libxslt* zlib zlib-devel libjpeg-devel libpng-devel libwebp libwebp-devel freetype freetype-devel lsof pcre pcre-devel vixie-cron crontabs icu libicu-devel c-ares libffi-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel qrencode at mariadb rsyslog net-tools" yum install -y ${yumPacks} for yumPack in ${yumPacks} @@ -537,7 +537,7 @@ Install_Deb_Pack(){ apt-get install curl -y fi - debPacks="wget curl libcurl4-openssl-dev gcc make zip unzip tar openssl libssl-dev gcc libxml2 libxml2-dev zlib1g zlib1g-dev libjpeg-dev libpng-dev lsof libpcre3 libpcre3-dev cron net-tools swig build-essential libffi-dev libbz2-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils git qrencode sqlite3"; + debPacks="wget curl libcurl4-openssl-dev gcc make zip unzip tar openssl libssl-dev gcc libxml2 libxml2-dev zlib1g zlib1g-dev libjpeg-dev libpng-dev lsof libpcre3 libpcre3-dev cron net-tools swig build-essential libffi-dev libbz2-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils git qrencode sqlite3 at mariadb-client rsyslog net-tools"; apt-get install -y $debPacks --force-yes for debPack in ${debPacks} diff --git a/public/install/src/panel6.zip b/public/install/src/panel6.zip index d5bcd1f..70ec706 100644 Binary files a/public/install/src/panel6.zip and b/public/install/src/panel6.zip differ diff --git a/public/install/update/LinuxPanel-9.2.0.zip b/public/install/update/LinuxPanel-9.3.0.zip similarity index 66% rename from public/install/update/LinuxPanel-9.2.0.zip rename to public/install/update/LinuxPanel-9.3.0.zip index 38fe3b5..1593c70 100644 Binary files a/public/install/update/LinuxPanel-9.2.0.zip and b/public/install/update/LinuxPanel-9.3.0.zip differ diff --git a/public/install/update6.sh b/public/install/update6.sh index 0b2fbec..87620e6 100644 --- a/public/install/update6.sh +++ b/public/install/update6.sh @@ -103,7 +103,7 @@ fi setup_path=/www version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version) if [ -z "$VERSION_CHECK" ];then - version='9.2.0' + version='9.3.0' fi armCheck=$(uname -m|grep arm) if [ "${armCheck}" ];then @@ -136,6 +136,33 @@ rm -f /www/server/panel/class/*.pyc #pip install flask_sqlalchemy #pip install itsdangerous==0.24 +if [ -f "/www/server/panel/pyenv/bin/pip3" ];then + btpip_path="/www/server/panel/pyenv/bin/pip3" + FlaskV=$($btpip_path list 2>/dev/null|grep "Flask " |awk '{print $2}'|cut -f 1 -d .) + piplist_count=$($btpip_path list 2>/dev/null|wc -l) + if [ "${FlaskV}" -le "2" ] && [ "${piplist_count}" -le "118" ];then + echo "检测到面板运行环境过老,正常尝试修复面板依赖" + pyenv_path="/www/server/panel" + wget -O $pyenv_path/pyenv/pip.txt $download_Url/install/pyenv/pip-3.7.16.txt -T 5 + $pyenv_path/pyenv/bin/pip install -U pip + $pyenv_path/pyenv/bin/pip install -U setuptools==65.5.0 + $pyenv_path/pyenv/bin/pip install -U wheel==0.34.2 + $pyenv_path/pyenv/bin/pip install -r $pyenv_path/pyenv/pip.txt + echo "依赖修复完成,如面板仍无法正常访问,请联系宝塔官方人员进行求助" + fi + + #wget -O pip-packs.txt $download_Url/install/pyenv/pip-packs.txt + #PIP_PACKS=$(cat pip-packs.txt) + #for P_PACK in ${PIP_PACKS}; + #do + # btpip show ${P_PACK} > /dev/null 2>&1 + # if [ "$?" == "1" ];then + # btpip install ${P_PACK} + # fi + #done +fi + + pip_list=$($mypip list 2>&1) request_v=$(btpip list 2>/dev/null|grep "requests "|awk '{print $2}'|cut -d '.' -f 2) if [ "$request_v" = "" ] || [ "${request_v}" -gt "28" ];then diff --git a/public/win/panel/panel_8.2.0.zip b/public/win/panel/panel_8.2.1.zip similarity index 96% rename from public/win/panel/panel_8.2.0.zip rename to public/win/panel/panel_8.2.1.zip index aaa7869..05d4cf6 100644 Binary files a/public/win/panel/panel_8.2.0.zip and b/public/win/panel/panel_8.2.1.zip differ diff --git a/wiki/files/linux/bt.js b/wiki/files/linux/bt.js index 6437730..37af3d2 100644 --- a/wiki/files/linux/bt.js +++ b/wiki/files/linux/bt.js @@ -88,396 +88,23 @@ if("undefined" != typeof bt && bt.hasOwnProperty("input_confirm")){ }); } } -if("undefined" != typeof database && database.hasOwnProperty("del_database")){ - database.del_database = function (wid, dbname, obj, callback) { - var is_db_type = false, del_data = [] - if (typeof wid === 'object') { - del_data = wid - is_db_type = wid.some(function (item) { - return item.db_type > 0 - }) - var ids = []; - for (var i = 0; i < wid.length; i++) { - ids.push(wid[i].id); - } - wid = ids - } - var type = $('.database-pos .tabs-item.active').data('type'), - title = '', - tips = ''; - title = typeof dbname === "function" ? '批量删除数据库' : '删除数据库 - [ ' + dbname + ' ]'; - tips = is_db_type || !recycle_bin_db_open || type !== 'mysql' ? '当前列表存在彻底删除后无法恢复的数据库,请仔细查看列表,以防误删,是否继续操作?' : '当前列表数据库将迁移至数据库回收站,如需彻底删除请前往数据库回收站,是否继续操作?' - var arrs = wid instanceof Array ? wid : [wid] - var ids = JSON.stringify(arrs), - countDown = 9; - if (arrs.length == 1) countDown = 4 - var loadT = bt.load('正在检测数据库数据信息,请稍候...'), - param = { url: 'database/' + bt.data.db_tab_name + '/check_del_data', data: { data: JSON.stringify({ ids: ids }) } } - if (bt.data.db_tab_name == 'mysql') param = { url: 'database?action=check_del_data', data: { ids: ids } } - bt_tools.send(param, function (res) { - loadT.close() - layer.open({ - type: 1, - title: title, - area: '740px', - skin: 'verify_site_layer_info', - closeBtn: 2, - shadeClose: true, - content: '
" + h + "
" + f + "" + h + "
" + f + "