<?php

/*

'**************************************************************************************************

' 软件名称: 黑色幻想舞曲管理系统CMS2.0

' 版本编号: hshxsdj 2.0

' 官方网站: http://www..hshxs.com

' 官方论坛：http://bbs.hshxs.com

' 版权所有: 黑色幻想开发团队    噬己翼(QQ:532917920)

' 郑重声明:

'    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	 

}

?>