@@ -73,7 +73,7 @@ if (version_compare(PHP_VERSION, '7.0.0', '>=')) { | |||||
} | } | ||||
} | } | ||||
if (!function_exists('mysql_error') and function_exists('mysqli_connect_error')) { | if (!function_exists('mysql_error') and function_exists('mysqli_connect_error')) { | ||||
function mysql_error($link='') | |||||
function mysql_error($link) | |||||
{ | { | ||||
if (mysqli_connect_errno()) { | if (mysqli_connect_errno()) { | ||||
return mysqli_connect_error(); | return mysqli_connect_error(); | ||||
@@ -293,7 +293,7 @@ function dede_htmlspecialchars($str) | |||||
* | * | ||||
* @access public | * @access public | ||||
* @param string | * @param string | ||||
* @return string | |||||
* @return void | |||||
*/ | */ | ||||
function helpers($helpers) | function helpers($helpers) | ||||
{ | { | ||||
@@ -569,8 +569,8 @@ if (!function_exists('obtainimgs')) { | |||||
{ | { | ||||
preg_match_all("/<img([^>]*)\s*src=('|\")([^'\"]+)('|\")/", $string, $matches); | preg_match_all("/<img([^>]*)\s*src=('|\")([^'\"]+)('|\")/", $string, $matches); | ||||
$imgsrc_arr = array_unique($matches[3]); | $imgsrc_arr = array_unique($matches[3]); | ||||
$count = count($imgsrc_arr); | |||||
$i = 0; | $i = 0; | ||||
$result = ""; | |||||
foreach($imgsrc_arr as $imgsrc) | foreach($imgsrc_arr as $imgsrc) | ||||
{ | { | ||||
if ($i == $num) break; | if ($i == $num) break; | ||||
@@ -525,7 +525,6 @@ class DedeModule | |||||
if (isset($this->fileListNames[$f])) return; | if (isset($this->fileListNames[$f])) return; | ||||
else if (preg_match("/Thumbs\.db/i", $f)) return; | else if (preg_match("/Thumbs\.db/i", $f)) return; | ||||
else $this->fileListNames[$f] = 1; | else $this->fileListNames[$f] = 1; | ||||
$fileList = ''; | |||||
if (!file_exists($filename)) { | if (!file_exists($filename)) { | ||||
ShowMsg("文件或文件夹<span class='text-primary'>{$filename}</span>不存在,无法进行编译", "-1"); | ShowMsg("文件或文件夹<span class='text-primary'>{$filename}</span>不存在,无法进行编译", "-1"); | ||||
exit(); | exit(); | ||||
@@ -581,7 +580,6 @@ class DedeModule | |||||
function Clear() | function Clear() | ||||
{ | { | ||||
unset($this->modules); | unset($this->modules); | ||||
unset($this->fileList); | |||||
unset($this->fileListNames); | unset($this->fileListNames); | ||||
} | } | ||||
}//End Class | }//End Class |
@@ -67,7 +67,7 @@ class DedeVote | |||||
* | * | ||||
* @access public | * @access public | ||||
* @param int $aid 投票ID | * @param int $aid 投票ID | ||||
* @return string | |||||
* @return void | |||||
*/ | */ | ||||
function AddVoteCount($aid) | function AddVoteCount($aid) | ||||
{ | { | ||||
@@ -75,7 +75,7 @@ class diyform | |||||
if ($type == 'post') { | if ($type == 'post') { | ||||
$formstring .= $func($tag, $admintype); | $formstring .= $func($tag, $admintype); | ||||
} else { | } else { | ||||
$formstring .= $func($tag, dede_htmlspecialchars($value[$tag->GetName()], ENT_QUOTES), $admintype); | |||||
$formstring .= $func($tag, dede_htmlspecialchars($value[$tag->GetName()]), $admintype); | |||||
} | } | ||||
$formfields .= $formfields == '' ? $tag->GetName().','.$tag->GetAtt('type') : ';'.$tag->GetName().','.$tag->GetAtt('type'); | $formfields .= $formfields == '' ? $tag->GetName().','.$tag->GetAtt('type') : ';'.$tag->GetName().','.$tag->GetAtt('type'); | ||||
} | } | ||||
@@ -89,7 +89,7 @@ class diyform | |||||
* 获取字段列表 | * 获取字段列表 | ||||
* | * | ||||
* @access public | * @access public | ||||
* @return string | |||||
* @return array | |||||
*/ | */ | ||||
function getFieldList() | function getFieldList() | ||||
{ | { | ||||
@@ -313,7 +313,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
$ids[] = $row['id']; | $ids[] = $row['id']; | ||||
//处理一些特殊字段 | //处理一些特殊字段 | ||||
$row['info'] = $row['infos'] = cn_substr($row['description'], $infolen); | $row['info'] = $row['infos'] = cn_substr($row['description'], $infolen); | ||||
$row['id'] = $row['id']; | |||||
$row['aid'] = $row['id']; | |||||
if ($row['corank'] > 0 && $row['arcrank'] == 0) { | if ($row['corank'] > 0 && $row['arcrank'] == 0) { | ||||
$row['arcrank'] = $row['corank']; | $row['arcrank'] = $row['corank']; | ||||
} | } | ||||
@@ -476,7 +476,7 @@ function lib_GetAutoChannelID($sortid, $topid) | |||||
* @param array $list 查询结果 | * @param array $list 查询结果 | ||||
* @param string $field 排序的字段名 | * @param string $field 排序的字段名 | ||||
* @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 | * @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 | ||||
* @return array | |||||
* @return mixed | |||||
*/ | */ | ||||
function list_sort_by($list, $field, $sortby = 'asc') | function list_sort_by($list, $field, $sortby = 'asc') | ||||
{ | { | ||||
@@ -69,7 +69,7 @@ function lib_relation(&$ctag, &$refObj) | |||||
if ($col > 1) $artlist .= "<td width='$colWidth'>\r\n"; | if ($col > 1) $artlist .= "<td width='$colWidth'>\r\n"; | ||||
if ($row = $dsql->GetArray("al")) { | if ($row = $dsql->GetArray("al")) { | ||||
if ($channelid > 0) { | if ($channelid > 0) { | ||||
$row['id'] = $row['id']; | |||||
$row['aid'] = $row['id']; | |||||
} else { | } else { | ||||
$row['id'] = $row['aid']; | $row['id'] = $row['aid']; | ||||
} | } | ||||
@@ -10,6 +10,14 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(DEDEINC.'/channelunit.func.php'); | require_once(DEDEINC.'/channelunit.func.php'); | ||||
/** | |||||
* plus_channel | |||||
* | |||||
* @param array $atts | |||||
* @param object $refObj | |||||
* @param mixed $fields | |||||
* @return array | |||||
*/ | |||||
function plus_channel(&$atts, &$refObj, &$fields) | function plus_channel(&$atts, &$refObj, &$fields) | ||||
{ | { | ||||
global $dsql, $_vars; | global $dsql, $_vars; | ||||
@@ -37,7 +45,6 @@ function plus_channel(&$atts, &$refObj, &$fields) | |||||
$typeid = $row2['id']; | $typeid = $row2['id']; | ||||
$reid = $row2['reid']; | $reid = $row2['reid']; | ||||
$topid = $row2['topid']; | $topid = $row2['topid']; | ||||
$issetInfos = true; | |||||
} | } | ||||
if ($type == '' || $type == 'sun') $type = 'son'; | if ($type == '' || $type == 'sun') $type = 'son'; | ||||
if ($type == 'top') { | if ($type == 'top') { | ||||
@@ -99,7 +99,7 @@ class TypeUnit | |||||
} | } | ||||
echo "<dl>\r\n"; | echo "<dl>\r\n"; | ||||
echo "<dd><img onclick=\"LoadSuns('suns{$id}',{$id});\" style='cursor:pointer'></dd>\r\n"; | echo "<dd><img onclick=\"LoadSuns('suns{$id}',{$id});\" style='cursor:pointer'></dd>\r\n"; | ||||
echo "<dd><a href='catalog_do.php?cid=".$id."&dopost=listArchives'{$smenu}>".$typeName."</a></dd>\r\n"; | |||||
echo "<dd><a href='catalog_do.php?cid=".$id."&dopost=listArchives'>".$typeName."</a></dd>\r\n"; | |||||
echo "</dl>\r\n"; | echo "</dl>\r\n"; | ||||
echo "<div id='suns".$id."'>"; | echo "<div id='suns".$id."'>"; | ||||
if ($lastid == $id || $cfg_admin_channel == 'array') { | if ($lastid == $id || $cfg_admin_channel == 'array') { | ||||
@@ -156,7 +156,7 @@ class TypeUnit | |||||
} | } | ||||
echo "<table>\r\n"; | echo "<table>\r\n"; | ||||
echo "<tr>\r\n"; | echo "<tr>\r\n"; | ||||
echo "<td align='left'>".$step.$timg."<a href='catalog_do.php?cid=".$id."&dopost=listArchives'{$smenu}>".$typeName."</a></td>\r\n"; | |||||
echo "<td align='left'>".$step."<a href='catalog_do.php?cid=".$id."&dopost=listArchives'>".$typeName."</a></td>\r\n"; | |||||
echo "</tr>\r\n"; | echo "</tr>\r\n"; | ||||
echo "</table>\r\n"; | echo "</table>\r\n"; | ||||
$this->LogicListAllSunType($id, $step." ", false); | $this->LogicListAllSunType($id, $step." ", false); | ||||