//修改后的信息统计。$day参数11表示本年1月,12表示本年二月,...,22表示本年12月
function user_TotalData1($classid,$enews=0,$day=0,$totaltype=0){
global $empire,$class_r,$class_zr,$dbtbpre,$fun_r,$class_tr;
if(empty($classid))
{
return "";
}
//统计类型
if($totaltype==1)//评论数
{
$totalfield='sum(plnum) as total';
}
elseif($totaltype==2)//点击数
{
$totalfield='sum(onclick) as total';
}
elseif($totaltype==3)//下载数
{
$totalfield='sum(totaldown) as total';
}
else//信息数
{
$totalfield='count(*) as total';
}
if($day)
{
if($day==1)//今日信息
{
$date=date("Y-m-d");
$starttime=$date." 00:00:01";
$endtime=$date." 23:59:59";
}
elseif($day==2)//本月信息
{
$date=date("Y-m");
$starttime=$date."-01 00:00:01";
$endtime=$date."-".date("t")." 23:59:59";
}
elseif($day==3)//本年信息
{
$date=date("Y");
$starttime=$date."-01-01 00:00:01";
$endtime=($date+1)."-01-01 00:00:01";
}
elseif($day>10)//本年某月信息
{
$yue=$day-10;
$date=date("Y");
$starttime=$date."-".$yue."-01 00:00:01";
if($yue==12){$endtime=$date."-".$yue."-31 23:59:59";}else{$endtime=$date."-".($yue+1)."-01 00:00:01";}
}
$and=" and newstime>=".to_time($starttime)." and newstime<=".to_time($endtime);
}
if($enews==1)//统计标题分类
{
if(empty($class_tr[$classid][tbname]))
{
echo $fun_r['BqErrorTtid']."=<b>".$classid."</b>".$fun_r['BqErrorNtb'];
return "";
}
$query="select ".$totalfield." from {$dbtbpre}ecms_".$class_tr[$classid][tbname]." where ttid='$classid'".$and;
}
elseif($enews==2)//统计数据表
{
$query="select ".$totalfield." from {$dbtbpre}ecms_".$classid.(empty($and)?'':' where '.substr($and,5));
}
else//统计栏目数据
{
if(empty($class_r[$classid][tbname]))
{
echo $fun_r['BqErrorCid']."=<b>".$classid."</b>".$fun_r['BqErrorNtb'];
return "";
}
if($class_r[$classid][islast])//终极栏目
{
$where="classid='$classid'";
}
else//大栏目
{
$where=ReturnClass($class_r[$classid][sonclass]);
}
$query="select ".$totalfield." from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where ".$where.$and;
}
$num=$empire->gettotal($query);
echo $num;
}
?>
2、新建标签代码仿站人员都知道仿站挣的就是时间钱,我们做的越快才能挣的越多,那么提高我们正常的仿站效率是每个仿站人员必修技能,那么快速仿站有哪些技巧呢和...
今天仿站小编介绍站内站外需要注意的事项才能提高百度权重相关内容的介绍,感兴趣的朋友们可以跟着小编去下文了解一下哦看一个网站的受欢迎程...
问:我设置了301跳转,多久可以生效? 答:目前搜索引擎无法承诺301跳转的生效时间,因为站长感受到的生效时间会受多因素影响,比如Baiduspider再次抓取...
个人仿站基本各行业都会有,无非就是哪些类型仿的多,哪些类型仿的少而已。下面给大家介绍下一些常见的个人仿站类型。一、流量类站点,一般包括影...
从使用上讲是一样的; 仿站是指 参考某一个网站,全部或者大部分的仿照他的样式或功能 这样做出来,这样做简单,因为不用再进行页面的设计,及功能需...
仿站网站的具体步骤为以下几个方面: 仿站第一步:客户确定目标网站,并确认需要哪些功能和栏目,以及需要修改的地方有哪些。 仿站第二步:与仿...