Sfoglia il codice sorgente

添加notypeid参数

tags/6.2.5
叙述、别离 2 anni fa
parent
commit
220d537c71
2 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +0
    -1
      src/system/taglib/channel.lib.php
  2. +2
    -2
      src/system/taglib/channelartlist.lib.php

+ 0
- 1
src/system/taglib/channel.lib.php Vedi File

@@ -38,7 +38,6 @@ function lib_channel(&$ctag, &$refObj)
//如果指定了栏目id,从数据库获取栏目信息 //如果指定了栏目id,从数据库获取栏目信息
else { else {
$row2 = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' "); $row2 = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' ");
if (is_array($row2)) { if (is_array($row2)) {
$typeid = $row2['id']; $typeid = $row2['id'];
$reid = $row2['reid']; $reid = $row2['reid'];


+ 2
- 2
src/system/taglib/channelartlist.lib.php Vedi File

@@ -13,7 +13,7 @@ require_once(DEDEINC.'/archive/partview.class.php');
function lib_channelartlist(&$ctag, &$refObj) function lib_channelartlist(&$ctag, &$refObj)
{ {
global $dsql, $envs, $_sys_globals; global $dsql, $envs, $_sys_globals;
//添加不调用指定栏目文档参数,语法 notypeid='1'
//添加不调用指定栏目参数notypeid
$attlist = 'typeid|0,row|20,cacheid|,notypeid|0'; $attlist = 'typeid|0,row|20,cacheid|,notypeid|0';
FillAttsDefault($ctag->CAttribute->Items, $attlist); FillAttsDefault($ctag->CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP); extract($ctag->CAttribute->Items, EXTR_SKIP);
@@ -42,11 +42,11 @@ function lib_channelartlist(&$ctag, &$refObj)
$tpsql = " id IN($typeid) AND ishidden<>1 "; $tpsql = " id IN($typeid) AND ishidden<>1 ";
} }
} }
$dsql->SetQuery("SELECT * FROM `#@__arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum");
//否定指定栏目 //否定指定栏目
if ($notypeid!=0) { if ($notypeid!=0) {
$tpsql = $tpsql."and not(id in($notypeid))"; $tpsql = $tpsql."and not(id in($notypeid))";
} }
$dsql->SetQuery("SELECT * FROM `#@__arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum");
$dsql->Execute(); $dsql->Execute();
while ($row = $dsql->GetArray()) { while ($row = $dsql->GetArray()) {
$typeids[] = $row; $typeids[] = $row;


Loading…
Annulla
Salva