📄 export_bat.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/check_type.php" );
include_once( "inc/utility_all.php" );
ob_end_clean( );
header( "Cache-control: private" );
header( "Content-type: application/vnd.ms-excel" );
header( "Content-Disposition: attachment; filename= 内部邮件.xls" );
echo "\r\n<html xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n<head>\r\n<title></title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n<body topmargin=\"5\">\r\n <table border=\"1\" cellspacing=\"1\" width=\"95%\" class=\"small\" cellpadding=\"3\">\r\n <tr style=\"BACKGROUND: #D3E5FA; color: #000000; f";
echo "ont-weight: bold;\">\r\n <td align=\"center\">收件人</td>\r\n <td align=\"center\">发件人</td>\r\n <td align=\"center\">抄送</td>\r\n <td align=\"center\">重要级别</td>\r\n <td align=\"center\">主题</td>\r\n <td align=\"center\">时间</td>\r\n <td align=\"center\">内容</td>\r\n </tr>\r\n";
$query = "SELECT * from EMAIL where find_in_set(EMAIL_ID,'{$DELETE_STR}')";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$TO_ID = $ROW['TO_ID'];
$FROM_ID = $ROW['FROM_ID'];
$COPY_TO_ID = $ROW['COPY_TO_ID'];
$IMPORTANT = $ROW['IMPORTANT'];
$SUBJECT = $ROW['SUBJECT'];
$CONTENT = $ROW['CONTENT'];
$SEND_TIME = $ROW['SEND_TIME'];
if ( $TO_ID != $LOGIN_USER_ID && $FROM_ID != $LOGIN_USER_ID )
{
}
else
{
$SUBJECT = str_replace( "<", "<", $SUBJECT );
$SUBJECT = str_replace( ">", ">", $SUBJECT );
$SUBJECT = stripslashes( $SUBJECT );
$CONTENT = str_replace( " ", " ", $CONTENT );
$CONTENT = str_replace( "\n", "<br>", $CONTENT );
$query1 = "SELECT * from USER where USER_ID='{$FROM_ID}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$FROM_NAME = $ROW['USER_NAME'];
}
$query1 = "SELECT * from USER where USER_ID='{$TO_ID}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$TO_NAME = $ROW['USER_NAME'];
}
$COPY_TO_NAME = "";
$TOK = strtok( $COPY_TO_ID, "," );
while ( $TOK != "" )
{
$query1 = "SELECT * from USER where USER_ID='{$TOK}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$COPY_TO_NAME .= $ROW['USER_NAME'].",";
}
$TOK = strtok( "," );
}
if ( substr( $COPY_TO_NAME, -1 ) == "," )
{
$COPY_TO_NAME = substr( $COPY_TO_NAME, 0, -1 );
}
if ( $IMPORTANT == "0" || $IMPORTANT == "" )
{
$IMPORTANT_DESC = "";
}
else if ( $IMPORTANT == "1" )
{
$IMPORTANT_DESC = "<font color=\"#FF6600\">重要</font>";
}
else if ( $IMPORTANT == "2" )
{
$IMPORTANT_DESC = "<font color=\"#FF0000\">非常重要</font>";
}
echo " <tr>\r\n <td nowrap align=\"center\">";
echo $TO_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $FROM_NAME;
echo "</td>\r\n <td>";
echo $COPY_TO_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $IMPORTANT_DESC;
echo "</td>\r\n <td nowrap>";
echo $SUBJECT;
echo "</td>\r\n <td nowrap align=\"center\" x:str=\"'";
echo $SEND_TIME;
echo "\">";
echo $SEND_TIME;
echo "</td>\r\n <td>";
echo $CONTENT;
echo "</td>\r\n </tr>\r\n";
}
}
echo "</table>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -