Source for file LC_Page_Admin_Mail_History.php

Documentation is available at LC_Page_Admin_Mail_History.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * This program is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU General Public License
  11.  * as published by the Free Software Foundation; either version 2
  12.  * of the License, or (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  22.  */
  23.  
  24. // {{{ requires
  25. require_once(CLASS_PATH . "pages/LC_Page.php");
  26.  
  27. /**
  28.  * メール配信履歴 のページクラス.
  29.  *
  30.  * @package Page
  31.  * @author LOCKON CO.,LTD.
  32.  * @version $Id$
  33.  */
  34.  
  35.     // }}}
  36.     // {{{ functions
  37.  
  38.     /**
  39.      * Page を初期化する.
  40.      *
  41.      * @return void 
  42.      */
  43.     function init() {
  44.         parent::init();
  45.         $this->tpl_mainpage = 'mail/history.tpl';
  46.         $this->tpl_mainno = 'mail';
  47.         $this->tpl_subnavi = 'mail/subnavi.tpl';
  48.         $this->tpl_subno = "history";
  49.         $this->tpl_subtitle = '配信履歴';
  50.  
  51.     }
  52.  
  53.     /**
  54.      * Page のプロセス.
  55.      *
  56.      * @return void 
  57.      */
  58.     function process() {
  59.         //---- ページ初期設定
  60.         $conn = new SC_DBConn();
  61.         $objView = new SC_AdminView();
  62.         $objSess = new SC_Session();
  63.         $objDate = new SC_Date();
  64.  
  65.         // 認証可否の判定
  66.         SC_Utils_Ex::sfIsSuccess($objSess);
  67.  
  68.         if (!isset($_GET['send_id'])) $_GET['send_id'] = "";
  69.         if (!isset($_GET['mode'])) $_GET['mode'] = "";
  70.         if (!isset($_POST['search_pageno'])) $_POST['search_pageno'] = "";
  71.  
  72.         // 削除時
  73.         if (SC_Utils_Ex::sfCheckNumLength($_GET['send_id']) && ($_GET['mode']=='delete') ){
  74.  
  75.             $sql = "UPDATE dtb_send_history SET del_flg = 1 WHERE send_id = ?";
  76.             $conn->query($sql, array($_GET['send_id']) );
  77.             $_SERVER['QUERY_STRING'] = "";
  78.             $this->reload();
  79.         }
  80.         $col = "*";
  81.         $from = "dtb_send_history";
  82.  
  83.         $where = " del_flg = ?";
  84.         $arrval[] = "0";
  85.  
  86.         $objQuery = new SC_Query();
  87.         // 行数の取得
  88.         $linemax = $objQuery->count($from, $where, $arrval);
  89.         $this->tpl_linemax = $linemax;              // 何件が該当しました。表示用
  90.  
  91.         // ページ送りの取得
  92.         $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, SEARCH_PMAX, "fnNaviSearchPage", NAVI_PMAX);
  93.         $this->tpl_strnavi = $objNavi->strnavi;     // 表示文字列
  94.         $startno = $objNavi->start_row;
  95.  
  96.         // 取得範囲の指定(開始行番号、行数のセット)
  97.         $objQuery->setlimitoffset(SEARCH_PMAX, $startno);
  98.  
  99.         // 表示順序
  100.         $order = "start_date DESC, send_id DESC";
  101.         $objQuery->setorder($order);
  102.  
  103.         // 検索結果の取得
  104.         $this->arrDataList = $objQuery->select($col, $from, $where, $arrval);
  105.  
  106.         //---- ページ表示
  107.         $objView->assignobj($this);
  108.         $objView->display(MAIN_FRAME);
  109.     }
  110.  
  111.     /**
  112.      * デストラクタ.
  113.      *
  114.      * @return void 
  115.      */
  116.     function destroy() {
  117.         parent::destroy();
  118.     }
  119. }
  120. ?>

Documentation generated on Tue, 28 Apr 2009 18:11:16 +0900 by phpDocumentor 1.4.2