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

Revision 15532, 2.6 KB checked in by nanasess, 17 years ago (diff)

svn:mime-type 修正

  • Property svn:keywords set to Id Revision Date
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
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            $this->reload();
59            break;
60        case 'up':
61            $objDb->sfRankUp("dtb_payment", "payment_id", $_POST['payment_id']);
62            // 再表示
63            $this->reload();
64            break;
65        case 'down':
66            $objDb->sfRankDown("dtb_payment", "payment_id", $_POST['payment_id']);
67            // 再表示
68            $this->reload();
69            break;
70        }
71
72        $this->arrDelivList = $objDb->sfGetIDValueList("dtb_deliv", "deliv_id", "service_name");
73        $this->arrPaymentListFree = $this->lfGetPaymentList(2);
74
75        $objView->assignobj($this);
76        $objView->display(MAIN_FRAME);
77    }
78
79    /**
80     * デストラクタ.
81     *
82     * @return void
83     */
84    function destroy() {
85        parent::destroy();
86    }
87
88    // 配送業者一覧の取得
89    function lfGetPaymentList($fix = 1) {
90        $objQuery = new SC_Query();
91        // 配送業者一覧の取得
92        $col = "payment_id, payment_method, charge, rule, upper_rule, note, deliv_id, fix, charge_flg";
93        $where = "del_flg = 0";
94    //  $where .= " AND fix = ?";
95        $table = "dtb_payment";
96        $objQuery->setorder("rank DESC");
97        $arrRet = $objQuery->select($col, $table, $where);
98        return $arrRet;
99    }
100}
101?>
Note: See TracBrowser for help on using the repository browser.