1 | <?php |
---|
2 | /* |
---|
3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
---|
4 | * |
---|
5 | * http://www.lockon.co.jp/ |
---|
6 | */ |
---|
7 | require_once("../require.php"); |
---|
8 | |
---|
9 | class LC_Page { |
---|
10 | var $arrSession; |
---|
11 | function LC_Page() { |
---|
12 | $this->tpl_mainpage = 'mail/history.tpl'; |
---|
13 | $this->tpl_mainno = 'mail'; |
---|
14 | $this->tpl_subnavi = 'mail/subnavi.tpl'; |
---|
15 | $this->tpl_subno = "history"; |
---|
16 | $this->tpl_subtitle = '配信履歴'; |
---|
17 | } |
---|
18 | } |
---|
19 | |
---|
20 | //---- ページ初期設定 |
---|
21 | $conn = new SC_DBConn(); |
---|
22 | $objPage = new LC_Page(); |
---|
23 | $objView = new SC_AdminView(); |
---|
24 | $objSess = new SC_Session(); |
---|
25 | $objDate = new SC_Date(); |
---|
26 | |
---|
27 | // 認証可否の判定 |
---|
28 | sfIsSuccess($objSess); |
---|
29 | |
---|
30 | // 削除時 |
---|
31 | if ( sfCheckNumLength($_GET['send_id']) && ($_GET['mode']=='delete') ){ |
---|
32 | |
---|
33 | $sql = "UPDATE dtb_send_history SET del_flg = 1 WHERE send_id = ?"; |
---|
34 | $conn->query($sql, array($_GET['send_id']) ); |
---|
35 | sfReload(); |
---|
36 | |
---|
37 | } |
---|
38 | $col = "*"; |
---|
39 | $from = "dtb_send_history"; |
---|
40 | |
---|
41 | $where .= " del_flg = ?"; |
---|
42 | $arrval[] = "0"; |
---|
43 | |
---|
44 | $objQuery = new SC_Query(); |
---|
45 | // 行数の取得 |
---|
46 | $linemax = $objQuery->count($from, $where, $arrval); |
---|
47 | $objPage->tpl_linemax = $linemax; // 何件が該当しました。表示用 |
---|
48 | |
---|
49 | // ページ送りの取得 |
---|
50 | $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, SEARCH_PMAX, "fnNaviSearchPage", NAVI_PMAX); |
---|
51 | $objPage->tpl_strnavi = $objNavi->strnavi; // 表示文字列 |
---|
52 | $startno = $objNavi->start_row; |
---|
53 | |
---|
54 | // 取得範囲の指定(開始行番号、行数のセット) |
---|
55 | $objQuery->setlimitoffset(SEARCH_PMAX, $startno); |
---|
56 | |
---|
57 | // 表示順序 |
---|
58 | $order = "start_date DESC, send_id DESC"; |
---|
59 | $objQuery->setorder($order); |
---|
60 | |
---|
61 | // 検索結果の取得 |
---|
62 | $objPage->arrDataList = $objQuery->select($col, $from, $where, $arrval); |
---|
63 | |
---|
64 | //---- ページ表示 |
---|
65 | $objView->assignobj($objPage); |
---|
66 | $objView->display(MAIN_FRAME); |
---|