source: branches/feature-module-update/data/class/pages/admin/basis/LC_Page_Admin_Basis_Delivery.php @ 15294

Revision 15294, 2.5 KB checked in by nanasess, 17 years ago (diff)

クラス化対応

  • Property svn:keywords set to Id Revision Date
Line 
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
9require_once(CLASS_PATH . "pages/LC_Page.php");
10
11/**
12 * 配送業者設定 のページクラス.
13 *
14 * @package Page
15 * @author LOCKON CO.,LTD.
16 * @version $Id$
17 */
18class LC_Page_Admin_Basis_Delivery 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 = 'basis/delivery.tpl';
31        $this->tpl_subnavi = 'basis/subnavi.tpl';
32        $this->tpl_subno = 'delivery';
33        $this->tpl_mainno = 'basis';
34        $masterData = new SC_DB_MasterData_Ex();
35        $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
36        $this->arrTAXRULE = $masterData->getMasterData("mtb_taxrule");
37        $this->tpl_subtitle = '配送業者設定';
38    }
39
40    /**
41     * Page のプロセス.
42     *
43     * @return void
44     */
45    function process() {
46        $conn = new SC_DBConn();
47        $objView = new SC_AdminView();
48        $objSess = new SC_Session();
49        $objQuery = new SC_Query();
50        $objDb = new SC_Helper_DB_Ex();
51
52        // 認証可否の判定
53        SC_Utils_Ex::sfIsSuccess($objSess);
54
55        if (!isset($_POST['mode'])) $_POST['mode'] = "";
56
57        switch($_POST['mode']) {
58        case 'delete':
59            // ランク付きレコードの削除
60            $objDb->sfDeleteRankRecord("dtb_deliv", "deliv_id", $_POST['deliv_id']);
61            // 再表示
62            SC_Utils_Ex::sfReload();
63            break;
64        case 'up':
65            $objDb->sfRankUp("dtb_deliv", "deliv_id", $_POST['deliv_id']);
66            // 再表示
67            SC_Utils_Ex::sfReload();
68            break;
69        case 'down':
70            $objDb->sfRankDown("dtb_deliv", "deliv_id", $_POST['deliv_id']);
71            // 再表示
72            SC_Utils_Ex::sfReload();
73            break;
74        default:
75            break;
76        }
77
78        // 配送業者一覧の取得
79        $col = "deliv_id, name, service_name";
80        $where = "del_flg = 0";
81        $table = "dtb_deliv";
82        $objQuery->setorder("rank DESC");
83        $this->arrDelivList = $objQuery->select($col, $table, $where);
84
85        $objView->assignobj($this);
86        $objView->display(MAIN_FRAME);
87    }
88
89    /**
90     * デストラクタ.
91     *
92     * @return void
93     */
94    function destroy() {
95        parent::destroy();
96    }
97}
98?>
Note: See TracBrowser for help on using the repository browser.