?? manage.php
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
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\r\n<script>\r\nfunction delete_vehicle(V_ID)\r\n{\r\n msg='確認要刪除該車輛么?';\r\n if(window.confirm(msg))\r\n {\r\n URL=\"delete.php?V_ID=\" + V_ID;\r\n window.location=URL;\r\n }\r\n}\r\n</script>\r\n\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/menu/vehicle.gif\" HEIGHT=\"20\"><span class=\"big3\"> 車輛信息管理</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n";
$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\">\r\n <tr class=\"TableHeader\">\r\n <td nowrap align=\"center\">廠牌型號</td>\r\n <td nowrap align=\"center\">車牌號</td>\r\n <td nowrap align=\"center\">司機</td>\r\n <td nowrap align=\"center\">類型</td>\r\n <td nowrap align=\"center\">購置日期</td>\r\n <td nowrap align=\"center\">狀態</td>\r\n <td nowrap align=\"center\">操作</td>\r\n </tr>\r\n";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\r\n <td nowrap align=\"center\">";
echo $V_MODEL;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $V_NUM;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $V_DRIVER;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $V_TYPE_DESC;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $V_DATE;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $V_STATUS_DESC;
echo "</td>\r\n <td nowrap align=\"center\">\r\n <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> \r\n <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> \r\n <a href=\"new.php?V_ID=";
echo $V_ID;
echo "\">修改</a> \r\n <a href=javascript:delete_vehicle('";
echo $V_ID;
echo "');>刪除</a>\r\n </td>\r\n </tr>\r\n";
}
if ( 0 < $V_COUNT )
{
echo "</table><br>\r\n<div align=\"center\">\r\n<input type=\"button\" value=\"導出\" class=\"BigButton\" onClick=\"window.open('export.php');\" title=\"導出word文件\"> \r\n</div>\r\n";
}
else
{
message( "", "暫無車輛信息" );
}
echo "\r\n</body>\r\n\r\n</html>\r\n";
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -