📄 getdata.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/ip2add.php" );
while ( list( $k, $v ) = each( &$GLOBALS['_GET'] ) )
{
$$k = iconv( "UTF-8", "GBK", $v );
}
while ( list( $k, $v ) = each( &$GLOBALS['_POST'] ) )
{
$$k = iconv( "UTF-8", "GBK", $v );
}
ob_end_clean( );
if ( $act == "count" )
{
$query = "select count(*) from FLOW_RUN_LOG WHERE 1=1";
}
else
{
$query = "select * from FLOW_RUN_LOG WHERE 1=1";
}
if ( $RUN_ID )
{
$query .= " and RUN_ID='".$RUN_ID."'";
}
if ( $RUN_NAME )
{
$query .= " and RUN_NAME LIKE '%".$RUN_NAME."%'";
}
if ( $FLOW_ID != "ALL" )
{
$query .= " and FLOW_ID='".$FLOW_ID."'";
}
if ( $BEGIN_TIME )
{
$query .= " and TIME>='".$BEGIN_TIME." 00:00:00'";
}
if ( $END_TIME )
{
$query .= " and TIME<='".$END_TIME." 23:59:59'";
}
if ( $IP )
{
$query .= " and IP='".$IP."'";
}
if ( $USER_ID )
{
$query .= " and USER_ID='".$USER_ID."'";
}
if ( $LOG_TYPE )
{
$query .= " and TYPE='".$LOG_TYPE."'";
}
if ( $act == "count" )
{
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$TOTAL_COUNT = $ROW[0];
}
echo $TOTAL_COUNT;
exit( );
}
$USER_NAME_ARR = array( );
$PRCS_NAME_ARR = array( );
$LOG_COUNT = 0;
$limit = $endrecord - $startrecord + 1;
$start = $startrecord - 1;
$query .= " order by TIME DESC";
$query .= " limit ".$start.",{$limit}";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$LOG_ID = $ROW['LOG_ID'];
$RUN_ID = $ROW['RUN_ID'];
$RUN_NAME = $ROW['RUN_NAME'];
$USER_ID = $ROW['USER_ID'];
$CONTENT = $ROW['CONTENT'];
$TIME = $ROW['TIME'];
$FLOW_ID = $ROW['FLOW_ID'];
$FLOW_PRCS = $ROW['FLOW_PRCS'];
$PRCS_ID = $ROW['PRCS_ID'];
$IP = $ROW['IP'];
$IP_ADD = convertip( $IP );
if ( !array_key_exists( $USER_ID, $USER_NAME_ARR ) )
{
$query1 = "select USER_NAME from USER WHERE USER_ID='".$USER_ID."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME_ARR["{$USER_ID}"] = $ROW['USER_NAME'];
}
}
$USER_NAME = $USER_NAME_ARR["{$USER_ID}"];
if ( $FLOW_PRCS != "" && $FLOW_PRCS != 0 )
{
if ( !$PRCS_NAME_ARR["{$FLOW_ID}"] )
{
$PRCS_NAME_ARR["{$FLOW_ID}"] = array( );
}
if ( !array_key_exists( $FLOW_PRCS, $PRCS_NAME_ARR["{$FLOW_ID}"] ) )
{
$query1 = "select PRCS_NAME from FLOW_PROCESS WHERE FLOW_ID='".$FLOW_ID."' AND PRCS_ID='{$FLOW_PRCS}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$PRCS_NAME_ARR["{$FLOW_ID}"]["{$FLOW_PRCS}"] = $ROW['PRCS_NAME'];
}
}
$PRCS_NAME = $PRCS_NAME_ARR["{$FLOW_ID}"]["{$FLOW_PRCS}"];
}
else
{
$PRCS_NAME = "-";
}
++$LOG_COUNT;
if ( $LOG_COUNT == 1 )
{
echo "<table class=\"TableList\" width=\"100%\" border=0>\r\n <tr class=\"TableHeader\">\r\n \t <td nowrap align=\"center\">选</td>\r\n <td nowrap align=\"center\">流水号</td>\r\n <td nowrap align=\"center\">工作名称/文号</td>\r\n <td nowrap align=\"center\">步骤号</td>\r\n <td nowrap align=\"center\">步骤名称</td>\r\n <td nowrap align=\"center\">相关人员</td>\r\n <td nowrap align=\"center\">发生时间</td>\r\n <td nowrap align=\"center\">IP地址</td>\r\n <td nowrap align=\"center\">内容</td>\r\n </tr>\r\n";
}
if ( $LOG_COUNT % 2 == 0 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\" id=\"";
echo $LOG_ID;
echo "\">\r\n \t<td nowrap align=\"center\"><input type=\"checkbox\" name=\"run_select\" value=\"";
echo $LOG_ID;
echo "\" onClick=\"check_one(self);\"></td>\r\n \t<td align=\"center\">";
echo $RUN_ID;
echo "</td>\r\n \t<td >";
echo $RUN_NAME;
echo "</td>\r\n \t<td align=\"center\">";
echo $PRCS_ID == 0 ? "-" : $PRCS_ID;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $PRCS_NAME;
echo "</td>\r\n \t<td align=\"center\">";
echo $USER_NAME;
echo "</td>\r\n \t<td align=\"center\">";
echo $TIME;
echo "</td>\r\n \t<td align=\"center\">";
echo $IP."(".$IP_ADD.")";
echo "</td>\r\n \t<td >";
echo $CONTENT;
echo "</td>\r\n </tr>\r\n";
}
if ( 0 < $LOG_COUNT )
{
echo " <tr class=\"TableControl\">\r\n <td colspan=\"10\">\r\n \t <input type=\"checkbox\" name=\"allbox\" id=\"allbox_for\" onClick=\"check_all();\">\r\n <label for=\"allbox_for\" style=\"cursor:hand\"><u><b>全选</b></u></label> \r\n <a href=\"javascript:delete_log_sel();\" title=\"删除所选日志\"><img src=\"/images/delete.gif\" align=\"absMiddle\">删除</a> \r\n </td>\r\n </tr>\r\n</talbe>\r\n";
}
echo "\t \t\t";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -