📄 viewarg.php
字号:
<?
require('session.inc');
require('connect.inc');
if ($usern=="none")
{
html_header("非法登录,拒绝访问 - ACCESS DENIED",'<META http-equiv="refresh" content="3; url=index.php">');
echo "<td align=right valign=center><br>
Sorry, 您正想非法登录本系统,请正常登录!<br>系统会在3秒后自动返回登录页面。
<br><br><br><a href=index.php>返回登录</a></td>";
html_footer();
}
else
{
?>
<html>
<head>
<title>::: DATABASE 化妆品公司数据库管理系统 - 查询调货单 :::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="common.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="770" border="0" cellspacing="0" cellpadding="0" align="center" height="450">
<tr>
<td background="images/bg2.jpg">
<table width="770" border="0" cellspacing="0" cellpadding="0" height="450">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="450">
<tr>
<td height="140" class="bigh"><font color="#FF3333">查询调货单</font></td>
</tr>
<tr>
<td valign=top>
<div align="right"><br>
<?
if ($usern>-1) $str_sql="select * from ARRANGERTB where outst = '$usern' or inst = '$usern';";
else $str_sql="select * from ARRANGERTB;";
$result=mysql_db_query($db,$str_sql,$link_id);
if (!$result) html_error_exit('MySQL查询命令失败!');
if (!($nor=@mysql_num_rows($result)))
if ($usern>-1) echo "<p> $gs 无调拨信息</p>";
else echo "<p>数据库中无调拨信息</p>";
else
{
$num=$page*7;
$dp=$page+1;
$num0=$num+1;
$maxp=ceil($nor/7);
if ($page<$maxp-1) $num1=$dp*7;
else $num1=$nor;
if ($usern>-1) $str_sql="select * from ARRANGERTB where outst = '$usern' or inst = '$usern' limit $num,7;";
else $str_sql="select * from ARRANGERTB limit $num,7;";
$result=mysql_db_query($db,$str_sql,$link_id);
if (!$result) html_error_exit('MySQL查询命令失败!');
if ($usern>-1) echo "有关 $gs 的调拨单 <br>";
?>
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<tr bgcolor="#000000">
<td width=35>
<div align="center"><b><font color="#FFFFFF">查阅</font></b></div>
</td>
<td width=8%>
<div align="center"><b><font color="#FFFFFF">调拨单号</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">发 货</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">收 货</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">调拨日期</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">发货日期</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">收货日期</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">批核人</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">发货人</font></b></div>
</td>
<td width=10%>
<div align="center"><b><font color="#FFFFFF">收货人</font></b></div>
</td>
<td>
<div align="center"><b><font color="#FFFFFF">备 注</font></b></div>
</td>
</tr>
<?
$html='';
$bgc='DDDDDD';
while ($record=mysql_fetch_object($result))
{
if ($bgc=='DDDDDD')
$bgc='EEEEEE';
else
$bgc='DDDDDD';
$shid=$record->shid;
$outst=$record->outst;
$inst=$record->inst;
$checkdate=$record->checkdate;
$outdate=$record->outdate;
$indate=$record->indate;
$checkp=$record->checkp;
$outp=$record->outp;
$inp=$record->inp;
$memo=$record->memo;
$str_sql="select stname,isactive from STOREHOUSETB where stid = '$outst';";
$res=mysql_db_query($db,$str_sql,$link_id);
if (!$res) html_error_exit('MySQL查询命令失败!');
$rec=mysql_fetch_object($res);
$outname=$rec->stname;
if ($rec->isactive!=1) $outname.="(已关闭)";
$str_sql="select stname,isactive from STOREHOUSETB where stid = '$inst';";
$res=mysql_db_query($db,$str_sql,$link_id);
if (!$res) html_error_exit('MySQL查询命令失败!');
$rec=mysql_fetch_object($res);
$inname=$rec->stname;
if ($rec->isactive!=1) $inname.="(已关闭)";
$html.=' <tr bgcolor='.$bgc.'>
<td align=center><a href=viewargsh.php?shid='."$shid&outname=$outname&inname=$inname&checkdate=$checkdate&outdate=$outdate&indate=$indate&checkp=$checkp&outp=$outp&inp=$inp&pp=$page".'>查阅</a></td>
<td align=center>'.$shid.'</td>
<td>'.$outname.'</td>
<td>'.$inname.'</td>
<td>'.$checkdate.'</td>
<td>'.$outdate.'</td>
<td>'.$indate.'</td>
<td>'.$checkp.'</td>
<td>'.$outp.'</td>
<td>'.$inp.'</td>
<td><a title="'.$memo.'">查阅备注</a></td>
</tr>';
}
$html.='</table><br><div align=center>';
echo $html;
if ($page!=0) {
$n=$page-1;
echo "<a href=viewarg.php?page=0>第一页</a> <a href=viewarg.php?page=$n>上一页</a> ";
}
echo " <a href=index2.php>返回首页</a> ";
if (($maxp!=0)&&($page<($lp=$maxp-1))) {
$n=$page+1;
echo " <a href=viewarg.php?page=$n>下一页</a> <a href=viewarg.php?page=$lp>最后页</a>";
}
echo "</div>";
}
?> <br>
</div>
</td>
</tr>
<tr>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
<tr>
<td valign="bottom" align="right"><font face="Arial"><b>Powered
by <img src="images/php.gif" width="39" height="20" align="absmiddle">
& <img src="images/mysql.gif" width="82" height="20" align="absmiddle"></b></font></td>
<td align="right" valign="bottom" width="200"><font face="Arial">©
<a href="mailto:lonelyp@etang.com">Lonely Passenger</a>,2001<br>
All rights reserved!</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -