Exemple #1
0
 public static function act_delEmail()
 {
     if (!empty($_GET['idArr'])) {
         $idStr = implode(",", $_GET['idArr']);
         $where = ' and id in (' . $idStr . ')';
         $data["is_delete"] = 1;
         $result = NoticeModel::update($data, $where, 'nt_email');
         if ($result) {
             self::$errCode = "001";
             self::$errMsg = "删除成功";
             return $result;
         }
         self::$errCode = "066";
         self::$errMsg = "删除失败";
     }
 }
Exemple #2
0
 /**
  * 短信接收记录
  */
 public function view_smsNoticeList_receive()
 {
     $this->view_lang();
     $this->smarty->assign("title", "短信接受记录");
     $where = '';
     $isAdmin = $_SESSION['isAdmin'];
     if ($isAdmin == '0') {
         $where = " AND `to_name` = '{$_SESSION['cnName']}' ";
     }
     $from_name = post_check($_GET['sender']);
     $to_name = post_check($_GET['receiver']);
     if ($from_name != '') {
         $where .= " AND (`from_name` like '%{$from_name}%'  OR `from_login_name` like '%{$from_name}%' )";
     }
     if ($to_name != '') {
         $where .= " AND (`to_name` like '%{$to_name}%'  OR `to_login_name` like '%{$to_name}%' )";
     }
     if (!empty($_GET['start_date']) && !empty($_GET['end_date'])) {
         $starTime = strtotime(trim($_GET['start_date']) . " 00:00:00 ");
         $endTime = strtotime(trim($_GET['end_date']) . " 23:59:59 ");
         if ($starTime > $endTime) {
             $temp = $starTime;
             $starTime = $endTime;
             $endTime = $temp;
         }
         $where .= " AND (addtime>{$starTime} OR addtime = {$starTime} ) AND (addtime < {$endTime} OR addtime = {$endTime})";
     }
     $perNum = 20;
     $list = NoticeAct::act_getSMSPage($where, $perNum, "");
     self::view_comm();
     $this->smarty->assign("smsNoticelist", $list[0]);
     //消息数据
     $this->smarty->assign("pageIndex", $list[1]);
     //导航条
     $this->smarty->assign("searchResults", $list[2]);
     //总数
     $this->smarty->display('smsNoticeList.htm');
 }