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

Revision 15303, 2.7 KB checked in by nanasess, 17 years ago (diff)

SC_Utils_Ex::sfReload() を LC_Page::reload() に変更

  • 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_Payment 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/payment.tpl';
31        $this->tpl_subnavi = 'basis/subnavi.tpl';
32        $this->tpl_mainno = 'basis';
33        $this->tpl_subno = 'payment';
34        $this->tpl_subtitle = '支払方法設定';
35    }
36
37    /**
38     * Page のプロセス.
39     *
40     * @return void
41     */
42    function process() {
43        $conn = new SC_DBConn();
44        $objView = new SC_AdminView();
45        $objSess = new SC_Session();
46        $objDb = new SC_Helper_DB_Ex();
47
48        // 認証可否の判定
49        SC_Utils_Ex::sfIsSuccess($objSess);
50
51        if (!isset($_POST['mode'])) $_POST['mode'] = "";
52
53        switch($_POST['mode']) {
54            case 'delete':
55            // ランク付きレコードの削除
56            $objDb->sfDeleteRankRecord("dtb_payment", "payment_id", $_POST['payment_id']);
57            // 再表示
58            //SC_Utils_Ex::sfReload();
59            $this->reload();
60            break;
61        case 'up':
62            $objDb->sfRankUp("dtb_payment", "payment_id", $_POST['payment_id']);
63            // 再表示
64            //SC_Utils_Ex::sfReload();
65            $this->reload();
66            break;
67        case 'down':
68            $objDb->sfRankDown("dtb_payment", "payment_id", $_POST['payment_id']);
69            // 再表示
70            //SC_Utils_Ex::sfReload();
71            $this->reload();
72            break;
73        }
74
75        $this->arrDelivList = $objDb->sfGetIDValueList("dtb_deliv", "deliv_id", "service_name");
76        $this->arrPaymentListFree = $this->lfGetPaymentList(2);
77
78        $objView->assignobj($this);
79        $objView->display(MAIN_FRAME);
80    }
81
82    /**
83     * デストラクタ.
84     *
85     * @return void
86     */
87    function destroy() {
88        parent::destroy();
89    }
90
91    // 配送業者一覧の取得
92    function lfGetPaymentList($fix = 1) {
93        $objQuery = new SC_Query();
94        // 配送業者一覧の取得
95        $col = "payment_id, payment_method, charge, rule, upper_rule, note, deliv_id, fix, charge_flg";
96        $where = "del_flg = 0";
97    //  $where .= " AND fix = ?";
98        $table = "dtb_payment";
99        $objQuery->setorder("rank DESC");
100        $arrRet = $objQuery->select($col, $table, $where);
101        return $arrRet;
102    }
103}
104?>
Note: See TracBrowser for help on using the repository browser.