📄 pass.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=\"histor";
echo "y.back()\"><table><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";
$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";
$where_str = "";
if ( $_REQUEST['take_date_start'] != NULL )
{
$where_str .= " and to_days(date_format(ot.TAKE_DATE,'%Y-%m-%d')) >= to_days('".$_REQUEST['take_date_start']."') ";
}
if ( $_REQUEST['take_date_end'] != NULL )
{
$where_str .= " and to_days(date_format(ot.TAKE_DATE,'%Y-%m-%d')) <= to_days('".$_REQUEST['take_date_end']."') ";
}
if ( $_REQUEST['appellation'] != NULL )
{
$where_str .= " and oa.APPELLATION = '".$_REQUEST['appellation']."'";
}
if ( $_REQUEST['take_amount'] != NULL )
{
$where_str .= " and ot.TAKE_AMOUNT = ".$_REQUEST['take_amount']."";
}
if ( $_REQUEST['VU_KEEPER'] != NULL )
{
$where_str .= " and ot.TAKE_OPERATOR = '".$_REQUEST['VU_KEEPER']."'";
}
if ( $_REQUEST['take_bill'] != NULL )
{
$where_str .= " and ot.TAKE_BILL LIKE '%".$_REQUEST['take_bill']."%'";
}
if ( $_REQUEST['modes'] != NULL )
{
$where_str .= " and ot.MODES = ".$_REQUEST['modes']."";
if ( $_REQUEST['modes'] == "2" && $_REQUEST['mode_time'] != NULL )
{
$where_str .= " and to_days(date_format(ot.MODE_TIME, '%Y%m%d')) = to_days('".$_REQUEST['mode_time']."')";
}
}
$query .= $where_str;
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 "take_operator" :
$query .= " order by ot.TAKE_OPERATOR";
break;
case "take_date" :
$query .= " order by ot.TAKE_DATE";
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['JOIN_APPELLATION_SORT'];
$appellation = $row['JOIN_APPELLATION'];
$unit = $row['UNIT'];
$take_amount = $row['TAKE_AMOUNT'];
$take_operator = $row['TAKE_OPERATOR'];
$mode_time = $row['MODE_TIME'];
$take_date = $row['TAKE_DATE'];
$stockpile = $row['STOCKPILE'];
$take_bill = $row['TAKE_BILL'];
$appellation_id = $row['APPELLATION_ID'];
$conceal = $row['CONCEAL'];
$sqlu = "SELECT USER_NAME FROM user WHERE USER_ID='".$take_operator."'";
$rsu = exequery( $connection, $sqlu );
$rowu = mysql_fetch_array( $rsu );
$username = $rowu['USER_NAME'];
$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];
}
$mode_time = explode( " ", $mode_time );
$mode_time = $mode_time[0] == "0000-00-00" ? "" : $mode_time[0];
$take_date = explode( " ", $take_date );
$take_date = $take_date[0];
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 $join_appellation_sort;
echo "</td>\r\n\t\t<td>";
echo $join_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 "(";
echo $dept_name;
echo ")</td>\r\n\t\t<td>";
echo $take_date;
echo "</td>\r\n\t\t";
if ( $_REQUEST['modes'] == 2 )
{
echo "\t\t<td>";
echo $mode_time;
echo "</td>\r\n\t\t";
}
echo "\t\t<td>";
echo $take_bill;
echo "</td>\r\n\t\t<td>";
echo $stockpile;
echo "</td>\r\n\t\t";
if ( $_REQUEST['modes'] == 2 )
{
$str_back = $conceal ? "已归还" : "未归还";
echo "\t\t<td>";
echo $str_back;
echo "</td>\r\n\t\t";
}
echo "\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."&appellation=".$_REQUEST['appellation']."&take_amount=".$_REQUEST['take_amount']."&VU_KEEPER=".$_REQUEST['VU_KEEPER']."&modes=".$_REQUEST['modes']."&take_date_start=".$_REQUEST['take_date_start']."&take_date_end=".$_REQUEST['take_date_end'];
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><a href=\"";
echo $sufurl;
echo "&order=take_date&appellation\">申请日期";
if ( $_REQUEST['order'] == "take_date" )
{
echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t";
if ( $_REQUEST['modes'] == 2 )
{
echo "\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";
}
echo "\t\t<td>申请单据号</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";
if ( $_REQUEST['modes'] == 2 )
{
echo "\t\t<td>状态</td>\r\n\t\t";
}
echo "\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']."&appellation=".$_REQUEST['appellation']."&take_amount=".$_REQUEST['take_amount']."&VU_KEEPER=".$_REQUEST['VU_KEEPER']."&modes=".$_REQUEST['modes']."" );
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 + -