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

📄 search.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
include_once("inc/check_type.php");
include_once("inc/utility_all.php");
?>

<html>
<head>
<title>短信发送管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function delete_sms(SMS_ID)
{
 msg='确认要删除该手机短信么?';
 if(window.confirm(msg))
 {
  URL="delete_sms.php?SMS_ID=" + SMS_ID;
  window.location=URL;
 }
}
</script>
</head>

<body class="bodycolor" topmargin="5">

<?
  //----------- 合法性校验 ---------
  if($BEGIN_DATE!="")
  {
    $TIME_OK=is_date_time($BEGIN_DATE);

    if(!$TIME_OK)
    { Message("错误","起始时间格式不对,应形如 1999-1-2 14:55:20");
      Button_Back();
      exit;
    }
  }

  if($END_DATE!="")
  {
    $TIME_OK=is_date_time($END_DATE);

    if(!$TIME_OK)
    { Message("错误","截止时间格式不对,应形如 1999-1-2 14:55:20");
      Button_Back();
      exit;
    }
  }


 if($BEGIN_DATE=="")
    $query = "SELECT * from SMS2 where SEND_TIME<='$END_DATE'";
 elseif($END_DATE=="")
    $query = "SELECT * from SMS2 where SEND_TIME>='$BEGIN_DATE'";
 else
    $query = "SELECT * from SMS2 where SEND_TIME>='$BEGIN_DATE' and SEND_TIME<='$END_DATE'";

 if($SEND_FLAG!="ALL")
    $query.= " and SEND_FLAG='$SEND_FLAG'";

 $query.= " and FROM_ID='$LOGIN_USER_ID'";

 if($PHONE!="")
    $query.= " and PHONE like '%$PHONE%'";

 if($CONTENT!="")
    $query.= " and CONTENT like '%$CONTENT%'";

 if($DELETE_FLAG==1)
 {
    $query=str_replace("SELECT * from","delete from",$query)." and SEND_FLAG!='1'";
    exequery($connection,$query);
    Message("提示","指定范围内的手机短信记录已删除!");
    Button_Back();
    exit;
 }
?>

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/mobile_sms.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 短信发送查询结果 (最多显示500条记录)</span>
    	<input type="button" class="BigButton" value="刷新" onclick="location.reload();">
    </td>
  </tr>
</table>

<?
 $query1= "select * from USER where MOBIL_NO<>''";
 $cursor= exequery($connection,$query1);
 while($ROW=mysql_fetch_array($cursor))
 {
 	$USER_NAME=$ROW["USER_NAME"];
 	$MOBIL_NO=$ROW["MOBIL_NO"];
 	$MOBIL_NO_HIDDEN=$ROW["MOBIL_NO_HIDDEN"];
 	$PHONE_ARRAY[$MOBIL_NO][0]=$USER_NAME;
 	$PHONE_ARRAY[$MOBIL_NO][1]=$MOBIL_NO_HIDDEN;
 }

 $query.= " order by SEND_TIME desc,SMS_ID desc";
 $cursor= exequery($connection,$query);
 $SMS_COUNT=0;
 while($ROW=mysql_fetch_array($cursor))
 {
    $SMS_COUNT++;
    if($SMS_COUNT>500)
       break;

    $SMS_ID=$ROW["SMS_ID"];
    $PHONE=$ROW["PHONE"];
    $CONTENT=$ROW["CONTENT"];
    $SEND_TIME=$ROW["SEND_TIME"];
    $SEND_FLAG=$ROW["SEND_FLAG"];

    switch($SEND_FLAG)
    {
      case "0":
          $SEND_FLAG_DESC="未发送";
          break;
      case "1":
          $SEND_FLAG_DESC="发送成功";
          break;
      case "2":
          $SEND_FLAG_DESC="发送失败";
          break;
    }

    if($SMS_COUNT==1)
    {
?>
     <table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
      <tr class="TableHeader">
       <td nowrap align="center">收信人</td>
       <td nowrap align="center">手机号码</td>
       <td nowrap align="center">内容</td>
       <td nowrap align="center">发送时间 <img border=0 src="/images/arrow_down.gif" width="11" height="10"></td>
       <td nowrap align="center">状态</td>
       <td nowrap align="center">操作</td>
      </tr>
<?
    }

    if($SMS_COUNT%2==1)
       $TableLine="TableLine1";
    else
       $TableLine="TableLine2";
?>
    <tr class="<?=$TableLine?>">
      <td nowrap align="center"><?=$PHONE_ARRAY[$PHONE][0]?>
      <td nowrap align="center"><?if($PHONE_ARRAY[$PHONE][1]==0)echo $PHONE;else echo "不公开";?></td>
      <td><?=$CONTENT?></td>
      <td nowrap align="center"><?=$SEND_TIME?></td>
      <td nowrap align="center"><?=$SEND_FLAG_DESC?></td>
      <td nowrap align="center">
<?
   if($SEND_FLAG!="1")
   {
?>
          <a href="javascript:delete_sms(<?=$SMS_ID?>);">删除</a>
<?
   }
?>
      </td>
    </tr>
<?
 }//while

 if($SMS_COUNT==0)
   Message("","无符合条件的手机短信记录");
 else
 {
   echo "</table>";
   Message("","共 $SMS_COUNT 条记录");
 }

 Button_Back();
?>

</body>
</html>

⌨️ 快捷键说明

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