帝国CMS显示指定时间内更新的数据数量,会员数,最新会员今日文章数,昨日文章数

帝国CMS统计总文章数,会员数,最新会员今日文章数,昨日文章数 

帝国CMS显示指定时间内更新的信息数量,如1天内列新多少条信息:

 

用sql调用
12小时:<?=$empire->gettotal("select count(*) as total from phome_ecms_表 where newstime>UNIX_TIMESTAMP()-24*3600")?>
6小时:<?=$empire->gettotal("select count(*) as total from phome_ecms_表 where newstime>UNIX_TIMESTAMP()-6*3600")?>

<?php

$members=$empire->gettotal("select count(*) as total from phome_enewsmember"); 

$newmember=$empire->fetch1("select userid,username from phome_enewsmember order by userid desc limit 1"); 

$tzcount=$empire->gettotal("select count(*) as total from phome_ecms_news"); 

$plnum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewspl"); 

$pltzcont=$tzcount+$plnum; 

?> 

<div class="forumstatus"> 

今日: <em class="numeric">[totaldata]'news',2,1[/totaldata]</em> , 

昨日: <em class="numeric">[ztotal]栏目ID[/ztotal]</em> , 

主题: <em class="numeric"><?=$tzcount?></em> , 

帖子: <em class="numeric"><?=$pltzcont?></em> , 

用户: <em class="numeric"><?=$members?></em>, 

最新会员: <em class="numeric"><?=$newmember[username]?></em> 

</div>

扫一扫手机访问