index.php

来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 99 行

PHP
99
字号
<?
  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 '
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="90%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/system.gif" align="absmiddle">';
  echo '<s';
  echo 'pan class="big3"> 最近20条系统安全日志</span><br>
    </td>
  </tr>
</table>
';
  $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 '<table border="0" cellspacing="1" width="70%" align="center" class="small" bgcolor="#000000" cellpadding="3">
    <tr class="TableHeader">
      <td align="center">用户</td>
      <td align="center">时间</td>
      <td align="center">IP地址</td>
      <td align="center">IP所在地</td>
      <td align="center">类型</td>
      <td align="center">备注</td>
    </tr>
';
  $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 '">
      <td nowrap align="center">';
    echo $USER_NAME;
    echo '</td>
      <td nowrap align="center">';
    echo $TIME;
    echo '</td>
      <td nowrap align="center">';
    echo $IP;
    echo '</td>
      <td nowrap align="center">';
    echo $IP_ADD;
    echo '</td>
      <td nowrap align="center">';
    echo $TYPE_DESC;
    echo '</td>
      <td align="left">';
    echo $REMARK;
    echo '</td>
    </tr>
';
  }
  echo '</table>
<br>
<div align="center">
  <input type="button" value="返回" class="BigButton" onClick="location=\'../\'">
</div>
</body>
</html>
';
?>

⌨️ 快捷键说明

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