📄 submit.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<link rel=\"stylesheet\" type=\"text/css\" href=\"/theme/";
echo $LOGIN_THEME;
echo "/calendar.css\">\r\n<script>\r\n\r\n</script>\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$CUR_DATE = date( "Y-m-d", time( ) );
$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
if ( $SEND_TIME_MIN != "" )
{
$TIME_OK = is_date( $SEND_TIME_MIN );
if ( !$TIME_OK )
{
message( "错误", "\"日期\"的格式不对,应形如 ".$CUR_DATE );
button_back( );
exit( );
}
$SEND_TIME_MIN .= " 00:00:00";
}
if ( $SEND_TIME_MAX != "" )
{
$TIME_OK = is_date( $SEND_TIME_MAX );
if ( !$TIME_OK )
{
message( "错误", "\"日期\"的格式不对,应形如 ".$CUR_DATE );
button_back( );
exit( );
}
$SEND_TIME_MAX .= " 23:59:59";
}
$CONDITION_STR = "";
if ( $CAL_LEVEL == "0" )
{
$CONDITION_STR .= " and CAL_LEVEL=''";
}
else if ( $CAL_LEVEL == "1" )
{
$CONDITION_STR .= " and CAL_LEVEL='1'";
}
else if ( $CAL_LEVEL == "2" )
{
$CONDITION_STR .= " and CAL_LEVEL='2'";
}
else if ( $CAL_LEVEL == "3" )
{
$CONDITION_STR .= " and CAL_LEVEL='3'";
}
else if ( $CAL_LEVEL == "4" )
{
$CONDITION_STR .= " and CAL_LEVEL='4'";
}
if ( $CAL_TYPE != "" )
{
$CONDITION_STR .= " and CAL_TYPE=".$CAL_TYPE;
}
if ( $CONTENT != "" )
{
$CONDITION_STR .= " and CONTENT like '%".$CONTENT."%'";
}
if ( $SEND_TIME_MIN != "" )
{
$CONDITION_STR .= " and CAL_TIME>='".$SEND_TIME_MIN."'";
}
if ( $SEND_TIME_MAX != "" )
{
$CONDITION_STR .= " and END_TIME<='".$SEND_TIME_MAX."'";
}
if ( $OVER_STATUS == "1" )
{
$CONDITION_STR .= " and OVER_STATUS='0' and CAL_TIME>'".$CUR_TIME."'";
}
else if ( $OVER_STATUS == "2" )
{
$CONDITION_STR .= " and OVER_STATUS='0' and CAL_TIME<='".$CUR_TIME."' and END_TIME>='{$CUR_TIME}'";
}
else if ( $OVER_STATUS == "3" )
{
$CONDITION_STR .= " and OVER_STATUS='0' and END_TIME<'".$CUR_TIME."'";
}
else if ( $OVER_STATUS == "4" )
{
$CONDITION_STR .= " and OVER_STATUS='1'";
}
$query = "SELECT * from CALENDAR where USER_ID='".$LOGIN_USER_ID."'".$CONDITION_STR." order by CAL_TIME,END_TIME";
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/menu/infofind.gif\" align=\"absmiddle\"><span class=\"big3\"> 日程安排查询结果</span><br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n";
$CAL_COUNT = 0;
$CODE_NAME = array( );
$MANAGER = array( );
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$CAL_COUNT;
$CAL_ID = $ROW['CAL_ID'];
$CAL_TIME = $ROW['CAL_TIME'];
$END_TIME = $ROW['END_TIME'];
$CAL_TYPE = $ROW['CAL_TYPE'];
$CAL_LEVEL = $ROW['CAL_LEVEL'];
$CONTENT = $ROW['CONTENT'];
$MANAGER_ID = $ROW['MANAGER_ID'];
$OVER_STATUS = $ROW['OVER_STATUS'];
$MANAGER_NAME = "";
if ( $MANAGER_ID != "" )
{
$query = "SELECT * from USER where USER_ID='".$MANAGER_ID."'";
$cursor1 = exequery( $connection, $query );
if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
$MANAGER_NAME = $ROW1['USER_NAME'];
}
}
$CONTENT = htmlspecialchars( $CONTENT );
if ( !array_key_exists( $CAL_TYPE, $MANAGER ) )
{
$CODE_NAME[$CAL_TYPE] = get_code_name( $CAL_TYPE, "CAL_TYPE" );
}
$CAL_TYPE = $CODE_NAME[$CAL_TYPE];
if ( $OVER_STATUS == "" || $OVER_STATUS == "1" )
{
$OVER_STATUS1 = "<font color='#00AA00'><b>已完成</span>";
}
else if ( 0 < compare_time( $CUR_TIME, $END_TIME ) )
{
$OVER_STATUS1 = "<font color='#FF0000'><b>已超时</span>";
}
else if ( compare_time( $CUR_TIME, $CAL_TIME ) < 0 )
{
$OVER_STATUS1 = "<font color='#0000AA'><b>未至</span>";
}
else
{
$OVER_STATUS1 = "<font color='#00AA00'><b>进行中</span>";
}
if ( $CAL_COUNT == 1 )
{
echo "\r\n<table class=\"TableList\" width=\"95%\" align=\"center\">\r\n <thead class=\"TableHeader\">\r\n <td nowrap align=\"center\">开始时间 <img border=0 src=\"/images/arrow_up.gif\" width=\"11\" height=\"10\"></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 </thead>\r\n\r\n";
}
echo " <tr class=\"TableData\">\r\n <td nowrap align=\"center\">";
echo substr( $CAL_TIME, 0, -3 );
echo "</td>\r\n <td nowrap align=\"center\">";
echo substr( $END_TIME, 0, -3 );
echo "</td>\r\n <td nowrap align=\"center\">";
echo $CAL_TYPE;
echo "</td>\r\n <td><span class=\"CalLevel";
echo $CAL_LEVEL;
echo "\" title=\"";
echo cal_level_desc( $CAL_LEVEL );
echo "\"> </span>";
echo $CONTENT;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $MANAGER_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $OVER_STATUS1;
echo "</td>\r\n </tr>\r\n";
}
if ( $CAL_COUNT == 0 )
{
message( "", "无符合条件的日程安排" );
button_back( );
exit( );
}
echo "</table>\r\n";
button_back( );
echo "</body>\r\n\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -