<?php
# Name: PHP版程氏音乐CMS管理系统 v3.0
# Author: 程氏<web@chshcms.com> [QQ:848769359]
# Homepage:http://www.chshcms.cn/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
header("Cache-Control: no-cache, must-revalidate"); 
header("Pragma: no-cache");
if(!eregi($_SERVER['SERVER_NAME'],$_SERVER['HTTP_REFERER'])){exit('QQ:848769359');}
include_once("../lib/cs_conn.php");
include_once("../lib/cs_common.php");
$ac=CS_Request('ac');

global $db;
switch($ac){
	case 'dc':
		$sql="select count(CS_ID) as recount from ".Getdbname('dance')." where CS_YID=0 and CS_CID<>0";
		break;
	case 'dd':
		$sql="select count(CS_ID) as recount from ".Getdbname('dance')." where CS_YID=0 and CS_CID<>0 and DATEDIFF(DATE(CS_AddTime),'".date('Y-m-d')."')=0";
		break;
	case 'uc':
		$sql="select count(CS_ID) as recount from  ".Getdbname('user')." where CS_SID=0";
		break;
	case 'ud':
		$sql="select count(CS_ID) as recount from  ".Getdbname('user')." where CS_SID=0 and  DATEDIFF(DATE(CS_AddTime),'".date('Y-m-d')."')=0";
		break;
	case 'ac':
		$sql="select count(CS_ID) as recount from ".Getdbname('news')." where CS_YID=0 and CS_CID<>0";
		break;	
	case 'ad':
		$sql="select count(CS_ID) as recount from ".Getdbname('news')." where CS_YID=0 and CS_CID<>0 and DATEDIFF(DATE(CS_AddTime),'".date('Y-m-d')."')=0";
		break;	
}
		$row=$db -> getRow($sql);	
		$nums= $row['recount'];
	
	

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