@@ -465,14 +465,8 @@ class Archives | |||
$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/article_spec.htm"; | |||
} | |||
} | |||
if (defined('DEDEMOB')) { | |||
$tmpfile = str_replace('.htm', '_m.htm', $tmpfile); | |||
} | |||
if (!file_exists($tmpfile)) { | |||
$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid == 'spec' ? 'article_spec.htm' : 'article_default.htm'); | |||
if (defined('DEDEMOB')) { | |||
$tmpfile = str_replace('.htm', '_m.htm', $tmpfile); | |||
} | |||
} | |||
if (!preg_match("#.htm$#", $tmpfile)) return FALSE; | |||
return $tmpfile; | |||
@@ -696,25 +690,21 @@ class Archives | |||
$nextRow = $this->dsql->GetOne($query.$next); | |||
$preRow = $this->dsql->GetOne($query.$pre); | |||
if (is_array($preRow)) { | |||
if (defined('DEDEMOB')) { | |||
$mlink = 'view.php?aid='.$preRow['id']; | |||
} else { | |||
$mlink = GetFileUrl( | |||
$preRow['id'], | |||
$preRow['typeid'], | |||
$preRow['senddate'], | |||
$preRow['title'], | |||
$preRow['ismake'], | |||
$preRow['arcrank'], | |||
$preRow['namerule'], | |||
$preRow['typedir'], | |||
$preRow['money'], | |||
$preRow['filename'], | |||
$preRow['moresite'], | |||
$preRow['siteurl'], | |||
$preRow['sitepath'] | |||
); | |||
} | |||
$mlink = GetFileUrl( | |||
$preRow['id'], | |||
$preRow['typeid'], | |||
$preRow['senddate'], | |||
$preRow['title'], | |||
$preRow['ismake'], | |||
$preRow['arcrank'], | |||
$preRow['namerule'], | |||
$preRow['typedir'], | |||
$preRow['money'], | |||
$preRow['filename'], | |||
$preRow['moresite'], | |||
$preRow['siteurl'], | |||
$preRow['sitepath'] | |||
); | |||
//二次开发上一篇属性 | |||
$preRow['litpic'] = (empty($preRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg' : $preRow['litpic']; | |||
$this->PreNext['diy']['pre']['id'] = $preRow['id']; | |||
@@ -729,25 +719,21 @@ class Archives | |||
$this->PreNext['preimg'] = "<img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有上一图集了\"/>"; | |||
} | |||
if (is_array($nextRow)) { | |||
if (defined('DEDEMOB')) { | |||
$mlink = 'view.php?aid='.$preRow['id']; | |||
} else { | |||
$mlink = GetFileUrl( | |||
$nextRow['id'], | |||
$nextRow['typeid'], | |||
$nextRow['senddate'], | |||
$nextRow['title'], | |||
$nextRow['ismake'], | |||
$nextRow['arcrank'], | |||
$nextRow['namerule'], | |||
$nextRow['typedir'], | |||
$nextRow['money'], | |||
$nextRow['filename'], | |||
$nextRow['moresite'], | |||
$nextRow['siteurl'], | |||
$nextRow['sitepath'] | |||
); | |||
} | |||
$mlink = GetFileUrl( | |||
$nextRow['id'], | |||
$nextRow['typeid'], | |||
$nextRow['senddate'], | |||
$nextRow['title'], | |||
$nextRow['ismake'], | |||
$nextRow['arcrank'], | |||
$nextRow['namerule'], | |||
$nextRow['typedir'], | |||
$nextRow['money'], | |||
$nextRow['filename'], | |||
$nextRow['moresite'], | |||
$nextRow['siteurl'], | |||
$nextRow['sitepath'] | |||
); | |||
//二次开发下一篇属性 | |||
$nextRow['litpic'] = (empty($nextRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg' : $nextRow['litpic']; | |||
$this->PreNext['diy']['next']['id'] = $nextRow['id']; | |||
@@ -232,14 +232,8 @@ class ListView | |||
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; | |||
$tempfile = str_replace("{tid}", $this->TypeID, $tempfile); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
if (!file_exists($tempfile) || !is_file($tempfile)) { | |||
echo "模板文件不存在,无法解析文档"; | |||
@@ -357,14 +351,8 @@ class ListView | |||
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
$tempfile = $tmpdir."/".$tempfile; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
$this->dtp->LoadTemplate($tempfile); | |||
} | |||
@@ -388,14 +376,8 @@ class ListView | |||
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
$tempfile = $tmpdir."/".$tempfile; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
$this->PartView->SetTemplet($tempfile); | |||
} else if ($this->Fields['ispart'] == 2) { | |||
@@ -433,14 +415,8 @@ class ListView | |||
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
$tempfile = $tmpdir."/".$tempfile; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
$this->PartView->SetTemplet($tempfile); | |||
} else if ($this->Fields['ispart'] == 2) { | |||
@@ -114,9 +114,6 @@ class SearchView | |||
} | |||
$this->CountRecord(); | |||
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/search.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile) || !is_file($tempfile)) { | |||
echo "模板文件不存在,无法解析"; | |||
exit(); | |||
@@ -182,14 +182,8 @@ class SgListView | |||
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; | |||
$tempfile = str_replace("{tid}", $this->TypeID, $tempfile); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default_sg.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
if (!file_exists($tempfile) || !is_file($tempfile)) { | |||
echo "模板文件不存在,无法解析文档"; | |||
@@ -333,14 +327,8 @@ class SgListView | |||
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
$tempfile = $tmpdir."/".$tempfile; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
$this->PartView->SetTemplet($tempfile); | |||
} else if ($this->Fields['ispart'] == 2) { | |||
@@ -377,14 +365,8 @@ class SgListView | |||
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); | |||
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); | |||
$tempfile = $tmpdir."/".$tempfile; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
if (!file_exists($tempfile)) { | |||
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm"; | |||
if (defined('DEDEMOB')) { | |||
$tempfile = str_replace('.htm', '_m.htm', $tempfile); | |||
} | |||
} | |||
$this->PartView->SetTemplet($tempfile); | |||
} else if ($this->Fields['ispart'] == 2) { | |||
@@ -96,12 +96,7 @@ class TypeLink | |||
//islink 表示返回的列表是否带连接 | |||
function GetPositionLink($islink = true) | |||
{ | |||
if (defined('DEDEMOB')) { | |||
$indexpage = "<li class='breadcrumb-item'><a href='index.php'>".$this->indexName."</a></li>"; | |||
} else { | |||
$indexpage = "<li class='breadcrumb-item'><a href='".$this->indexUrl."'>".$this->indexName."</a></li>"; | |||
} | |||
$indexpage = "<li class='breadcrumb-item'><a href='".$this->indexUrl."'>".$this->indexName."</a></li>"; | |||
if ($this->valuePosition != "" && $islink) { | |||
return $this->valuePosition; | |||
} else if ($this->valuePositionName != "" && !$islink) { | |||
@@ -162,21 +157,17 @@ class TypeLink | |||
//获得某分类连接的URL | |||
function GetOneTypeUrl($typeinfos) | |||
{ | |||
if (defined('DEDEMOB')) { | |||
return 'list.php?tid='.$typeinfos['id']; | |||
} else { | |||
return GetTypeUrl( | |||
$typeinfos['id'], | |||
MfTypedir($typeinfos['typedir']), | |||
$typeinfos['isdefault'], | |||
$typeinfos['defaultname'], | |||
$typeinfos['ispart'], | |||
$typeinfos['namerule2'], | |||
$typeinfos['moresite'], | |||
$typeinfos['siteurl'], | |||
$typeinfos['sitepath'] | |||
); | |||
} | |||
return GetTypeUrl( | |||
$typeinfos['id'], | |||
MfTypedir($typeinfos['typedir']), | |||
$typeinfos['isdefault'], | |||
$typeinfos['defaultname'], | |||
$typeinfos['ispart'], | |||
$typeinfos['namerule2'], | |||
$typeinfos['moresite'], | |||
$typeinfos['siteurl'], | |||
$typeinfos['sitepath'] | |||
); | |||
} | |||
//获得类别列表 | |||
//hid 是指默认选中类目,0 表示“请选择类目”或“不限类目” | |||