Source for file LC_Page_Inquiry.php
Documentation is available at LC_Page_Inquiry.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 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");
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Inquiry.php 15532 2007-08-31 14:39:46Z nanasess $
$this->arrPref =
$masterData->getMasterData("mtb_pref",
array("pref_id", "pref_name", "rank"));
$arrRegistColumn =
array(
array( "column" =>
"name01", "convert" =>
"aKV" ),
array( "column" =>
"name02", "convert" =>
"aKV" ),
array( "column" =>
"kana01", "convert" =>
"CKV" ),
array( "column" =>
"kana02", "convert" =>
"CKV" ),
array( "column" =>
"zip01", "convert" =>
"n" ),
array( "column" =>
"zip02", "convert" =>
"n" ),
array( "column" =>
"pref", "convert" =>
"n" ),
array( "column" =>
"addr01", "convert" =>
"aKV" ),
array( "column" =>
"addr02", "convert" =>
"aKV" ),
array( "column" =>
"email", "convert" =>
"a" ),
array( "column" =>
"email02", "convert" =>
"a" ),
array( "column" =>
"tel01", "convert" =>
"n" ),
array( "column" =>
"tel02", "convert" =>
"n" ),
array( "column" =>
"tel03", "convert" =>
"n" ),
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
if ( ( ! $_POST['mode'] ==
'confirm' ) &&
( ! is_numeric($_REQUEST['question_id']) ) ){
$sql =
"SELECT question_id, question FROM dtb_question WHERE question_id = ?";
$result =
$conn->getAll( $sql, array($_REQUEST['question_id']) );
if ( count($result) <=
0 ){
$this->question_id =
$_REQUEST['question_id'];
$this->arrHidden =
SC_Utils_Ex::sfMakeHiddenArray($_POST);
unset
($this->arrHidden['mode']);
if (isset
($this->QUESTION["delete"])
&& (int)
$this->QUESTION["delete"] !==
0 ){
$objPage->tpl_mainpage =
"inquiry/closed.tpl";
} elseif( $_POST['mode'] ==
"confirm" ) {
$this->arrForm =
$this->lfConvertParam($this->arrForm, $arrRegistColumn);
}elseif( $_POST['mode'] ==
"return"){
}elseif( $_POST['mode'] ==
"regist" ) {
$this->arrForm =
$this->lfConvertParam($this->arrForm, $arrRegistColumn);
//--------- ▼ SQL ---------//
$arrOption =
$this->arrForm['option'];
unset
($this->arrForm['email02']);
$this->arrForm['mail01'] =
$this->arrForm['email'];
unset
($this->arrForm['email']);
unset
($this->arrForm['option']);
$this->arrForm['question_id'] =
$this->question_id;
$this->arrForm['question_name'] =
$this->QUESTION['title'];
for ( $i=
0; $i<
(count($arrOption)); $i++
){
for( $j=
0; $j<
count($arrOption[$i]); $j++
){
$tmp .=
$arrOption[$i][$j];
$this->arrForm['question0'.
($i+
1)] =
$tmp;
$this->arrForm['question0'.
($i+
1)] =
$arrOption[$i];
$this->arrForm['create_date'] =
"now()";
$objQuery->insert("dtb_question_result", $this->arrForm );
//--------- ▲ SQL ---------//
$this->arrActive = isset
($arrActive) ?
$arrActive :
"";
$this->arrQuestion = isset
($arrQuestion) ?
$arrQuestion :
"";
$objView->_smarty->register_function("lfArray_Search_key_Smarty", array("LC_Page_Inquiry", "lfArray_Search_key_Smarty"));
$objView->assignobj($this);
// {{{ protected functions
* @param array FormParam の配列
$objErr->doFunc(array("お名前(姓)", 'name01', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK","MAX_LENGTH_CHECK"));
$objErr->doFunc(array("お名前(名)", 'name02', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("フリガナ(セイ)", 'kana01', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
$objErr->doFunc(array("フリガナ(メイ)", 'kana02', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
$objErr->doFunc(array("郵便番号1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
$objErr->doFunc(array("都道府県", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
$objErr->doFunc(array("ご住所1", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
$objErr->doFunc(array("ご住所2", "addr02", MTEXT_LEN), array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("お電話番号1", 'tel01'), array("EXIST_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("お電話番号2", 'tel02'), array("EXIST_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("お電話番号3", 'tel03'), array("EXIST_CHECK", "NUM_CHECK"));
$objErr->doFunc(array('メールアドレス', "email", MTEXT_LEN) ,array("EXIST_CHECK", "SPTAB_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス(確認)', "email02", MTEXT_LEN) ,array("EXIST_CHECK", "SPTAB_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', "email", "email02") ,array("EQUAL_CHECK"));
$objErr->arrErr["option"] =
array_map(array($this, "lfCheckNull"), (array)
$_POST['option'] );
* @param array $array 取得文字列の配列
* @param array フォームパラメータの配列
foreach ($arrRegistColumn as $data) {
$arrConvList[ $data["column"] ] =
$data["convert"];
foreach ($arrConvList as $key =>
$val) {
$new_array[$key] =
$array[$key];
for ($i=
0; $i<
count($array['option']); $i++
){
$new_array['option'][$i] =
$array['option'][$i];
* @param array $arr 入力文字列
* @return array 値が入力された配列
foreach ( $arr as $key=>
$val ) {
* 配列の Smarty 変数の存在をチェックする.
* @param array $params フォームパラメータの配列
* @return Smarty 変数が存在する場合 true
* @param mixed $val 入力データ
* @return integer|array引数に null が含まれる場合 1, それ以外は空の配列
foreach ($val as $line) {
Documentation generated on Tue, 28 Apr 2009 18:12:21 +0900 by phpDocumentor 1.4.2