Index: /branches/mobile/data/Smarty/templates/mobile/mypage/login.tpl
===================================================================
--- /branches/mobile/data/Smarty/templates/mobile/mypage/login.tpl	(revision 11418)
+++ /branches/mobile/data/Smarty/templates/mobile/mypage/login.tpl	(revision 11524)
@@ -6,6 +6,4 @@
 	<input type="hidden" name="mode" value="login" >
 <!--{if !$tpl_valid_phone_id}-->
-	¢£°ÊÁ°¤Ë¤´ÃíÊ¸¤µ¤ì¤¿Êý<br>
-	(¥â¥Ð¥¤¥ëËô¤ÏPC¤Ç¤´ÅÐÏ¿ºÑ¤ß)<br>
 	¢§¥á¡¼¥ë¥¢¥É¥ì¥¹<br>
 	<!--{assign var=key value="login_email"}-->
Index: /branches/mobile/data/Smarty/templates/mobile/mypage/change_confirm.tpl
===================================================================
--- /branches/mobile/data/Smarty/templates/mobile/mypage/change_confirm.tpl	(revision 11418)
+++ /branches/mobile/data/Smarty/templates/mobile/mypage/change_confirm.tpl	(revision 11524)
@@ -31,5 +31,5 @@
 	
 	¡ÚÒ°ÙÏ¶Þ¼ÞÝÞ¡Û<br>
-	<!--{if $list_data.mail_flag eq 2}-->´õË¾¤¹¤ë<!--{else}-->´õË¾¤·¤Ê¤¤<!--{/if}--><br>
+	<!--{if $list_data.mail_flag eq "2"}-->´õË¾¤¹¤ë<!--{else}-->´õË¾¤·¤Ê¤¤<!--{/if}--><br>
 	<br>
 
Index: /branches/mobile/data/Smarty/templates/mobile/top.tpl
===================================================================
--- /branches/mobile/data/Smarty/templates/mobile/top.tpl	(revision 11510)
+++ /branches/mobile/data/Smarty/templates/mobile/top.tpl	(revision 11524)
@@ -27,5 +27,5 @@
 <a href="guide/index.php" accesskey="5"><!--{5|numeric_emoji}-->¤´ÍøÍÑ¥¬¥¤¥É</a><br>
 <a href="contact/index.php" accesskey="6"><!--{6|numeric_emoji}-->¤ªÌä¤¤¹ç¤»</a><br>
-<a href="mypage/index.php" accesskey="7"><!--{7|numeric_emoji}-->MY¥Ú¡¼¥¸</a><br>
+<a href="mypage/index.php" accesskey="7" utn><!--{7|numeric_emoji}-->MY¥Ú¡¼¥¸</a><br>
 <!-- ¢¥¥á¥Ë¥å¡¼ ¤³¤³¤Þ¤Ç -->
 
Index: /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_cancel.tpl
===================================================================
--- /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_cancel.tpl	(revision 11418)
+++ /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_cancel.tpl	(revision 11524)
@@ -1,10 +1,10 @@
-¢¨ËÜÒ°Ù¤Ï¼«Æ°ÇÛ¿®Ò°Ù¤Ç¤¹¡
-<!--{$tpl_shopname}-->¤è¤ê¤ÒÙÏ¶Þ¹ØÆÉ²ò½ü¤ò´õË¾¤µ¤ì¤¿Êý¤Ë¤ªÁ÷¤ê¤·¤Æ¤¤¤Þ¤¹¡
-¤â¤·¤ª¿´Åö¤¿¤ê¤¬Ìµ¤¤¾ì¹ç¤Ï¤¤³¤Î¤Þ¤Þ¤³¤ÎÒ°Ù¤òÇË´þ¤·¤Æ¤¤¤¿¤À¤±¤ì¤ÐÒÙÏ¶Þ¹ØÆÉ²ò½ü¤Ï¤Ê¤µ¤ì¤Þ¤»¤ó¡
-¤Þ¤¿¤½¤Î»Ý¤<!--{$tpl_infoemail}-->¤Þ¤Ç¤´Ï¢Íí¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡
+¢¨ËÜ¥á¡¼¥ë¤Ï¼«Æ°ÇÛ¿®¥á¡¼¥ë¤Ç¤¹¡£
+<!--{$tpl_shopname}-->¤è¤ê¡¢¥á¥ë¥Þ¥¬¹ØÆÉ²ò½ü¤ò´õË¾¤µ¤ì¤¿Êý¤Ë¤ªÁ÷¤ê¤·¤Æ¤¤¤Þ¤¹¡£
+¤â¤·¤ª¿´Åö¤¿¤ê¤¬Ìµ¤¤¾ì¹ç¤Ï¡¢¤³¤Î¤Þ¤Þ¤³¤Î¥á¡¼¥ë¤òÇË´þ¤·¤Æ¤¤¤¿¤À¤±¤ì¤Ð¥á¥ë¥Þ¥¬¹ØÆÉ²ò½ü¤Ï¤Ê¤µ¤ì¤Þ¤»¤ó¡£
+¤Þ¤¿¤½¤Î»Ý¡¢<!--{$tpl_infoemail}-->¤Þ¤Ç¤´Ï¢Íí¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡£
 
