Example #1
0
if($ismember==1) $whereSql .= " And a.mid > 0 ";

if(!empty($memberid)) $whereSql .= " And a.mid = '$memberid' ";
else $memberid = 0;

if(!empty($cids)){
	$whereSql .= " And a.typeid in ($cids) ";
}

if($keyword!=""){
	$whereSql .= " And a.title like '%$keyword%' ";
}

if($cid!=0){
	$tlinkids = $tl->GetSunID($cid,'',0,true);
	if($tlinkids != -1){
		$whereSql .= " And a.typeid in($tlinkids) ";
	}
}

if($adminid>0){ $whereSql .= " And a.adminid = '$adminid' "; }

if($arcrank!=''){
	$whereSql .= " And a.arcrank = '$arcrank' ";
	$CheckUserSend = "<input type='button' onClick=\"location='full_list.php?channelid=$channelid';\" value='所有文档' class='inputbut'>";
}
else{
	$whereSql .= " And a.arcrank >-1 ";
	$CheckUserSend = "<input type='button' onClick=\"location='full_list.php?arcrank=-1&channelid=$channelid';\" value='稿件审核' class='inputbut'>";
}
   }else{
  	 if(top.document.getElementById('menu').src.indexOf('catalog_menu.php')>=1)
     { top.document.getElementById('menu').src = 'catalog_menu.php?$rndtime'; }
   }
   -->
   </script>
   ";

//"-------------------------------
   
   //更改子栏目属性
   if(!empty($upnext))
   {
   	 require_once(dirname(__FILE__)."/../include/inc_typelink.php");
   	 $tl = new TypeLink($ID);
   	 $slinks = $tl->GetSunID($ID,'###',0);
   	 $slinks = str_replace("###.typeid","ID",$slinks);
   	 $upquery = "
       Update #@__arctype set
       issend='$issend',
       defaultname='$defaultname',
       channeltype='$channeltype',
       tempindex='$tempindex',
       templist='$templist',
       temparticle='$temparticle',
       namerule='$namerule',
       namerule2='$namerule2',
       moresite='$moresite',
       siterefer='$siterefer',
       sitepath='$sitepath',
       siteurl='$siteurl',
$opall=1;
if(is_array($seltypeids)){
	$optionarr = GetTypeidSel('form3','cid','selbt1',$channelid,$seltypeids['ID'],$seltypeids['typename']);
}else{
	$optionarr = GetTypeidSel('form3','cid','selbt1',$channelid,0,'请选择...');
}

if(empty($channelid)) $whereSql = " where arc.channelid != -1 ";
else $whereSql = " where arc.channelid = '$channelid' ";

if($keyword!=""){
	$whereSql .= " And (arc.title like '%$keyword%' Or arc.keywords like '%$keyword%' Or arc.addinfos like '%$keyword%') ";
}

if($typeid!=0){
	$tids = $tl->GetSunID($typeid,'',$channelid,true);
	$whereSql .= " And arc.typeid in($tids) ";
}

$query = "
select arc.aid as ID,arc.typeid,arc.uptime,arc.channelid,arc.arcrank,arc.title,
arc.litpic,arc.adminID,arc.mid,t.typename,c.typename as channelname 
from `#@__full_search` arc 
left join #@__arctype t on t.ID=arc.typeid
left join #@__channeltype c on c.ID=arc.channelid
$whereSql
order by aid desc
";

$dlist = new DataList();
$dlist->pageSize = 20;
if($ismember==1) $whereSql .= " And a.memberID > 0 ";

if(!empty($memberid)) $whereSql .= " And a.memberID = '$memberid' ";
else $memberid = 0;

if(!empty($cids)){
	$whereSql .= " And a.typeid in ($cids) ";
}

if($keyword!=""){
	$whereSql .= " And a.title like '%$keyword%' ";
}

if($cid!=0){
	$tlinkSql = $tl->GetSunID($cid,"a",0);
	$whereSql .= " And $tlinkSql ";
}

if($adminid>0){ $whereSql .= " And a.adminID = '$adminid' "; }

if($arcrank!=""){
	$whereSql .= " And a.arcrank = '$arcrank' ";
	$CheckUserSend = "<input type='button' onClick=\"location='catalog_do.php?channelid={$channelid}&cid={$cid}&dopost=listArchives&gurl=content_list.php';\" value='所有文档' class='inputbut'>";
}
else{
	//$whereSql .= " And a.arcrank >-1 ";
	$CheckUserSend = "<input type='button' onClick=\"location='catalog_do.php?channelid={$channelid}&cid={$cid}&dopost=listArchives&arcrank=-1&gurl=content_list.php';\" value='稿件审核' class='inputbut'>";
}

if(empty($orderby)) $orderby = "ID";
}
$opall=1;
if(is_array($seltypeids)){
	$optionarr = GetTypeidSel('form3','cid','selbt1',0,$seltypeids['ID'],$seltypeids['typename']);
}else{
	$optionarr = GetTypeidSel('form3','cid','selbt1',0,0,'请选择...');
}

$whereSql = " where arcs.channel = -1 ";

if($keyword!=""){
	$whereSql .= " And (arcs.title like '%$keyword%' Or arcs.writer like '%$keyword%' Or arcs.source like '%$keyword%') ";
}

if($typeid!=0){
	$tlinkSql = $tl->GetSunID($typeid,"arcs",0);
	$whereSql .= " And $tlinkSql ";
}

if($arcrank!=""){
	$whereSql .= " And arcs.arcrank=$arcrank ";
	$CheckUserSend = "<input type='button' onClick=\"location='content_s_list.php?cid=".$cid."';\" value='所有专题' class='inputbut' />";
}
else
{
	$CheckUserSend = "<input type='button' onClick=\"location='content_s_list.php?cid=".$cid."&arcrank=-1';\" value='待审核专题' class='inputbut' />";
}

$tl->Close();

$query = "