Index: /branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php
===================================================================
--- /branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php	(revision 19881)
+++ /branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php	(revision 19892)
@@ -39,6 +39,8 @@
      * @param array $arrRegistColumn 登録するカラムの配列
      * @return void
+     * @deprecated 
+     * @todo sfEditCustomerData に統一。LC_Page_Admin_Customer_Edit から呼び出されているだけ
      */
-    function sfEditCustomerData($array, $arrRegistColumn) {
+    function sfEditCustomerDataAdmin($array, $arrRegistColumn) {
         $objQuery =& SC_Query::getSingletonInstance();
 
@@ -61,9 +63,50 @@
         if ($array["password"] != DEFAULT_PASSWORD) $arrRegist["password"] = sha1($array["password"] . ":" . AUTH_MAGIC);
         $arrRegist["update_date"] = "NOW()";
-
+        
         //-- 編集登録実行
         $objQuery->update("dtb_customer", $arrRegist, "customer_id = ? ", array($array['customer_id']));
     }
     
+    /**
+     * 会員編集登録処理を行う.
+     *
+     * @param array $array 登録するデータの配列（SC_FormParamのgetDbArrayの戻り値）
+     * @param array $customer_id nullの場合はinsert, 存在する場合はupdate
+     * @access public
+     * @return integer 登録編集したユーザーのcustomer_id
+     */
+    function sfEditCustomerData($array, $customer_id = null) {
+        $objQuery =& SC_Query::getSingletonInstance();
+
+        $array["update_date"] = "now()";    // 更新日
+        
+        //-- パスワードの更新がある場合は暗号化
+        if ($array["password"] != DEFAULT_PASSWORD){
+            $array["password"] = sha1($array["password"] . ":" . AUTH_MAGIC);
+        } else {
+            unset($array["password"]);
+        }
+       
+        //-- 編集登録実行
+        if (is_numeric($customer_id)){
+            // 編集
+            $objQuery->update("dtb_customer", $array, "customer_id = ? ", array($customer_id));
+        } else {
+            // 新規登録
+            
+            // 会員ID
+            $customer_id = $objQuery->nextVal('dtb_customer_customer_id');
+            if (is_null($array["customer_id"])){
+                $array['customer_id'] = $customer_id;
+            }
+            // 作成日
+            if (is_null($array["create_date"])){
+                $array["create_date"] = "now()"; 	
+            }            
+            $objQuery->insert("dtb_customer", $array);
+        }
+        return $customer_id;
+    }
+        
     /**
      * 注文番号、利用ポイント、加算ポイントから最終ポイントを取得する.
@@ -98,10 +141,12 @@
      *	 
      *	 @param string $email  メールアドレス
-     *   @return integer  0:登録可能     1:登録済み   2:再登録制限期間内削除ユーザー
+     *   @return integer  0:登録可能     1:登録済み   2:再登録制限期間内削除ユーザー  3:自分のアドレス
      */
     function lfCheckRegisterUserFromEmail($email){
         $return = 0;
         
+        $objCustomer = new SC_Customer();
         $objQuery =& SC_Query::getSingletonInstance();
+        
         $arrRet = $objQuery->select("email, update_date, del_flg"
                                     ,"dtb_customer"
@@ -128,9 +173,18 @@
             }
         }
+        
+        // ログインしている場合、すでに登録している自分のemailの場合はエラーを返さない
+        if ($objCustomer->getValue('customer_id')){
+            $arrRet = $objQuery->select("email, email_mobile"
+                            ,"dtb_customer"
+                            ,"customer_id = ? ORDER BY del_flg"
+                            ,array($objCustomer->getValue('customer_id'))
+                            );
+            if ($email == $arrRet[0]["email"] 
+                || $email == $arrRet[0]["email_mobile"]){
+                    $return = 3;
+                }
+        }
         return $return;
     }
-    
-    
-    
-    
 }
Index: /branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Change.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Change.php	(revision 19832)
+++ /branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Change.php	(revision 19892)
@@ -24,8 +24,4 @@
 // {{{ requires
 require_once(CLASS_REALDIR . "pages/LC_Page.php");
-
-if (file_exists(MODULE_REALDIR . "mdl_gmopg/inc/function.php")) {
-    require_once(MODULE_REALDIR . "mdl_gmopg/inc/function.php");
-}
 
 /**
@@ -62,32 +58,5 @@
         $this->arrSex = $masterData->getMasterData("mtb_sex");
         $this->httpCacheControl('nocache');
-    }
-
-    /**
-     * Page のプロセス.
-     *
-     * @return void
-     */
-    function process() {
-        parent::process();
-        $this->action();
-        $this->sendResponse();
-    }
-    
-    /**
-     * Page のAction.
-     *
-     * @return void
-     */
-    function action() {
-        //$objView = new SC_SiteView();
-        $this->objQuery = new SC_Query();
-        $this->objCustomer = new SC_Customer();
-        $this->objFormParam = new SC_FormParam();
-        
-        // 退会判定用情報の取得
-        $objCustomer = new SC_Customer();
-        $this->tpl_login = $objCustomer->isLoginSuccess();
-
+        
         // 生年月日選択肢の取得
         $objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now")));
@@ -95,326 +64,102 @@
         $this->arrMonth = $objDate->getMonth(true);
         $this->arrDay = $objDate->getDay(true);
-
+        
+        $this->isMobile = Net_UserAgent_Mobile::isMobile();
+    }
+
+    /**
+     * Page のプロセス.
+     *
+     * @return void
+     */
+    function process() {
+        $this->action();
+        $this->sendResponse();
+    }
+    
+    /**
+     * Page のプロセス
+     * @return void
+     */
+    function action() {
+        $objDb = new SC_Helper_DB_Ex();
+        $CONF = $objDb->sfGetBasisData();
+        
+        $objQuery = new SC_Query();
+        $objCustomer = new SC_Customer();
+        
         // ログインチェック
-        if (!$this->objCustomer->isLoginSuccess()){
+        if (!$objCustomer->isLoginSuccess()){
             SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
         }else {
             //マイページトップ顧客情報表示用
-            $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'] = "";
-
-        switch ($_POST['mode']){
-
-        case 'confirm':
-
-            //エラーなしでかつメールアドレスが重複していない場合
-            if ($this->checkErrorTotal($arrRegistColumn, $arrMailType)) {
-
-                //確認ページへ
-                $this->tpl_mainpage = TEMPLATE_REALDIR . 'mypage/change_confirm.tpl';
-                $this->tpl_subtitle = '会員登録内容変更(確認ページ)';
-                $passlen = strlen($this->arrForm['password']);
-                $this->passlen = $this->lfPassLen($passlen);
-            } else {
-                $this->lfFormReturn($this->arrForm,$this);
+            $this->CustomerName1 = $objCustomer->getvalue('name01');
+            $this->CustomerName2 = $objCustomer->getvalue('name02');
+            $this->CustomerPoint = $objCustomer->getvalue('point');
+        }
+        
+        // mobile用（戻るボタンでの遷移かどうかを判定）
+        if (!empty($_POST["return"])) {
+            $_POST["mode"] = "return";
+        }
+        
+        // パラメータ管理クラス,パラメータ情報の初期化
+        $this->objFormParam = new SC_FormParam();
+        $this->lfInitParam();
+        $this->objFormParam->setParam($_POST);    // POST値の取得
+        
+       
+        if ($_SERVER["REQUEST_METHOD"] == "POST") {
+            
+            //CSRF対策
+            /*
+            if (!SC_Helper_Session_Ex::isValidToken()) {
+                SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", true);
             }
-
-            break;
-
-        case 'return':
-            $this->arrForm = $_POST;
-            $this->lfFormReturn($this->arrForm,$this);
-            break;
-
-        case 'gmo_oneclick':
-            sfGMOMypageEdit();
+            */
+                        
+            $this->objFormParam->convParam();
+            $this->objFormParam->toLower('email');
+            $this->objFormParam->toLower('email02');
+            $this->objFormParam->toLower('email_mobile');
+            $this->objFormParam->toLower('email_mobile02');
+            $this->arrForm = $this->objFormParam->getHashArray();
+                 
+            //-- 確認
+            if ($_POST["mode"] == "confirm") {
+
+                $this->arrErr = $this->lfErrorCheck();
+                
+                // 入力エラーなし
+                if(count($this->arrErr) == 0) {
+                    
+                    $this->list_data = $this->objFormParam->getHashArray();
+                
+                    //パスワード表示
+                    $passlen = strlen($this->arrForm['password']);
+                    $this->passlen = SC_Utils_Ex::lfPassLen($passlen);
+    
+                    $this->tpl_mainpage = 'mypage/change_confirm.tpl';
+                    $this->tpl_title = '会員登録(確認ページ)';
+                }
+
+            } elseif ($_POST["mode"] == "complete") {
+                //-- 会員登録と完了画面
+           
+                // 会員情報の登録
+                $this->CONF = $CONF;
+                $this->lfRegistData();
+                
+                // 完了ページに移動させる。
+                SC_Response_Ex::sendRedirect('change_complete.php');
+                exit;
+                
+            }
+        } else {
             $this->arrForm = $this->lfGetCustomerData();
             $this->arrForm['password'] = DEFAULT_PASSWORD;
             $this->arrForm['password02'] = DEFAULT_PASSWORD;
-            break;
-        case 'complete':
-            //エラーなしでかつメールアドレスが重複していない場合
-            if ($this->checkErrorTotal($arrRegistColumn, $arrMailType)) {
-                $this->arrForm['customer_id'] = $this->objCustomer->getValue('customer_id');
-                //-- 編集登録
-                $objDb = new SC_Helper_DB_Ex();
-                $objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
-                //セッション情報を最新の状態に更新する
-                $this->objCustomer->updateSession();
-
-                // Do楽SNS連携モジュールユーザ情報更新処理
-                if (function_exists('sfUpdateSourakuSNSUserInfo')) {
-                    sfUpdateSourakuSNSUserInfo();
-                }
-
-                //完了ページへ
-                SC_Response_Ex::sendRedirect('change_complete.php');
-                exit;
-            } else {
-                SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
-            }
-            break;
-
-        default:
-            //顧客情報取得
-            $this->arrForm = $this->lfGetCustomerData();
-            $this->arrForm['password'] = DEFAULT_PASSWORD;
-            $this->arrForm['password02'] = DEFAULT_PASSWORD;
-            break;
-        }
-
-        //誕生日データ登録の有無
-        $arrCustomer = $this->lfGetCustomerData();
-        if ($arrCustomer['birth'] != ""){
-            $this->birth_check = true;
-        }
-
-        //$objView->assignobj($this);             //$objpage内の全てのテンプレート変数をsmartyに格納
-        //$objView->display(SITE_FRAME);              //パスとテンプレート変数の呼び出し、実行
-
-
-    }
-
-    /**
-     * モバイルページを初期化する.
-     *
-     * @return void
-     */
-    function mobileInit() {
-        $this->init();
-        $this->tpl_mainpage = 'mypage/change.tpl';		// メインテンプレート
-        $this->tpl_title .= '登録変更(1/3)';			// ページタイトル
-
-        $masterData = new SC_DB_MasterData_Ex();
-        $this->arrReminder = $masterData->getMasterData("mtb_reminder");
-        $this->arrPref = $masterData->getMasterData('mtb_pref');
-        $this->arrJob = $masterData->getMasterData("mtb_job");
-        $this->arrMAILMAGATYPE = $masterData->getMasterData("mtb_mail_magazine_type");
-        $this->arrSex = $masterData->getMasterData("mtb_sex");
-    }
-
-    /**
-     * Page のプロセス(モバイル).
-     *
-     * @return void
-     */
-    function mobileProcess() {
-        parent::mobileProcess();
-        $this->mobileAction();
-        $this->sendResponse();
-    }
-
-    /**
-     * Page のAction(モバイル).
-     *
-     * @return void
-     */
-    function mobileAction() {
-        $objDb = new SC_Helper_DB_Ex();
-        $CONF = $objDb->sfGetBasisData();					// 店舗基本情報
-        //$objView = new SC_MobileView();
-        
-        // 生年月日選択肢の取得
-        $objDate = new SC_Date();
-        $this->arrMonth = $objDate->getMonth(true);
-        $this->arrDay = $objDate->getDay(true);
-
-        $this->objQuery = new SC_Query();
-        $this->objCustomer = new SC_Customer();
-
-        //メールアドレス種別
-        $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" )
-                                 );
-
-        $this->arrForm = $this->lfGetCustomerData();
-        $this->arrForm['password'] = DEFAULT_PASSWORD;
-
-        if ($_SERVER["REQUEST_METHOD"] == "POST") {
-
-            //-- POSTデータの引き継ぎ
-            $this->arrForm = array_merge($this->arrForm, $_POST);
-
-            //-- 入力データの変換
-            $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn);
-
-            // 戻るボタン用処理
-            if (!empty($_POST["return"])) {
-                switch ($_POST["mode"]) {
-                case "complete":
-                    $_POST["mode"] = "set3";
-                    break;
-                case "confirm":
-                    $_POST["mode"] = "set2";
-                    break;
-                default:
-                    $_POST["mode"] = "set1";
-                    break;
-                }
-            }
-
-            //--　入力エラーチェック
-            if ($_POST["mode"] == "set1") {
-                $this->arrErr = $this->lfErrorCheck1($this->arrForm);
-                $this->tpl_mainpage = 'mypage/change.tpl';
-                $this->tpl_title = '登録変更(1/3)';
-            } elseif ($_POST["mode"] == "set2") {
-                $this->arrErr = $this->lfErrorCheck2($this->arrForm);
-                $this->tpl_mainpage = 'mypage/set1.tpl';
-                $this->tpl_title = '登録変更(2/3)';
-            } else {
-                $this->arrErr = $this->lfErrorCheck3($this->arrForm);
-                $this->tpl_mainpage = 'mypage/set2.tpl';
-                $this->tpl_title = '登録変更(3/3)';
-            }
-
-            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");
-                } else {
-                    $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;
-                    }
-                }
-
-            } else {
-
-                //--　テンプレート設定
-                if ($_POST["mode"] == "set1") {
-                    $this->tpl_mainpage = 'mypage/set1.tpl';
-                    $this->tpl_title = '登録変更(2/3)';
-                } elseif ($_POST["mode"] == "set2") {
-                    $this->tpl_mainpage = 'mypage/set2.tpl';
-                    $this->tpl_title = '登録変更(3/3)';
-                } elseif ($_POST["mode"] == "confirm") {
-                    //パスワード表示
-                    $passlen = strlen($this->arrForm['password']);
-                    $this->passlen = $this->lfPassLen($passlen);
-
-                    // メール受け取り
-                    if (!isset($_POST['mailmaga_flg'])) $_POST['mailmaga_flg'] = "";
-                    if (strtolower($_POST['mailmaga_flg']) == "on") {
-                        $this->arrForm['mailmaga_flg'] = "2";
-                    } else {
-                        $this->arrForm['mailmaga_flg'] = "3";
-                    }
-
-                    $this->tpl_mainpage = 'mypage/change_confirm.tpl';
-                    $this->tpl_title = '登録変更(確認ページ)';
-
-                }
-
-                //-- データ設定
-                unset($this->list_data);
-                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");
-                } else {
-                    $checkVal = array();
-                }
-
-                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") {
-                    //エラーなしでかつメールアドレスが重複していない場合
-                    if($this->checkErrorTotal($arrRegistColumn, $arrMailType, true)) {
-                        $this->arrForm['customer_id'] = $this->objCustomer->getValue('customer_id');
-                        //-- 編集登録
-                        $objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
-                        //セッション情報を最新の状態に更新する
-                        $this->objCustomer->updateSession();
-                        //完了ページへ
-                        SC_Response_Ex::sendRedirect('change_complete.php');
-                        exit;
-                    } else {
-                        SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
-                    }
-                }
-            }
-        }
-
-        $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);
+        }
+        $this->transactionid = SC_Helper_Session_Ex::getToken();
     }
 
@@ -428,134 +173,91 @@
     }
 
-    /**
-     * すべてのエラーチェックを行う.
-     *
-     * @param array $arrRegistColumn 登録カラムの配列
-     * @param array $arrMailType メール種別とフラグを格納した配列
-     * @param bool $isMobile モバイル版登録チェックの場合 true
-     * @return bool エラーの無い場合 true
-     */
-    function checkErrorTotal(&$arrRegistColumn, &$arrMailType, $isMobile = false) {
-        // 入力データの変換
-        $this->arrForm = $this->lfConvertParam($_POST, $arrRegistColumn);
-
-        //エラーチェック
-        $this->arrErr = $isMobile
-            ? $this->lfErrorCheckMobile($this->arrForm)
-            : $this->lfErrorCheck($this->arrForm);
-
-        //メールアドレスを変更している場合、メールアドレスの重複チェック
-        $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 (email = ? OR email_mobile = ?) ",
-                                  array($this->arrForm[$mailType], $this->arrForm[$mailType]));
-                if ($email_cnt > 0){
-                    $arrMailType2[$mailType] = false;
-                    $this->arrErr[$mailType] .= "既に使用されているメールアドレスです。";
-                }
-            }
-        }
-
-        // エラーが存在せず, メールアドレスの重複が無い場合は true
-        if (empty($this->arrErr)
-            && $arrMailType2['email'] == true
-            && $arrMailType2['email_mobile'] == true) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
     /* パラメータ情報の初期化 */
     function lfInitParam() {
-        $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", MTEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
-        $this->objFormParam->addParam("住所2", "addr02", MTEXT_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"));
-    }
-
-    //エラーチェック
-
+                         
+        $this->objFormParam->addParam("お名前(姓)", 'name01', STEXT_LEN, "aKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+        $this->objFormParam->addParam("お名前(名)", 'name02', STEXT_LEN, "aKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+        $this->objFormParam->addParam("お名前(フリガナ・姓)", 'kana01', STEXT_LEN, "CKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+        $this->objFormParam->addParam("お名前(フリガナ・名)", 'kana02', STEXT_LEN, "CKV", array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+        $this->objFormParam->addParam("パスワード", 'password', STEXT_LEN, "a", array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK"));
+        $this->objFormParam->addParam("パスワード確認用の質問", "reminder", STEXT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK"));
+        $this->objFormParam->addParam("パスワード確認用の質問の答え", "reminder_answer", STEXT_LEN, "aKV", array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+        $this->objFormParam->addParam("郵便番号1", "zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
+        $this->objFormParam->addParam("郵便番号2", "zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
+        $this->objFormParam->addParam("都道府県", 'pref', INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK"));
+        $this->objFormParam->addParam("住所1", "addr01", MTEXT_LEN, "aKV", array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+        $this->objFormParam->addParam("住所2", "addr02", MTEXT_LEN, "aKV", array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+        $this->objFormParam->addParam("お電話番号1", 'tel01', TEL_ITEM_LEN, "n", array("EXIST_CHECK","SPTAB_CHECK" ));
+        $this->objFormParam->addParam("お電話番号2", 'tel02', TEL_ITEM_LEN, "n", array("EXIST_CHECK","SPTAB_CHECK" ));
+        $this->objFormParam->addParam("お電話番号3", 'tel03', TEL_ITEM_LEN, "n", array("EXIST_CHECK","SPTAB_CHECK" ));
+        $this->objFormParam->addParam("性別", "sex", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK"));
+        $this->objFormParam->addParam("職業", "job", INT_LEN, "n", array("NUM_CHECK"));
+        $this->objFormParam->addParam("年", "year", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+        $this->objFormParam->addParam("月", "month", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+        $this->objFormParam->addParam("日", "day", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+        
+        if ($this->isMobile === false){
+            $this->objFormParam->addParam("FAX番号1", 'fax01', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("FAX番号2", 'fax02', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("FAX番号3", 'fax03', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("メールマガジン", "mailmaga_flg", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK"));
+            $this->objFormParam->addParam("パスワード(確認)", 'password02', STEXT_LEN, "a", array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK"), "", false);
+            $this->objFormParam->addParam('メールアドレス', "email", MTEXT_LEN, "a", array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
+            $this->objFormParam->addParam('メールアドレス(確認)', "email02", MTEXT_LEN, "a", array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK","SPTAB_CHECK" , "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"), "", false);
+            $this->objFormParam->addParam('携帯メールアドレス', "email_mobile", MTEXT_LEN, "a", array("NO_SPTAB", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
+            $this->objFormParam->addParam('携帯メールアドレス(確認)', "email_mobile02", MTEXT_LEN, "a", array("NO_SPTAB", "EMAIL_CHECK","SPTAB_CHECK" , "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"), "", false);
+        } else {
+            $this->objFormParam->addParam('メールアドレス', "email", MTEXT_LEN, "a", array("EXIST_CHECK", "EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK","MOBILE_EMAIL_CHECK"));
+        }
+    }
+
+    //---- 入力エラーチェック
     function lfErrorCheck($array) {
-        $objErr = new SC_CheckError($array);
-
-        $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"));
+
+        // 入力データを渡す。
+        $arrRet = $this->objFormParam->getHashArray();
+        $objErr = new SC_CheckError($arrRet);
+        $objErr->arrErr = $this->objFormParam->checkError();
+                        
+        $objErr->doFunc(array("お電話番号", "tel01", "tel02", "tel03"),array("TEL_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") ,array("TEL_CHECK"));
-        $objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03") ,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"));
+        if ($this->isMobile === false){
+            $objErr->doFunc(array('パスワード', 'パスワード(確認)', "password", "password02") ,array("EQUAL_CHECK"));
+            $objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', "email", "email02") ,array("EQUAL_CHECK"));
+            $objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03") ,array("TEL_CHECK"));
+        }
+                
+        // 現会員の判定 → 現会員もしくは仮登録中は、メアド一意が前提になってるので同じメアドで登録不可
+        $register_user_flg = SC_Helper_Customer_Ex::lfCheckRegisterUserFromEmail($arrRet["email"]);
+        switch($register_user_flg) {
+            case 1:
+                $objErr->arrErr["email"] .= "※ すでに会員登録で使用されているメールアドレスです。<br />";
+                break;
+            case 2:
+                $objErr->arrErr["email"] .= "※ 退会から一定期間の間は、同じメールアドレスを使用することはできません。<br />";
+                break;
+            default:
+                break;
+        }
         return $objErr->arrErr;
-
-    }
-
-    //----　取得文字列の変換
-    function lfConvertParam($array, $arrRegistColumn) {
-        /*
-         *  文字列の変換
-         *  K :  「半角(ﾊﾝｶｸ)片仮名」を「全角片仮名」に変換
-         *  C :  「全角ひら仮名」を「全角かた仮名」に変換
-         *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します
-         *  n :  「全角」数字を「半角(ﾊﾝｶｸ)」に変換
-         *  a :  全角英数字を半角英数字に変換する
-         */
-        foreach ($arrRegistColumn as $registColumn) {
-            $key = $registColumn["column"];
-            $mb_convert_kana_option = $registColumn["convert"];
-            $val =& $array[$key];
-
-            // string 型以外は変換対象外とする
-            if (!is_string($val)) continue;
-
-            // 文字変換
-            if (strlen($val) > 0) {
-                $val = mb_convert_kana($val ,$mb_convert_kana_option);
-            }
-            
-            // メールアドレスは小文字に変換
-            if ($key == 'email' || $key == 'email02' || $key == 'email_mobile' || $key == 'email_mobile02') {
-                $val = strtolower($val);
-            }
-        }
-        return $array;
-    }
-
+    }
+    
+    function lfRegistData() {
+                
+        $objQuery = new SC_Query();
+        $objCustomer = new SC_Customer();
+        
+        $arrRet = $this->objFormParam->getHashArray();
+        
+        // 登録データの作成
+        $sqlval = $this->objFormParam->getDbArray();
+        $sqlval['birth'] = SC_Utils_Ex::sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']);
+                       
+        $objQuery->begin();
+        SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $objCustomer->getValue('customer_id'));        
+        $objQuery->commit();
+    }
+    
     /**
      * 顧客情報の取得
@@ -564,66 +266,21 @@
      */
     function lfGetCustomerData(){
+        $objQuery = new SC_Query();
+        $objCustomer = new SC_Customer();
+        
         // 顧客情報DB取得
-        $ret = $this->objQuery->select("*","dtb_customer","customer_id=?", array($this->objCustomer->getValue('customer_id')));
+        $ret = $objQuery->select("*","dtb_customer","customer_id=?", array($objCustomer->getValue('customer_id')));
         $arrForm = $ret[0];
 
         // 確認項目に複製
         $arrForm['email02'] = $arrForm['email'];
-        $arrForm['email_mobile02'] = $arrForm['email_mobile02'];
+        $arrForm['email_mobile02'] = $arrForm['email_mobile'];
 
         // 誕生日を年月日に分ける
         if (isset($arrForm['birth'])){
             $birth = split(" ", $arrForm["birth"]);
-            list($year, $month, $day) = split("-",$birth[0]);
-
-            $arrForm['year'] = $year;
-            $arrForm['month'] = $month;
-            $arrForm['day'] = $day;
-
+            list($arrForm['year'], $arrForm['month'], $arrForm['day']) = split("-",$birth[0]);
         }
         return $arrForm;
-    }
-
-    /**
-     * 編集登録
-     * TODO
-     * @deprecated 未使用?
-     */
-    function lfRegistData($array, $arrRegistColumn) {
-
-        foreach ($arrRegistColumn as $data) {
-            if ($data["column"] != "password") {
-                if($array[ $data['column'] ] == "") {
-                    $arrRegist[ $data['column'] ] = NULL;
-                } else {
-                    $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";
-        } else {
-            $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();
-    }
-
-    //確認ページ用パスワード表示用
-
-    function lfPassLen($passlen){
-        $ret = "";
-        for ($i=0;$i<$passlen;true){
-            $ret.="*";
-            $i++;
-        }
-        return $ret;
     }
 
@@ -642,114 +299,5 @@
         }
     }
-
-
-    // }}}
-    // {{{ mobile functions
-
-    //エラーチェック
-
-    function lfErrorCheckMobile($array) {
-        $objErr = new SC_CheckError($array);
-
-        $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('携帯メールアドレス', "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") ,array("TEL_CHECK"));
-        $objErr->doFunc(array("FAX番号", "fax01", "fax02", "fax03") ,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"));
-        return $objErr->arrErr;
-
-    }
-
-
-    //---- 入力エラーチェック
-    function lfErrorCheck1($array) {
-
-        $objErr = new SC_CheckError($array);
-
-        $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(count($arrRet) > 0) {
-                if($arrRet[0]['del_flg'] != '1') {
-                    // 会員である場合
-                    $objErr->arrErr["email"] .= "※ すでに会員登録で使用されているメールアドレスです。<br />";
-                } else {
-                    // 退会した会員である場合
-                    $leave_time = SC_Utils_Ex::sfDBDatetoTime($arrRet[0]['update_date']);
-                    $now_time = time();
-                    $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"));
-
-        return $objErr->arrErr;
-    }
-
-    //---- 入力エラーチェック
-    function lfErrorCheck2($array) {
-
-        $objErr = new SC_CheckError($array);
-
-        $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"));
-
-        return $objErr->arrErr;
-    }
-
-    //---- 入力エラーチェック
-    function lfErrorCheck3($array) {
-
-        $objErr = new SC_CheckError($array);
-
-        $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("電話番号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") ,array("TEL_CHECK"));
-
-        return $objErr->arrErr;
-    }
+    
 }
 ?>
Index: /branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php	(revision 19864)
+++ /branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php	(revision 19892)
@@ -185,5 +185,5 @@
                     $this->tpl_mainpage = 'customer/edit_confirm.tpl';
                     $passlen = strlen($this->arrForm['password']);
-                    $this->passlen = $this->lfPassLen($passlen);
+                    $this->passlen = SC_Utils_Ex::lfPassLen($passlen);
 
                 }
@@ -202,5 +202,5 @@
                     }
                     //-- 編集登録
-                    $objCustomerHelper->sfEditCustomerData($this->arrForm, $arrRegistColumn);
+                    $objCustomerHelper->sfEditCustomerDataAdmin($this->arrForm, $arrRegistColumn);
                 }
             }
@@ -331,13 +331,4 @@
     }
 
-    //確認ページ用パスワード表示用
-    function lfPassLen($passlen){
-        $ret = "";
-        for ($i=0;$i<$passlen;true){
-            $ret.="*";
-            $i++;
-        }
-        return $ret;
-    }
 }
 ?>
Index: /branches/version-2_5-dev/data/class/pages/entry/LC_Page_Entry.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/entry/LC_Page_Entry.php	(revision 19881)
+++ /branches/version-2_5-dev/data/class/pages/entry/LC_Page_Entry.php	(revision 19892)
@@ -101,7 +101,7 @@
         
         if ($this->isMobile === false){
-            $this->objFormParam->addParam("FAX番号1", 'fax01', "n", array("SPTAB_CHECK"));
-            $this->objFormParam->addParam("FAX番号2", 'fax02', "n", array("SPTAB_CHECK"));
-            $this->objFormParam->addParam("FAX番号3", 'fax03', "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("FAX番号1", 'fax01', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("FAX番号2", 'fax02', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
+            $this->objFormParam->addParam("FAX番号3", 'fax03', TEL_ITEM_LEN, "n", array("SPTAB_CHECK"));
             $this->objFormParam->addParam("メールマガジン", "mailmaga_flg", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK"));
             $this->objFormParam->addParam("パスワード(確認)", 'password02', STEXT_LEN, "a", array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK"), "", false);
@@ -232,7 +232,4 @@
         */
         $sqlval["secret_key"] = $uniqid;		// 会員登録キー
-        $sqlval["create_date"] = "now()"; 	// 作成日
-        $sqlval["update_date"] = "now()"; 	// 更新日
-        $sqlval["first_buy_date"] = "";	 	// 最初の購入日
         $sqlval["point"] = $this->CONF["welcome_point"]; // 入会時ポイント
 
@@ -244,9 +241,7 @@
         }
        
-        //-- 仮登録実行
+        //-- 登録実行
         $objQuery->begin();
-        $sqlval['customer_id'] = $objQuery->nextVal('dtb_customer_customer_id');
-        $objQuery->insert("dtb_customer", $sqlval);
-        
+        SC_Helper_Customer_Ex::sfEditCustomerData($sqlval);
         $objQuery->commit();
         
Index: /branches/version-2_5-dev/data/class/SC_CustomerList.php
===================================================================
--- /branches/version-2_5-dev/data/class/SC_CustomerList.php	(revision 19704)
+++ /branches/version-2_5-dev/data/class/SC_CustomerList.php	(revision 19892)
@@ -45,6 +45,4 @@
 
         if($mode == "customer") {
-            // 管理機能顧客検索の場合仮登録会員も検索
-            //$this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 ");
             $this->setWhere( " del_flg = 0 ");
             // 登録日を示すカラム
Index: /branches/version-2_5-dev/data/Smarty/templates/mobile/mypage/change.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/mobile/mypage/change.tpl	(revision 19835)
+++ /branches/version-2_5-dev/data/Smarty/templates/mobile/mypage/change.tpl	(revision 19892)
@@ -22,11 +22,10 @@
  */
 *}-->
-<div align="center">登録内容変更 1/3</div>
+<div align="center">登録内容変更</div>
 <hr>
 <form name="form1" method="post" action="?">
-	<input type="hidden" name="mode" value="set1">
-
+    <input type="hidden" name="mode" value="confirm" />
+    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
 	<font color="#FF0000">*は必須項目です。</font><br>
-	PCと携帯のメールアドレスが登録できます。<br>
 	<br>
 
@@ -34,10 +33,5 @@
 	<font color="#FF0000"><!--{$arrErr.email}--></font>
 	<input type="text" name="email" value="<!--{$arrForm.email|h}-->" istyle="3">
-	<br>
-
-	【携帯メールアドレス】<br>
-	<font color="#FF0000"><!--{$arrErr.email_mobile}--></font>
-	<input type="text" name="email_mobile" value="<!--{$arrForm.email_mobile|h}-->" istyle="3">
-	<br>
+  <br>
 
 	【パスワード】<font color="#FF0000">※</font><br>
@@ -67,11 +61,65 @@
 	<font color="#FF0000"><!--{$arrErr.kana01}--><!--{$arrErr.kana02}--></font>
 
-	カナ/姓（例：シブヤ）<br>
+	カナ/姓（例：シブヤ）<font color="#FF0000">※</font><br>
 	<input type="text" name="kana01" value="<!--{$arrForm.kana01|h}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" istyle="2"><br>
 
-	カナ/名（例：ハナコ）<br>
+	カナ/名（例：ハナコ）<font color="#FF0000">※</font><br>
 	<input type="text" name="kana02" value="<!--{$arrForm.kana02|h}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" istyle="2"><br>
 
-	<input type="submit" name="confirm" value="次へ">
+	【性別】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr.sex}--></font>
+	<input type="radio" name="sex" value="1" <!--{if $arrForm.sex eq 1}-->checked<!--{/if}--> />男性&nbsp;<input type="radio" name="sex" value="2" <!--{if $arrForm.sex eq 2}-->checked<!--{/if}--> />女性<br>
+
+	【生年月日】<br>
+	<font color="#FF0000"><!--{$arrErr.year}--><!--{$arrErr.month}--><!--{$arrErr.day}--></font>
+	<input type="text" name="year" value="<!--{$arrForm.year|h}-->" size="4" maxlength="4" istyle="4">年<br>
+	<select name="month">
+		<!--{html_options options=$arrMonth selected=$arrForm.month}-->
+	</select>月<br>
+	<select name="day">
+		<!--{html_options options=$arrDay selected=$arrForm.day}-->
+	</select>日<br>
+
+	<!--{assign var=key1 value="zip01"}-->
+	<!--{assign var=key2 value="zip02"}-->
+	【郵便番号】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr[$key1]}--><!--{$arrErr[$key2]}--></font>
+	<!--{assign var="size1" value="`$smarty.const.ZIP01_LEN+2`"}-->
+	<!--{assign var="size2" value="`$smarty.const.ZIP02_LEN+2`"}-->
+	<input size="<!--{$size1}-->" type="text" name="zip01" value="<!--{if $arrForm.zip01 == ""}--><!--{$arrOtherDeliv.zip01|h}--><!--{else}--><!--{$arrForm.zip01|h}--><!--{/if}-->" maxlength="<!--{$smarty.const.ZIP01_LEN}-->" istyle="4">
+	&nbsp;-&nbsp;
+	<input size="<!--{$size2}-->" type="text" name="zip02" value="<!--{if $arrForm.zip02 == ""}--><!--{$arrOtherDeliv.zip02|h}--><!--{else}--><!--{$arrForm.zip02|h}--><!--{/if}-->" maxlength="<!--{$smarty.const.ZIP02_LEN}-->" istyle="4"><br>
+
+	【都道府県】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr.pref}--></font>
+	<select name="pref">
+		<option value="">都道府県を選択</option>
+		<!--{html_options options=$arrPref selected=$arrForm.pref}-->
+	</select><br>
+
+	【住所1】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr.addr01}--></font>
+	<input type="text" name="addr01" value="<!--{$arrForm.addr01|h}-->" istyle="1"><br>
+
+	【住所2】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr.addr02}--></font>
+	<input type="text" name="addr02" value="<!--{$arrForm.addr02|h}-->" istyle="1"><br>
+
+	【電話番号】<font color="#FF0000">*</font><br>
+	<font color="#FF0000"><!--{$arrErr.tel01}--><!--{$arrErr.tel02}--><!--{$arrErr.tel03}--></font>
+	<!--{assign var="size" value="`$smarty.const.TEL_ITEM_LEN+2`"}-->
+	<input type="text" size="<!--{$size}-->" name="tel01" value="<!--{$arrForm.tel01|h}-->" maxlength="<!--{$smarty.const.TEL_ITEM_LEN}-->" istyle="4">
+	&nbsp;-&nbsp;
+	<input type="text" size="<!--{$size}-->" name="tel02" value="<!--{$arrForm.tel02|h}-->" maxlength="<!--{$smarty.const.TEL_ITEM_LEN}-->" istyle="4">
+	&nbsp;-&nbsp;
+	<input type="text" size="<!--{$size}-->" name="tel03" value="<!--{$arrForm.tel03|h}-->" maxlength="<!--{$smarty.const.TEL_ITEM_LEN}-->" istyle="4"><br>
+
+	【メールマガジン】<br>
+	お得な情報を希望されますか？<br>
+	配信希望<input type="checkbox" name="mailmaga_flg" value="on" <!--{if $arrForm.mailmaga_flg eq 'on' || $arrForm.mailmaga_flg == 2}-->checked<!--{/if}--> /><br>
+	（希望されない場合はチェックをはずしてください）<br>
+	<br>
+
+	<input type="submit" name="submit" value="次へ">
 
 	<!--{foreach from=$list_data key=key item=item}-->