-¸½ºß¤Ï¤Þ¤À¹ØÆÉ¤µ¤ì¤¿¾õÂÖ¤Ç¤¹¡
-´°Î»¤¹¤ë¤Ë¤Ï²¼µ­URL¤Ë±¸¾½¤·¤Æ¤¯¤À¤µ¤¤¡
-¢¨ÆþÎÏ¤µ¤ì¤¿¤ªµÒÍÍ¤Î¾ðÊó¤ÏSSL°Å¹æ²½ÄÌ¿®¤Ë¤è¤êÊÝ¸î¤µ¤ì¤Þ¤¹¡
+¸½ºß¤Ï¤Þ¤À¹ØÆÉ¤µ¤ì¤¿¾õÂÖ¤Ç¤¹¡£
+´°Î»¤¹¤ë¤Ë¤Ï²¼µ­URL¤Ë¥¢¥¯¥»¥¹¤·¤Æ¤¯¤À¤µ¤¤¡£
+¢¨ÆþÎÏ¤µ¤ì¤¿¤ªµÒÍÍ¤Î¾ðÊó¤ÏSSL°Å¹æ²½ÄÌ¿®¤Ë¤è¤êÊÝ¸î¤µ¤ì¤Þ¤¹¡£
 
 <!--{$tpl_url}-->
Index: /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_regist.tpl
===================================================================
--- /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_regist.tpl	(revision 11418)
+++ /branches/mobile/data/Smarty/templates/mobile/mail_templates/mailmagazine_regist.tpl	(revision 11524)
@@ -1,11 +1,11 @@
-¢¨ËÜÒ°Ù¤Ï¼«Æ°ÇÛ¿®Ò°Ù¤Ç¤¹¡
-<!--{$tpl_shopname}-->¤è¤ê¤ÒÙÏ¶Þ¹ØÆÉÅÐÏ¿¤ò´õË¾¤µ¤ì¤¿Êý¤Ë¤ªÁ÷¤ê¤·¤Æ¤¤¤Þ¤¹¡
-¤â¤·¤ª¿´Åö¤¿¤ê¤¬Ìµ¤¤¾ì¹ç¤Ï¤¤³¤Î¤Þ¤Þ¤³¤ÎÒ°Ù¤òÇË´þ¤·¤Æ¤¤¤¿¤À¤±¤ì¤ÐÒÙÏ¶Þ¹ØÆÉÅÐÏ¿¤Ï¤Ê¤µ¤ì¤Þ¤»¤ó¡
-¤Þ¤¿¤½¤Î»Ý¤<!--{$tpl_infoemail}-->¤Þ¤Ç¤´Ï¢Íí¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡
+¢¨ËÜ¥á¡¼¥ë¤Ï¼«Æ°ÇÛ¿®¥á¡¼¥ë¤Ç¤¹¡£
+<!--{$tpl_shopname}-->¤è¤ê¡¢¥á¥ë¥Þ¥¬¹ØÆÉÅÐÏ¿¤ò´õË¾¤µ¤ì¤¿Êý¤Ë¤ªÁ÷¤ê¤·¤Æ¤¤¤Þ¤¹¡£
+¤â¤·¤ª¿´Åö¤¿¤ê¤¬Ìµ¤¤¾ì¹ç¤Ï¡¢¤³¤Î¤Þ¤Þ¤³¤Î¥á¡¼¥ë¤òÇË´þ¤·¤Æ¤¤¤¿¤À¤±¤ì¤Ð¥á¥ë¥Þ¥¬¹ØÆÉÅÐÏ¿¤Ï¤Ê¤µ¤ì¤Þ¤»¤ó¡£
+¤Þ¤¿¤½¤Î»Ý¡¢<!--{$tpl_infoemail}-->¤Þ¤Ç¤´Ï¢Íí¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡£
 
