在这里给大家介绍一下帝国CMS如何利用计划任务自动审核栏目信息并自动更新为当时时间 :
<?php
if(!defined('InEmpireCMS'))
{
}
//include("../class/connect.php");
//include("../class/db_sql.php");
//include("../class/functions.php");
//include("../data/language/gb/pub/fun.php");
//include("../class/t_functions.php");
//include("../data/dbcache/MemberLevel.php");
//include("../data/dbcache/class.php");
//$link=db_connect();
//$empire=new mysqlquery();
//$check_tbname=RepPostVar($check_tbname);
//$check_infoid=(int)$check_infoid;
//$check_classid=(int)$check_classid;
//自定义变量
//####################################
$time=time();
$classid_s="1";//栏目ID
$biao_s="news";//数据库名
$tiao_s=1; //更新数量
//####################################
$sql=$empire->query("select * from {$dbtbpre}ecms_".$biao_s." where checked = 0 and classid in (".$classid_s.") ORDER BY `truetime` ASC LIMIT {$tiao_s}");
while($r=$empire->fetch($sql))
{
}
$id_s=$id_s."0";
$empire->query("UPDATE `{$dbtbpre}ecms_{$biao_s}` SET checked = 1,truetime='".$time."',newstime='".$time."' where checked=0 and id in (".$id_s.") ");
$sql=$empire->query("select * from {$dbtbpre}ecms_".$biao_s." where id in (".$id_s.")");
while($rs=$empire->fetch($sql))
{
}
//echo $id_s;
$indextemp=GetIndextemp();
NewsBq($classid,$indextemp,1,0);
function html_pindao($classid){
}
//刷新信息列表
function ReListHtml_ask($classid,$enews=0){
}
?>