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

📄 index.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/function_page_01.php" );
if ( $_REQUEST['cur_page'] == "" )
{
	$cur_page = 1;
}
else
{
	$cur_page = $_REQUEST['cur_page'];
}
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<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t<tr class=\"tablehead1\">\r\n\t\t<td><img src=\"/images/manage/news.gif\" align=\"absmiddle\">使用到期</td>\r\n\t</tr>\r\n\t<tr class=\"tablehead2\">\r\n\t\t<td><BUTTON class=btn onClick=\"location='end.php';\"><t";
echo "able><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">已批查询</span></td></tr></table></BUTTON></td>\r\n\t</tr>\r\n</table>\r\n<br>\r\n";
$now_time = date( "Y-m-d" );
$connection = openconnection( );
$query = "select os.*, oa.*, ot.* from officeitem_sort as os, officeitem_appellation as oa, officeitem_take as ot where os.SORT_ID=oa.SORT_ID && oa.APPELLATION_ID=ot.APPELLATION_ID && ot.STATUS=2 && ot.CONCEAL<>1 && ot.MODES=2 && to_days(MODE_TIME) <= to_days('".$now_time."')";
switch ( $_REQUEST['order'] )
{
case "sort" :
	$query .= " order by os.SORT";
	break;
case "appellaton" :
	$query .= " order by oa.APPELLATION";
	break;
case "unit" :
	$query .= " order by oa.UNIT";
	break;
case "take_amount" :
	$query .= " order by ot.TAKE_AMOUNT";
	break;
case "mode_time" :
	$query .= " order by ot.MODE_TIME";
	break;
case "take_operator" :
	$query .= " order by ot.TAKE_OPERATOR";
	break;
case "stockpile" :
	$query .= " order by oa.STOCKPILE";
	break;
default :
	$query .= " order by ot.TAKE_ID";
	break;
}
$query .= $_REQUEST['sens'] ? " DESC" : " ASC";
$query = page( $query, 15 );
$cursor = exequery( $connection, $query );
$count = 0;
echo "<table border=\"0\" cellspacing=\"1\" width=\"100%\" cellpadding=\"5\" class=\"small\">\r\n";
while ( $row = mysql_fetch_array( $cursor ) )
{
	++$count;
	$take_id = $row['TAKE_ID'];
	$sort = $row['SORT'];
	$appellation = $row['APPELLATION'];
	$appellation_id = $row['APPELLATION_ID'];
	$unit = $row['UNIT'];
	$take_amount = $row['TAKE_AMOUNT'];
	$take_operator = $row['TAKE_OPERATOR'];
	$take_date = $row['TAKE_DATE'];
	$stockpile = $row['STOCKPILE'];
	$mode_time = $row['MODE_TIME'];
	$sql = "select JOIN_APPELLATION, JOIN_APPELLATION_SORT from officeitem_joinstoreroom where APPELLATION_ID=".$appellation_id;
	$cs = exequery( $connection, $sql );
	if ( $r = mysql_fetch_row( $cs ) )
	{
		$join_appellation = $r[0];
		$join_appellation_sort = $r[1];
	}
	$sqlu = "SELECT USER_NAME FROM user WHERE USER_ID='".$take_operator."'";
	$rsu = exequery( $connection, $sqlu );
	$rowu = mysql_fetch_array( $rsu );
	$username = $rowu['USER_NAME'];
	$mode_time = explode( " ", $mode_time );
	if ( $count % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	$query2 = "select d.DEPT_NAME,u.USER_NAME from department as d,user as u where d.DEPT_ID=u.DEPT_ID && u.USER_ID='".$take_operator."'";
	$cursor2 = exequery( $connection, $query2 );
	if ( $row2 = mysql_fetch_row( $cursor2 ) )
	{
		$dept_name = $row2[0];
		$user_name = $row2[1];
	}
	echo "\t<tr class=\"";
	echo $TableLine;
	echo "\">\r\n\t\t<td>";
	echo $sort;
	echo "</td>\r\n\t\t<td>";
	echo $appellation;
	echo "</td>\r\n\t\t<td>";
	echo $unit;
	echo "</td>\r\n\t\t<td>";
	echo $take_amount;
	echo "</td>\r\n\t\t<td><a href=\"#\" onClick=\"javascript:window.open('../take_detail.php?TAKE_ID=";
	echo $take_id;
	echo "','','topbar=no,width=200,height=200')\">详细</a></td>\r\n\t\t<td>";
	echo $username;
	echo "</td>\r\n\t\t<td>";
	echo $dept_name;
	echo "</td>\r\n\t\t<td>";
	echo $mode_time[0];
	echo "</td>\r\n\t\t<td>";
	echo $stockpile;
	echo "</td>\r\n\t\t<td style=\"font:bold\">已到期</td>\r\n\t</tr>\r\n";
}
echo "<center>";
if ( $count == 0 )
{
	message( "提示", "暂无记录" );
	exit( );
}
echo "</center>";
$sens = $_REQUEST['sens'] ? 0 : 1;
$sensimg = $_REQUEST['sens'] ? "arrow_up.gif" : "arrow_down.gif";
$sensimg = "/images/".$sensimg;
$sufurl = $_SERVER['PHP_SELF']."?sens=".$sens;
echo "\t<thead class=\"TableHeader\">\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=sort\">类别";
if ( $_REQUEST['order'] == "sort" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=appellation\">名称";
if ( $_REQUEST['order'] == "appellation" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=unit\">单位";
if ( $_REQUEST['order'] == "unit" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=take_amount\">领用数量";
if ( $_REQUEST['order'] == "take_amount" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td>说明</td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=take_operator\">使用者";
if ( $_REQUEST['order'] == "take_operator" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td>部门</td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=mode_time\">到期时间";
if ( $_REQUEST['order'] == "mode_time" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=stockpile\">库存";
if ( $_REQUEST['order'] == "stockpile" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td>操作</td>\r\n\t</thead>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n\t<tr>\r\n\t\t<td class=\"TableLine1\" nowrap align=\"right\">";
disp( "sens=".$_REQUEST['sens']."&order=".$_REQUEST['order'] );
echo "</td>\r\n\t</tr>\r\n</table>\r\n";
if ( 0 < ( $n = $_REQUEST['cur_page'] - $total_page_nums ) )
{
	$cur_page = $_REQUEST['cur_page'] - $n;
	header( "location:".$_SERVER['PHP_SELF']."?&order=".$_REQUEST['order']."&sens=".$_REQUEST['sens']."&cur_page=".$cur_page );
}
echo "</body>\r\n</html>";
?>

⌨️ 快捷键说明

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