📄 modify.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 IsNumber(str)\r\n{\r\n return str.match(/^[0-9]*\$/)!=null;\r\n}\r\n\r\nfunction CheckForm()\r\n{\r\n if(document.form1.VU_END.value==\"\")\r\n {\r\n \t alert(\"结束时间不能为空!\");\r\n return (false);\r\n }\r\n \r\n if(document.form1.VU_MILEAGE.value!=\"\"&&!IsNumber(document.form1.VU_MILEAGE.value))\r\n {\r\n \t alert(\"里程应为数字!\");\r\n return (false);\r\n }\r\n\r\n form1.submit();\r\n}\r\n\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\r\nfunction td_clock(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/clock.php?FIELDNAME=\"+fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
if ( $VU_ID != "" )
{
$query = "SELECT * from VEHICLE_USAGE where VU_ID='".$VU_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$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_REASON = str_replace( "\n", "<br>", $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'];
$VU_DESTINATION = $ROW['VU_DESTINATION'];
$VU_OPERATOR = $ROW['VU_OPERATOR'];
$VU_DRIVER = $ROW['VU_DRIVER'];
$DEPT_MANAGER = $ROW['DEPT_MANAGER'];
$query = "SELECT * from USER where USER_ID='".$DEPT_MANAGER."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$DEPT_MANAGER_NAME = $ROW['USER_NAME'];
}
if ( $VU_START == "0000-00-00 00:00:00" )
{
$VU_START = "";
}
if ( $VU_END == "0000-00-00 00:00:00" )
{
$VU_END = "";
}
}
}
else
{
$VU_START = $CUR_TIME;
$VU_END = $CUR_TIME;
}
if ( $VU_REQUEST_DATE == "0000-00-00 00:00:00" || $VU_REQUEST_DATE == "" )
{
$VU_REQUEST_DATE = $CUR_TIME;
}
if ( $VU_PROPOSER == "" )
{
$VU_PROPOSER = $LOGIN_USER_ID;
}
$query = "SELECT * from USER where USER_ID='".$VU_PROPOSER."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$VU_PROPOSER_NAME = $ROW['USER_NAME'];
}
if ( $VU_DEPT != "" )
{
$query = "SELECT * from DEPARTMENT where DEPT_ID=".$VU_DEPT;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$VU_DEPT_FIELD_DESC = $ROW['DEPT_NAME'];
}
}
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\" align=\"absmiddle\" width=\"22\" height=\"18\"><span class=\"big3\"> 车辆使用信息修改</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table align=\"center\" border=\"0\" width=\"620\" cellpadding=\"2\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n<form enctype=\"multipart/form-data\" action=\"submit.php\" method=\"post\" name=\"form1\">\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 车 牌 号:</td>\r\n <td class=\"TableData\" width=\"230\">\r\n";
$query = "SELECT * from VEHICLE where V_ID='".$V_ID."'";
$cursor1 = exequery( $connection, $query );
if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
echo $V_NUM = $ROW1['V_NUM'];
}
echo " </td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 司 机:</td>\r\n <td class=\"TableData\" width=\"230\">";
echo $VU_DRIVER;
echo "</td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 用 车 人:</td>\r\n <td class=\"TableData\">";
echo $VU_USER;
echo "</td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 用车部门:</td>\r\n <td class=\"TableData\">";
echo $VU_DEPT_FIELD_DESC;
echo "</td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 起始时间:</td>\r\n <td class=\"TableData\">";
echo $VU_START;
echo "</td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 结束时间:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"VU_END\" size=\"20\" maxlength=\"19\" class=\"BigInput\" value=\"";
echo $VU_END;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" border=\"0\" align=\"absMiddle\" style=\"cursor:hand\" onclick=\"td_calendar('form1.VU_END');\">\r\n <img src=\"/images/menu/clock.gif\" border=\"0\" align=\"absMiddle\" style=\"cursor:hand\" onclick=\"td_clock('form1.VU_END');\">\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=\"VU_DESTINATION\" size=\"20\" maxlength=\"100\" class=\"BigInput\" value=\"";
echo $VU_DESTINATION;
echo "\">\r\n </td>\r\n <td nowrap class=\"TableContent\" width=\"80\"> 里 程:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"VU_MILEAGE\" size=\"10\" maxlength=\"14\" class=\"BigInput\" value=\"";
echo $VU_MILEAGE;
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\">";
echo $VU_REASON;
echo " </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=\"VU_REMARK\" class=\"BigInput\" cols=\"74\" rows=\"5\">";
echo $VU_REMARK;
echo "</textarea>\r\n </td>\r\n </tr>\r\n <tr class=\"TableControl\">\r\n <td nowrap colspan=\"4\" align=\"center\">\r\n <input type=\"hidden\" value=\"";
echo $VU_ID;
echo "\" name=\"VU_ID\"> \r\n <input type=\"hidden\" value=\"";
echo $VU_START;
echo "\" name=\"VU_START\"> \t\r\n <input type=\"button\" value=\"保存\" class=\"BigButton\" onclick=\"CheckForm();\"> \r\n <input type=\"button\" value=\"关闭\" class=\"BigButton\" onClick=\"window.close();\" title=\"关闭窗口\">\r\n </td>\r\n </tr>\r\n </table>\r\n</form>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -