| @@ -23,6 +23,8 @@ if (!empty($channelid) && empty($tid)) { | |||||
| } else { | } else { | ||||
| $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' "); | $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' "); | ||||
| } | } | ||||
| if (empty($tinfos)) die( DedeAlert("栏目信息获取失败,请检查是否存在当前栏目", ALERT_DANGER)); | |||||
| if ($tinfos['issystem'] == -1) { | if ($tinfos['issystem'] == -1) { | ||||
| $nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace); | $nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace); | ||||
| $infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype); | $infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype); | ||||
| @@ -9,7 +9,7 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
| * @license GNU GPL v2 (https://www.dedebiz.com/license) | * @license GNU GPL v2 (https://www.dedebiz.com/license) | ||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| function MakePublicTag($atts = array(), $refObj = '', $fields = array()) | |||||
| function MakePublicTag($atts = array(), $refObj = null, $fields = array()) | |||||
| { | { | ||||
| $atts['tagname'] = preg_replace("/[0-9]{1,}$/", "", $atts['tagname']); | $atts['tagname'] = preg_replace("/[0-9]{1,}$/", "", $atts['tagname']); | ||||
| $plusfile = DEDEINC.'/tpllib/plus_'.$atts['tagname'].'.php'; | $plusfile = DEDEINC.'/tpllib/plus_'.$atts['tagname'].'.php'; | ||||
| @@ -9,16 +9,6 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
| * @license GNU GPL v2 (https://www.dedebiz.com/license) | * @license GNU GPL v2 (https://www.dedebiz.com/license) | ||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| /** | |||||
| * 获取软件连接 | |||||
| * | |||||
| * @access public | |||||
| * @param string $fvalue 默认值 | |||||
| * @param object $ctag 解析标签 | |||||
| * @param object $refObj 引用对象 | |||||
| * @param bool $downloadpage 下载页面 | |||||
| * @return string | |||||
| */ | |||||
| function ch_softlinks($fvalue, &$ctag, &$refObj, $fname = '', $downloadpage = false) | function ch_softlinks($fvalue, &$ctag, &$refObj, $fname = '', $downloadpage = false) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| @@ -65,14 +55,14 @@ function ch_softlinks_all($fvalue, &$ctag, &$refObj, &$row) | |||||
| $link = trim($ctag->GetInnerText()); | $link = trim($ctag->GetInnerText()); | ||||
| $serverName = trim($ctag->GetAtt('text')); | $serverName = trim($ctag->GetAtt('text')); | ||||
| $islocal = trim($ctag->GetAtt('islocal')); | $islocal = trim($ctag->GetAtt('islocal')); | ||||
| if (isset($sertype_arr[$serverName]) && $islinktype && $sertype_arr[$serverName] != $link_type) continue; | |||||
| if (isset($sertype_arr[$serverName]) && $islinktype) continue; | |||||
| //分析本地链接 | //分析本地链接 | ||||
| if (!isset($firstLink) && $islocal == 1) $firstLink = $link; | if (!isset($firstLink) && $islocal == 1) $firstLink = $link; | ||||
| if ($islocal == 1 && $row['islocal'] != 1) continue; | if ($islocal == 1 && $row['islocal'] != 1) continue; | ||||
| //支持http,迅雷下载,ftp,flashget | //支持http,迅雷下载,ftp,flashget | ||||
| if (!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link)) { | |||||
| $link = $link; | |||||
| } | |||||
| // if (!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link)) { | |||||
| // $link = $link; | |||||
| // } | |||||
| $downloads = getDownloads($link); | $downloads = getDownloads($link); | ||||
| $uhash = substr(md5($link), 0, 24); | $uhash = substr(md5($link), 0, 24); | ||||
| if ($row['gotojump'] == 1) { | if ($row['gotojump'] == 1) { | ||||
| @@ -10,14 +10,6 @@ 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; | ||||
| @@ -31,6 +23,7 @@ function plus_channel(&$atts, &$refObj, &$fields) | |||||
| $topid = 0; | $topid = 0; | ||||
| //如果属性里没指定栏目id,从引用类里获取栏目信息 | //如果属性里没指定栏目id,从引用类里获取栏目信息 | ||||
| if (empty($typeid)) { | if (empty($typeid)) { | ||||
| $refObj = (object)$refObj; | |||||
| if (isset($refObj->TypeLink->TypeInfos['id'])) { | if (isset($refObj->TypeLink->TypeInfos['id'])) { | ||||
| $typeid = $refObj->TypeLink->TypeInfos['id']; | $typeid = $refObj->TypeLink->TypeInfos['id']; | ||||
| $reid = $refObj->TypeLink->TypeInfos['reid']; | $reid = $refObj->TypeLink->TypeInfos['reid']; | ||||
| @@ -182,7 +182,7 @@ class TypeLink | |||||
| if (count($oper) == 0) { | if (count($oper) == 0) { | ||||
| $query = "SELECT id,typename,ispart FROM `#@__arctype` WHERE 1=2 "; | $query = "SELECT id,typename,ispart FROM `#@__arctype` WHERE 1=2 "; | ||||
| } else { | } else { | ||||
| $admin_catalog_tmp = $admin_catalog = join(',', $oper); | |||||
| $admin_catalog = join(',', $oper); | |||||
| $this->dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id in($admin_catalog) GROUP BY reid "); | $this->dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id in($admin_catalog) GROUP BY reid "); | ||||
| $this->dsql->Execute(); | $this->dsql->Execute(); | ||||
| $topidstr = ''; | $topidstr = ''; | ||||
| @@ -219,7 +219,7 @@ class TypeLink | |||||
| * | * | ||||
| * @access public | * @access public | ||||
| * @param int $id 栏目id | * @param int $id 栏目id | ||||
| * @param int $step 步进标志 | |||||
| * @param string $step 步进标志 | |||||
| * @param int $oper 操作权限 | * @param int $oper 操作权限 | ||||
| * @return void | * @return void | ||||
| */ | */ | ||||
| @@ -89,7 +89,7 @@ class TypeUnitSelector | |||||
| * @param int $id 栏目id | * @param int $id 栏目id | ||||
| * @param int $channel 栏目id | * @param int $channel 栏目id | ||||
| * @param int $soncat 子级分类 | * @param int $soncat 子级分类 | ||||
| * @return string | |||||
| * @return void | |||||
| */ | */ | ||||
| function LogicListAllSunType($id, $channel = 0, &$soncat=0) | function LogicListAllSunType($id, $channel = 0, &$soncat=0) | ||||
| { | { | ||||
| @@ -127,7 +127,6 @@ else if ($dopost == "delArc") { | |||||
| ShowMsg("删除文档失败", $ENV_GOBACK_URL); | ShowMsg("删除文档失败", $ENV_GOBACK_URL); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| exit(); | |||||
| } | } | ||||
| //查看文档 | //查看文档 | ||||
| else if ($dopost == "viewArchives") { | else if ($dopost == "viewArchives") { | ||||
| @@ -211,7 +211,7 @@ function CheckRank($rank = 0, $money = 0) | |||||
| * | * | ||||
| * @access public | * @access public | ||||
| * @param int $channelid 栏目模型id | * @param int $channelid 栏目模型id | ||||
| * @return string | |||||
| * @return mixed | |||||
| */ | */ | ||||
| function countArchives($channelid) | function countArchives($channelid) | ||||
| { | { | ||||
| @@ -179,7 +179,7 @@ function GetFormItemValueA($ctag, $fvalue) | |||||
| * @param bool $isprint 是否打印 | * @param bool $isprint 是否打印 | ||||
| * @return string | * @return string | ||||
| */ | */ | ||||
| function PrintAutoFieldsAdd(&$fieldset, $loadtype = 'all', $isprint = TRUE) | |||||
| function PrintAutoFieldsAdd($fieldset, $loadtype = 'all', $isprint = TRUE) | |||||
| { | { | ||||
| $dtp = new DedeTagParse(); | $dtp = new DedeTagParse(); | ||||
| $dtp->SetNameSpace('field', '<', '>'); | $dtp->SetNameSpace('field', '<', '>'); | ||||
| @@ -142,8 +142,6 @@ if (empty($dopost)) { | |||||
| $gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
| echo $inQuery; | |||||
| exit(); | |||||
| ShowMsg("数据保存到数据库附加表出错,请联系管理员".str_replace('"', '', $gerr), "javascript:;"); | ShowMsg("数据保存到数据库附加表出错,请联系管理员".str_replace('"', '', $gerr), "javascript:;"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||