1 | <?php |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2011 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 |
---|
25 | require_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 | */ |
---|
34 | class 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 | parent::init(); |
---|
46 | $this->tpl_mainpage = 'customer/search_customer.tpl'; |
---|
47 | $this->tpl_subtitle = '会員検索'; |
---|
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 | $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); |
---|
69 | $objPlugin->doAction('lc_page_admin_customer_searchcustomer_action_start', array($this)); |
---|
70 | |
---|
71 | // パラメーター管理クラス |
---|
72 | $objFormParam = new SC_FormParam_Ex(); |
---|
73 | // パラメーター設定 |
---|
74 | $this->lfInitParam($objFormParam); |
---|
75 | $objFormParam->setParam($_POST); |
---|
76 | $objFormParam->convParam(); |
---|
77 | // パラメーター読み込み |
---|
78 | $this->arrForm = $objFormParam->getFormParamList(); |
---|
79 | // 入力パラメーターチェック |
---|
80 | $this->arrErr = $this->lfCheckError($objFormParam); |
---|
81 | if (!SC_Utils_Ex::isBlank($this->arrErr)) { |
---|
82 | return; |
---|
83 | } |
---|
84 | |
---|
85 | // POSTのモードがsearchなら会員検索開始 |
---|
86 | switch ($this->getMode()) { |
---|
87 | case 'search': |
---|
88 | list($this->tpl_linemax, $this->arrCustomer, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray()); |
---|
89 | $this->tpl_strnavi = $this->objNavi->strnavi; |
---|
90 | break; |
---|
91 | default: |
---|
92 | break; |
---|
93 | } |
---|
94 | $this->setTemplate($this->tpl_mainpage); |
---|
95 | |
---|
96 | // フックポイント. |
---|
97 | $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); |
---|
98 | $objPlugin->doAction('lc_page_admin_customer_searchcustomer_action_end', array($this)); |
---|
99 | } |
---|
100 | |
---|
101 | /** |
---|
102 | * デストラクタ. |
---|
103 | * |
---|
104 | * @return void |
---|
105 | */ |
---|
106 | function destroy() { |
---|
107 | parent::destroy(); |
---|
108 | } |
---|
109 | |
---|
110 | /** |
---|
111 | * パラメーター情報の初期化 |
---|
112 | * |
---|
113 | * @param array $objFormParam フォームパラメータークラス |
---|
114 | * @return void |
---|
115 | */ |
---|
116 | function lfInitParam(&$objFormParam) { |
---|
117 | SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam); |
---|
118 | } |
---|
119 | |
---|
120 | /** |
---|
121 | * エラーチェック |
---|
122 | * |
---|
123 | * @param array $objFormParam フォームパラメータークラス |
---|
124 | * @return array エラー配列 |
---|
125 | */ |
---|
126 | function lfCheckError(&$objFormParam) { |
---|
127 | return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam); |
---|
128 | } |
---|
129 | |
---|
130 | /** |
---|
131 | * 会員一覧を検索する処理 |
---|
132 | * |
---|
133 | * @param array $arrParam 検索パラメーター連想配列 |
---|
134 | * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed SC_PageNaviオブジェクト) |
---|
135 | */ |
---|
136 | function lfDoSearch($arrParam) { |
---|
137 | return SC_Helper_Customer_Ex::sfGetSearchData($arrParam); |
---|
138 | } |
---|
139 | } |
---|