window.close();";
exit();
}
//表名
$tbname='';
if($classid)
{
$tbname=$class_r[$classid]['tbname'];
}
elseif($tid)
{
$tbr=$empire->fetch1("select tbname from {$dbtbpre}enewstable where tid='$tid'");
$tbname=$tbr['tbname'];
}
if(!$tbname)
{
printerror('ErrorUrl','');
}
//ID
$id=eReturnInids($id);
$where='id in ('.$id.')';
$ztids='';
$zcids='';
for($i=0;$i<$count;$i++)
{
$true_ztid=(int)$ztid[$i];
if(!$true_ztid)
{
continue;
}
$true_cid=(int)$cid[$true_ztid];
if($true_cid<0)
{
$true_cid=0;
}
$ztids.=$dh.$true_ztid;
$dh=',';
AddMoreInfoToZt($true_ztid,$true_cid,$tbname,$where,1);
}
//操作日志
insert_dolog("classid=$classid&tid=$tid
ztid=".$ztids."
id=".$id);
echo"";
exit();
}
//返回所属选择专题
function ReturnZtToInfo($add,$userid,$username){
global $empire,$dbtbpre,$class_r;
$ztid=$add['ztid'];
$cid=$add['cid'];
$count=count($ztid);
if(!$count)
{
//echo"";
//exit();
}
$ztids='';
$zcids='';
$oldztids=$add['oldztids'];
$oldzcids=$add['oldcids'];
for($i=0;$i<$count;$i++)
{
$true_ztid=(int)$ztid[$i];
if(!$true_ztid)
{
continue;
}
$true_cid=(int)$cid[$true_ztid];
$ztids.=$dh.$true_ztid;
$dh=',';
$zcids.=$cdh.$true_cid;
$cdh=',';
}
?>
alert('请选择信息');window.close();";
exit();
}
//信息
$info_ztids='';
$info_cids='';
if($sinfo&&$id)
{
$ztdh='';
$cdh='';
$id=(int)$id;
$infosql=$empire->query("select ztid,cid from {$dbtbpre}enewsztinfo where id='$id' and classid='$classid'");
while($infor=$empire->fetch($infosql))
{
$info_ztids.=$ztdh.$infor['ztid'];
$ztdh=',';
if($infor['cid'])
{
$info_cids.=$cdh.$infor['cid'];
}
else
{
$info_cids.=$cdh.'-'.$infor['ztid'];
}
$cdh=',';
}
}
elseif($sinfo&&empty($id))
{
$firstpost=1;
}
$time=time();
//专题
$query="select ztid,ztname from {$dbtbpre}enewszt where usezt=0 and (endtime=0 or endtime>$time)".$add." order by myorder,ztid desc";
$sql=$empire->query($query);
//分类
$zcstr="";
$zcsql=$empire->query("select classid,classname from {$dbtbpre}enewsztclass order by classid");
while($zcr=$empire->fetch($zcsql))
{
$select="";
if($zcr[classid]==$zcid)
{
$select=" selected";
}
$zcstr.="";
}
?>
位置: 推送信息到专题
|