<?php
/*
'**************************************************************************************************
' 软件名称: 盘锦DJ舞曲网CMS Content Management PjRen.Net
' 版本编号: Version 2.5
' 盘锦舞曲: http://www.pj57.com
' 官方网站: http://www.pjren.net
' 小说网站: http://www.hx39.com
' 0427DJ网: http://www.0427dj.net
' 官方论坛: http://www.tianjiazhen.com
' 版权所有: 盘锦舞曲开发团队    盘锦人(QQ:814006710)
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、盘锦网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include "../include/conn.php";
include "../include/function.php";
$action=SafeRequest("action","get","zr");
$S_ID=SafeRequest("id","get","zr");
if($action=="ah" or $action=="vh"){
	if(!IsNum($S_ID)) die();
}
switch($action){
	case 'vc':
		$sql="select count(S_ID) as recount from s_video where S_IsHide<>1 and S_ClassID<>0";
		break;
	case 'vd':
		$sql="select count(S_ID) as recount from s_video where S_IsHide<>1 and S_ClassID<>0 and DATEDIFF(DATE(S_AddTime),'".date('Y-m-d')."')=0";
		break;
	case 'uc':
		$sql="select count(S_ID) as recount from  s_users where S_State<>1";
		break;
	case 'ud':
		$sql="select count(S_ID) as recount from  s_users where S_State<>1 and  DATEDIFF(DATE(S_CreateTime),'".date('Y-m-d')."')=0";
		break;
	case 'ad':
		$sql="select count(S_ID) as recount from s_article where S_IsHide<>1 and S_ClassID<>0 and DATEDIFF(DATE(S_AddTime),'".date('Y-m-d')."')=0";
		break;	
	case 'ac':
		$sql="select count(S_ID) as recount from s_article where S_IsHide<>1 and S_ClassID<>0";
		break;
	case 'hd':
		$sql="select count(S_ID) as recount from s_huodongall";
		break;
	case 'ah':		
		$sql="update s_article set S_Hits=S_Hits+1 where S_ID=".$S_ID."";
		break;
	case 'vh':
		$sql="update s_video set S_Hits=S_Hits+1 where S_ID=".$S_ID."";
		break;		
	}
	
	if($action=="ah" or $action=="vh"){
		$result=$db->query($sql);
		}
	else{	
		$row=$db -> getRow($sql);	
		$nums= $row['recount'];
	
	

?>
document.writeln("<?php echo $nums?>");
<?php	 
}
?>