Source for file LC_Page_Admin_Customer.php
Documentation is available at LC_Page_Admin_Customer.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 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_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Customer.php 21185 2011-08-11 10:37:10Z shutta $
$this->tpl_mainpage = 'customer/index.tpl';
$this->tpl_mainno = 'customer';
$this->tpl_subno = 'index';
$this->tpl_pager = 'pager.tpl';
$this->tpl_maintitle = '顧客管理';
$this->tpl_subtitle = '顧客マスター';
$masterData = new SC_DB_MasterData_Ex();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrJob = $masterData->getMasterData("mtb_job");
$this->arrJob["不明"] = "不明";
$this->arrSex = $masterData->getMasterData("mtb_sex");
$this->arrPageMax = $masterData->getMasterData("mtb_page_max");
$this->arrStatus = $masterData->getMasterData("mtb_customer_status");
$this->arrMagazineType = $masterData->getMasterData("mtb_magazine_type");
$objDate = new SC_Date_Ex();
$objDate->setStartYear(RELEASE_YEAR);
$objDate->setEndYear(DATE('Y'));
$this->arrRegistYear = $objDate->getYear();
$objDate->setStartYear(BIRTH_YEAR);
$objDate->setEndYear(DATE('Y'));
$this->arrBirthYear = $objDate->getYear();
$this->arrMonth = $objDate->getMonth();
$this->arrDay = $objDate->getDay();
$objDb = new SC_Helper_DB_Ex();
$this->arrCatList = $objDb->sfGetCategoryList();
$this->httpCacheControl('nocache');
$objFormParam = new SC_FormParam_Ex();
$objFormParam->setParam($_POST);
$objFormParam->convParam();
$this->arrForm = $objFormParam->getFormParamList();
$this->arrHidden = $objFormParam->getSearchArray();
if(!SC_Utils_Ex::isBlank($this->arrErr)) {
switch ($this->getMode()) {
$this->is_delete = $this->lfDoDeleteCustomer($objFormParam->getValue('edit_customer_id'));
list ($this->tpl_linemax, $this->arrData, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray());
$this->arrPagenavi = $this->objNavi->arrPagenavi;
$this->is_resendmail = $this->lfDoResendMail($objFormParam->getValue('edit_customer_id'));
list ($this->tpl_linemax, $this->arrData, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray());
$this->arrPagenavi = $this->objNavi->arrPagenavi;
list ($this->tpl_linemax, $this->arrData, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray());
$this->arrPagenavi = $this->objNavi->arrPagenavi;
$this->lfDoCSV($objFormParam->getHashArray());
* @param array $objFormParam フォームパラメータークラス
SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
$objFormParam->addParam('編集対象顧客ID', 'edit_customer_id', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK"));
* @param array $objFormParam フォームパラメータークラス
return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
* @param integer $customer_id 顧客ID
* @return boolean true:成功 false:失敗
$arrData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id, "del_flg = 0");
if(SC_Utils_Ex::isBlank($arrData)) {
// XXXX: 仮会員は物理削除となっていたが論理削除に変更。
$arrVal["del_flg"] = "1";
$arrVal["update_date"] = 'CURRENT_TIMESTAMP';
SC_Helper_Customer_Ex::sfEditCustomerData($arrVal, $customer_id);
* @param integer $customer_id 顧客ID
* @return boolean true:成功 false:失敗
$arrData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
if(SC_Utils_Ex::isBlank($arrData) or $arrData['del_flg'] == 1) {
//対象となるデータが見つからない、または削除済み
$objHelperMail = new SC_Helper_Mail_Ex();
$objHelperMail->sfSendRegistMail($arrData['secret_key'], $customer_id);
* @param array $arrParam 検索パラメーター連想配列
* @return array( integer 全体件数, mixed 顧客データ一覧配列, mixed SC_PageNaviオブジェクト)
return SC_Helper_Customer_Ex::sfGetSearchData($arrParam);
* @param array $arrParam 検索パラメーター連想配列
* @return boolean true:成功 false:失敗
$objSelect = new SC_CustomerList_Ex($arrParam, 'customer');
$order = "update_date DESC, customer_id DESC";
require_once CLASS_EX_REALDIR . 'helper_extends/SC_Helper_CSV_Ex.php';
$objCSV = new SC_Helper_CSV_Ex();
list ($where, $arrVal) = $objSelect->getWhere();
return $objCSV->sfDownloadCsv('2', $where, $arrVal, $order, true);
Documentation generated on Fri, 24 Feb 2012 14:01:12 +0900 by Seasoft
|