Source for file LC_Page_Contact.php
Documentation is available at LC_Page_Contact.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/LC_Page_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Contact.php 21198 2011-08-18 12:08:40Z shutta $
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->tpl_title = 'お問い合わせ';
$this->tpl_title = 'お問い合わせ(入力ページ)';
$this->tpl_page_category = 'contact';
$this->httpCacheControl('nocache');
$masterData = new SC_DB_MasterData_Ex();
$this->arrPref = $masterData->getMasterData('mtb_pref');
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->CONF = SC_Helper_DB_Ex::sfGetBasisData();
$objDb = new SC_Helper_DB_Ex();
$objFormParam = new SC_FormParam_Ex();
$this->arrData = isset ($_SESSION['customer']) ? $_SESSION['customer'] : "";
switch ($this->getMode()) {
$objFormParam->setParam($_POST);
$objFormParam->convParam();
$objFormParam->toLower('email');
$objFormParam->toLower('email02');
$this->arrForm = $objFormParam->getFormParamList();
if (SC_Utils_Ex::isBlank($this->arrErr)) {
$this->tpl_mainpage = 'contact/confirm.tpl';
$this->tpl_title = 'お問い合わせ(確認ページ)';
$objFormParam->setParam($_POST);
$this->arrForm = $objFormParam->getFormParamList();
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
$this->arrForm = $objFormParam->getFormParamList();
if (SC_Utils_Ex::isBlank($this->arrErr)) {
SC_Response_Ex::sendRedirect('complete.php');
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
// {{{ protected functions
* お問い合わせ入力時のパラメーター情報の初期化を行う.
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
$objFormParam->addParam("お名前(姓)", 'name01', STEXT_LEN, 'KVa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
$objFormParam->addParam("お名前(名)", 'name02', STEXT_LEN, 'KVa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
$objFormParam->addParam("お名前(フリガナ・姓)", 'kana01', STEXT_LEN, 'KVCa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "KANA_CHECK"));
$objFormParam->addParam("お名前(フリガナ・名)", 'kana02', STEXT_LEN, 'KVCa', array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK", "KANA_CHECK"));
$objFormParam->addParam("郵便番号1", "zip01", ZIP01_LEN, 'n',array("SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objFormParam->addParam("郵便番号2", "zip02", ZIP02_LEN, 'n',array("SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objFormParam->addParam("都道府県", 'pref', INT_LEN, 'n', array("MAX_LENGTH_CHECK", "NUM_CHECK"));
$objFormParam->addParam("住所1", "addr01", MTEXT_LEN, 'KVa', array("SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objFormParam->addParam("住所2", "addr02", MTEXT_LEN, 'KVa', array("SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objFormParam->addParam("お問い合わせ内容", 'contents', MLTEXT_LEN, 'KVa', array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$objFormParam->addParam('メールアドレス', 'email', null, 'KVa',array("EXIST_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK"));
$objFormParam->addParam('メールアドレス(確認)', "email02", null, 'KVa',array("EXIST_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK"));
$objFormParam->addParam("お電話番号1", 'tel01', TEL_ITEM_LEN, 'n', array("NUM_CHECK", "MAX_LENGTH_CHECK"));
$objFormParam->addParam("お電話番号2", 'tel02', TEL_ITEM_LEN, 'n', array("NUM_CHECK", "MAX_LENGTH_CHECK"));
$objFormParam->addParam("お電話番号3", 'tel03', TEL_ITEM_LEN, 'n', array("NUM_CHECK", "MAX_LENGTH_CHECK"));
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @return array 入力チェック結果の配列
$arrForm = $objFormParam->getHashArray();
$objErr = new SC_CheckError_Ex($arrForm);
$objErr->arrErr = $objFormParam->checkError();
$objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', 'email', "email02") ,array("EQUAL_CHECK"));
$CONF = SC_Helper_DB_Ex::sfGetBasisData();
$objPage->tpl_shopname = $CONF['shop_name'];
$objPage->tpl_infoemail = $CONF['email02'];
$fromMail_name = $objPage->arrForm['name01']['value'] . " 様";
$fromMail_address = $objPage->arrForm['email']['value'];
$helperMail = new SC_Helper_Mail_Ex();
$helperMail->sfSendTemplateMail(
$objPage->arrForm['email']['value'], // to
$objPage->arrForm['name01']['value'] . ' 様', // to_name
$CONF['email03'], // from_address
$CONF['shop_name'], // from_name
$CONF['email02'], // reply_to
Documentation generated on Fri, 24 Feb 2012 14:01:54 +0900 by Seasoft
|