📄 manage.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_all.php';
echo '
<html>
<head>
<title>车辆信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript>
function delete_vehicle(V_ID)
{
msg=\'确认要删除该车辆么?\';
if(window.confirm(msg))
{
URL="delete.php?V_ID=" + V_ID;
window.location=URL;
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/vehicle.gif" HEIGHT="20">';
echo '<s';
echo 'pan class="big3"> 车辆信息管理</span>
</td>
</tr>
</table>
';
$query = 'SELECT * from VEHICLE order by V_STATUS';
$cursor = exequery ($connection, $query);
$V_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$V_COUNT;
$V_ID = $ROW['V_ID'];
$V_MODEL = $ROW['V_MODEL'];
$V_NUM = $ROW['V_NUM'];
$V_DRIVER = $ROW['V_DRIVER'];
$V_TYPE = $ROW['V_TYPE'];
$V_DATE = $ROW['V_DATE'];
$V_PRICE = $ROW['V_PRICE'];
$V_ENGINE_NUM = $ROW['V_ENGINE_NUM'];
$V_STATUS = $ROW['V_STATUS'];
if (($V_STATUS == 0))
{
$V_STATUS_DESC = '可用';
}
else
{
if (($V_STATUS == 1))
{
$V_STATUS_DESC = '损坏';
}
else
{
if (($V_STATUS == 2))
{
$V_STATUS_DESC = '维修中';
}
else
{
if (($V_STATUS == 3))
{
$V_STATUS_DESC = '报废';
}
}
}
}
$V_TYPE_DESC = get_code_name ($V_TYPE, 'VEHICLE_TYPE');
if ((($V_COUNT % 2) == 1))
{
$TableLine = 'TableLine1';
}
else
{
$TableLine = 'TableLine2';
}
if (($V_COUNT == 1))
{
echo '<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 nowrap align="center">司机</td>
<td nowrap align="center">类型</td>
<td nowrap align="center">购置日期</td>
<td nowrap align="center">状态</td>
<td nowrap align=';
echo '"center">操作</td>
</tr>
';
}
echo ' <tr class="';
echo $TableLine;
echo '">
<td nowrap align="center">';
echo $V_MODEL;
echo '</td>
<td nowrap align="center">';
echo $V_NUM;
echo '</td>
<td nowrap align="center">';
echo $V_DRIVER;
echo '</td>
<td nowrap align="center">';
echo $V_TYPE_DESC;
echo '</td>
<td nowrap align="center">';
echo $V_DATE;
echo '</td>
<td nowrap align="center">';
echo $V_STATUS_DESC;
echo '</td>
<td nowrap align="center">
<a href="javascript:;" onClick="window.open(\'../vehicle_detail.php?V_ID=';
echo $V_ID;
echo '\',\'\',\'height=550,width=700,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=170,top=100,resizable=yes\');">详细信息</a>
<a href="javascript:;" onClick="window.open(\'../order_detail.php?V_ID=';
echo $V_ID;
echo '\',\'\',\'height=400,width=700,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=250,top=170,resizable=yes\');">预定情况</a>
<a href="new.php?V_ID=';
echo $V_ID;
echo '">修改</a>
<a href=javascript:delete_vehicle(\'';
echo $V_ID;
echo '\');>删除</a>
</td>
</tr>
';
}
if ((0 < $V_COUNT))
{
echo '</table>';
}
else
{
message ('', '暂无车辆信息');
}
echo '
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -