source: branches/comu/html/admin/mail/history.php @ 2

Revision 2, 1.6 KB checked in by root, 17 years ago (diff)

new import

Line 
1<?php
2/*
3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7require_once("../require.php");
8
9class 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// ǧ¾Ú²ÄÈݤÎȽÄê
28sfIsSuccess($objSess);
29
30// ºï½ü»þ
31if ( 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);
Note: See TracBrowser for help on using the repository browser.