📄 new.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<script Language=\"JavaScript\">\r\nfunction td_calendar(fieldname)\r\n{\r\n myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\r\n mytop=document.body.scrollTop+event.clientY-event.offsetY+140;\r\n window.showModalDialog(\"/inc/calendar.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
if ( $VM_ID != "" )
{
$query = "SELECT * from VEHICLE_MAINTENANCE where VM_ID=".$VM_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$V_ID = $ROW['V_ID'];
$VM_REQUEST_DATE = $ROW['VM_REQUEST_DATE'];
$VM_TYPE = $ROW['VM_TYPE'];
$VM_REASON = $ROW['VM_REASON'];
$VM_FEE = $ROW['VM_FEE'];
$VM_PERSON = $ROW['VM_PERSON'];
$VM_REMARK = $ROW['VM_REMARK'];
if ( $VM_REQUEST_DATE == "0000-00-00" )
{
$VM_REQUEST_DATE = "";
}
}
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/notify_new.gif\" HEIGHT=\"20\"><span class=\"big3\"> 车辆维护记录</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table align=\"center\" border=\"0\" width=\"550\" cellpadding=\"2\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n<form enctype=\"multipart/form-data\" action=\"add.php\" method=\"post\" name=\"form1\">\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 车 牌 号:</td>\r\n <td class=\"TableData\" colspan=\"3\" width=\"470\">\r\n <select name=\"V_ID\" class=\"BigSelect\">\r\n";
$query = "SELECT * from VEHICLE order by V_NUM";
$cursor1 = exequery( $connection, $query );
while ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
$V_ID1 = $ROW1['V_ID'];
$V_NUM = $ROW1['V_NUM'];
echo " <option value=\"";
echo $V_ID1;
echo "\" ";
if ( $V_ID == $V_ID1 )
{
echo "selected";
}
echo ">";
echo $V_NUM;
echo "</option>\r\n";
}
echo " </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 维护日期:</td>\r\n <td class=\"TableData\" width=\"260\">\r\n <input type=\"text\" name=\"VM_REQUEST_DATE\" size=\"12\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $VM_REQUEST_DATE;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" border=\"0\" align=\"absMiddle\" style=\"cursor:hand\" onclick=\"td_calendar('form1.VM_REQUEST_DATE');\">\r\n </td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 维护类型:</td>\r\n <td class=\"TableData\" width=\"130\">\r\n <SELECT name=\"VM_TYPE\" class=\"BigSelect\">\r\n <option value=\"0\" ";
if ( $VM_TYPE == 0 )
{
echo "selected";
}
echo ">维修</option>\r\n <option value=\"1\" ";
if ( $VM_TYPE == 1 )
{
echo "selected";
}
echo ">加油</option>\r\n <option value=\"2\" ";
if ( $VM_TYPE == 2 )
{
echo "selected";
}
echo ">洗车</option>\r\n <option value=\"3\" ";
if ( $VM_TYPE == 3 )
{
echo "selected";
}
echo ">年检</option>\r\n <option value=\"4\" ";
if ( $VM_TYPE == 4 )
{
echo "selected";
}
echo ">其它</option>\r\n </SELECT>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 维护原因:</td>\r\n <td class=\"TableData\" colspan=\"3\">\r\n <textarea name=\"VM_REASON\" class=\"BigInput\" cols=\"60\" rows=\"2\">";
echo $VM_REASON;
echo "</textarea>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 经 办 人:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"VM_PERSON\" size=\"12\" maxlength=\"100\" class=\"BigInput\" value=\"";
echo $VM_PERSON;
echo "\">\r\n </td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 维护费用:</td>\r\n <td class=\"TableData\" width=\"130\">\r\n <input type=\"text\" name=\"VM_FEE\" size=\"12\" maxlength=\"25\" class=\"BigInput\" value=\"";
echo $VM_FEE;
echo "\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 备 注:</td>\r\n <td class=\"TableData\" colspan=\"3\">\r\n <textarea name=\"VM_REMARK\" class=\"BigInput\" cols=\"60\" rows=\"2\">";
echo $VM_REMARK;
echo "</textarea>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class=\"TableData\" colspan=\"4\">\r\n";
echo get_field_table( get_field_html( "VEHICLE_MAINTENANCE", $VM_ID ) );
echo " </td>\r\n </tr> \r\n <tr class=\"TableControl\">\r\n <td nowrap colspan=\"4\" align=\"center\">\r\n <input type=\"hidden\" value=\"";
echo $VM_ID;
echo "\" name=\"VM_ID\">\r\n <input type=\"submit\" value=\"保存\" class=\"BigButton\"> \r\n <input type=\"reset\" value=\"重填\" class=\"BigButton\"> \r\n";
if ( $VM_ID != "" )
{
echo " <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"location='query.php'\">\r\n";
}
echo " </td>\r\n </tr>\r\n </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -