| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | require_once("../require.php"); |
|---|
| 4 | |
|---|
| 5 | class LC_Page { |
|---|
| 6 | var $arrSession; |
|---|
| 7 | function LC_Page() { |
|---|
| 8 | $this->tpl_mainpage = 'mail/history.tpl'; |
|---|
| 9 | $this->tpl_mainno = 'mail'; |
|---|
| 10 | $this->tpl_subnavi = 'mail/subnavi.tpl'; |
|---|
| 11 | $this->tpl_subno = "history"; |
|---|
| 12 | $this->tpl_subtitle = 'ÇÛ¿®ÍúÎò'; |
|---|
| 13 | } |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | //---- ¥Ú¡¼¥¸½é´üÀßÄê |
|---|
| 17 | $conn = new SC_DBConn(); |
|---|
| 18 | $objPage = new LC_Page(); |
|---|
| 19 | $objView = new SC_AdminView(); |
|---|
| 20 | $objSess = new SC_Session(); |
|---|
| 21 | $objDate = new SC_Date(); |
|---|
| 22 | |
|---|
| 23 | // ǧ¾Ú²ÄÈݤÎȽÄê |
|---|
| 24 | sfIsSuccess($objSess); |
|---|
| 25 | |
|---|
| 26 | // ºï½ü»þ |
|---|
| 27 | if ( sfCheckNumLength($_GET['send_id']) && ($_GET['mode']=='delete') ){ |
|---|
| 28 | |
|---|
| 29 | $sql = "UPDATE dtb_send_history SET delete = 1 WHERE send_id = ?"; |
|---|
| 30 | $conn->query($sql, array($_GET['send_id']) ); |
|---|
| 31 | sfReload(); |
|---|
| 32 | |
|---|
| 33 | } |
|---|
| 34 | $col = "*"; |
|---|
| 35 | $from = "dtb_send_history"; |
|---|
| 36 | |
|---|
| 37 | $where .= " delete = ?"; |
|---|
| 38 | $arrval[] = 0; |
|---|
| 39 | |
|---|
| 40 | $objQuery = new SC_Query(); |
|---|
| 41 | // ¹Ô¿ô¤Î¼èÆÀ |
|---|
| 42 | $linemax = $objQuery->count($from, $where, $arrval); |
|---|
| 43 | $objPage->tpl_linemax = $linemax; // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ |
|---|
| 44 | |
|---|
| 45 | // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ |
|---|
| 46 | $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, SEARCH_PMAX, "fnNaviSearchPage", NAVI_PMAX); |
|---|
| 47 | $objPage->tpl_strnavi = $objNavi->strnavi; // ɽ¼¨Ê¸»úÎó |
|---|
| 48 | $startno = $objNavi->start_row; |
|---|
| 49 | |
|---|
| 50 | // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) |
|---|
| 51 | $objQuery->setlimitoffset(SEARCH_PMAX, $startno); |
|---|
| 52 | |
|---|
| 53 | // ɽ¼¨½ç½ø |
|---|
| 54 | $order = "start_date DESC, send_id DESC"; |
|---|
| 55 | $objQuery->setorder($order); |
|---|
| 56 | |
|---|
| 57 | // ¸¡º÷·ë²Ì¤Î¼èÆÀ |
|---|
| 58 | $objPage->arrDataList = $objQuery->select($col, $from, $where, $arrval); |
|---|
| 59 | |
|---|
| 60 | //----¡¡¥Ú¡¼¥¸É½¼¨ |
|---|
| 61 | $objView->assignobj($objPage); |
|---|
| 62 | $objView->display(MAIN_FRAME); |
|---|