From 368c25caf6eaa9044a9355ae0f9e6193d7826d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= Date: Tue, 11 Jun 2024 13:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/catalog_add.php | 2 +- src/admin/dialog/select_soft.php | 2 +- src/admin/file_manage_main.php | 2 +- src/admin/friendlink_edit.php | 2 +- src/admin/inc/inc_archives_all.php | 2 +- src/admin/makehtml_taglist_action.php | 4 +- src/admin/module_main.php | 3 +- src/admin/mychannel_edit.php | 2 +- src/admin/templets/makehtml_spec.htm | 2 +- src/admin/templets_one_edit.php | 4 +- src/apps/diy.php | 2 +- src/apps/feedback.php | 2 +- src/system/archive/archives.class.php | 8 +- src/system/archive/freelist.class.php | 6 +- src/system/archive/listview.class.php | 7 +- src/system/archive/searchview.class.php | 2 +- src/system/archive/sglistview.class.php | 4 +- src/system/archive/sgpage.class.php | 2 +- src/system/archive/specview.class.php | 2 +- src/system/archive/taglist.class.php | 14 +- src/system/common.inc.php | 18 +- src/system/customfields.func.php | 18 +- src/system/extend.func.php | 4 +- src/system/helpers/channelunit.helper.php | 1340 +++++++++--------- src/system/libraries/statistics.class.php | 2 +- src/system/taglib/arclist.lib.php | 2 +- src/system/taglib/arclistsg.lib.php | 2 +- src/system/taglib/feedback.lib.php | 2 +- src/system/taglib/infoguide.lib.php | 9 +- src/system/taglib/infolink.lib.php | 5 +- src/system/taglib/likearticle.lib.php | 2 +- src/system/taglib/relation.lib.php | 2 +- src/system/taglib/statistics.lib.php | 2 +- src/system/taglib/tag.lib.php | 2 +- src/system/tpllib/plus_userarclist.php | 2 +- src/system/typelink/typelink.class.php | 2 +- src/system/typelink/typeunit.class.admin.php | 2 +- src/user/index_do.php | 2 +- 38 files changed, 749 insertions(+), 743 deletions(-) diff --git a/src/admin/catalog_add.php b/src/admin/catalog_add.php index 8da51e10..53518566 100644 --- a/src/admin/catalog_add.php +++ b/src/admin/catalog_add.php @@ -166,7 +166,7 @@ if ($dopost == 'quick') { } //创建目录 if ($ispart != 2) { - $true_typedir = str_replace("{cmspath}", "", $typedir); + $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); if (!CreateDir($true_typedir)) { ShowMsg("创建目录{$true_typedir}失败,请检查路径是否存在问题", "-1"); diff --git a/src/admin/dialog/select_soft.php b/src/admin/dialog/select_soft.php index 8543e3b6..6691487f 100644 --- a/src/admin/dialog/select_soft.php +++ b/src/admin/dialog/select_soft.php @@ -157,7 +157,7 @@ if (!empty($noeditor)) { window.opener.CKEDITOR.tools.callFunction(funcNum, reimg); } if (typeof window.opener.CKEDITOR.instances[""] !== "undefined") { - let addonHTML = ` 附件:${reimg}`; + let addonHTML = `附件:${reimg}`; window.opener.CKEDITOR.instances[""].insertHtml(addonHTML); } if (window.opener.document. != null) { diff --git a/src/admin/file_manage_main.php b/src/admin/file_manage_main.php index 52ba6085..e705b50b 100644 --- a/src/admin/file_manage_main.php +++ b/src/admin/file_manage_main.php @@ -10,7 +10,7 @@ */ require(dirname(__FILE__)."/config.php"); CheckPurview('plus_文件管理器'); -if (!isset($activepath)) $activepath = DEDEBIZ_SAFE_MODE? $cfg_medias_dir : '/'; +if (!isset($activepath)) $activepath = DEDEBIZ_SAFE_MODE? $cfg_medias_dir : $cfg_cmspath; $inpath = ''; $activepath = str_replace("..", "", $activepath); $activepath = preg_replace("#^\/{1,}#", "/", $activepath); diff --git a/src/admin/friendlink_edit.php b/src/admin/friendlink_edit.php index bb50073a..7c8d6bd3 100644 --- a/src/admin/friendlink_edit.php +++ b/src/admin/friendlink_edit.php @@ -60,7 +60,7 @@ if ($dopost == "delete") { $fullfilename = DEDEROOT.'/static/flink/'.$logoimg_name; move_uploaded_file($logoimg, $fullfilename) or die("上传文件到".$fullfilename."失败"); @unlink($logoimg); - $logo = '/static/flink/'.$logoimg_name; + $logo = $cfg_cmspath.'/static/flink/'.$logoimg_name; } $sortrank = isset($sortrank)? intval($sortrank) : 1; $url = isset($url)? HtmlReplace($url, -1) : ''; diff --git a/src/admin/inc/inc_archives_all.php b/src/admin/inc/inc_archives_all.php index b23fd831..fdb0bd8a 100644 --- a/src/admin/inc/inc_archives_all.php +++ b/src/admin/inc/inc_archives_all.php @@ -153,7 +153,7 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') fclose($fp); return $addvar; } else { - $ipath = '/data/textdata'; + $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; $tpath = ceil($aid / 5000); if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); diff --git a/src/admin/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php index 6f593fb7..11ce9343 100644 --- a/src/admin/makehtml_taglist_action.php +++ b/src/admin/makehtml_taglist_action.php @@ -20,7 +20,7 @@ if (empty($maxpagesize)) $maxpagesize = 30; $startid = isset($startid) ? intval($startid) : 0; $endid = isset($endid) ? intval($endid) : 0; $tagid = isset($tagid) ? intval($tagid) : 0; -$tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); +$tagsdir = str_replace("{cmspath}", $cfg_cmspath, $cfg_tags_dir); //生成 if ($tagid > 0) { $upall = 0; //更新单个模式 @@ -50,7 +50,7 @@ if ($ctagid == 0 && $allfinish) { } $tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;"); //创建TAGS目录 -$tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); +$tagsDir = str_replace("{cmspath}",$cfg_cmspath,$cfg_tags_dir); MkdirAll($cfg_basedir.$tagsDir, $cfg_dir_purview); if (is_array($tag) && count($tag) > 0) { $dlist = new TagList($tag['id'], 'tag_list.htm'); diff --git a/src/admin/module_main.php b/src/admin/module_main.php index 843d0444..22f4f926 100644 --- a/src/admin/module_main.php +++ b/src/admin/module_main.php @@ -237,7 +237,8 @@ if ($action == '') { $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); } //_ROOTURL_ - $rooturl = $cfg_basehost; + if ($cfg_cmspath == '/') $cfg_cmspath = ''; + $rooturl = $cfg_basehost.$cfg_cmspath; $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); $sqls = preg_split('/;[ \t]{0,}\n/', $setupsql); diff --git a/src/admin/mychannel_edit.php b/src/admin/mychannel_edit.php index 7071dbab..77542e7b 100644 --- a/src/admin/mychannel_edit.php +++ b/src/admin/mychannel_edit.php @@ -440,7 +440,7 @@ if ($dopost == "show") { $addonfields = ''; } $template = trim($template); - $forms = "
"; + $forms = ""; $forms .= ""; $forms .= ""; $forms .= "
"; diff --git a/src/admin/templets/makehtml_spec.htm b/src/admin/templets/makehtml_spec.htm index 0bc5009a..921ec535 100644 --- a/src/admin/templets/makehtml_spec.htm +++ b/src/admin/templets/makehtml_spec.htm @@ -16,7 +16,7 @@
更新专题
-
发布专题后需要手动更新,建议专题目录设置仅可读写权限,存放目录:
+
发布专题后需要手动更新,建议专题目录设置仅可读写权限,存放目录:
diff --git a/src/admin/templets_one_edit.php b/src/admin/templets_one_edit.php index c2f5daa7..7718ba50 100644 --- a/src/admin/templets_one_edit.php +++ b/src/admin/templets_one_edit.php @@ -45,7 +45,7 @@ if ($dopost == "saveedit") { ShowMsg("系统文件禁止重名", "javascript:;"); exit(); } - $oldfilename = $cfg_basedir.'/'.$oldfilename; + $oldfilename = $cfg_basedir.$cfg_cmspath."/".$oldfilename; if (is_file($oldfilename)) { unlink($oldfilename); } @@ -64,7 +64,7 @@ if ($dopost == "saveedit") { exit(); } else if ($dopost == "delete") { $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); - $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir."/".$row['filename']); + $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']); $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' "); if (is_file($filename)) { unlink($filename); diff --git a/src/apps/diy.php b/src/apps/diy.php index 155d479c..b9729908 100755 --- a/src/apps/diy.php +++ b/src/apps/diy.php @@ -74,7 +74,7 @@ if ($action == 'post') { $goto = "diy.php?action=list&diyid={$diy->diyid}"; $bkmsg = '提交成功,正在前往表单列表'; } else { - $goto = '/'; + $goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '提交成功,请等待管理员处理'; } ShowMsg($bkmsg, $goto); diff --git a/src/apps/feedback.php b/src/apps/feedback.php index b0cc16ef..16f27f85 100755 --- a/src/apps/feedback.php +++ b/src/apps/feedback.php @@ -65,7 +65,7 @@ if ($action == '' || $action == 'show') { $dsql->Execute('fb', $querystring." LIMIT 20 "); $data = array(); while ($row = $dsql->GetArray('fb')) { - $row['face'] = empty($row['mface']) ? '/static/web/img/admin.png' : $row['mface']; + $row['face'] = empty($row['mface']) ? $GLOBALS['cfg_cmspath'].'/static/web/img/admin.png' : $row['mface']; $row['dtimestr'] = MyDate('Y-m-d', $row['dtime']); unset($row['ip']); $data[] = $row; diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index 9d98e808..a178849a 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -219,7 +219,7 @@ class Archives //处理默认缩略图等 if (isset($this->Fields['litpic'])) { if ($this->Fields['litpic'] == '-' || $this->Fields['litpic'] == '') { - $this->Fields['litpic'] = '/static/web/img/thumbnail.jpg'; + $this->Fields['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } if (!preg_match("#^http:\/\/#i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $this->Fields['litpic'] = $GLOBALS['cfg_mainsite'].$this->Fields['litpic']; @@ -232,7 +232,7 @@ class Archives if (isset($this->Fields['voteid']) && !empty($this->Fields['voteid'])) { $this->Fields['vote'] = ''; $voteid = $this->Fields['voteid']; - $this->Fields['vote'] = ""; + $this->Fields['vote'] = ""; if ($GLOBALS['cfg_multi_site'] == 'Y') { $this->Fields['vote'] = ""; } @@ -681,7 +681,7 @@ class Archives $preRow['siteurl'], $preRow['sitepath'] ); - $preRow['litpic'] = (empty($preRow['litpic'])) ? '/static/web/img/thumbnail.jpg' : $preRow['litpic']; + $preRow['litpic'] = (empty($preRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg' : $preRow['litpic']; $this->PreNext['diy']['pre']['id'] = $preRow['id']; $this->PreNext['diy']['pre']['arcurl'] = $mlink; $this->PreNext['diy']['pre']['title'] = $preRow['title']; @@ -709,7 +709,7 @@ class Archives $nextRow['siteurl'], $nextRow['sitepath'] ); - $nextRow['litpic'] = (empty($nextRow['litpic'])) ? '/static/web/img/thumbnail.jpg' : $nextRow['litpic']; + $nextRow['litpic'] = (empty($nextRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg' : $nextRow['litpic']; $this->PreNext['diy']['next']['id'] = $nextRow['id']; $this->PreNext['diy']['next']['arcurl'] = $mlink; $this->PreNext['diy']['next']['title'] = $nextRow['title']; diff --git a/src/system/archive/freelist.class.php b/src/system/archive/freelist.class.php index a9479ad3..f5e19ce0 100755 --- a/src/system/archive/freelist.class.php +++ b/src/system/archive/freelist.class.php @@ -229,7 +229,7 @@ class FreeList $this->dtp->SaveTo($makeFile); } if ($this->FLInfos['nodefault'] == 0) { - $murl = '/'.str_replace('{cmspath}', $this->FLInfos['listdir']); + $murl = '/'.str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']); $murl .= '/'.$this->FLInfos['defaultpage']; $indexfile = $GLOBALS['cfg_basedir'].$murl; $murl = preg_replace("#\/{1,}#", "/", $murl); @@ -355,7 +355,7 @@ class FreeList $okfile = ''; $namerule = $this->FLInfos['namerule']; $listdir = $this->FLInfos['listdir']; - $listdir = str_replace('{cmspath}', $listdir); + $listdir = str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $listdir); $okfile = str_replace('{listid}', $this->FLInfos['aid'], $namerule); $okfile = str_replace('{listdir}', $listdir, $okfile); $okfile = str_replace("\\", "/", $okfile); @@ -540,7 +540,7 @@ class FreeList } $row['description'] = cn_substr($row['description'], $infolen); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("#^http:\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 7eb180a0..015091de 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -525,7 +525,7 @@ class ListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; @@ -945,7 +945,7 @@ class ListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; @@ -1014,6 +1014,7 @@ class ListView */ function GetPageListST($list_len, $listitem = "index,end,pre,next,pageno") { + global $cfg_cmspath; $prepage = $nextpage = ''; $prepagenum = $this->PageNo - 1; $nextpagenum = $this->PageNo + 1; @@ -1102,7 +1103,7 @@ class ListView */ function GetPageListDM($list_len, $listitem = "index,end,pre,next,pageno") { - global $cfg_rewrite; + global $cfg_cmspath, $cfg_rewrite; $prepage = $nextpage = ''; $prepagenum = $this->PageNo - 1; $nextpagenum = $this->PageNo + 1; diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index 50063efe..6a80918a 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -568,7 +568,7 @@ class SearchView $row["title"] = $this->GetRedKeyWord(cn_substr($row["title"], $titlelen)); $row["id"] = $row["id"]; if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("/^(http|https):\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index 0d6b1a8e..39a5ec31 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -431,7 +431,7 @@ class SgListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; @@ -780,7 +780,7 @@ class SgListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; diff --git a/src/system/archive/sgpage.class.php b/src/system/archive/sgpage.class.php index faf1484b..dc940625 100755 --- a/src/system/archive/sgpage.class.php +++ b/src/system/archive/sgpage.class.php @@ -80,7 +80,7 @@ class sgpage */ function SaveToHtml() { - $filename = $GLOBALS['cfg_basedir'].'/'.$this->Fields['filename']; + $filename = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_cmspath'].'/'.$this->Fields['filename']; $filename = preg_replace("/\/{1,}/", '/', $filename); $this->dtp->SaveTo($filename); } diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index 3f892cb2..478c4858 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -348,7 +348,7 @@ class SpecView $row["title"] = cn_substr($row["title"], $titlelen); $row["id"] = $row["id"]; if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index 044dc01b..4f37d77f 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -156,8 +156,8 @@ class TagList */ function Display() { - global $cfg_tags_dir; - $tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); + global $cfg_cmspath, $cfg_tags_dir; + $tagsDir = str_replace("{cmspath}",$cfg_cmspath,$cfg_tags_dir); $makeDir = empty($this->Tag) ? $this->GetTruePath().$tagsDir."/index.html" : $this->GetTruePath().$tagsDir."/".$this->Tag."/index.html"; if ($this->Tag != '') { $this->CountRecord(); @@ -346,7 +346,7 @@ class TagList $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = '/static/web/img/thumbnail.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; } /*if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; @@ -559,16 +559,16 @@ class TagList } function SetTagsDir($dir = '') { - global $cfg_tags_dir; - if ($dir == "") $dir = str_replace("{cmspath}", "", $cfg_tags_dir); + global $cfg_tags_dir, $cfg_cmspath; + if ($dir == "") $dir = str_replace("{cmspath}", $cfg_cmspath, $cfg_tags_dir); $this->tagsDir = $dir; } //生成静态标签 function MakeHtml($startpage = 1, $makepagesize = 0) { - global $cfg_dir_purview, $envs, $cfg_tags_dir, $cfg_cmsurl; + global $cfg_dir_purview, $envs, $cfg_cmspath, $cfg_tags_dir, $cfg_cmsurl; $envs['makeTag'] = 1; - $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); + $tagsdir = str_replace("{cmspath}", $cfg_cmspath, $cfg_tags_dir); if (isset($envs['makeTag']) && $envs['makeTag'] == 1) { $this->Fields['position'] = $cfg_cmsurl.$tagsdir."/"; } diff --git a/src/system/common.inc.php b/src/system/common.inc.php index 89799b7a..153c4848 100755 --- a/src/system/common.inc.php +++ b/src/system/common.inc.php @@ -152,32 +152,32 @@ if (PHP_SAPI === 'cli') { $cfg_clihost = 'http://'.$_SERVER['HTTP_HOST']; } //站点根目录 -$cfg_basedir = preg_replace('#'.'\/system$#i', '', DEDEINC); +$cfg_basedir = preg_replace('#'.$cfg_cmspath.'\/system$#i', '', DEDEINC); if ($cfg_multi_site == 'Y') { $cfg_mainsite = $cfg_basehost; } else { $cfg_mainsite = ''; } //模板存放目录 -$cfg_templets_dir = '/theme'; +$cfg_templets_dir = $cfg_cmspath.'/theme'; $cfg_templeturl = $cfg_mainsite.$cfg_templets_dir; $cfg_templets_skin = empty($cfg_df_style) ? $cfg_mainsite.$cfg_templets_dir."/templets" : $cfg_mainsite.$cfg_templets_dir."/$cfg_df_style"; //安装目录网址 -$cfg_cmsurl = $cfg_mainsite; +$cfg_cmsurl = $cfg_mainsite.$cfg_cmspath; //模块插件目录 -$cfg_plus_dir = '/apps'; +$cfg_plus_dir = $cfg_cmspath.'/apps'; $cfg_phpurl = $cfg_mainsite.$cfg_plus_dir; //一些缓存配置数据存放目录 -$cfg_data_dir = '/data'; +$cfg_data_dir = $cfg_cmspath.'/data'; $cfg_dataurl = $cfg_mainsite.$cfg_data_dir; //专题存放目录 -$cfg_special = '/a/special'; +$cfg_special = $cfg_cmspath.'/a/special'; $cfg_specialurl = $cfg_mainsite.$cfg_special; //会员会员目录 -$cfg_member_dir = '/user'; +$cfg_member_dir = $cfg_cmspath.'/user'; $cfg_memberurl = $cfg_mainsite.$cfg_member_dir; //静态文件存放目录 -$cfg_static_dir = '/static'; +$cfg_static_dir = $cfg_cmspath.'/static'; $cfg_staticurl = $cfg_mainsite.$cfg_static_dir; //上传图片存放目录,建议按默认 $cfg_image_dir = $cfg_medias_dir.'/allimg'; @@ -188,7 +188,7 @@ $cfg_soft_dir = $cfg_medias_dir.'/soft'; //上传多媒体文件存放目录 $cfg_other_medias = $cfg_medias_dir.'/media'; //附件目录 -$cfg_medias_dir = $cfg_medias_dir; +$cfg_medias_dir = $cfg_cmspath.$cfg_medias_dir; $cfg_mediasurl = $cfg_mainsite.$cfg_medias_dir; //程序信息摘要,请不要删除则系统无法接收升级信息 $cfg_version = 'V6'; diff --git a/src/system/customfields.func.php b/src/system/customfields.func.php index e0e80e81..ee1c6325 100755 --- a/src/system/customfields.func.php +++ b/src/system/customfields.func.php @@ -38,19 +38,20 @@ function GetFormItem($ctag, $admintype = 'admin') $myformItem .= ""; $innertext = $myformItem; } else if ($fieldType == 'stepselect') { - global $hasSetEnumJs; + global $hasSetEnumJs, $cfg_cmspath; + $cmspath = ((empty($cfg_cmspath) || !preg_match('/[/$]/', $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath); $myformItem = ''; $myformItem .= ""; $myformItem .= ""; $myformItem .= ""; $myformItem .= ""; if ($hasSetEnumJs != 'hasset') { - $myformItem .= ''.""; + $myformItem .= ''.""; $GLOBALS['hasSetEnumJs'] = 'hasset'; } $myformItem .= "'.""; + $myformItem .= ''.""; $GLOBALS['hasSetEnumJs'] = 'hasset'; } $myformItem .= "'."\r\n"; + $revalue .= ''."\r\n"; $GLOBALS['hasSetEnumJs'] = 'hasset'; } $fields['nativeplace'] = $fields['infotype'] = ''; @@ -40,7 +41,7 @@ function lib_infoguide(&$ctag, &$refObj) $fields['nativeplace'] .= "\r\n\r\n"; $fields['nativeplace'] .= "'; + $revalue = ''; return $revalue; } ?> \ No newline at end of file diff --git a/src/system/taglib/tag.lib.php b/src/system/taglib/tag.lib.php index 85b8dac1..03313727 100755 --- a/src/system/taglib/tag.lib.php +++ b/src/system/taglib/tag.lib.php @@ -21,7 +21,7 @@ function lib_tag(&$ctag, &$refObj) $ltype = $sort; $num = $row; $addsql = ''; - $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); + $tagsdir = str_replace("{cmspath}", $cfg_cmspath, $cfg_tags_dir); if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); $dsql->Execute(); diff --git a/src/system/tpllib/plus_userarclist.php b/src/system/tpllib/plus_userarclist.php index ac3f4541..ecc793dc 100644 --- a/src/system/tpllib/plus_userarclist.php +++ b/src/system/tpllib/plus_userarclist.php @@ -28,7 +28,7 @@ function plus_userarclist(&$atts, &$refObj, &$fields) $row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); $row['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],$row['ispart'], $row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); - if ($row['litpic']=='') $row['litpic'] = '/static/web/img/thumbnail.jpg'; + if ($row['litpic']=='') $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; if (!preg_match("#^(http|https):\/\/#i", $row['litpic'])) { $row['picname'] = $row['litpic'] = $GLOBALS['cfg_cmsurl'].$row['litpic']; } else { diff --git a/src/system/typelink/typelink.class.php b/src/system/typelink/typelink.class.php index 664b9868..c53f5285 100755 --- a/src/system/typelink/typelink.class.php +++ b/src/system/typelink/typelink.class.php @@ -75,7 +75,7 @@ class TypeLink function GetTypeDir() { if (empty($this->TypeInfos['typedir'])) { - return $GLOBALS['cfg_arcdir']; + return $GLOBALS['cfg_cmspath'].$GLOBALS['cfg_arcdir']; } else { return $this->TypeInfos['typedir']; } diff --git a/src/system/typelink/typeunit.class.admin.php b/src/system/typelink/typeunit.class.admin.php index 9efbd94e..e6bbbba8 100755 --- a/src/system/typelink/typeunit.class.admin.php +++ b/src/system/typelink/typeunit.class.admin.php @@ -23,7 +23,7 @@ class TypeUnit function __construct() { $this->idCounter = 0; - $this->artDir = $GLOBALS['cfg_arcdir']; + $this->artDir = $GLOBALS['cfg_cmspath'].$GLOBALS['cfg_arcdir']; $this->baseDir = $GLOBALS['cfg_basedir']; $this->shortName = $GLOBALS['art_shortname']; $this->idArray = array(); diff --git a/src/user/index_do.php b/src/user/index_do.php index 6a8d2921..cb1c228d 100755 --- a/src/user/index_do.php +++ b/src/user/index_do.php @@ -21,7 +21,7 @@ if ($fmdo == 'sendMail') { exit(); } $userhash = md5($cfg_cookie_encode.'--'.$cfg_ml->fields['mid'].'--'.$cfg_ml->fields['email']); - $url = $cfg_basehost.$cfg_memberurl."/index_do.php?fmdo=checkMail&mid={$cfg_ml->fields['mid']}&userhash={$userhash}&do=1"; + $url = $cfg_basehost.(empty($cfg_cmspath) ? '/' : $cfg_cmspath)."/user/index_do.php?fmdo=checkMail&mid={$cfg_ml->fields['mid']}&userhash={$userhash}&do=1"; $url = preg_replace("#http:\/\/#i", '', $url); $proto = IsSSL()? "https://" : "http://"; $url = $proto.preg_replace("#\/\/#i", '/', $url);