-¤³¤ÎÅÙ¤Ï¤ÒÙÏ¶Þ¹ØÆÉ°ÍÍê¤ò¤¤¤¿¤À¤­¤Þ¤·¤Æ¤Í­¤êÆñ¤¦¤´¤¶¤¤¤Þ¤¹¡
-¸½ºß¤Ï²¾ÅÐÏ¿¤Î¾õÂÖ¤Ç¤¹¡
-´°Î»¤¹¤ë¤Ë¤Ï²¼µ­URL¤Ë±¸¾½¤·¤Æ¤¯¤À¤µ¤¤¡
-¢¨ÆþÎÏ¤µ¤ì¤¿¤ªµÒÍÍ¤Î¾ðÊó¤ÏSSL°Å¹æ²½ÄÌ¿®¤Ë¤è¤êÊÝ¸î¤µ¤ì¤Þ¤¹¡
+¤³¤ÎÅÙ¤Ï¡¢¥á¥ë¥Þ¥¬¹ØÆÉ°ÍÍê¤ò¤¤¤¿¤À¤­¤Þ¤·¤Æ¡¢Í­¤êÆñ¤¦¤´¤¶¤¤¤Þ¤¹¡£
+¸½ºß¤Ï²¾ÅÐÏ¿¤Î¾õÂÖ¤Ç¤¹¡£
+´°Î»¤¹¤ë¤Ë¤Ï²¼µ­URL¤Ë¥¢¥¯¥»¥¹¤·¤Æ¤¯¤À¤µ¤¤¡£
+¢¨ÆþÎÏ¤µ¤ì¤¿¤ªµÒÍÍ¤Î¾ðÊó¤ÏSSL°Å¹æ²½ÄÌ¿®¤Ë¤è¤êÊÝ¸î¤µ¤ì¤Þ¤¹¡£
 
 <!--{$tpl_url}-->
Index: /branches/mobile/data/lib/slib.php
===================================================================
--- /branches/mobile/data/lib/slib.php	(revision 11417)
+++ /branches/mobile/data/lib/slib.php	(revision 11524)
@@ -2254,4 +2254,8 @@
 	$sqlval['mail_flag'] = $array['mail_flag'];
 	//-- ÊÔ½¸ÅÐÏ¿¼Â¹Ô
+	if (defined('MOBILE_SITE')) {
+		$arrRegist['email_mobile'] = $arrRegist['email'];
+		unset($arrRegist['email']);
+	}
 	$objQuery->begin();
 	$objQuery->update("dtb_customer", $arrRegist, "customer_id = ? ", array($array['customer_id']));
Index: /branches/mobile/html/mobile/mypage/index.php
===================================================================
--- /branches/mobile/html/mobile/mypage/index.php	(revision 11457)
+++ /branches/mobile/html/mobile/mypage/index.php	(revision 11524)
@@ -30,4 +30,7 @@
 $objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
 
+// ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+$objPage->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
+
 // ¥í¥°¥¤¥ó½èÍý
 if($_POST['mode'] == 'login') {
@@ -44,5 +47,6 @@
 
 	if (count($arrErr) == 0){
-		if($objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) {
+		if($objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) ||
+		   $objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
 			// ¥í¥°¥¤¥ó¤¬À®¸ù¤·¤¿¾ì¹ç¤Ï·ÈÂÓÃ¼ËöID¤òÊÝÂ¸¤¹¤ë¡£
 			$objCustomer->updateMobilePhoneId();
@@ -72,5 +76,5 @@
 
 // ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
-if(!isset($_SESSION['customer'])) {
+if(!$objCustomer->isLoginSuccess()) {
 	$objPage->tpl_mainpage = 'mypage/login.tpl';
 	$objView->assignArray($objFormParam->getHashArray());
Index: /branches/mobile/html/mobile/mypage/change_complete.php
===================================================================
--- /branches/mobile/html/mobile/mypage/change_complete.php	(revision 11418)
+++ /branches/mobile/html/mobile/mypage/change_complete.php	(revision 11524)
@@ -23,5 +23,5 @@
 
 //¥í¥°¥¤¥óÈ½Äê
-if (!$objCustomer->isLoginSuccess()){
+if (!$objCustomer->isLoginSuccess(true)){
 	sfDispSiteError(CUSTOMER_ERROR);
 }else {
Index: /branches/mobile/html/mobile/mypage/history.php
===================================================================
--- /branches/mobile/html/mobile/mypage/history.php	(revision 11418)
+++ /branches/mobile/html/mobile/mypage/history.php	(revision 11524)
@@ -51,17 +51,24 @@
 	$next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>¼¡¤Ø¢ª</a>";
 } else {
-	$next = "¼¡¤Ø¢ª";
+	$next = "";
 }
 
 // previous
 if ($pageNo - HISTORY_NUM > 0) {
-	$previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>¢«Á°</a>";
+	$previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>¢«Á°¤Ø</a>";
 } elseif ($pageNo == 0) {
-	$previous = "¢«Á°";
+	$previous = "";
 } else {
-	$previous = "<a href='history.php?pageno=0'>¢«Á°</a>";
+	$previous = "<a href='history.php?pageno=0'>¢«Á°¤Ø</a>";
 }
 
-$objPage->tpl_strnavi = $previous . " | " . $next;
+// bar
+if ($next != '' && $previous != '') {
+	$bar = " | ";
+} else {
+	$bar = "";
+}
+
+$objPage->tpl_strnavi = $previous . $bar . $next;
 $objView->assignobj($objPage);				//$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊÇ¼
 $objView->display(SITE_FRAME);				//¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
Index: /branches/mobile/html/mobile/mypage/change.php
===================================================================
--- /branches/mobile/html/mobile/mypage/change.php	(revision 11418)
+++ /branches/mobile/html/mobile/mypage/change.php	(revision 11524)
@@ -136,8 +136,10 @@
 			$passlen = strlen($objPage->arrForm['password']);
 			$objPage->passlen = lfPassLen($passlen);
-			
-			//¥á¡¼¥ë¼õ¤±¼è¤ê
-			if ($objPage->arrForm['mail_flag'] = "ON") {
-				$objPage->arrForm['mail_flag']  = "2";
+
+			// ¥á¡¼¥ë¼õ¤±¼è¤ê
+			if (strtolower($_POST['mail_flag']) == "on") {
+				$_POST['mail_flag']  = "2";
+			} else {
+				$_POST['mail_flag']  = "3";
 			}
 
@@ -165,7 +167,7 @@
 			$email_flag = true;
 
-			if($objPage->arrForm['email'] != $objCustomer->getValue('email')) {
+			if($objPage->arrForm['email'] != $objCustomer->getValue('email_mobile')) {
 				//¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î½ÅÊ£¥Á¥§¥Ã¥¯
-				$email_cnt = $objQuery->count("dtb_customer","del_flg=0 AND email=?", array($objPage->arrForm['email']));
+				$email_cnt = $objQuery->count("dtb_customer","del_flg=0 AND (email=? OR email_mobile=?)", array($objPage->arrForm['email'], $objPage->arrForm['email']));
 				if ($email_cnt > 0){
 					$email_flag = false;
@@ -449,7 +451,8 @@
 	$ret = $objQuery->select("*","dtb_customer","customer_id=?", array($objCustomer->getValue('customer_id')));
 	$arrForm = $ret[0];
+	$arrForm['email'] = $arrForm['email_mobile'];
 
 	//¥á¥ë¥Þ¥¬¥Õ¥é¥°¼èÆÀ
-	$arrForm['mail_flag'] = $objQuery->get("dtb_customer_mail","mail_flag","email=?", array($objCustomer->getValue('email')));
+	$arrForm['mail_flag'] = $objQuery->get("dtb_customer_mail","mail_flag","email=?", array($objCustomer->getValue('email_mobile')));
 	
 	//ÃÂÀ¸Æü¤ÎÇ¯·îÆü¼èÆÀ
Index: /branches/mobile/html/mobile/magazine/confirm.php
===================================================================
--- /branches/mobile/html/mobile/magazine/confirm.php	(revision 11418)
+++ /branches/mobile/html/mobile/magazine/confirm.php	(revision 11524)
@@ -144,5 +144,4 @@
 
 	$objQuery = new SC_Query();
-	$objQuery->insert("dtb_customer_mail", $arrRegist);
 
 	//--¡¡´û¤Ë¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎÈ½Äê
@@ -165,5 +164,18 @@
 
 	$sql = "SELECT secret_key FROM dtb_customer_mail WHERE email = ?";
-	return $objConn->getOne($sql, array($email));
+	$uniqid = $objConn->getOne($sql, array($email));
+
+	if ($uniqid == '') {
+		$count = 1;
+		while ($count != 0) {
+			$uniqid = sfGetUniqRandomId("t");
+			$count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer_mail WHERE secret_key = ?", array($uniqid));
+		}
+
+		$objQuery = new SC_Query();
+		$objQuery->update("dtb_customer_mail", array('secret_key' => $uniqid), "email = '" .addslashes($email). "'");
+	}
+
+	return $uniqid;
 }
 
@@ -176,5 +188,5 @@
 
 	// NULL¤â¹ØÆÉ¤È¤ß¤Ê¤¹
-	if (count($mailResult) == 0 or ($mailResult[1] != null and $mailResult[1] <= 2 )) {
+	if (count($mailResult) == 0 or ($mailResult[1] != null and $mailResult[1] != 2 )) {
 		return false;
 	} else {
