1 | <?php |
---|
2 | /* |
---|
3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
---|
4 | * |
---|
5 | * http://www.lockon.co.jp/ |
---|
6 | */ |
---|
7 | |
---|
8 | // {{{ requires |
---|
9 | require_once(CLASS_PATH . "pages/LC_Page.php"); |
---|
10 | |
---|
11 | /** |
---|
12 | * メール配信履歴 のページクラス. |
---|
13 | * |
---|
14 | * @package Page |
---|
15 | * @author LOCKON CO.,LTD. |
---|
16 | * @version $Id$ |
---|
17 | */ |
---|
18 | class LC_Page_Admin_Mail_History extends LC_Page { |
---|
19 | |
---|
20 | // }}} |
---|
21 | // {{{ functions |
---|
22 | |
---|
23 | /** |
---|
24 | * Page を初期化する. |
---|
25 | * |
---|
26 | * @return void |
---|
27 | */ |
---|
28 | function init() { |
---|
29 | parent::init(); |
---|
30 | $this->tpl_mainpage = 'mail/history.tpl'; |
---|
31 | $this->tpl_mainno = 'mail'; |
---|
32 | $this->tpl_subnavi = 'mail/subnavi.tpl'; |
---|
33 | $this->tpl_subno = "history"; |
---|
34 | $this->tpl_subtitle = '配信履歴'; |
---|
35 | |
---|
36 | } |
---|
37 | |
---|
38 | /** |
---|
39 | * Page のプロセス. |
---|
40 | * |
---|
41 | * @return void |
---|
42 | */ |
---|
43 | function process() { |
---|
44 | //---- ページ初期設定 |
---|
45 | $conn = new SC_DBConn(); |
---|
46 | $objView = new SC_AdminView(); |
---|
47 | $objSess = new SC_Session(); |
---|
48 | $objDate = new SC_Date(); |
---|
49 | |
---|
50 | // 認証可否の判定 |
---|
51 | SC_Utils_Ex::sfIsSuccess($objSess); |
---|
52 | |
---|
53 | if (!isset($_GET['send_id'])) $_GET['send_id'] = ""; |
---|
54 | if (!isset($_GET['mode'])) $_GET['mode'] = ""; |
---|
55 | if (!isset($_POST['search_pageno'])) $_POST['search_pageno'] = ""; |
---|
56 | |
---|
57 | // 削除時 |
---|
58 | if (SC_Utils_Ex::sfCheckNumLength($_GET['send_id']) && ($_GET['mode']=='delete') ){ |
---|
59 | |
---|
60 | $sql = "UPDATE dtb_send_history SET del_flg = 1 WHERE send_id = ?"; |
---|
61 | $conn->query($sql, array($_GET['send_id']) ); |
---|
62 | $_SERVER['QUERY_STRING'] = ""; |
---|
63 | $this->reload(); |
---|
64 | } |
---|
65 | $col = "*"; |
---|
66 | $from = "dtb_send_history"; |
---|
67 | |
---|
68 | $where = " del_flg = ?"; |
---|
69 | $arrval[] = "0"; |
---|
70 | |
---|
71 | $objQuery = new SC_Query(); |
---|
72 | // 行数の取得 |
---|
73 | $linemax = $objQuery->count($from, $where, $arrval); |
---|
74 | $this->tpl_linemax = $linemax; // 何件が該当しました。表示用 |
---|
75 | |
---|
76 | // ページ送りの取得 |
---|
77 | $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, SEARCH_PMAX, "fnNaviSearchPage", NAVI_PMAX); |
---|
78 | $this->tpl_strnavi = $objNavi->strnavi; // 表示文字列 |
---|
79 | $startno = $objNavi->start_row; |
---|
80 | |
---|
81 | // 取得範囲の指定(開始行番号、行数のセット) |
---|
82 | $objQuery->setlimitoffset(SEARCH_PMAX, $startno); |
---|
83 | |
---|
84 | // 表示順序 |
---|
85 | $order = "start_date DESC, send_id DESC"; |
---|
86 | $objQuery->setorder($order); |
---|
87 | |
---|
88 | // 検索結果の取得 |
---|
89 | $this->arrDataList = $objQuery->select($col, $from, $where, $arrval); |
---|
90 | |
---|
91 | //---- ページ表示 |
---|
92 | $objView->assignobj($this); |
---|
93 | $objView->display(MAIN_FRAME); |
---|
94 | } |
---|
95 | |
---|
96 | /** |
---|
97 | * デストラクタ. |
---|
98 | * |
---|
99 | * @return void |
---|
100 | */ |
---|
101 | function destroy() { |
---|
102 | parent::destroy(); |
---|
103 | } |
---|
104 | } |
---|
105 | ?> |
---|