Source for file LC_Page_Admin_Customer_SearchCustomer.php
Documentation is available at LC_Page_Admin_Customer_SearchCustomer.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH . "pages/LC_Page.php");
* Admin_Customer_SearchCustomer のページクラス.
* @author LOCKON CO.,LTD.
SC_Utils_Ex::sfIsSuccess($objSess);
// POSTのモードがsearchなら顧客検索開始
if($_POST['mode'] == 'search'){
$this->objFormParam->setParam($_POST);
$this->objFormParam->convParam();
$arrForm = $this->objFormParam->getHashArray();
if( is_array($this->arrErr) === true && 0 < count($this->arrErr) ){
foreach($arrForm as $tmp_key => $val){
$key = strtr($tmp_key , array('search_' => ''));
$where .= " AND customer_id = ? ";
$where .= " AND name01 ILIKE ? ";
$sqlval[$key] = '%'. $val. '%';
$where .= " AND name02 ILIKE ? ";
$sqlval[$key] = '%'. $val. '%';
$where .= " AND kana01 ILIKE ? ";
$sqlval[$key] = '%'. $val. '%';
$where .= " AND kana02 ILIKE ? ";
$sqlval[$key] = '%'. $val. '%';
if( $is_select === true ){
$arrCustomer = $objQuery->select($col, $from, $where, $sqlval);
$customer_count = count($arrCustomer);
if( $customer_count != 0 ){
$this->tpl_linemax = $customer_count;
$this->tpl_linemax = null;
if(isset ($_POST['search_page_max'])
$page_max = $_POST['search_page_max'];
$objNavi = new SC_PageNavi($_POST['search_pageno'], $customer_count, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
$objQuery->setLimitOffset($page_max, $startno);
$objQuery->setOrder($order);
$this->arrCustomer = $objQuery->select($col, $from, $where, $sqlval);
$this->arrForm = $arrForm;
$objView->assignobj($this);
$this->objFormParam->addParam("顧客ID", "search_customer_id", INT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("顧客名(姓)", "search_name01", STEXT_LEN, "aKV", array("NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("顧客名(名)", "search_name02", STEXT_LEN, "aKV", array("NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("顧客名(カナ)", 'search_kana01', STEXT_LEN, "CKV", array("NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
$this->objFormParam->addParam("顧客名(カナ/名)", 'search_kana02', STEXT_LEN, "CKV", array("NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
$arrRet = $this->objFormParam->getHashArray();
$objErr->arrErr = $this->objFormParam->checkError();
Documentation generated on Fri, 24 Feb 2012 13:58:40 +0900 by Seasoft
|