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

📄 check_capacity.php

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

function capacity_warning( $REMARK )
{
	global $EMAIL_CAPACITY;
	echo "<body class=\"bodycolor\" topmargin=\"5\"><br>";
	message( "警告", "您的邮箱已超过容量限制,请清除您的无用邮件!<br><br><div align=left>邮箱限制容量:".number_format( $EMAIL_CAPACITY * 1024 * 1024, 0, ".", "," )." 字节".$REMARK."</div>" );
	echo "<br>\r\n<div align=\"center\">\r\n <input type=\"button\"  value=\"返回\" class=\"BigButton\" onClick=\"location='../';\">\r\n</div>\r\n";
}

include_once( "inc/auth.php" );
$query = "SELECT * from USER where USER_ID='".$LOGIN_USER_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$EMAIL_CAPACITY = $ROW['EMAIL_CAPACITY'];
}
if ( $EMAIL_CAPACITY != 0 )
{
	$USER_ID = $LOGIN_USER_ID;
	$EMAIL_SIZE1 = 0;
	$query = "SELECT sum(SIZE) from EMAIL,EMAIL_BODY where EMAIL.BODY_ID=EMAIL_BODY.BODY_ID and TO_ID='".$USER_ID."' and SEND_FLAG='1' and DELETE_FLAG!='1'";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$EMAIL_SIZE1 = $ROW[0];
	}
	if ( $EMAIL_CAPACITY * 1024 * 1024 <= $EMAIL_SIZE1 )
	{
		capacity_warning( "<br>收件箱(包括已删除邮件箱):".number_format( $EMAIL_SIZE1, 0, ".", "," )." 字节" );
		exit( );
	}
	$EMAIL_SIZE2 = 0;
	$query = "SELECT sum(SIZE) from EMAIL,EMAIL_BODY where EMAIL.BODY_ID=EMAIL_BODY.BODY_ID and FROM_ID='".$USER_ID."' and SEND_FLAG='0'";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$EMAIL_SIZE2 = $ROW[0];
	}
	if ( $EMAIL_CAPACITY * 1024 * 1024 <= $EMAIL_SIZE1 + $EMAIL_SIZE2 )
	{
		capacity_warning( "<br>收件箱(包括已删除邮件箱):".number_format( $EMAIL_SIZE1, 0, ".", "," )." 字节<br>发件箱:".number_format( $EMAIL_SIZE2, 0, ".", "," )." 字节" );
		exit( );
	}
	$EMAIL_SIZE3 = 0;
	$query = "SELECT sum(SIZE) from EMAIL,EMAIL_BODY where EMAIL.BODY_ID=EMAIL_BODY.BODY_ID and FROM_ID='".$USER_ID."' and SEND_FLAG='1' and DELETE_FLAG!='2' and DELETE_FLAG!='4'";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$EMAIL_SIZE3 = $ROW[0];
	}
	if ( $EMAIL_CAPACITY * 1024 * 1024 <= $EMAIL_SIZE1 + $EMAIL_SIZE2 + $EMAIL_SIZE3 )
	{
		capacity_warning( "<br>收件箱(包括已删除邮件箱):".number_format( $EMAIL_SIZE1, 0, ".", "," )." 字节<br>发件箱:".number_format( $EMAIL_SIZE2, 0, ".", "," )." 字节<br>已发送邮件箱:".number_format( $EMAIL_SIZE3, 0, ".", "," )." 字节<br>合计:".number_format( $EMAIL_SIZE, 0, ".", "," )." 字节" );
		exit( );
	}
	$SUBJECT = "";
	$CONTENT = "";
	$ATTACHMENT_ID = "";
	$ATTACHMENT_NAME = "";
}
?>

⌨️ 快捷键说明

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