📄 export.php
字号:
<?php
include_once( "inc/auth.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= {$LOGIN_USER_ID}.xls" );
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</head>\r\n\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; font-weight: bold;\">\r\n <td nowrap align=\"center\">日期 <img border=0 src=\"/images/arrow_down.gif\" width=\"11\" height=\"10\">";
echo "</td>\r\n <td nowrap align=\"center\">日志类型</td>\r\n <td nowrap align=\"center\">日志内容</td>\r\n </tr>\r\n";
$cursor = exequery( $connection, $QUERY_DIARY );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$DIA_ID = $ROW['DIA_ID'];
$DIA_DATE = $ROW['DIA_DATE'];
$DIA_DATE = strtok( $DIA_DATE, " " );
$DIA_TYPE = $ROW['DIA_TYPE'];
$CONTENT = $ROW['CONTENT'];
$FLAG = 0;
if ( $KEY1 != "" && stristr( strip_tags( $CONTENT ), $KEY1 ) )
{
++$FLAG;
}
if ( $KEY2 != "" && stristr( strip_tags( $CONTENT ), $KEY2 ) )
{
++$FLAG;
}
if ( $KEY3 != "" && stristr( strip_tags( $CONTENT ), $KEY3 ) )
{
++$FLAG;
}
if ( $FLAG == 0 && ( $KEY1 != "" || $KEY2 != "" || $KEY3 != "" ) )
{
}
else
{
switch ( $DIA_TYPE )
{
case "1" :
$DIA_TYPE_DESC = "工作日志";
break;
case "2" :
$DIA_TYPE_DESC = "个人日志";
}
echo " <tr style=\"BACKGROUND: #FFFFFF;\">\r\n <td nowrap align=\"center\" width=\"100\">";
echo $DIA_DATE;
echo "</td>\r\n <td nowrap align=\"center\" width=\"100\">";
echo $DIA_TYPE_DESC;
echo "</td>\r\n <td>";
echo $CONTENT;
echo "</td>\r\n </tr>\r\n";
}
}
echo " </table>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -