Source for file LC_Page_Mypage_Change.php
Documentation is available at LC_Page_Mypage_Change.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");
if (file_exists(MODULE_PATH .
"mdl_gmopg/inc/function.php")) {
require_once(MODULE_PATH .
"mdl_gmopg/inc/function.php");
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Mypage_Change.php 17927 2009-03-25 07:18:11Z Seasoft $
$this->tpl_subtitle =
'会員登録内容変更(入力ページ)';
$this->tpl_navi =
TEMPLATE_DIR .
'mypage/navi.tpl';
$this->tpl_mypageno =
'change';
$this->arrReminder =
$masterData->getMasterData("mtb_reminder");
$this->arrPref =
$masterData->getMasterData("mtb_pref",
array("pref_id", "pref_name", "rank"));
$this->arrJob =
$masterData->getMasterData("mtb_job");
$this->arrMAILMAGATYPE =
$masterData->getMasterData("mtb_mail_magazine_type");
$this->arrSex =
$masterData->getMasterData("mtb_sex");
$objLayout->sfGetPageLayout($this, false, "mypage/index.php");
$this->arrYear =
$objDate->getYear('', 1950, '');
$this->arrMonth =
$objDate->getMonth(true);
$this->arrDay =
$objDate->getDay(true);
if (!$this->objCustomer->isLoginSuccess()){
$this->CustomerName1 =
$this->objCustomer->getvalue('name01');
$this->CustomerName2 =
$this->objCustomer->getvalue('name02');
$this->CustomerPoint =
$this->objCustomer->getvalue('point');
$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" =>
"email_mobile", "convert" =>
"a" ),
array( "column" =>
"tel01", "convert" =>
"n" ),
array( "column" =>
"tel02", "convert" =>
"n" ),
array( "column" =>
"tel03", "convert" =>
"n" ),
array( "column" =>
"fax01", "convert" =>
"n" ),
array( "column" =>
"fax02", "convert" =>
"n" ),
array( "column" =>
"fax03", "convert" =>
"n" ),
array( "column" =>
"sex", "convert" =>
"n" ),
array( "column" =>
"job", "convert" =>
"n" ),
array( "column" =>
"birth", "convert" =>
"n" ),
array( "column" =>
"password", "convert" =>
"an" ),
array( "column" =>
"reminder", "convert" =>
"n" ),
array( "column" =>
"reminder_answer", "convert" =>
"aKV" ),
array( "column" =>
"mailmaga_flg", "convert" =>
"n" )
$arrMailType =
array("email" =>
true, "email_mobile" =>
true);
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
//エラーなしでかつメールアドレスが重複していない場合
$this->tpl_mainpage =
TEMPLATE_DIR .
'mypage/change_confirm.tpl';
$this->tpl_subtitle =
'会員登録内容変更(確認ページ)';
$passlen =
strlen($this->arrForm['password']);
$this->arrForm['password'] =
DEFAULT_PASSWORD;
$this->arrForm['password02'] =
DEFAULT_PASSWORD;
//エラーなしでかつメールアドレスが重複していない場合
$this->arrForm['customer_id'] =
$this->objCustomer->getValue('customer_id');
$objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
$this->objCustomer->updateSession();
// Do楽SNS連携モジュールユーザ情報更新処理
sfUpdateSourakuSNSUserInfo();
$this->arrForm['password'] =
DEFAULT_PASSWORD;
$this->arrForm['password02'] =
DEFAULT_PASSWORD;
if ($arrCustomer['birth'] !=
""){
$this->birth_check =
true;
$objView->assignobj($this); //$objpage内の全てのテンプレート変数をsmartyに格納
$objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行
$this->arrReminder =
$masterData->getMasterData("mtb_reminder");
$this->arrPref =
$masterData->getMasterData("mtb_pref",
array("pref_id", "pref_name", "rank"));
$this->arrJob =
$masterData->getMasterData("mtb_job");
$this->arrMAILMAGATYPE =
$masterData->getMasterData("mtb_mail_magazine_type");
$this->arrSex =
$masterData->getMasterData("mtb_sex");
$CONF =
$objDb->sf_getBasisData(); // 店舗基本情報
$this->arrMonth =
$objDate->getMonth(true);
$this->arrDay =
$objDate->getDay(true);
$arrMailType =
array("email" =>
true, "email_mobile" =>
true);
$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" =>
"email_mobile", "convert" =>
"a" ),
array( "column" =>
"tel01", "convert" =>
"n" ),
array( "column" =>
"tel02", "convert" =>
"n" ),
array( "column" =>
"tel03", "convert" =>
"n" ),
array( "column" =>
"fax01", "convert" =>
"n" ),
array( "column" =>
"fax02", "convert" =>
"n" ),
array( "column" =>
"fax03", "convert" =>
"n" ),
array( "column" =>
"sex", "convert" =>
"n" ),
array( "column" =>
"job", "convert" =>
"n" ),
array( "column" =>
"birth", "convert" =>
"n" ),
array( "column" =>
"reminder", "convert" =>
"n" ),
array( "column" =>
"reminder_answer", "convert" =>
"aKV"),
array( "column" =>
"password", "convert" =>
"a" ),
array( "column" =>
"mailmaga_flg", "convert" =>
"n" )
$arrRejectRegistColumn =
array("year", "month", "day", "email02", "email_mobile02", "password02");
$this->arrForm['password'] =
DEFAULT_PASSWORD;
if ($_SERVER["REQUEST_METHOD"] ==
"POST") {
if (!isset
($this->arrForm['year'])) $this->arrForm['year'] =
"";
if($this->arrForm['year'] ==
'----') {
$this->arrForm['year'] =
'';
$this->arrForm =
$this->lfConvertParam($this->arrForm, $arrRegistColumn);
if (!empty($_POST["return"])) {
switch ($_POST["mode"]) {
if ($_POST["mode"] ==
"set1") {
} elseif ($_POST["mode"] ==
"set2") {
if ($this->arrErr ||
!empty($_POST["return"])) { // 入力エラーのチェック
if ($_POST["mode"] ==
"set1") {
$checkVal =
array("email", "email_mobile", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
} elseif ($_POST["mode"] ==
"set2") {
$checkVal =
array("sex", "year", "month", "day", "zip01", "zip02");
$checkVal =
array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
foreach($this->arrForm as $key =>
$val) {
if ($key !=
"return" &&
$key !=
"mode" &&
$key !=
"confirm" &&
$key !=
session_name() &&
!in_array($key, $checkVal)) {
$this->list_data[ $key ] =
$val;
if ($_POST["mode"] ==
"set1") {
} elseif ($_POST["mode"] ==
"set2") {
} elseif ($_POST["mode"] ==
"confirm") {
$passlen =
strlen($this->arrForm['password']);
if ($_POST["mode"] ==
"set1") {
$checkVal =
array("sex", "year", "month", "day", "zip01", "zip02");
} elseif ($_POST["mode"] ==
"set2") {
$checkVal =
array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
foreach($this->arrForm as $key =>
$val) {
if ($key !=
"return" &&
$key !=
"mode" &&
$key !=
"confirm" &&
$key !=
session_name() &&
!in_array($key, $checkVal)) {
$this->list_data[ $key ] =
$val;
if ($_POST["mode"] ==
"complete") {
//エラーなしでかつメールアドレスが重複していない場合
$this->arrForm['customer_id'] =
$this->objCustomer->getValue('customer_id');
$objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
$this->objCustomer->updateSession();
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
$arrPrivateVariables =
array('secret_key', 'first_buy_date', 'last_buy_date', 'buy_times', 'buy_total', 'point', 'note', 'status', 'create_date', 'update_date', 'del_flg', 'cell01', 'cell02', 'cell03', 'mobile_phone_id');
foreach ($arrPrivateVariables as $key) {
unset
($this->list_data[$key]);
$objView->assignobj($this);
$objView->display(SITE_FRAME);
* @param array $arrRegistColumn 登録カラムの配列
* @param array $arrMailType メール種別とフラグを格納した配列
* @param bool $isMobile モバイル版登録チェックの場合 true
* @return bool エラーの無い場合 true
function checkErrorTotal(&$arrRegistColumn, &$arrMailType, $isMobile =
false) {
$this->arrForm =
$this->lfConvertParam($this->arrForm, $arrRegistColumn);
$this->arrErr =
$isMobile
//メールアドレスを変更している場合、メールアドレスの重複チェック
$arrMailType2 =
$arrMailType;
foreach ($arrMailType as $mailType =>
$mailTypeValue) {
if ($this->arrForm[$mailType]
!=
$this->objCustomer->getValue($mailType)){
$email_cnt =
$this->objQuery->count("dtb_customer",
"del_flg=0 AND " .
$mailType .
"= ?",
array($this->arrForm[$mailType]));
$arrMailType2[$mailTypeValue] =
false;
$this->arrErr[$mailType] .=
"既に使用されているメールアドレスです。";
// エラーが存在せず, メールアドレスの重複が無い場合は true
&&
$arrMailType2['email'] ==
true
&&
$arrMailType2['email_mobile'] ==
true) {
$this->objFormParam->addParam("お名前(姓)", "name01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("お名前(名)", "name02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("フリガナ(セイ)", "kana01", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("フリガナ(メイ)", "kana02", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("郵便番号1", "zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
$this->objFormParam->addParam("郵便番号2", "zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
$this->objFormParam->addParam("都道府県", "pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
$this->objFormParam->addParam("ご住所1", "addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("ご住所2", "addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("お電話番号1", "tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
$this->objFormParam->addParam("お電話番号2", "tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
$this->objFormParam->addParam("お電話番号3", "tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
$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", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_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("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス', "email", MTEXT_LEN) ,array("EXIST_CHECK", "EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス(確認)', "email02", MTEXT_LEN) ,array("EXIST_CHECK", "EMAIL_CHECK","NO_SPTAB" , "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', "email", "email02") ,array("EQUAL_CHECK"));
$objErr->doFunc(array('携帯メールアドレス', "email_mobile", MTEXT_LEN) ,array("EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
$objErr->doFunc(array('携帯メールアドレス(確認)', "email_mobile02", MTEXT_LEN), array("EMAIL_CHECK","NO_SPTAB" , "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
$objErr->doFunc(array('携帯メールアドレス', '携帯メールアドレス(確認)', "email_mobile", "email_mobile02") ,array("EQUAL_CHECK"));
$objErr->doFunc(array("お電話番号1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("お電話番号2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("お電話番号3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("お電話番号", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));
$objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03", TEL_LEN) ,array("TEL_CHECK"));
$objErr->doFunc(array("ご性別", "sex") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("ご職業", "job") ,array("NUM_CHECK"));
$objErr->doFunc(array("生年月日", "year", "month", "day"), array("CHECK_BIRTHDAY"));
$objErr->doFunc(array("パスワード", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "ALNUM_CHECK", "NUM_RANGE_CHECK"));
$objErr->doFunc(array("パスワード(確認)", 'password02', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "ALNUM_CHECK", "NUM_RANGE_CHECK"));
$objErr->doFunc(array("パスワード", 'パスワード(確認)', 'password', 'password02'), array("EQUAL_CHECK"));
$objErr->doFunc(array("パスワードを忘れたときの質問", "reminder") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("パスワードを忘れたときの答え", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("メールマガジン", "mailmaga_flg") ,array("SELECT_CHECK", "NUM_CHECK"));
* K : 「半角(ハンカク)片仮名」を「全角片仮名」に変換
* C : 「全角ひら仮名」を「全角かた仮名」に変換
* V : 濁点付きの文字を一文字に変換。"K","H"と共に使用します
* n : 「全角」数字を「半角(ハンカク)」に変換
foreach ($arrRegistColumn as $registColumn) {
$key =
$registColumn["column"];
$mb_convert_kana_option =
$registColumn["convert"];
// XXX 文字列のみを変換するようにした方が良い気もする。
if ($key ==
'mailmaga_flg') {
} else if ($val !=
"2") {
$ret =
$this->objQuery->select("*","dtb_customer","customer_id=?", array($this->objCustomer->getValue('customer_id')));
if (isset
($arrForm['birth'])){
$birth =
split(" ", $arrForm["birth"]);
list
($year, $month, $day) =
split("-",$birth[0]);
$arrForm['year'] =
$year;
$arrForm['month'] =
$month;
foreach ($arrRegistColumn as $data) {
if ($data["column"] !=
"password") {
if($array[ $data['column'] ] ==
"") {
$arrRegist[ $data['column'] ] =
NULL;
$arrRegist[ $data["column"] ] =
$array[ $data["column"] ];
if (strlen($array["year"]) >
0 &&
strlen($array["month"]) >
0 &&
strlen($array["day"]) >
0) {
$arrRegist["birth"] =
$array["year"] .
"/".
$array["month"] .
"/".
$array["day"] .
" 00:00:00";
$arrRegist["birth"] =
NULL;
//-- パスワードの更新がある場合は暗号化。(更新がない場合はUPDATE文を構成しない)
if ($array["password"] !=
DEFAULT_PASSWORD) $arrRegist["password"] =
sha1($array["password"] .
":" .
AUTH_MAGIC);
$arrRegist["update_date"] =
"NOW()";
$this->objQuery->begin();
$this->objQuery->update("dtb_customer", $arrRegist, "customer_id = ? ", array($this->objCustomer->getValue('customer_id')));
$this->objQuery->commit();
for ($i=
0;$i<
$passlen;true){
foreach($array as $key =>
$val){
$arrRejectRegistColumn) {
foreach ($arrRegistColumn as $data) {
if (strlen($array[ $data["column"] ]) >
0 &&
! in_array($data["column"], $arrRejectRegistColumn)) {
$arrRegist[ $data["column"] ] =
$array[ $data["column"] ];
if (strlen($array["year"]) >
0 ) {
$arrRegist["birth"] =
$array["year"] .
"/".
$array["month"] .
"/".
$array["day"] .
" 00:00:00";
$arrRegist["password"] =
sha1($arrRegist["password"] .
":" .
AUTH_MAGIC);
$count =
$objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid));
$arrRegist["secret_key"] =
$uniqid; // 仮登録ID発行
$arrRegist["create_date"] =
"now()"; // 作成日
$arrRegist["update_date"] =
"now()"; // 更新日
$arrRegist["first_buy_date"] =
""; // 最初の購入日
$this->objQuery->insert("dtb_customer", $arrRegist);
$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", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_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("市区町村", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array("番地", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array('メールアドレス', "email", MTEXT_LEN) ,array("EXIST_CHECK", "EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('携帯メールアドレス', "email_mobile", MTEXT_LEN) ,array("EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
$objErr->doFunc(array("電話番号1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("電話番号2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("電話番号3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK"));
$objErr->doFunc(array("電話番号", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));
$objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03", TEL_LEN) ,array("TEL_CHECK"));
$objErr->doFunc(array("性別", "sex") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("ご職業", "job") ,array("NUM_CHECK"));
$objErr->doFunc(array("生年月日", "year", "month", "day"), array("CHECK_BIRTHDAY"));
$objErr->doFunc(array("パスワード", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "ALNUM_CHECK", "NUM_RANGE_CHECK"));
$objErr->doFunc(array("パスワード確認用の質問", "reminder") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("パスワード確認用の質問の答え", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("お名前(姓)", 'name01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array("お名前(名)", 'name02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("お名前(カナ/姓)", 'kana01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
$objErr->doFunc(array("お名前(カナ/名)", 'kana02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
$objErr->doFunc(array('メールアドレス', "email", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
$objErr->doFunc(array('携帯メールアドレス', "email_mobile", MTEXT_LEN) ,array("NO_SPTAB", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
//現会員の判定 → 現会員もしくは仮登録中は、メアド一意が前提になってるので同じメアドで登録不可
$array["customer_id"] =
$this->objCustomer->getValue('customer_id');
if (strlen($array["email"]) >
0) {
$arrRet =
$this->objQuery->select("email, update_date, del_flg", "dtb_customer","customer_id <> ? and (email = ? OR email_mobile = ?) ORDER BY del_flg", array($array["customer_id"], $array["email"], $array["email"]));
if($arrRet[0]['del_flg'] !=
'1') {
$objErr->arrErr["email"] .=
"※ すでに会員登録で使用されているメールアドレスです。<br />";
$leave_time =
SC_Utils_Ex::sfDBDatetoTime($arrRet[0]['update_date']);
$pass_time =
$now_time -
$leave_time;
$limit_time =
ENTRY_LIMIT_HOUR *
3600;
if($pass_time <
$limit_time) {
$objErr->arrErr["email"] .=
"※ 退会から一定期間の間は、同じメールアドレスを使用することはできません。<br />";
$objErr->doFunc(array("パスワード", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK", "NUM_RANGE_CHECK"));
$objErr->doFunc(array("パスワード確認用の質問", "reminder") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("パスワード確認用の質問の答え", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
$objErr->doFunc(array("郵便番号1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
$objErr->doFunc(array("郵便番号", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
$objErr->doFunc(array("性別", "sex") ,array("SELECT_CHECK", "NUM_CHECK"));
$objErr->doFunc(array("生年月日", "year", "month", "day"), array("CHECK_BIRTHDAY"));
$objErr->doFunc(array("都道府県", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
$objErr->doFunc(array("市区町村", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array("番地", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
$objErr->doFunc(array("電話番号1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK" ));
$objErr->doFunc(array("電話番号2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK" ));
$objErr->doFunc(array("電話番号3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK" ));
$objErr->doFunc(array("電話番号", "tel01", "tel02", "tel03",TEL_ITEM_LEN) ,array("TEL_CHECK"));
$conn =
new SC_DBconn(ZIP_DSN);
$sqlse =
"SELECT state, city, town FROM mtb_zip WHERE zipcode = ?";
$data_list =
$conn->getAll($sqlse, array($zipcode));
総務省からダウンロードしたデータをそのままインポートすると
$town =
$data_list[0]['town'];
$data_list[0]['town'] =
$town;
$data_list[0]['state'] =
$arrREV_PREF[$data_list[0]['state']];
$ret =
$this->objQuery->select("*","dtb_customer","customer_id=?", array($this->objCustomer->getValue('customer_id')));
//$arrForm['email'] = $arrForm['email_mobile'];
$arrForm['mailmaga_flg'] =
$this->objQuery->get("dtb_customer","mailmaga_flg","email_mobile=?", array($this->objCustomer->getValue('email_mobile')));
if (isset
($arrForm['birth'])){
$birth =
split(" ", $arrForm["birth"]);
list
($year, $month, $day) =
split("-",$birth[0]);
$arrForm['year'] =
$year;
$arrForm['month'] =
$month;
* @param array $arrParam パラメータ名の配列
foreach ($arrParam as $key =>
$val) {
$this->arrForm[$key] =
"";
}elseif($key ==
'email' ||
$key ==
'email_mobile'){
Documentation generated on Tue, 28 Apr 2009 18:12:28 +0900 by phpDocumentor 1.4.2