📄 submit.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/check_type.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility_sms1.php" );
include_once( "inc/utility_sms2.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";
if ( $LEAVE_DATE1 != "" )
{
$TIME_OK = is_date_time( $LEAVE_DATE1 );
if ( !$TIME_OK )
{
message( "错误", "请假开始时间格式不对,应形如 1999-01-01 12:12:12" );
button_back( );
exit( );
}
}
if ( $LEAVE_DATE2 != "" )
{
$TIME_OK = is_date_time( $LEAVE_DATE2 );
if ( !$TIME_OK )
{
message( "错误", "请假结束时间格式不对,应形如 1999-01-01 12:12:12" );
button_back( );
exit( );
}
}
if ( 0 <= compare_date_time( $LEAVE_DATE1, $LEAVE_DATE2 ) )
{
message( "错误", "请假结束时间应晚于请假开始时间" );
button_back( );
exit( );
}
if ( $TO_ID != "" )
{
$LEAVE_USER_ID = $TO_ID;
}
else
{
$LEAVE_USER_ID = $LOGIN_USER_ID;
}
$query = "insert into ATTEND_LEAVE(USER_ID,LEADER_ID,LEAVE_TYPE,LEAVE_DATE1,LEAVE_DATE2,STATUS,ALLOW) values ('".$LEAVE_USER_ID."','{$LEADER_ID}','{$LEAVE_TYPE}','{$LEAVE_DATE1}','{$LEAVE_DATE2}','1','0')";
exequery( $connection, $query );
$ROW_ID = mysql_insert_id( );
$SMS_CONTENT = $LOGIN_USER_NAME."提交请假申请,请批示!";
if ( $SMS_REMIND == "on" )
{
send_sms( "", $LOGIN_USER_ID, $LEADER_ID, 6, $SMS_CONTENT, $REMIND_URL );
}
if ( $SMS2_REMIND == "on" )
{
send_mobile_sms_user( "", $LOGIN_USER_ID, $LEADER_ID, $SMS_CONTENT, 6 );
}
header( "location: ../" );
echo "\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -