📄 update.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/check_type.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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
if ( $VU_START != "" )
{
$TIME_OK = is_date_time( $VU_START );
if ( !$TIME_OK )
{
message( "错误", "起始时间格式不对,应形如 1999-1-2 09:30:00" );
button_back( );
exit( );
}
}
if ( $VU_END != "" )
{
$TIME_OK = is_date_time( $VU_END );
if ( !$TIME_OK )
{
message( "错误", "结束时间格式不对,应形如 1999-1-2 09:30:00" );
button_back( );
exit( );
}
}
if ( $VU_MILEAGE != "" && !is_numeric( $VU_MILEAGE ) )
{
message( "错误", "里程应为数字!" );
button_back( );
exit( );
}
if ( $VU_MILEAGE == "" )
{
$VU_MILEAGE = 0;
}
if ( $VU_OPERATOR != "" && $VU_OPERATOR != $LOGIN_USER_ID )
{
send_sms( "", $VU_PROPOSER, $VU_OPERATOR, 9, $VU_PROPOSER_NAME."向您提交车辆申请,请批示!" );
}
if ( $VU_ID == "" )
{
$query = "insert into VEHICLE_USAGE (V_ID,VU_PROPOSER,VU_REQUEST_DATE,VU_USER,VU_MILEAGE,VU_REASON,VU_REMARK,VU_START,VU_END,VU_DEPT,VU_DESTINATION,VU_OPERATOR) values({$V_ID},'{$VU_PROPOSER}','{$VU_REQUEST_DATE}','{$VU_USER}',{$VU_MILEAGE},'{$VU_REASON}','{$VU_REMARK}','{$VU_START}','{$VU_END}','{$VU_DEPT}','{$VU_DESTINATION}','{$VU_OPERATOR}')";
}
else
{
$query = "update VEHICLE_USAGE set V_ID='{$V_ID}',VU_PROPOSER='{$VU_PROPOSER}',VU_REQUEST_DATE='{$VU_REQUEST_DATE}',VU_USER='{$VU_USER}',VU_MILEAGE={$VU_MILEAGE},VU_REASON='{$VU_REASON}',VU_REMARK='{$VU_REMARK}',VU_START='{$VU_START}',VU_END='{$VU_END}',VU_DEPT='{$VU_DEPT}',VU_DESTINATION='{$VU_DESTINATION}',VU_OPERATOR='{$VU_OPERATOR}' where VU_ID={$VU_ID}";
}
exequery( $connection, $query );
header( "location: query.php?VU_STATUS={$VU_STATUS}" );
echo "\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -