⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
字号:
<?
  include_once 'inc/auth.php';
  include_once 'inc/utility_all.php';
  include_once 'inc/check_type.php';
  echo '
<html>
<head>
<title>会议查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
';
  $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 = ($M_START_B.' 00:00:00');
  }
  else
  {
    $M_START_B = '';
  }
  if (($M_END_B != ''))
  {
    $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 '
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
 <tr>
  <td class="Big"><img src="/images/menu/infofind.gif" width="22" height="18" align="absMiddle">';
  echo '<s';
  echo 'pan class="big3"> 查询结果</span><br>
  </td>
 </tr>
</table>
';
  $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 * 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 ('<', '&lt', $M_NAME);
    $M_NAME = str_replace ('>', '&gt', $M_NAME);
    $M_NAME = stripslashes ($M_NAME);
    $SUMMARY = str_replace ('<', '&lt', $SUMMARY);
    $SUMMARY = str_replace ('>', '&gt', $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 * 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 * 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>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3" align="center">
  <tr class="TableHeader">
      <td nowrap align="center">会议名称</td>
      <td nowrap align="center">申请人</td>
      <td nowrap align="center">出席人员</td>
      <td nowrap align="center">开始时间</td>
      <td nowrap align="center">会议状态</td>
      <td nowrap align="center">链

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -