diff --git a/src/admin/archives_do.php b/src/admin/archives_do.php index 0107ac8e..643ba2aa 100644 --- a/src/admin/archives_do.php +++ b/src/admin/archives_do.php @@ -113,8 +113,8 @@ else if ($dopost == "viewArchives") { $arcRow['money'], $arcRow['filename'] ); - if (preg_match("#^http:#", $arcfile)) { - $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); + if (preg_match("#^https?://#", $arcfile)) { + $arcfile = preg_replace("#^https?://[^/]+/#i", '/', $arcfile); } $truefile = GetTruePath().$arcfile; if (!file_exists($truefile)) { diff --git a/src/admin/dialog/select_images_post.php b/src/admin/dialog/select_images_post.php index b7e5bb14..21e2ea49 100644 --- a/src/admin/dialog/select_images_post.php +++ b/src/admin/dialog/select_images_post.php @@ -86,7 +86,11 @@ $fid = $dsql->GetLastID(); AddMyAddon($fid, $activepath.'/'.$filename); $CKUpload = isset($CKUpload) ? $CKUpload : FALSE; if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { - $fileurl = $activepath.'/'.$filename; + if ($GLOBALS['cfg_multi_site'] == 'Y') { + $fileurl = $GLOBALS['cfg_mainsite'].$activepath.'/'.$filename; + } else { + $fileurl = $activepath.'/'.$filename; + } $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); echo json_encode($result); exit; diff --git a/src/admin/inc/inc_archives_functions.php b/src/admin/inc/inc_archives_functions.php index a566d257..164085d4 100644 --- a/src/admin/inc/inc_archives_functions.php +++ b/src/admin/inc/inc_archives_functions.php @@ -44,7 +44,7 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) foreach ($img_array as $key => $value) { $value = trim($value); if ( - preg_match("#".$basehost."#i", $value) || !preg_match("#^http:\/\/#i", $value) || ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value))) { + preg_match("#".$basehost."#i", $value) || !preg_match("#^(http|https):\/\/#i", $value) || ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value))) { continue; } $itype = substr($value, -4, 4); diff --git a/src/admin/member_do.php b/src/admin/member_do.php index 0250b2d3..8f666754 100644 --- a/src/admin/member_do.php +++ b/src/admin/member_do.php @@ -37,8 +37,6 @@ if ($dopost == "delmember") { if ($rs > 0) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid='$id' LIMIT 1"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='$id' LIMIT 1"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='$id' LIMIT 1"); //删除会员相关数据 $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); @@ -83,8 +81,6 @@ if ($dopost == "delmember") { if ($rs > 0) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); //删除会员相关数据 $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); diff --git a/src/admin/sys_admin_user_add.php b/src/admin/sys_admin_user_add.php index 1d1464cc..b778ce8f 100644 --- a/src/admin/sys_admin_user_add.php +++ b/src/admin/sys_admin_user_add.php @@ -55,13 +55,10 @@ if ($dopost == 'add') { $inquery = "INSERT INTO `#@__admin`(id,usertype,userid,$pfd,uname,typeid,tname,email) VALUES ('$mid','$usertype','$userid','$pwd','$uname','$typeid','$tname','$email'); "; $rs = $dsql->ExecuteNoneQuery($inquery); - $adminquery = "INSERT INTO `#@__member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`,`income`,`education`,`height`,`bodytype`,`blood`,`vocation`,`smoke`,`marital`,`house`,`drink`,`datingtype`,`language`,`nature`,`lovemsg`,`address`,`uptime`) - VALUES ('$mid', '1', '男', '{$userid}', '', '', '', '', '0', '0','1980-01-01', '1', '0', '0', '160', '0', '0', '0', '0', '0', '0','0', '0', '', '', '', '','0'); "; - $dsql->ExecuteNoneQuery($adminquery); $adminquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) VALUES ('$mid','0','0','0','0','0','0','0','0'); "; $dsql->ExecuteNoneQuery($adminquery); - $adminquery = "Insert Into `#@__member_space` (`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`) + $adminquery = "INSERT INTO `#@__member_space` (`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`) VALUES ('$mid','10','0','{$uname}的主页','','person','',''); "; $dsql->ExecuteNoneQuery($adminquery); ShowMsg('成功添加一个账户', 'sys_admin_user.php'); diff --git a/src/admin/templets/ad_main.htm b/src/admin/templets/ad_main.htm index 63eba918..7d9d28aa 100644 --- a/src/admin/templets/ad_main.htm +++ b/src/admin/templets/ad_main.htm @@ -24,7 +24,7 @@ - + 添加广告 广告分类管理 diff --git a/src/admin/templets/album_add.htm b/src/admin/templets/album_add.htm index 0d079049..e22522af 100644 --- a/src/admin/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -65,7 +65,7 @@ 跳转网址 - + 标签 (英文逗号隔开,如:DedeBIZ,得德) 权重 @@ -124,7 +124,7 @@ 关键词 - + diff --git a/src/admin/templets/archives_add.htm b/src/admin/templets/archives_add.htm index 4b3745a9..dc4af0ee 100644 --- a/src/admin/templets/archives_add.htm +++ b/src/admin/templets/archives_add.htm @@ -61,7 +61,7 @@ 跳转网址 - + 标签 (英文逗号隔开,如:DedeBIZ,得德) 权重 @@ -127,11 +127,11 @@ 关键词 - + - + 描述 @@ -195,7 +195,7 @@ 文件名称 (不包括文件扩展名) - + 发布时间 关键词 - + @@ -288,10 +288,10 @@ const chars = event.data.split(''); chars.forEach(char => { if (lastChar === '\\' && char === 'r') { - char = '
'; //替换为br标签 - lastChar = ""; //清空追踪字符 + char = '
'; //替换为br标签 + lastChar = ""; //清空追踪字符 } else { - lastChar = char; //记录当前字符 + lastChar = char; //记录当前字符 } if (char === '\\') { return; //如果是反斜杠,跳过处理 diff --git a/src/admin/templets/article_description_main.htm b/src/admin/templets/article_description_main.htm index 06c3ca6f..136e9bb0 100644 --- a/src/admin/templets/article_description_main.htm +++ b/src/admin/templets/article_description_main.htm @@ -60,7 +60,7 @@ - + diff --git a/src/admin/templets/article_keywords_main.htm b/src/admin/templets/article_keywords_main.htm index ed973483..fbd25973 100644 --- a/src/admin/templets/article_keywords_main.htm +++ b/src/admin/templets/article_keywords_main.htm @@ -21,7 +21,7 @@ - + diff --git a/src/admin/templets/article_test_same.htm b/src/admin/templets/article_test_same.htm index 32769c51..4888d191 100644 --- a/src/admin/templets/article_test_same.htm +++ b/src/admin/templets/article_test_same.htm @@ -49,7 +49,7 @@ - + diff --git a/src/admin/templets/cards_make.htm b/src/admin/templets/cards_make.htm index d27f3409..eda66b10 100644 --- a/src/admin/templets/cards_make.htm +++ b/src/admin/templets/cards_make.htm @@ -56,7 +56,7 @@ - + diff --git a/src/admin/templets/catalog_add.htm b/src/admin/templets/catalog_add.htm index 9bfb19f3..221007f5 100644 --- a/src/admin/templets/catalog_add.htm +++ b/src/admin/templets/catalog_add.htm @@ -350,14 +350,12 @@ if (obj.style.display != "none") obj.style.display = "none"; else { - if (Nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "block"; + obj.style.display = "block"; } } function ShowObj(objname) { var obj = document.getElementById(objname); - if (Nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "block"; + obj.style.display = "block"; } function HideObj(objname) { var obj = document.getElementById(objname); @@ -381,8 +379,7 @@ templist[0].value = dfstyleValue + "/list_" + sevvalue + ".htm"; temparticle[0].value = dfstyleValue + "/article_" + sevvalue + ".htm"; if (obj.value < 0) { - if (Nav() == 'IE') tobj.style.display = "block"; - else tobj.style.display = "block"; + tobj.style.display = "block"; } else { tobj.style.display = "none"; } @@ -415,7 +412,6 @@ $("#mdlAI").modal('show'); } $("#btnAIAction").click(async function() { - let prompt = document.getElementById("prompt").value; let modelid = document.getElementById("modelid").value; let req = await fetch(`api.php?action=get_ai_server&pname=catalog_add&modelid=${modelid}&prompt=${prompt}`); @@ -438,10 +434,10 @@ const chars = event.data.split(''); chars.forEach(char => { if (lastChar === '\\' && char === 'r') { - char = '
'; //替换为br标签 - lastChar = ""; //清空追踪字符 + char = '
'; //替换为br标签 + lastChar = ""; //清空追踪字符 } else { - lastChar = char; //记录当前字符 + lastChar = char; //记录当前字符 } if (char === '\\') { return; //如果是反斜杠,跳过处理 diff --git a/src/admin/templets/catalog_edit.htm b/src/admin/templets/catalog_edit.htm index f410e8fd..149ce7d5 100644 --- a/src/admin/templets/catalog_edit.htm +++ b/src/admin/templets/catalog_edit.htm @@ -380,14 +380,12 @@ if (obj.style.display != "none") obj.style.display = "none"; else { - if (Nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "block"; + obj.style.display = "block"; } } function ShowObj(objname) { var obj = document.getElementById(objname); - if (Nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "block"; + obj.style.display = "block"; } function HideObj(objname) { var obj = document.getElementById(objname); @@ -411,8 +409,7 @@ templist[0].value = dfstyleValue + "/list_" + sevvalue + ".htm"; temparticle[0].value = dfstyleValue + "/article_" + sevvalue + ".htm"; if (obj.value < 0) { - if (Nav() == 'IE') tobj.style.display = "block"; - else tobj.style.display = "block"; + tobj.style.display = "block"; } else { tobj.style.display = "none"; } @@ -468,10 +465,10 @@ const chars = event.data.split(''); chars.forEach(char => { if (lastChar === '\\' && char === 'r') { - char = '
'; //替换为br标签 - lastChar = ""; //清空追踪字符 + char = '
'; //替换为br标签 + lastChar = ""; //清空追踪字符 } else { - lastChar = char; //记录当前字符 + lastChar = char; //记录当前字符 } if (char === '\\') { return; //如果是反斜杠,跳过处理 diff --git a/src/admin/templets/content_s_list.htm b/src/admin/templets/content_s_list.htm index da9cd424..617b888f 100644 --- a/src/admin/templets/content_s_list.htm +++ b/src/admin/templets/content_s_list.htm @@ -38,7 +38,7 @@ - + diff --git a/src/admin/templets/content_select_list.htm b/src/admin/templets/content_select_list.htm index cd7ce7f1..13553389 100644 --- a/src/admin/templets/content_select_list.htm +++ b/src/admin/templets/content_select_list.htm @@ -19,7 +19,7 @@ - + diff --git a/src/admin/templets/content_sg_list.htm b/src/admin/templets/content_sg_list.htm index 3e7b0eb0..ab26dc91 100644 --- a/src/admin/templets/content_sg_list.htm +++ b/src/admin/templets/content_sg_list.htm @@ -47,7 +47,7 @@ {dede:global.optionarr/} - + diff --git a/src/admin/templets/diy_list.htm b/src/admin/templets/diy_list.htm index 61fd618d..029305ca 100644 --- a/src/admin/templets/diy_list.htm +++ b/src/admin/templets/diy_list.htm @@ -77,7 +77,7 @@ - + 预览 diff --git a/src/admin/templets/feedback_main.htm b/src/admin/templets/feedback_main.htm index 22ebb565..b0d250c6 100644 --- a/src/admin/templets/feedback_main.htm +++ b/src/admin/templets/feedback_main.htm @@ -26,7 +26,7 @@ {dede:global.openarray/} - + diff --git a/src/admin/templets/friendlink_main.htm b/src/admin/templets/friendlink_main.htm index 9a263aa6..1e0579c3 100644 --- a/src/admin/templets/friendlink_main.htm +++ b/src/admin/templets/friendlink_main.htm @@ -31,7 +31,7 @@ } ?> - + 添加链接 网站类型管理 申请链接 diff --git a/src/admin/templets/log_list.htm b/src/admin/templets/log_list.htm index 223f01d7..b4a7c29c 100644 --- a/src/admin/templets/log_list.htm +++ b/src/admin/templets/log_list.htm @@ -29,7 +29,7 @@ - + diff --git a/src/admin/templets/media_main.htm b/src/admin/templets/media_main.htm index b8c0ad3d..ab394fed 100644 --- a/src/admin/templets/media_main.htm +++ b/src/admin/templets/media_main.htm @@ -30,7 +30,7 @@ - + 添加附件 diff --git a/src/admin/templets/member_main.htm b/src/admin/templets/member_main.htm index 2495c0e7..422c9410 100644 --- a/src/admin/templets/member_main.htm +++ b/src/admin/templets/member_main.htm @@ -43,7 +43,7 @@ } ?> - + 所有会员 禁言会员 推荐会员 diff --git a/src/admin/templets/member_operations.htm b/src/admin/templets/member_operations.htm index 91dc90aa..b4101d70 100644 --- a/src/admin/templets/member_operations.htm +++ b/src/admin/templets/member_operations.htm @@ -18,7 +18,7 @@
- + 未付款 已付款 已完成 diff --git a/src/admin/templets/member_pm.htm b/src/admin/templets/member_pm.htm index 0f20c5c4..16382a01 100644 --- a/src/admin/templets/member_pm.htm +++ b/src/admin/templets/member_pm.htm @@ -24,7 +24,7 @@ - + 短信列表 群发短信 单独短信 diff --git a/src/admin/templets/member_pmall.htm b/src/admin/templets/member_pmall.htm index fbeeb563..09a544ee 100644 --- a/src/admin/templets/member_pmall.htm +++ b/src/admin/templets/member_pmall.htm @@ -23,7 +23,7 @@ - + 短信列表 群发短信 单独短信 diff --git a/src/admin/templets/member_pmone.htm b/src/admin/templets/member_pmone.htm index acf99806..0093afa3 100644 --- a/src/admin/templets/member_pmone.htm +++ b/src/admin/templets/member_pmone.htm @@ -23,7 +23,7 @@ - + 短信列表 群发短信 单独短信 diff --git a/src/admin/templets/mychannel_add.htm b/src/admin/templets/mychannel_add.htm index 753202fe..90c8a5d2 100644 --- a/src/admin/templets/mychannel_add.htm +++ b/src/admin/templets/mychannel_add.htm @@ -79,14 +79,8 @@ 会员投稿组 - SetQuery("SELECT * FROM `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo " "; - } - ?> + + diff --git a/src/admin/templets/mychannel_edit.htm b/src/admin/templets/mychannel_edit.htm index c578fdb7..f1a56241 100644 --- a/src/admin/templets/mychannel_edit.htm +++ b/src/admin/templets/mychannel_edit.htm @@ -80,15 +80,9 @@ 会员投稿组 - SetQuery("SELECT * FROM `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo " "; - } - ?> - + + + @@ -273,8 +267,7 @@ } function ShowObj(objname) { var obj = document.getElementById(objname); - if (Nav() == 'IE') { obj.style.display = "block"; obj.style.display = "block"; } - else obj.style.display = "table"; + obj.style.display = "table"; } function HideObj(objname) { var obj = document.getElementById(objname); diff --git a/src/admin/templets/soft_add.htm b/src/admin/templets/soft_add.htm index dcc4446a..357c0dd1 100644 --- a/src/admin/templets/soft_add.htm +++ b/src/admin/templets/soft_add.htm @@ -136,7 +136,7 @@ 关键词 - + diff --git a/src/admin/templets/spec_add.htm b/src/admin/templets/spec_add.htm index e2951cac..5804caa1 100644 --- a/src/admin/templets/spec_add.htm +++ b/src/admin/templets/spec_add.htm @@ -127,7 +127,7 @@ 关键词 - + diff --git a/src/admin/templets/sys_data_replace.htm b/src/admin/templets/sys_data_replace.htm index 5601d11d..c0e27c6e 100644 --- a/src/admin/templets/sys_data_replace.htm +++ b/src/admin/templets/sys_data_replace.htm @@ -76,7 +76,7 @@ - + diff --git a/src/admin/templets/sys_data_revert.htm b/src/admin/templets/sys_data_revert.htm index 03382d3d..4c83f75e 100644 --- a/src/admin/templets/sys_data_revert.htm +++ b/src/admin/templets/sys_data_revert.htm @@ -53,7 +53,7 @@ 全选 反选 取消 - + diff --git a/src/admin/templets/vote_getcode.htm b/src/admin/templets/vote_getcode.htm index 98beeffa..6871e073 100644 --- a/src/admin/templets/vote_getcode.htm +++ b/src/admin/templets/vote_getcode.htm @@ -38,7 +38,7 @@ - + diff --git a/src/static/web/js/admin.main.js b/src/static/web/js/admin.main.js index d461331d..3e2aadcc 100644 --- a/src/static/web/js/admin.main.js +++ b/src/static/web/js/admin.main.js @@ -67,14 +67,6 @@ function ColorSel(c, oname) { return true; } } -function ShowColor(e, o) { - LoadNewDiv(e, "../theme/system/colornew.htm", "colordlg"); -} -function ShowHide(objname) { - var obj = $Obj(objname); - if (obj.style.display != "none") obj.style.display = "none"; - else obj.style.display = "inline-block"; -} function ShowObj(objname) { var obj = $Obj(objname); if (obj == null) return false; @@ -84,9 +76,6 @@ function ShowObjRow(objname) { var obj = $Obj(objname); obj.style.display = "table-row"; } -function AddTypeid2() { - ShowObjRow("typeid2tr"); -} function HideObj(objname) { var obj = $Obj(objname); if (obj == null) return false; @@ -110,12 +99,18 @@ function ClearDivCt(objname) { $Obj(objname).style.display = "none"; ChangeFullDiv("hide"); } +function AddTypeid2() { + ShowObjRow("typeid2tr"); +} function SelectSource(e) { LoadNewDiv(e, "article_select_sw.php?t=source&k=8&rnd=" + Math.random(), "mysource"); } function SelectWriter(e) { LoadNewDiv(e, "article_select_sw.php?t=writer&k=8&rnd=" + Math.random(), "mywriter"); } +function ShowColor(e, o) { + LoadNewDiv(e, "../theme/system/colornew.htm", "colordlg"); +} function ShowUrlTr() { var jumpTest = $Obj("flagsj"); var jtr = $Obj("redirecturltr"); diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index 21d11c27..f86c8120 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -84,10 +84,10 @@ class Archives $this->FixedValues = ''; $this->TempSource = ''; $this->remoteDir = ''; - if (empty($GLOBALS['pageno'])) { + if (empty($GLOBALS['PageNo'])) { $this->NowPage = 1; } else { - $this->NowPage = $GLOBALS['pageno']; + $this->NowPage = $GLOBALS['PageNo']; } //特殊的字段数据处理 $this->Fields['aid'] = $aid; @@ -340,7 +340,7 @@ class Archives for ($i = 1; $i <= $this->TotalPage; $i++) { if ($this->TotalPage > 1) { $this->Fields['tmptitle'] = (empty($this->Fields['tmptitle']) ? $this->Fields['title'] : $this->Fields['tmptitle']); - if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle']."($i)"; + if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle']."-第"."$i"."页"; } if ($i > 1) { $TRUEfilename = $this->GetTruePath().$fileFirst."-".$i.".".$this->ShortName; @@ -469,7 +469,7 @@ class Archives return ''; } $this->Fields["displaytype"] = "dm"; - if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"]."({$this->NowPage})"; + if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"]."-第"."{$this->NowPage}"."页"; //预编译 $this->LoadTemplet(); $this->ParAddTable(); @@ -545,17 +545,17 @@ class Archives * 解析模板,对文档里的变动进行赋值 * * @access public - * @param string $pageNo 页码数 + * @param string $PageNo 页码数 * @param string $ismake 是否生成 * @return string */ - function ParseDMFields($pageNo, $ismake = 1) + function ParseDMFields($PageNo, $ismake = 1) { - $this->NowPage = $pageNo; + $this->NowPage = $PageNo; $this->Fields['nowpage'] = $this->NowPage; if ($this->SplitPageField != '' && isset($this->Fields[$this->SplitPageField])) { - $this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1]; - if ($pageNo > 1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200))); + $this->Fields[$this->SplitPageField] = $this->SplitFields[$PageNo - 1]; + if ($PageNo > 1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200))); } //解析模板 if (is_array($this->dtp->CTags)) { @@ -570,9 +570,9 @@ class Archives } } else if ($ctag->GetName() == 'pagetitle') { if ($ismake == 0) { - $this->dtp->Assign($i, $this->GetPageTitlesDM($ctag->GetAtt("style"), $pageNo)); + $this->dtp->Assign($i, $this->GetPageTitlesDM($ctag->GetAtt("style"), $PageNo)); } else { - $this->dtp->Assign($i, $this->GetPageTitlesST($ctag->GetAtt("style"), $pageNo)); + $this->dtp->Assign($i, $this->GetPageTitlesST($ctag->GetAtt("style"), $PageNo)); } } else if ($ctag->GetName() == 'prenext') { $this->dtp->Assign($i, $this->GetPreNext($ctag->GetAtt('get'))); @@ -745,10 +745,10 @@ class Archives * * @access public * @param string $styleName 类型名称 - * @param string $pageNo 页码数 + * @param string $PageNo 页码数 * @return string */ - function GetPageTitlesST($styleName, $pageNo) + function GetPageTitlesST($styleName, $PageNo) { if ($this->TotalPage == 1) { return ""; @@ -761,12 +761,12 @@ class Archives $revalue = ''; foreach ($this->SplitTitles as $k => $v) { if ($i == 1) { - $revalue .= "$v"; + $revalue .= "{$v}"; } else { - if ($pageNo == $i) { + if ($PageNo == $i) { $revalue .= "$v"; } else { - $revalue .= "$v"; + $revalue .= "{$v}"; } } $i++; @@ -775,12 +775,12 @@ class Archives $revalue = ""; for ($fl = 1; $fl <= $totalpage; $fl++) { if ($fl == $this->PageNo) { - $optionlist .= ""; + $optionlist .= ""; } else { - $optionlist .= ""; + $optionlist .= ""; } } $optionlist .= ""; @@ -688,33 +688,19 @@ class FreeList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; - if (preg_match('#info#i', $listitem)) { - $plist .= $maininfo.' '; - } - if (preg_match('#index#i', $listitem)) { - $plist .= $indexpage.' '; - } - if (preg_match('#pre#i', $listitem)) { - $plist .= $prepage.' '; - } - if (preg_match('#pageno#i', $listitem)) { - $plist .= $listdd.' '; - } - if (preg_match('#next#i', $listitem)) { - $plist .= $nextpage.' '; - } - if (preg_match('#end#i', $listitem)) { - $plist .= $endpage.' '; - } - if (preg_match('#option#i', $listitem)) { - $plist .= $optionlist; - } + $plist .= preg_match('/index/i', $listitem)? $indexpage : ""; + $plist .= preg_match('/pre/i', $listitem)? $prepage : ""; + $plist .= preg_match('/pageno/i', $listitem)? $listdd : ""; + $plist .= preg_match('/next/i', $listitem)? $nextpage : ""; + $plist .= preg_match('/end/i', $listitem)? $endpage : ""; + $plist .= preg_match('/option/i', $listitem)? $optionlist : ""; + $plist .= preg_match('/info/i', $listitem)? $maininfo : ""; return $plist; } /** @@ -736,27 +722,32 @@ class FreeList } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); - $geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&"; - $hidenform = ""; - $hidenform .= ""; - $purl .= "?".$geturl; + //开启伪静态对规则替换 + if ($cfg_rewrite == 'Y') { + $purl = str_replace("/apps", "", $purl); + $nowurls = preg_replace("/", ".php?", $purl); + $nowurls = explode("?", $nowurls); + $purl = $nowurls[0]; + } + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; + $purl .= '?'.$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页"; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页"; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -773,18 +764,25 @@ class FreeList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } - $plist = "$hidenform"; - $plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; - if ($totalpage > $total_list) { - $plist .= ""; - $plist .= ""; + $plist = ''; + if (preg_match('/index/i', $listitem)) $plist .= $indexpage; + if (preg_match('/pre/i', $listitem)) $plist .= $prepage; + if (preg_match('/pageno/i', $listitem)) $plist .= $listdd; + if (preg_match('/next/i', $listitem)) $plist .= $nextpage; + if (preg_match('/end/i', $listitem)) $plist .= $endpage; + if (preg_match('/option/i', $listitem)) $plist .= $optionlist; + if (preg_match('/info/i', $listitem)) $plist .= $maininfo; + //伪静态栏目分页 + if ($cfg_rewrite == 'Y') { + $plist = str_replace("?tid=", "", $plist); + $plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); + $plist = preg_replace("/&TotalResult=(\d+)/i", "", $plist);//去掉分页数值 } - $plist .= "
    "; return $plist; } /** diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 22f88137..2b1adf90 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -986,13 +986,13 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上页和首页的链接 @@ -1018,9 +1018,9 @@ class ListView $optionlist = "
  • "; @@ -1041,9 +1041,9 @@ class ListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; @@ -1075,12 +1075,12 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); //开启伪静态对规则替换 if ($cfg_rewrite == 'Y') { @@ -1089,19 +1089,19 @@ class ListView $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; $purl .= '?'.$geturl; $optionlist = ''; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -1122,9 +1122,9 @@ class ListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index 51be3876..c824fcc8 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -635,10 +635,10 @@ class SearchView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword); @@ -646,7 +646,7 @@ class SearchView if ($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc / $this->pagesize); } - $infos = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $infos = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $geturl = ""; //$geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; //$geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; @@ -655,14 +655,14 @@ class SearchView $purl .= "?".$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -683,9 +683,9 @@ class SearchView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index bf4b1030..ee3e838d 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -575,7 +575,7 @@ class SgListView */ function GetTrueUrl($nurl) { - if (preg_match("/^http[s]?:\/\//", $nurl)) return $nurl; + if (preg_match("/^(http|https):\/\//i", $nurl)) return $nurl; if ($this->Fields['moresite'] == 1) { if ($this->Fields['sitepath'] != '') { $nurl = preg_replace("/^".$this->Fields['sitepath']."/", '', $nurl); @@ -880,13 +880,13 @@ class SgListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上页和首页的链接 @@ -922,9 +922,9 @@ class SgListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; @@ -958,12 +958,12 @@ class SgListView $list_len = 3; } $totalpage = ceil($this->TotalResult / $this->pagesize); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); //开启伪静态对规则替换 @@ -973,19 +973,19 @@ class SgListView $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; $purl .= '?'.$geturl; $optionlist = ''; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -1006,9 +1006,9 @@ class SgListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index 847f402e..1f26b605 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -437,23 +437,23 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $tnamerule = "spec_"; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -474,9 +474,9 @@ class SpecView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; @@ -501,26 +501,26 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; - $hidenform = ""; - $hidenform .= ""; + //$hidenform = ""; + //$hidenform .= ""; $purl .= "?".$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -541,9 +541,9 @@ class SpecView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index ff06cfc3..f3d4a248 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -411,23 +411,23 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->tagsDir.'/'.$this->TagInfos['id']; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -540,26 +540,26 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); //开启伪静态对规则替换 if ($cfg_rewrite == 'Y') $purl = "/tags/"; $purl .= "?/".urlencode($this->Tag); //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -580,9 +580,9 @@ class TagList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/dedecollection.func.php b/src/system/dedecollection.func.php index 9eb4b0a3..01a9fbed 100644 --- a/src/system/dedecollection.func.php +++ b/src/system/dedecollection.func.php @@ -180,7 +180,7 @@ function RefurlCookie($gurl) */ function GetHostInfo($gurl) { - $gurl = preg_replace("/^http:\/\//i", "", trim($gurl)); + $gurl = preg_replace("/^(http|https):\/\//i", "", trim($gurl)); $garr['host'] = preg_replace("/\/(.*)$/i", "", $gurl); $garr['query'] = "/".preg_replace("/^([^\/]*)\//i", "", $gurl); return $garr; @@ -318,7 +318,7 @@ function FillUrl($refurl, $surl) $basehost = ((!isset($urls['port']) || $urls['port'] == '80') ? $urls['host'] : $urls['host'].':'.$urls['port']); //由于直接获得的path在处理 http://xxxx/nnn/aaa?fdsafd 这种情况时会有错误,因此用其它方式处理 $basepath = $basehost; - $paths = explode('/', preg_replace("/^http:\/\//i", "", $refurl)); + $paths = explode('/', preg_replace("/^(http|https):\/\//i", "", $refurl)); $n = count($paths); for ($i = 1; $i < ($n - 1); $i++) { if (!preg_match("/[\?]/", $paths[$i])) $basepath .= '/'.$paths[$i]; @@ -347,13 +347,13 @@ function FillUrl($refurl, $surl) } else { if (strlen($surl) < 7) { $okurl = $basepath.'/'.$surl; - } else if (preg_match("/^http:\/\//i", $surl)) { + } else if (preg_match("/^(http|https):\/\//i", $surl)) { $okurl = $surl; } else { $okurl = $basepath.'/'.$surl; } } - $okurl = preg_replace("/^http:\/\//i", '', $okurl); + $okurl = preg_replace("/^(http|https):\/\//i", '', $okurl); $okurl = 'http://'.preg_replace("/\/{1,}/", '/', $okurl); return $okurl; } @@ -380,7 +380,7 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid = $handurls = explode("\n", $handurl); foreach ($handurls as $handurl) { $handurl = trim($handurl); - if (preg_match("/^http:\/\//i", $handurl)) { + if (preg_match("/^(http|https):\/\//i", $handurl)) { $lists[$n][0] = $handurl; $lists[$n][1] = 0; $n++; diff --git a/src/system/helpers/upload.helper.php b/src/system/helpers/upload.helper.php index ca2e5bc4..a5ebb04f 100755 --- a/src/system/helpers/upload.helper.php +++ b/src/system/helpers/upload.helper.php @@ -181,7 +181,7 @@ if (!function_exists('MemberUploads')) { exit('Not allow filename for not safe!'); } else if (!preg_match("/\.(".$allAllowType.")$/", $handname)) { exit('Not allow filename for filetype!'); - } else if (!preg_match('#^http:#', $handname) && !preg_match('#^'.$cfg_user_dir.'/'.$userid."#", $handname) && !$isadmin) { + } else if (!preg_match('#^(http|https):#', $handname) && !preg_match('#^'.$cfg_user_dir.'/'.$userid."#", $handname) && !$isadmin) { exit('Not allow filename for not userdir!'); } return $handname; diff --git a/src/system/libraries/dedehttpdown.class.php b/src/system/libraries/dedehttpdown.class.php index 46d042bf..45653805 100755 --- a/src/system/libraries/dedehttpdown.class.php +++ b/src/system/libraries/dedehttpdown.class.php @@ -484,7 +484,7 @@ class DedeHttpDown } if (isset($this->m_httphead["location"])) { $newurl = $this->m_httphead["location"]; - if (preg_match("/^http/i", $newurl)) { + if (preg_match("/^(http|https):\/\//i", $newurl)) { $this->JumpOpenUrl($newurl); } else { $newurl = $this->FillUrl($newurl); diff --git a/src/system/taglib/channel/img.lib.php b/src/system/taglib/channel/img.lib.php index b91aed4e..c75c5a54 100755 --- a/src/system/taglib/channel/img.lib.php +++ b/src/system/taglib/channel/img.lib.php @@ -82,10 +82,10 @@ function ch_img($fvalue, &$arcTag, &$refObj, $fname = '') } if ($cfg_multi_site == 'Y') { //$cfg_basehost) - if (!preg_match('#^http:#i', $fields['imgsrc'])) { + if (!preg_match('#^(http|https):#i', $fields['imgsrc'])) { $fields['imgsrc'] = $cfg_basehost.$fields['imgsrc']; } - if (!preg_match('#^http:#i', $fields['ddimg'])) { + if (!preg_match('#^(http|https):#i', $fields['ddimg'])) { $fields['ddimg'] = $cfg_basehost.$fields['ddimg']; } } diff --git a/src/theme/dedebiz/article_default.htm b/src/theme/dedebiz/article_default.htm index ef309da8..83a8f4a3 100644 --- a/src/theme/dedebiz/article_default.htm +++ b/src/theme/dedebiz/article_default.htm @@ -33,7 +33,7 @@ {dede:field.writer/}
    -
    您会看到这个提示,因为某个栏目无法应用模板或您的模型没对应模板,不同模型的文档浏览页的模板为:article_模型名字标识.htm更多的信息,您可以在栏目修改查看
    +
    您看到这个提示,因为某个栏目对应模板不存在,不同模型的文档模板为:article_模型标识.htm,在后台-网站栏目管理-修改栏目查看
    {dede:fieldlist} diff --git a/src/theme/dedebiz/article_default_sg.htm b/src/theme/dedebiz/article_default_sg.htm index 53d3fd2c..92986d45 100644 --- a/src/theme/dedebiz/article_default_sg.htm +++ b/src/theme/dedebiz/article_default_sg.htm @@ -34,7 +34,7 @@ {dede:field.writer/} -
    您会看到这个提示,因为某个栏目无法应用模板或您的模型没对应模板,不同模型的文档浏览页的模板为:article_模型名字标识.htm更多的信息,您可以在栏目修改查看
    +
    您看到这个提示,因为某个栏目对应模板不存在,不同模型的文档模板为:article_模型标识.htm,在后台-网站栏目管理-修改栏目查看
    {dede:fieldlist}
    diff --git a/src/theme/dedebiz/article_image.htm b/src/theme/dedebiz/article_image.htm index ac45be6f..cdd35a21 100644 --- a/src/theme/dedebiz/article_image.htm +++ b/src/theme/dedebiz/article_image.htm @@ -11,8 +11,8 @@ @@ -82,7 +82,7 @@
    - {dede:field name='pagestyle' alt='输出不同的图片头信息' runphp='yes'} + {dede:field name='pagestyle' alt='图片头部调用' runphp='yes'} if (@me==3) { @me = '
    '; } else if (@me==2) { @@ -96,14 +96,14 @@ @me = ''; } {/dede:field} - - {dede:field name='imgurls' alt='输出不同的图片信息'} - [field:pagestyle runphp='yes'] @me= (@me==3 ? '
    ' : '');[/field:pagestyle] + + {dede:field name='imgurls' alt='图片信息调用'} + [field:pagestyle runphp='yes'] @me=(@me==3 ? '
    ' : '');[/field:pagestyle]

    [field:alttext/]

    -

    ([field:alttext/])

    - [field:pagestyle runphp='yes'] @me = (@me==3 ? '
    ' : ''); [/field:pagestyle] +

    [field:alttext/]

    + [field:pagestyle runphp='yes'] @me=(@me==3 ? '
    ' : ''); [/field:pagestyle] {/dede:field} - {dede:field name='pagestyle' alt='输出不同的图片尾信息' runphp='yes'} + {dede:field name='pagestyle' alt='图片底部调用' runphp='yes'} if (@me==3) { @me = '
    '; } else if (@me==2) { diff --git a/src/user/inc/inc_archives_functions.php b/src/user/inc/inc_archives_functions.php index e56de959..c35f1269 100755 --- a/src/user/inc/inc_archives_functions.php +++ b/src/user/inc/inc_archives_functions.php @@ -89,7 +89,7 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) */ function GetImageMapDD($filename, $ddm, $oldname = '') { - if ($oldname != '' && !preg_match("#^http:\/\/#i", $oldname)) { + if ($oldname != '' && !preg_match("#^(http|https):\/\/#i", $oldname)) { $ddpicok = $oldname; } else { $ddn = substr($filename, -3);