📄 search.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/check_type.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";
$CUR_DATE = date( "Y-m-d", time( ) );
if ( $M_START_B != "" )
{
$TIME_OK = is_date( $M_START_B );
if ( !$TIME_OK )
{
message( "错误", "\"开始时间\"的格式不对,应形如 ".$CUR_DATE );
button_back( );
exit( );
}
}
if ( $M_END_B != "" )
{
$TIME_OK = is_date( $M_END_B );
if ( !$TIME_OK )
{
message( "错误", "\"开始时间\"的格式不对,应形如 ".$CUR_DATE );
button_back( );
exit( );
}
}
if ( $M_START_B != "" )
{
$M_START_B .= " 00:00:00";
}
else
{
$M_START_B = "";
}
if ( $M_END_B != "" )
{
$M_END_B .= " 23:59:59";
}
else
{
$M_START_B = "";
}
$CONDITION_STR = "";
if ( $M_NAME != "" )
{
$CONDITION_STR .= " and M_NAME like '%".$M_NAME."%'";
}
if ( $TO_ID != "" )
{
$CONDITION_STR .= " and M_PROPOSER='".$TO_ID."'";
}
if ( $M_START_B != "" )
{
$CONDITION_STR .= " and M_START>='".$M_START_B."'";
}
if ( $M_END_B != "" )
{
$CONDITION_STR .= " and M_START<='".$M_END_B."'";
}
if ( $M_ROOM != "" )
{
$CONDITION_STR .= " and M_ROOM='".$M_ROOM."'";
}
if ( $M_STATUS != "" )
{
$CONDITION_STR .= " and M_STATUS='".$M_STATUS."'";
}
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";
if ( $LOGIN_USER_PRIV != 1 )
{
$query = "SELECT * from MEETING where (TO_ID='ALL_DEPT' or find_in_set('".$LOGIN_DEPT_ID."',TO_ID) or find_in_set('{$LOGIN_USER_PRIV}',PRIV_ID) or find_in_set('{$LOGIN_USER_ID}',SECRET_TO_ID) or find_in_set('{$LOGIN_USER_ID}',M_ATTENDEE) or M_PROPOSER='{$LOGIN_USER_ID}' or M_MANAGER='{$LOGIN_USER_ID}') ";
}
else
{
$query = "SELECT * from MEETING where 1=1 ";
}
$query .= $CONDITION_STR." order by M_START desc, M_ROOM desc";
$cursor = exequery( $connection, $query );
$MEETING_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$MEETING_COUNT;
$M_ID = $ROW['M_ID'];
$M_NAME = $ROW['M_NAME'];
$M_PROPOSER = $ROW['M_PROPOSER'];
$M_ATTENDEE = $ROW['M_ATTENDEE'];
$M_START = $ROW['M_START'];
$M_END = $ROW['M_END'];
$M_ROOM = $ROW['M_ROOM'];
$M_STATUS = $ROW['M_STATUS'];
$M_ATTENDEE_OUT = $ROW['M_ATTENDEE_OUT'];
$USER_NAME2 = "";
$TOK = strtok( $M_ATTENDEE, "," );
while ( $TOK != "" )
{
$query2 = "SELECT USER_NAME from USER where USER_ID='".$TOK."'";
$cursor2 = exequery( $connection, $query2 );
if ( $ROW = mysql_fetch_array( $cursor2 ) )
{
$USER_NAME2 .= $ROW['USER_NAME'].",";
}
$TOK = strtok( "," );
}
$USER_NAME2 = substr( $USER_NAME2, 0, -1 );
$M_ATTENDEE_NAME = "内部:".$USER_NAME2."<br>外部:".$M_ATTENDEE_OUT;
$M_NAME = str_replace( "<", "<", $M_NAME );
$M_NAME = str_replace( ">", ">", $M_NAME );
$M_NAME = stripslashes( $M_NAME );
$SUMMARY = str_replace( "<", "<", $SUMMARY );
$SUMMARY = str_replace( ">", ">", $SUMMARY );
$SUMMARY = stripslashes( $SUMMARY );
if ( $M_START == "0000-00-00 00:00:00" )
{
$M_START = "";
}
if ( $M_END == "0000-00-00 00:00:00" )
{
$M_END = "";
}
$M_START = substr( $M_START, 0, 16 );
$M_END = substr( $M_END, 0, 16 );
$query1 = "select USER_NAME,DEPT_ID from USER where USER_ID='".$M_PROPOSER."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
$M_PROPOSER_NAME = $ROW1['USER_NAME'];
$DEPT_ID = $ROW1['DEPT_ID'];
}
$DEPT_NAME = dept_long_name( $DEPT_ID );
$query2 = "SELECT MR_NAME from MEETING_ROOM where MR_ID='".$M_ROOM."'";
$cursor2 = exequery( $connection, $query2 );
if ( $ROW2 = mysql_fetch_array( $cursor2 ) )
{
$M_ROOM_NAME = $ROW2['MR_NAME'];
}
if ( $MEETING_COUNT == 1 )
{
echo "<br>\r\n<table class=\"TableList\" width=\"100%\" align=\"center\">\r\n <tr class=\"TableHeader\">\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 <td nowrap align=\"center\">链接</td>\r\n <td nowrap align=\"center\">会议室</td>\r\n <td nowrap align=\"center\">会议纪要</td> \r\n </tr>\r\n";
}
if ( $MEETING_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo "<tr class=\"";
echo $TableLine;
echo "\">\r\n\t<td nowrap align=\"center\">";
echo $M_NAME;
echo "</td>\r\n <td nowrap align=\"center\"><u title=\"部门:";
echo $DEPT_NAME;
echo "\" style=\"cursor:hand\">";
echo $M_PROPOSER_NAME;
echo "</u></td>\r\n <td align=\"left\">";
echo $M_ATTENDEE_NAME;
echo "</td>\r\n <td align=\"left\">";
echo $M_START;
echo "</td>\r\n <td nowrap align=\"center\">\r\n";
if ( $M_STATUS == 0 )
{
$M_STATUS = "待批";
}
if ( $M_STATUS == 1 )
{
$M_STATUS = "已批准";
}
if ( $M_STATUS == 2 )
{
$M_STATUS = "进行中";
}
if ( $M_STATUS == 3 )
{
$M_STATUS = "未批准";
}
if ( $M_STATUS == 4 )
{
$M_STATUS = "已结束";
}
echo $M_STATUS;
echo "</td>\r\n<td nowrap align=\"center\"><a href=\"#\" onClick=\"window.open('../query/meeting_detail.php?M_ID=";
echo $M_ID;
echo "','','height=500,width=600,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=250 top=150,resizable=yes');\">详细信息</a></td>\r\n<td nowrap align=\"center\">";
echo $M_ROOM_NAME;
echo "</a></td>\r\n<td nowrap align=\"center\">\r\n";
if ( $LOGIN_USER_ID == $M_PROPOSER )
{
echo "<a href=\"#\" onClick=\"window.open('../apply/summary.php?M_ID=";
echo $M_ID;
echo "','','height=540,width=740,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=150,top=100,resizable=yes');\">添加</a>\r\n";
}
echo " \r\n</td>\r\n</tr>\r\n\r\n";
}
if ( $MEETING_COUNT == 0 )
{
message( "", "无符合条件的会议" );
button_back( );
exit( );
}
echo "</table>\r\n";
button_back( );
echo "</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -