⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 report.php

📁 极限网络智能办公系统 - Office Automation 2.8 100% 源码
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/check_type.php" );
include_once( "inc/utility_all.php" );
echo "\r\n<html>\r\n<head>\r\n<title>手机短信统计</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "cript>\r\nfunction delete_sms(USER_ID)\r\n{\r\n msg='确认要删除该用户的发送记录么?';\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete_user.php?USER_ID=\" + USER_ID;\r\n  window.location=URL;\r\n }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
if ( $BEGIN_DATE != "" )
{
	$TIME_OK = is_date_time( $BEGIN_DATE );
	if ( !$TIME_OK )
	{
		message( "错误", "起始时间格式不对,应形如 1999-1-2 14:55:20" );
		button_back( );
		exit( );
	}
}
if ( $END_DATE != "" )
{
	$TIME_OK = is_date_time( $END_DATE );
	if ( !$TIME_OK )
	{
		message( "错误", "截止时间格式不对,应形如 1999-1-2 14:55:20" );
		button_back( );
		exit( );
	}
}
$query_sms = "SELECT count(*) from SMS2 where 1=1";
if ( $END_DATE != "" )
{
	$query_sms .= " and SEND_TIME<='{$END_DATE}'";
}
if ( $BEGIN_DATE != "" )
{
	$query_sms .= " and SEND_TIME>='{$BEGIN_DATE}'";
}
echo "\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/system.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 手机短信发送统计</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n";
$query1 = "SELECT * from USER,USER_PRIV,DEPARTMENT where DEPARTMENT.DEPT_ID=USER.DEPT_ID and USER.USER_PRIV=USER_PRIV.USER_PRIV and NOT_LOGIN!='1' order by DEPT_NO,PRIV_NO,USER_NO,USER_NAME";
$cursor = exequery( $connection, $query1 );
$USER_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$USER_COUNT;
	$USER_ID = $ROW['USER_ID'];
	$DEPT_NAME = $ROW['DEPT_NAME'];
	$USER_NAME = $ROW['USER_NAME'];
	$query = $query_sms." and SEND_FLAG='1' and FROM_ID='{$USER_ID}'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$COUNT1 = $ROW[0];
	}
	$query = $query_sms." and SEND_FLAG='0' and FROM_ID='{$USER_ID}'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$COUNT2 = $ROW[0];
	}
	$query = $query_sms." and SEND_FLAG='2' and FROM_ID='{$USER_ID}'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$COUNT3 = $ROW[0];
	}
	if ( $USER_COUNT == 1 )
	{
		echo "     <table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\">\r\n      <tr class=\"TableHeader\">\r\n       <td nowrap align=\"center\">部门</td>\r\n       <td nowrap align=\"center\">用户</td>\r\n       <td nowrap align=\"center\">发送成功</td>\r\n       <td nowrap align=\"center\">未发送</td>\r\n       <td nowrap align=\"center\">发送失败</td>\r\n       <td nowrap align=\"center\">操作</td>\r\n      ";
		echo "</tr>\r\n";
	}
	if ( $USER_COUNT % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	echo "    <tr class=\"";
	echo $TableLine;
	echo "\">\r\n    \t<td nowrap align=\"center\">";
	echo $DEPT_NAME;
	echo "</td>\r\n      <td nowrap align=\"center\">";
	echo $USER_NAME;
	echo "</td>\r\n      <td nowrap align=\"center\">";
	echo $COUNT1;
	echo "      <td nowrap align=\"center\">";
	echo $COUNT2;
	echo "</td>\r\n      <td nowrap align=\"center\">";
	echo $COUNT3;
	echo "</td>\r\n      <td nowrap align=\"center\">\r\n          <a href=\"javascript:delete_sms('";
	echo $USER_ID;
	echo "');\">删除该用户的发送记录</a>\r\n      </td>\r\n    </tr>\r\n";
}
echo "</table>";
button_back( );
echo "\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -