[17876] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
[20764] | 5 | * Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved. |
---|
[17876] | 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 |
---|
[20534] | 25 | require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php'; |
---|
[17876] | 26 | |
---|
| 27 | /** |
---|
| 28 | * Admin_Customer_SearchCustomer のページクラス. |
---|
| 29 | * |
---|
| 30 | * @package Page |
---|
| 31 | * @author LOCKON CO.,LTD. |
---|
[20116] | 32 | * @version $Id$ |
---|
[17876] | 33 | */ |
---|
[20345] | 34 | class LC_Page_Admin_Customer_SearchCustomer extends LC_Page_Admin_Ex { |
---|
[17876] | 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'; |
---|
[21250] | 48 | $this->tpl_subtitle = '顧客検索'; |
---|
[18187] | 49 | $this->httpCacheControl('nocache'); |
---|
[17876] | 50 | } |
---|
| 51 | |
---|
| 52 | /** |
---|
| 53 | * Page のプロセス. |
---|
| 54 | * |
---|
| 55 | * @return void |
---|
| 56 | */ |
---|
[19661] | 57 | function process() { |
---|
| 58 | $this->action(); |
---|
| 59 | $this->sendResponse(); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | /** |
---|
| 63 | * Page のアクション. |
---|
| 64 | * |
---|
| 65 | * @return void |
---|
| 66 | */ |
---|
| 67 | function action() { |
---|
[20970] | 68 | // パラメーター管理クラス |
---|
[20501] | 69 | $objFormParam = new SC_FormParam_Ex(); |
---|
[20970] | 70 | // パラメーター設定 |
---|
[20286] | 71 | $this->lfInitParam($objFormParam); |
---|
| 72 | $objFormParam->setParam($_POST); |
---|
| 73 | $objFormParam->convParam(); |
---|
| 74 | // パラメーター読み込み |
---|
| 75 | $this->arrForm = $objFormParam->getFormParamList(); |
---|
| 76 | // 入力パラメーターチェック |
---|
| 77 | $this->arrErr = $this->lfCheckError($objFormParam); |
---|
| 78 | if(!SC_Utils_Ex::isBlank($this->arrErr)) { |
---|
| 79 | return; |
---|
| 80 | } |
---|
| 81 | |
---|
[21118] | 82 | // POSTのモードがsearchなら顧客検索開始 |
---|
[20044] | 83 | switch ($this->getMode()) { |
---|
| 84 | case 'search': |
---|
[20286] | 85 | list($this->tpl_linemax, $this->arrCustomer, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray()); |
---|
[20387] | 86 | $this->tpl_strnavi = $this->objNavi->strnavi; |
---|
[20044] | 87 | break; |
---|
| 88 | default: |
---|
| 89 | break; |
---|
[17876] | 90 | } |
---|
[19912] | 91 | $this->setTemplate($this->tpl_mainpage); |
---|
[17876] | 92 | } |
---|
| 93 | |
---|
| 94 | /** |
---|
| 95 | * デストラクタ. |
---|
| 96 | * |
---|
| 97 | * @return void |
---|
| 98 | */ |
---|
| 99 | function destroy() |
---|
| 100 | { |
---|
| 101 | parent::destroy(); |
---|
| 102 | } |
---|
| 103 | |
---|
[20286] | 104 | /** |
---|
| 105 | * パラメーター情報の初期化 |
---|
| 106 | * |
---|
| 107 | * @param array $objFormParam フォームパラメータークラス |
---|
| 108 | * @return void |
---|
| 109 | */ |
---|
| 110 | function lfInitParam(&$objFormParam) { |
---|
| 111 | SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam); |
---|
[17876] | 112 | } |
---|
| 113 | |
---|
[20286] | 114 | /** |
---|
| 115 | * エラーチェック |
---|
| 116 | * |
---|
| 117 | * @param array $objFormParam フォームパラメータークラス |
---|
| 118 | * @return array エラー配列 |
---|
| 119 | */ |
---|
| 120 | function lfCheckError(&$objFormParam) { |
---|
| 121 | return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam); |
---|
| 122 | } |
---|
[17876] | 123 | |
---|
[20286] | 124 | /** |
---|
[21118] | 125 | * 顧客一覧を検索する処理 |
---|
[20286] | 126 | * |
---|
| 127 | * @param array $arrParam 検索パラメーター連想配列 |
---|
[21118] | 128 | * @return array( integer 全体件数, mixed 顧客データ一覧配列, mixed SC_PageNaviオブジェクト) |
---|
[20286] | 129 | */ |
---|
| 130 | function lfDoSearch($arrParam) { |
---|
| 131 | return SC_Helper_Customer_Ex::sfGetSearchData($arrParam); |
---|
[17876] | 132 | } |
---|
| 133 | } |
---|
| 134 | ?> |
---|