📄 query.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility.php");
?>
<html>
<head>
<title>车辆查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<?
if($VU_STATUS==0)
$VU_STATUS_DESC="待批申请";
elseif($VU_STATUS==1)
$VU_STATUS_DESC="已准申请";
elseif($VU_STATUS==2)
$VU_STATUS_DESC="使用中车辆";
elseif($VU_STATUS==3)
$VU_STATUS_DESC="未准申请";
elseif($VU_STATUS==4)
$VU_STATUS_DESC="使用结束车辆";
?>
<body class="bodycolor" topmargin="5">
<?
$query = "SELECT count(*) from VEHICLE_USAGE where VU_STATUS='$VU_STATUS'";
$cursor= exequery($connection,$query);
$VU_COUNT=0;
if($ROW=mysql_fetch_array($cursor))
$VU_COUNT=$ROW[0];
if($VU_COUNT==0)
{
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/vehicle.gif" width="24" height="24"><span class="big3"> <?=$VU_STATUS_DESC?></span>
</td>
</tr>
</table>
<?
Message("","无".$VU_STATUS_DESC);
exit();
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/vehicle.gif" width="24" height="24"><span class="big3"> <?=$VU_STATUS_DESC?></span>
</td>
<td valign="bottom" class="small1">共<span class="big4"> <?=$VU_COUNT?></span> 条车辆记录
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td nowrap align="center">车牌号</td>
<td nowrap align="center">用车人</td>
<td align="center">事由</td>
<td nowrap align="center">开始时间</td>
<td nowrap align="center">结束时间</td>
<td align="center">备注</td>
<td nowrap align="center">操作</td>
</tr>
<?
//============================ 显示已发布公告 =======================================
$query = "SELECT * from VEHICLE_USAGE where VU_STATUS='$VU_STATUS' order by VU_START";
$cursor= exequery($connection,$query);
$VU_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$VU_COUNT++;
$VU_ID=$ROW["VU_ID"];
$V_ID=$ROW["V_ID"];
$VU_PROPOSER=$ROW["VU_PROPOSER"];
$VU_REQUEST_DATE=$ROW["VU_REQUEST_DATE"];
$VU_USER=$ROW["VU_USER"];
$VU_REASON=$ROW["VU_REASON"];
$VU_START =$ROW["VU_START"];
$VU_END=$ROW["VU_END"];
$VU_MILEAGE=$ROW["VU_MILEAGE"];
$VU_DEPT=$ROW["VU_DEPT"];
$VU_STATUS=$ROW["VU_STATUS"];
$VU_REMARK=$ROW["VU_REMARK"];
if($VU_START=="0000-00-00 00:00:00")
$VU_START="";
if($VU_END=="0000-00-00 00:00:00")
$VU_END="";
if($VU_COUNT%2==1)
$TableLine="TableLine1";
else
$TableLine="TableLine2";
$query = "SELECT * from VEHICLE where V_ID='$V_ID'";
$cursor2= exequery($connection,$query);
if($ROW2=mysql_fetch_array($cursor2))
$V_NUM=$ROW2["V_NUM"];
?>
<tr class="<?=$TableLine?>">
<td nowrap align="center"><a href="javascript:;" onClick="window.open('../vehicle_detail.php?V_ID=<?=$V_ID?>','','height=360,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=280,top=160,resizable=yes');"><?=$V_NUM?></a></td>
<td nowrap align="center"><?=$VU_USER?></td>
<td align="center"><?=$VU_REASON?></td>
<td nowrap align="center"><?=$VU_START?></a></td>
<td nowrap align="center"><?=$VU_END?></a></td>
<td align="center"><?=$VU_REMARK?></td>
<td nowrap align="center">
<a href="javascript:;" onClick="window.open('../usage_detail.php?VU_ID=<?=$VU_ID?>','','height=380,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=200,left=280,resizable=yes');">详细信息</a>
</td>
</tr>
<?
}
?>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -