来客旗下网站:来客网站设计
服务热线:18106308119(微信)联系我们支付方式

威海网站建设,威海网络公司

帝国CMS

怎样在帝国CMS中利用计划任务自动审核栏目信息并自动更新为当时时间

DATE:2015-02-04 16:43:07
在这里给大家介绍一下帝国CMS如何利用计划任务自动审核栏目信息并自动更新为当时时间 : <?php if(!defined(&#39;InEmpireCMS&#39;)){ exit();}//include("../class/c
标签:

在这里给大家介绍一下帝国CMS如何利用计划任务自动审核栏目信息并自动更新为当时时间 :

 

<?php

 

if(!defined('InEmpireCMS'))

{

        exit();

}

//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.=$r['id'].",";

}

$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))

{

        GetHtml($rs,$ret_r);

                ReListHtml_ask($rs['classid'],0);

        //$rst=$empire->fetch1("select bclassid from {$dbtbpre}enewsclass where classid=".$rs['classid']."");

                //ReListHtml_ask($rst['bclassid'],0);

                html_pindao($rs['classid']);

}

//echo $id_s;

$indextemp=GetIndextemp();

NewsBq($classid,$indextemp,1,0);

function html_pindao($classid){

        global $empire,$class_r,$dbtbpre;

        $rst=$empire->fetch1("select bclassid,classid from {$dbtbpre}enewsclass where classid=".$classid."");

        if($rst['bclassid']==0){

                ReListHtml_ask($rst['bclassid'],0);

        }else{

                ReListHtml_ask($rst['bclassid'],0);

                html_pindao($rst['bclassid']);

        }

}

//刷新信息列表

function ReListHtml_ask($classid,$enews=0){

        global $empire,$class_r,$dbtbpre;

        $classid=(int)$classid;

        $r=$empire->fetch1("select classtempid,islist from {$dbtbpre}enewsclass where classid='$classid'");

        if($class_r[$classid][islast])

        {

                ListHtml($classid,$ret_r,0);

        }

        else

        {

                if($r[islist]==1)

                {

                        ListHtml($classid,$ret_r,3);

                }

                else

                {

                        $classtemp=$r[islist]==2?GetClassText($classid):GetClassTemp($r['classtempid']);

                        NewsBq($classid,$classtemp,0,0);

                }

        }

        if($enews==1)

        {return "";}

}

?>

提交需求告诉我们您的求,我们会在24小时内与您联得联系,资料会保密!

服务项目
高端网页设计定制
移动应用设计开发
网络营销推广
成功案例
最新案例
网站建设
移动营销
网络营销
网店装修
客户名录
关于来客
公司简介
公司新闻
联系我们
在线问答
解决方案
网站建设
电商运营
移动营销
网络营销
站长博客
网页设计
手机网站
网站优化
天猫装修

电话:18106308119  邮箱:19767526@qq.com

© Copyright 2010-2015来客网站设计工作室保留所有权利    鲁ICP备13009554号-4

站点地图|