⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 history.php

📁 极限网络智能办公系统 - Office Automation 2008 官方100% 源码
💻 PHP
字号:
<?php
 

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
echo "\r\n<HTML>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/main.css\">\r\n<HEAD>\r\n<TITLE>资源申请历史记录</TITLE>\r\n</HEAD>\r\n\r\n<body>\r\n\r\n";
$query = "select * from OA_SOURCE where SOURCEID='".$SOURCEID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$SOURCENAME = $ROW['SOURCENAME'];
	$TIME_TITLE = $ROW['TIME_TITLE'];
	$MANAGE_USER = $ROW['MANAGE_USER'];
}
if ( $TIME_TITLE == "" )
{
	message( "提示", "未设定资源申请时间段" );
	exit( );
}
$TIME_ARRAY = explode( ",", $TIME_TITLE );
$ARRAY_COUNT = sizeof( $TIME_ARRAY );
if ( $TIME_ARRAY[$ARRAY_COUNT - 1] == "" )
{
	--$ARRAY_COUNT;
}
if ( !find_id( $MANAGE_USER, $LOGIN_USER_ID ) )
{
	message( "", "无权查看历史记录" );
	exit( );
}
echo "\r\n<table class=small>\r\n\t<tr>\r\n\t\t<td><b>图例说明:</b></td>\r\n\t\t<td width=20 bgColor=\"#00ff00\"></td>\r\n\t\t<td width=40>申请</td>\r\n\t\t<td width=20 bgColor=\"#ff33ff\"\"></td>\r\n\t\t<td width=40>撤销</td>\r\n\t\t<td width=20 bgColor=\"#ff0000\"></td>\r\n\t\t<td width=60>他人申请</td>\r\n\t\t<td width=20 bgColor=\"#0000ff\"></td>\r\n\t\t<td width=60>本人申请</td>\r\n\t</tr>\r\n</table>\r\n\r\n<form name=form1 action=\"submit.php\" method=post>\r\n<table class=small border=\"0\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#000000\">\r\n<tr class=TableHeader>\r\n\t<td colspan=100 height=30>";
echo date( "Y", time( ) );
echo "年度资源申请历史记录:\r\n\t\t";
echo $SOURCENAME;
echo "</td>\r\n</tr>\r\n\r\n";
$CUR_DATE = date( "Y-m-d", time( ) );
$CUR_YEAR = date( "Y-01-01", time( ) );
$I = 0;
$query = "select * from OA_SOURCE_USED where SOURCEID='".$SOURCEID."' and APPLY_DATE>='{$CUR_YEAR}'";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$I;
	if ( $I % 2 == 1 )
	{
		$TableLine = "TableData";
	}
	else
	{
		$TableLine = "TableContent";
	}
	$APPLY_DATE = $ROW['APPLY_DATE'];
	$USER_ID = $ROW['USER_ID'];
	$APPLY_DATE_DESC = substr( $APPLY_DATE, 5 );
	$WEEK_DAY = "周".get_week( $APPLY_DATE );
	$USER_ARRAY = explode( ",", $USER_ID );
	echo "\r\n<tr class=\"";
	echo $TableLine;
	echo "\" height=\"35\">\r\n  <td nowrap><b>";
	echo $APPLY_DATE_DESC;
	echo "<br>";
	echo $WEEK_DAY;
	echo "</b></td>\r\n";
	$J = 0;
	for ( ;	$J < $ARRAY_COUNT;	++$J	)
	{
		if ( $USER_ARRAY[$J] == "" || $USER_ARRAY[$J] == "0" )
		{
			$APPLY_VALUE = "0";
			$COLOR = "";
		}
		else if ( $USER_ARRAY[$J] == $LOGIN_USER_ID )
		{
			$APPLY_VALUE = $USER_ARRAY[$J];
			$COLOR = "#0000ff";
		}
		else
		{
			$APPLY_VALUE = $USER_ARRAY[$J];
			$COLOR = "#ff0000";
		}
		if ( $APPLY_VALUE != "0" )
		{
			$query = "select * from USER where USER_ID='".$APPLY_VALUE."'";
			$cursor1 = exequery( $connection, $query );
			if ( $ROW = mysql_fetch_array( $cursor1 ) )
			{
				$USER_NAME = $ROW['USER_NAME'];
			}
			else
			{
				$USER_NAME = $APPLY_VALUE;
			}
		}
		echo "\t\t\t<td  width=36 bgcolor=\"";
		echo $COLOR;
		echo "\">\r\n\t\t\t\t";
		if ( $APPLY_VALUE == "0" )
		{
			echo $TIME_ARRAY[$J];
		}
		else
		{
			echo "<font color=#FFFFFF>".$USER_NAME."</font>";
		}
		echo "\t\t\t</td>\r\n";
	}
	echo "</tr>\r\n";
}
echo "<tr class=TableControl>\r\n\t<td colspan=100 align=center>\r\n\t\t<input type=\"button\" value=\"关 闭\" class=\"BigButton\" onclick=\"window.close()\">&nbsp;&nbsp;\r\n\t\t<input type=\"button\" value=\"返 回\" class=\"BigButton\" onclick=\"history.back()\">\r\n  </td>\r\n</tr>\r\n</table>\r\n</form>\r\n\r\n</body>\r\n</HTML>\r\n";
?>

⌨️ 快捷键说明

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