| @@ -166,7 +166,7 @@ if ($dopost == 'quick') { | |||||
| } | } | ||||
| //创建目录 | //创建目录 | ||||
| if ($ispart != 2) { | if ($ispart != 2) { | ||||
| $true_typedir = str_replace("{cmspath}", $typedir); | |||||
| $true_typedir = str_replace("{cmspath}", "", $typedir); | |||||
| $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | ||||
| if (!CreateDir($true_typedir)) { | if (!CreateDir($true_typedir)) { | ||||
| ShowMsg("创建目录{$true_typedir}失败,请检查您的路径是否存在问题", "-1"); | ShowMsg("创建目录{$true_typedir}失败,请检查您的路径是否存在问题", "-1"); | ||||
| @@ -24,10 +24,6 @@ if (empty($dopost)) { | |||||
| ShowMsg("请输入自由列表标题", "-1"); | ShowMsg("请输入自由列表标题", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| if (empty($channel)) { | |||||
| showmsg("请选择一个限定模型", "-1"); | |||||
| exit(); | |||||
| } | |||||
| if (is_array($types)) { | if (is_array($types)) { | ||||
| foreach ($types as $v) $ntype .= $v.' '; | foreach ($types as $v) $ntype .= $v.' '; | ||||
| } | } | ||||
| @@ -30,10 +30,6 @@ if (empty($dopost)) { | |||||
| ShowMsg("请输入自由列表标题", "-1"); | ShowMsg("请输入自由列表标题", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| if (empty($channel)) { | |||||
| showmsg("请选择一个限定模型", "-1"); | |||||
| exit(); | |||||
| } | |||||
| if (is_array($types)) { | if (is_array($types)) { | ||||
| foreach ($types as $v) $ntype .= $v.' '; | foreach ($types as $v) $ntype .= $v.' '; | ||||
| } | } | ||||
| @@ -20,7 +20,7 @@ if (empty($maxpagesize)) $maxpagesize = 30; | |||||
| $startid = isset($startid) ? intval($startid) : 0; | $startid = isset($startid) ? intval($startid) : 0; | ||||
| $endid = isset($endid) ? intval($endid) : 0; | $endid = isset($endid) ? intval($endid) : 0; | ||||
| $tagid = isset($tagid) ? intval($tagid) : 0; | $tagid = isset($tagid) ? intval($tagid) : 0; | ||||
| $tagsdir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| //生成 | //生成 | ||||
| if ($tagid > 0) { | if ($tagid > 0) { | ||||
| $upall = 0; //更新单个模式 | $upall = 0; //更新单个模式 | ||||
| @@ -50,7 +50,7 @@ if ($ctagid == 0 && $allfinish) { | |||||
| } | } | ||||
| $tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;"); | $tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;"); | ||||
| //创建TAGS目录 | //创建TAGS目录 | ||||
| $tagsDir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| $tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| MkdirAll($cfg_basedir.$tagsDir, $cfg_dir_purview); | MkdirAll($cfg_basedir.$tagsDir, $cfg_dir_purview); | ||||
| if (is_array($tag) && count($tag) > 0) { | if (is_array($tag) && count($tag) > 0) { | ||||
| $dlist = new TagList($tag['id'], 'taglist.htm'); | $dlist = new TagList($tag['id'], 'taglist.htm'); | ||||
| @@ -224,7 +224,6 @@ class SpecView | |||||
| $murl = $makeFile; | $murl = $makeFile; | ||||
| $makeFile = $GLOBALS['cfg_basedir'].$makeFile; | $makeFile = $GLOBALS['cfg_basedir'].$makeFile; | ||||
| $this->dtp->SaveTo($makeFile); | $this->dtp->SaveTo($makeFile); | ||||
| echo "成功创建:$murl<br>"; | |||||
| } | } | ||||
| copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html"); | copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html"); | ||||
| $murl = $GLOBALS['cfg_special']."/index.html"; | $murl = $GLOBALS['cfg_special']."/index.html"; | ||||
| @@ -151,7 +151,7 @@ class TagList | |||||
| function Display() | function Display() | ||||
| { | { | ||||
| global $cfg_tags_dir; | global $cfg_tags_dir; | ||||
| $tagsDir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| $tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| $makeDir = empty($this->Tag) ? $this->GetTruePath().$tagsDir."/index.html" : $this->GetTruePath().$tagsDir."/".$this->Tag."/index.html"; | $makeDir = empty($this->Tag) ? $this->GetTruePath().$tagsDir."/index.html" : $this->GetTruePath().$tagsDir."/".$this->Tag."/index.html"; | ||||
| if ($this->Tag != '') { | if ($this->Tag != '') { | ||||
| $this->CountRecord(); | $this->CountRecord(); | ||||
| @@ -554,7 +554,7 @@ class TagList | |||||
| function SetTagsDir($dir = '') | function SetTagsDir($dir = '') | ||||
| { | { | ||||
| global $cfg_tags_dir; | global $cfg_tags_dir; | ||||
| if ($dir == "") $dir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| if ($dir == "") $dir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| $this->tagsDir = $dir; | $this->tagsDir = $dir; | ||||
| } | } | ||||
| //生成静态Tag | //生成静态Tag | ||||
| @@ -562,7 +562,7 @@ class TagList | |||||
| { | { | ||||
| global $cfg_dir_purview, $envs, $cfg_tags_dir, $cfg_cmsurl; | global $cfg_dir_purview, $envs, $cfg_tags_dir, $cfg_cmsurl; | ||||
| $envs['makeTag'] = 1; | $envs['makeTag'] = 1; | ||||
| $tagsdir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| if (isset($envs['makeTag']) && $envs['makeTag'] == 1) { | if (isset($envs['makeTag']) && $envs['makeTag'] == 1) { | ||||
| $this->Fields['position'] = $cfg_cmsurl.$tagsdir."/"; | $this->Fields['position'] = $cfg_cmsurl.$tagsdir."/"; | ||||
| } | } | ||||
| @@ -365,7 +365,7 @@ function GetSonIdsLogic($id, $sArr, $channel = 0, $addthis = false) | |||||
| function MfTypedir($typedir) | function MfTypedir($typedir) | ||||
| { | { | ||||
| if (preg_match("/^(http|https|ftp):/i", $typedir)) return $typedir; | if (preg_match("/^(http|https|ftp):/i", $typedir)) return $typedir; | ||||
| $typedir = str_replace("{cmspath}", "/", $typedir); | |||||
| $typedir = str_replace("{cmspath}", "", $typedir); | |||||
| $typedir = preg_replace("/\/{1,}/", "/", $typedir); | $typedir = preg_replace("/\/{1,}/", "/", $typedir); | ||||
| return $typedir; | return $typedir; | ||||
| } | } | ||||
| @@ -22,7 +22,7 @@ function lib_tag(&$ctag, &$refObj) | |||||
| $ltype = $sort; | $ltype = $sort; | ||||
| $num = $row; | $num = $row; | ||||
| $addsql = "WHERE 1=1"; | $addsql = "WHERE 1=1"; | ||||
| $tagsdir = str_replace("{cmspath}", $cfg_tags_dir); | |||||
| $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); | |||||
| if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { | if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { | ||||
| $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); | $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); | ||||
| $dsql->Execute(); | $dsql->Execute(); | ||||