[15653] | 1 | <?php |
---|
| 2 | /* |
---|
[16582] | 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
[18758] | 5 | * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. |
---|
[15653] | 6 | * |
---|
| 7 | * http://www.lockon.co.jp/ |
---|
[16582] | 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. |
---|
[15653] | 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 | class LC_Page_Admin_Mail_History extends LC_Page { |
---|
| 35 | |
---|
| 36 | // }}} |
---|
| 37 | // {{{ functions |
---|
| 38 | |
---|
| 39 | /** |
---|
| 40 | * Page を初期化する. |
---|
| 41 | * |
---|
| 42 | * @return void |
---|
| 43 | */ |
---|
| 44 | function init() { |
---|
| 45 | parent::init(); |
---|
| 46 | $this->tpl_mainpage = 'mail/history.tpl'; |
---|
| 47 | $this->tpl_mainno = 'mail'; |
---|
| 48 | $this->tpl_subnavi = 'mail/subnavi.tpl'; |
---|
| 49 | $this->tpl_subno = "history"; |
---|
| 50 | $this->tpl_subtitle = '配信履歴'; |
---|
| 51 | |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | /** |
---|
| 55 | * Page のプロセス. |
---|
| 56 | * |
---|
| 57 | * @return void |
---|
| 58 | */ |
---|
| 59 | function process() { |
---|
| 60 | //---- ページ初期設定 |
---|
| 61 | $conn = new SC_DBConn(); |
---|
| 62 | $objView = new SC_AdminView(); |
---|
| 63 | $objSess = new SC_Session(); |
---|
| 64 | $objDate = new SC_Date(); |
---|
| 65 | |
---|
| 66 | // 認証可否の判定 |
---|
| 67 | SC_Utils_Ex::sfIsSuccess($objSess); |
---|
| 68 | |
---|
| 69 | if (!isset($_GET['send_id'])) $_GET['send_id'] = ""; |
---|
| 70 | if (!isset($_GET['mode'])) $_GET['mode'] = ""; |
---|
| 71 | if (!isset($_POST['search_pageno'])) $_POST['search_pageno'] = ""; |
---|
| 72 | |
---|
| 73 | // 削除時 |
---|
| 74 | if (SC_Utils_Ex::sfCheckNumLength($_GET['send_id']) && ($_GET['mode']=='delete') ){ |
---|
| 75 | |
---|
| 76 | $sql = "UPDATE dtb_send_history SET del_flg = 1 WHERE send_id = ?"; |
---|
| 77 | $conn->query($sql, array($_GET['send_id']) ); |
---|
| 78 | $_SERVER['QUERY_STRING'] = ""; |
---|
| 79 | $this->reload(); |
---|
| 80 | } |
---|
| 81 | $col = "*"; |
---|
| 82 | $from = "dtb_send_history"; |
---|
| 83 | |
---|
| 84 | $where = " del_flg = ?"; |
---|
| 85 | $arrval[] = "0"; |
---|
| 86 | |
---|
| 87 | $objQuery = new SC_Query(); |
---|
| 88 | // 行数の取得 |
---|
| 89 | $linemax = $objQuery->count($from, $where, $arrval); |
---|
| 90 | $this->tpl_linemax = $linemax; // 何件が該当しました。表示用 |
---|
| 91 | |
---|
| 92 | // ページ送りの取得 |
---|
| 93 | $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, SEARCH_PMAX, "fnNaviSearchPage", NAVI_PMAX); |
---|
| 94 | $this->tpl_strnavi = $objNavi->strnavi; // 表示文字列 |
---|
| 95 | $startno = $objNavi->start_row; |
---|
| 96 | |
---|
| 97 | // 取得範囲の指定(開始行番号、行数のセット) |
---|
[18758] | 98 | $objQuery->setLimitOffset(SEARCH_PMAX, $startno); |
---|
[15653] | 99 | |
---|
| 100 | // 表示順序 |
---|
| 101 | $order = "start_date DESC, send_id DESC"; |
---|
[18758] | 102 | $objQuery->setOrder($order); |
---|
[15653] | 103 | |
---|
| 104 | // 検索結果の取得 |
---|
| 105 | $this->arrDataList = $objQuery->select($col, $from, $where, $arrval); |
---|
| 106 | |
---|
| 107 | //---- ページ表示 |
---|
| 108 | $objView->assignobj($this); |
---|
| 109 | $objView->display(MAIN_FRAME); |
---|
| 110 | } |
---|
| 111 | |
---|
| 112 | /** |
---|
| 113 | * デストラクタ. |
---|
| 114 | * |
---|
| 115 | * @return void |
---|
| 116 | */ |
---|
| 117 | function destroy() { |
---|
| 118 | parent::destroy(); |
---|
| 119 | } |
---|
| 120 | } |
---|
| 121 | ?> |
---|