source: branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_SearchCustomer.php @ 20501

Revision 20501, 3.6 KB checked in by shutta, 13 years ago (diff)

SC_FormParamクラスのclass_extends対応

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24// {{{ requires
25require_once(CLASS_EX_REALDIR . "page_extends/admin/LC_Page_Admin_Ex.php");
26
27/**
28 * Admin_Customer_SearchCustomer のページクラス.
29 *
30 * @package Page
31 * @author LOCKON CO.,LTD.
32 * @version $Id$
33 */
34class LC_Page_Admin_Customer_SearchCustomer extends LC_Page_Admin_Ex {
35
36    // }}}
37    // {{{ functions
38
39    /**
40     * Page を初期化する.
41     *
42     * @return void
43     */
44    function init()
45    {
46        parent::init();
47        $this->tpl_mainpage = 'customer/search_customer.tpl';
48        $this->httpCacheControl('nocache');
49    }
50
51    /**
52     * Page のプロセス.
53     *
54     * @return void
55     */
56    function process() {
57        $this->action();
58        $this->sendResponse();
59    }
60
61    /**
62     * Page のアクション.
63     *
64     * @return void
65     */
66    function action() {
67        // パラメータ管理クラス
68        $objFormParam = new SC_FormParam_Ex();
69        // パラメータ設定
70        $this->lfInitParam($objFormParam);
71        $objFormParam->setParam($_POST);
72        $objFormParam->convParam();
73        // パラメーター読み込み
74        $this->arrForm = $objFormParam->getFormParamList();
75        // 入力パラメーターチェック
76        $this->arrErr = $this->lfCheckError($objFormParam);
77        if(!SC_Utils_Ex::isBlank($this->arrErr)) {
78            return;
79        }
80
81        // POSTのモードがsearchなら顧客検索開始
82        switch ($this->getMode()) {
83        case 'search':
84            list($this->tpl_linemax, $this->arrCustomer, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray());
85            $this->tpl_strnavi = $this->objNavi->strnavi;
86            break;
87        default:
88            break;
89        }
90        $this->setTemplate($this->tpl_mainpage);
91    }
92
93    /**
94     * デストラクタ.
95     *
96     * @return void
97     */
98    function destroy()
99    {
100        parent::destroy();
101    }
102
103    /**
104     * パラメーター情報の初期化
105     *
106     * @param array $objFormParam フォームパラメータークラス
107     * @return void
108     */
109    function lfInitParam(&$objFormParam) {
110        SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
111    }
112
113    /**
114     * エラーチェック
115     *
116     * @param array $objFormParam フォームパラメータークラス
117     * @return array エラー配列
118     */
119    function lfCheckError(&$objFormParam) {
120        return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
121    }
122
123    /**
124     * 顧客一覧を検索する処理
125     *
126     * @param array $arrParam 検索パラメーター連想配列
127     * @return array( integer 全体件数, mixed 顧客データ一覧配列, mixed SC_PageNaviオブジェクト)
128     */
129    function lfDoSearch($arrParam) {
130        return SC_Helper_Customer_Ex::sfGetSearchData($arrParam);
131    }
132}
133?>
Note: See TracBrowser for help on using the repository browser.