📄 index.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/ip2add.php" );
$query = "SELECT * from USER where USER_ID='".$LOGIN_USER_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_NAME = $ROW['USER_NAME'];
}
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 class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/menu/system.gif\" align=\"absmiddle\"><span class=\"big3\"> 最近20条系统安全日志</span><br>\r\n </td>\r\n </tr>\r\n</table>\r\n";
$query = "SELECT * from SYS_LOG where (TYPE='1' or TYPE='2' or TYPE='14') and USER_ID='".$LOGIN_USER_ID."' order by TIME desc";
$cursor = exequery( $connection, $query );
if ( mysql_num_rows( $cursor ) == 0 )
{
message( "", "无系统安全日志记录" );
exit( );
}
echo "<br>\r\n<table class=\"TableList\" width=\"70%\" align=\"center\">\r\n <tr class=\"TableHeader\">\r\n <td align=\"center\">用户</td>\r\n <td align=\"center\">时间</td>\r\n <td align=\"center\">IP地址</td>\r\n <td align=\"center\">IP所在地</td>\r\n <td align=\"center\">类型</td>\r\n <td align=\"center\">备注</td>\r\n </tr>\r\n";
$LOG_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$LOG_COUNT;
if ( 20 < $LOG_COUNT )
{
break;
}
$TIME = $ROW['TIME'];
$IP = $ROW['IP'];
$TYPE = $ROW['TYPE'];
$REMARK = $ROW['REMARK'];
$IP_ADD = convertip( $IP );
$TYPE_DESC = get_code_name( $TYPE, "SYS_LOG" );
if ( $LOG_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\r\n <td nowrap align=\"center\">";
echo $USER_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $TIME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $IP;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $IP_ADD;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $TYPE_DESC;
echo "</td>\r\n <td align=\"left\">";
echo $REMARK;
echo "</td>\r\n </tr>\r\n";
}
echo "</table>\r\n\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -