Index: branches/dev/data/class/SC_FormParam.php
===================================================================
--- branches/dev/data/class/SC_FormParam.php	(revision 17)
+++ branches/dev/data/class/SC_FormParam.php	(revision 11460)
@@ -155,4 +155,5 @@
 				case 'DOMAIN_CHECK':
 				case 'FILE_NAME_CHECK':
+				case 'MOBILE_EMAIL_CHECK':
 				
 					if(!is_array($this->param[$cnt])) {
Index: branches/dev/data/class/SC_CheckError.php
===================================================================
--- branches/dev/data/class/SC_CheckError.php	(revision 17)
+++ branches/dev/data/class/SC_CheckError.php	(revision 11460)
@@ -378,5 +378,5 @@
 			return;
 		}
-		if(strlen($this->arrParam[$value[1]]) > 0 && ! mb_ereg("^([¥¡-¥ö]|[¡¼])+$", $this->arrParam[$value[1]])) {
+		if(strlen($this->arrParam[$value[1]]) > 0 && ! mb_ereg("^[¥¡-¥ö¦-ß¡¼]+$", $this->arrParam[$value[1]])) {
 			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï¥«¥¿¥«¥Ê¤ÇÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br />";	
 		}
@@ -780,4 +780,15 @@
 		}
 	}	
+	
+	/*¡¡·ÈÂÓ¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÎÈ½Äê¡¡*/
+	// value[0] = ¹àÌÜÌ¾ value[1] = È½ÄêÂÐ¾Ý¥á¡¼¥ë¥¢¥É¥ì¥¹
+	function MOBILE_EMAIL_CHECK( $value ){				//¡¡¥á¡¼¥ë¥¢¥É¥ì¥¹¤òÀµµ¬É½¸½¤ÇÈ½Äê¤¹¤ë
+		if(isset($this->arrErr[$value[1]])) {
+			return;
+		}
+		if(strlen($this->arrParam[$value[1]]) > 0 && !gfIsMobileMailAddress($this->arrParam[$value[1]])) {
+			$this->arrErr[$value[1]] = "¢¨ " . $value[0] . "¤Ï·ÈÂÓÅÅÏÃ¤Î¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£<br />";
+		}
+	}		
 }
 ?>
Index: branches/dev/data/class/GC_MobileKaraMail.php
===================================================================
--- branches/dev/data/class/GC_MobileKaraMail.php	(revision 11460)
+++ branches/dev/data/class/GC_MobileKaraMail.php	(revision 11460)
@@ -0,0 +1,200 @@
+<?php
+
+/**
+ * ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¥¢¥É¥ì¥¹¤Î¥³¥Þ¥ó¥ÉÌ¾¤È¥È¡¼¥¯¥ó¤Î´Ö¤Î¶èÀÚ¤êÊ¸»ú
+ */
+define('MOBILE_KARA_MAIL_EXTENSION_DELIMITER', '_');
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¤Î¶õ¥á¡¼¥ë¤ò°·¤¦¥¯¥é¥¹
+ */
+class GC_MobileKaraMail {
+	/**
+	 * ´Ä¶­ÊÑ¿ô¤«¤é MTA ¤òÈ½ÊÌ¤·¡¢ÂÐ±þ¤¹¤ë GC_MobileKaraMail ¤Þ¤¿¤Ï¤½¤Î¥µ¥Ö¥¯¥é¥¹
+	 * ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òºîÀ®¤¹¤ë¡£
+	 *
+	 * @return object GC_MobileKaraMail ¤Þ¤¿¤Ï¤½¤Î¥µ¥Ö¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÊÖ¤¹¡£
+	 */
+	function &factory() {
+		if (isset($_ENV['EXTENSION'])) {
+			$objInstance = new GC_MobileKaraMail_Postfix;
+		} elseif (isset($_ENV['DEFAULT'])) {
+			$objInstance = new GC_MobileKaraMail_Qmail;
+		} else {
+			$objInstance = new GC_MobileKaraMail;
+		}
+
+		return $objInstance;
+	}
+
+	/**
+	 * É¸½àÆþÎÏ¤«¤é¥á¡¼¥ë¤òÆÉ¤ß¹þ¤ß¡¢É¬Í×¤Ê¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function parse() {
+		if (@$this->parsed) {
+			return;
+		}
+
+		require_once DATA_PATH . '/module/Mail/mimeDecode.php';
+
+		$fp = fopen('php://stdin', 'r');
+
+		// From ¹Ô¤ò²òÀÏ¤¹¤ë¡£
+		$from_line = rtrim(fgets($fp));
+		if (preg_match('/^From\\s+"?([^\\s"@]+)"?@([^\\s@]+)/', $from_line, $matches)) {
+			$this->sender = $matches[1] . '@' . $matches[2];
+		} else {
+			trigger_error("Invalid from line: $from_line");
+			$this->sender = null;
+		}
+
+		// »Ä¤ê¤Î¥Ø¥Ã¥À¡¼¤ò²òÀÏ¤¹¤ë¡£
+		$data = '';
+		while (!feof($fp)) {
+			$data .= fgets($fp);
+			if (rtrim($data, "\r\n") == '') {
+				break;
+			}
+		}
+		$structure = Mail_mimeDecode::decode(array('input' => $data));
+		$this->recipient = @$structure->headers['to'];
+
+		// °¸Àè¥¢¥É¥ì¥¹¤«¤é³ÈÄ¥ÉôÊ¬¤ò¼èÆÀ¤¹¤ë¡£
+		$pos = strpos($this->recipient, MOBILE_KARA_MAIL_ADDRESS_DELIMITER);
+		if ($pos !== false) {
+			$extension_and_domain = substr($this->recipient, $pos + 1);
+			$pos = strpos($extension_and_domain, '@');
+			if ($pos !== false) {
+				$this->extension = substr($extension_and_domain, 0, $pos);
+			} else {
+				$this->extension = $extension_and_domain;
+			}
+		} else {
+			trigger_error("Invalid recipient: {$this->recipient}");
+			$this->extension = null;
+		}
+
+		$this->parsed = true;
+	}
+
+	/**
+	 * ÇÛ¿®¤¬´°Î»¤·¤¿¤³¤È¤ò¼¨¤¹½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤Ç¥×¥í¥°¥é¥à¤ò½ªÎ»¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function success() {
+		exit(0);
+	}
+
+	/**
+	 * °ì»þÅª¤Ê¥¨¥é¡¼¤ò¼¨¤¹½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤Ç¥×¥í¥°¥é¥à¤ò½ªÎ»¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function temporaryFailure() {
+		exit(75);
+	}
+
+	/**
+	 * Á÷¿®¼Ô¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * parse() ¼Â¹Ô¸å¤Ë»ÈÍÑ¤¹¤ë¤³¤È¡£
+	 *
+	 * @return string|false Á÷¿®¼Ô¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤òÊÖ¤¹¡£¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getSender() {
+		return isset($this->sender) ? $this->sender : false;
+	}
+
+	/**
+	 * °¸Àè¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î³ÈÄ¥ÉôÊ¬¤«¤é¥³¥Þ¥ó¥ÉÌ¾¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * parse() ¼Â¹Ô¸å¤Ë»ÈÍÑ¤¹¤ë¤³¤È¡£
+	 *
+	 * @return string|false ¥³¥Þ¥ó¥ÉÌ¾¤òÊÖ¤¹¡£¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getCommand() {
+		if (!isset($this->extension)) {
+			return false;
+		}
+
+		$pos = strpos($this->extension, MOBILE_KARA_MAIL_EXTENSION_DELIMITER);
+		if ($pos === false) {
+			return false;
+		}
+
+		return substr($this->extension, 0, $pos);
+	}
+
+	/**
+	 * °¸Àè¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î³ÈÄ¥ÉôÊ¬¤«¤é¥È¡¼¥¯¥ó¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * parse() ¼Â¹Ô¸å¤Ë»ÈÍÑ¤¹¤ë¤³¤È¡£
+	 *
+	 * @return string|false ¥È¡¼¥¯¥ó¤òÊÖ¤¹¡£¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getToken() {
+		if (!isset($this->extension)) {
+			return false;
+		}
+
+		$pos = strpos($this->extension, MOBILE_KARA_MAIL_EXTENSION_DELIMITER);
+		if ($pos === false) {
+			return false;
+		}
+
+		return substr($this->extension, $pos + 1);
+	}
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¤Î¶õ¥á¡¼¥ë¤ò°·¤¦¥¯¥é¥¹ (PostfixÍÑ)
+ */
+class GC_MobileKaraMail_Postfix extends GC_MobileKaraMail {
+	/**
+	 * @see GC_MobileKaraMail::parse()
+	 */
+	function parse() {
+		if (@$this->parsed) {
+			return;
+		}
+
+		$this->sender = $_ENV['SENDER'];
+		$this->recipient = $_ENV['RECIPIENT'];
+		$this->extension = $_ENV['EXTENSION'];
+
+		$this->parsed = true;
+	}
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¤Î¶õ¥á¡¼¥ë¤ò°·¤¦¥¯¥é¥¹ (qmailÍÑ)
+ */
+class GC_MobileKaraMail_Qmail extends GC_MobileKaraMail {
+	/**
+	 * @see GC_MobileKaraMail::parse()
+	 */
+	function parse() {
+		if (@$this->parsed) {
+			return;
+		}
+
+		$this->sender = $_ENV['SENDER'];
+		$this->recipient = $_ENV['RECIPIENT'];
+		$this->extension = $_ENV['DEFAULT'];
+
+		$this->parsed = true;
+	}
+
+	/**
+	 * °ì»þÅª¤Ê¥¨¥é¡¼¤ò¼¨¤¹½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤Ç¥×¥í¥°¥é¥à¤ò½ªÎ»¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function temporaryFailure() {
+		exit(111);
+	}
+}
+?>
Index: branches/dev/data/class/GC_MobileImage.php
===================================================================
--- branches/dev/data/class/GC_MobileImage.php	(revision 11460)
+++ branches/dev/data/class/GC_MobileImage.php	(revision 11460)
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Ã¼Ëö¤Î²èÌÌ²òÁüÅÙ¤Ë¤¢¤ï¤»¤Æ²èÁü¤òÊÑ´¹¤¹¤ë
+ */
+
+define("MOBILE_IMAGE_INC_PATH", realpath(dirname( __FILE__)) . "/../include");
+require_once(MOBILE_IMAGE_INC_PATH . "/image_converter.inc");
+
+/**
+ * ²èÁüÊÑ´¹¥¯¥é¥¹
+ */
+class GC_MobileImage {
+	/**
+	 * ²èÁü¤òÃ¼Ëö¤Î²òÁüÅÙ¤Ë¹ç¤ï¤»¤ÆÊÑ´¹¤¹¤ë
+	 * output buffering ÍÑ¥³¡¼¥ë¥Ð¥Ã¥¯´Ø¿ô
+	 *
+	 * @param string ÆþÎÏ
+	 * @return string ½ÐÎÏ
+	 */
+	function handler($buffer) {
+
+		// Ã¼Ëö¾ðÊó¤ò¼èÆÀ¤¹¤ë
+		$carrier = GC_MobileUserAgent::getCarrier();
+		$model   = GC_MobileUserAgent::getModel();
+
+		// ·ÈÂÓÅÅÏÃ¤Î¾ì¹ç¤Î¤ß½èÍý¤ò¹Ô¤¦
+		if ($carrier !== FALSE) {
+
+			// HTMLÃæ¤ÎIMG¥¿¥°¤ò¼èÆÀ¤¹¤ë
+			$pattern = '/<img\s+src=[\'"]([^>"]+)[\'"]\s*\/*>/i';
+			$result = preg_match_all($pattern, $buffer, $images);
+
+			// Ã¼Ëö¤Î¾ðÊó¤ò¼èÆÀ¤¹¤ë
+			$fp = fopen(MOBILE_IMAGE_INC_PATH . "/mobile_image_map_$carrier.csv", "r");
+			while (($data = fgetcsv($fp, 1000, ",")) !== FALSE) {
+				if ($data[1] == $model || $data[1] == '*') {
+					$cacheSize     = $data[2];
+					$imageFileSize = $data[7];
+					$imageType     = $data[6];
+					$imageWidth    = $data[5];
+					break;
+				}
+			}
+			fclose($fp);
+
+			// docomo¤Èsoftbank¤Î¾ì¹ç¤Ï²èÁü¥Õ¥¡¥¤¥ë°ì¤Ä¤ËÍøÍÑ²ÄÇ½¤Ê¥µ¥¤¥º¤Î¾å¸Â¤ò·×»»¤¹¤ë
+			// au¤ÏHTML¤Îbyte¿ô¾å¸Â¤Ë²èÁü¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤¬´Þ¤Þ¤ì¤Ê¤¤¤Î¤ÇimageFileSize¤Î¤Þ¤Þ¡£
+			if ($carrier == "docomo" or $carrier == "softbank") {
+				// ·×»»¼°¡§(ÍøÍÑÃ¼Ëö¤ÇÉ½¼¨²ÄÇ½¤Êcache¥µ¥¤¥º - HTML¤Î¥Ð¥¤¥È¿ô - ÊÑ´¹¸å¤Î²èÁüÌ¾¤Î¥Ð¥¤¥È¿ô(ÌÜ°ÂÃÍ) ) / HTMLÃæ¤Î²èÁü¿ô
+				$temp_imagefilesize = ($cacheSize - strlen($buffer) - (140 * $result) ) / $result;
+				// ·×»»·ë²Ì¤¬Ã¼Ëö¤ÎÉ½¼¨²ÄÇ½¥Õ¥¡¥¤¥ë¥µ¥¤¥º¾å¸Â¤è¤ê¾®¤µ¤¤¾ì¹ç¤Ï·×»»·ë²Ì¤ÎÃÍ¤òÍ­¸ú¤Ë¤¹¤ë
+				if ($temp_imagefilesize < $imageFileSize) {
+					$imageFileSize = $temp_imagefilesize;
+				}
+			}
+
+			// ²èÁüÊÑ´¹¤Î¾ðÊó¤ò¥»¥Ã¥È¤¹¤ë
+			$imageConverter = New ImageConverter();
+			$imageConverter->setOutputDir(MOBILE_IMAGE_DIR);
+			$imageConverter->setImageType($imageType);
+			$imageConverter->setImageWidth($imageWidth);
+			$imageConverter->setFileSize($imageFileSize);
+
+			// HTMLÃæ¤ÎIMG¥¿¥°¤òÊÑ´¹¸å¤Î¥Õ¥¡¥¤¥ë¥Ñ¥¹¤ËÃÖ´¹¤¹¤ë
+			foreach ($images[1] as $key => $value) {
+				$converted = $imageConverter->execute(preg_replace('|^' . PC_URL_DIR . '|', PC_HTML_PATH, $value));
+				if (isset($converted['outputImageName'])) {
+					$buffer = str_replace($value, MOBILE_IMAGE_URL . '/' . $converted['outputImageName'], $buffer);
+				} else {
+					$buffer = str_replace($images[0][$key], '<!--No image-->', $buffer);
+				}
+			}
+		}
+		return $buffer;
+	}
+}
+?>
Index: branches/dev/data/class/SC_Customer.php
===================================================================
--- branches/dev/data/class/SC_Customer.php	(revision 17)
+++ branches/dev/data/class/SC_Customer.php	(revision 11460)
@@ -50,8 +50,13 @@
 	}
 	
-	function getCustomerDataFromEmailPass( $pass, $email ) {
+	function getCustomerDataFromEmailPass( $pass, $email, $mobile = false ) {
+		$sql_mobile = $mobile ? ' OR email_mobile ILIKE ?' : '';
+		$arrValues = array($email);
+		if ($mobile) {
+			$arrValues[] = $email;
+		}
 		// ËÜÅÐÏ¿¤µ¤ì¤¿²ñ°÷¤Î¤ß
-		$sql = "SELECT * FROM dtb_customer WHERE email ILIKE ? AND del_flg = 0 AND status = 2";
-		$result = $this->conn->getAll($sql, array($email));
+		$sql = "SELECT * FROM dtb_customer WHERE (email ILIKE ?" . $sql_mobile . ") AND del_flg = 0 AND status = 2";
+		$result = $this->conn->getAll($sql, $arrValues);
 		$data = $result[0];
 		
@@ -63,4 +68,94 @@
 		}
 		return false;
+	}
+
+	/**
+	 * ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	 *
+	 * @return boolean ³ºÅö¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï true¡¢¤½¤ì°Ê³°¤Î¾ì¹ç
+	 *                 ¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function checkMobilePhoneId() {
+		if (!isset($_SESSION['mobile']['phone_id']) || $_SESSION['mobile']['phone_id'] === false) {
+			return false;
+		}
+
+		// ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤·¡¢ËÜÅÐÏ¿¤µ¤ì¤¿²ñ°÷¤ò¸¡º÷¤¹¤ë¡£
+		$sql = 'SELECT count(*) FROM dtb_customer WHERE mobile_phone_id = ? AND del_flg = 0 AND status = 2';
+		$result = $this->conn->getOne($sql, array($_SESSION['mobile']['phone_id']));
+		return $result > 0;
+	}
+
+	/**
+	 * ·ÈÂÓÃ¼ËöID¤ò»ÈÍÑ¤·¤Æ²ñ°÷¤ò¸¡º÷¤·¡¢¥Ñ¥¹¥ï¡¼¥É¤Î¾È¹ç¤ò¹Ô¤¦¡£
+	 * ¥Ñ¥¹¥ï¡¼¥É¤¬¹ç¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¸ÜµÒ¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * @param string $pass ¥Ñ¥¹¥ï¡¼¥É
+	 * @return boolean ³ºÅö¤¹¤ë²ñ°÷¤¬Â¸ºß¤·¡¢¥Ñ¥¹¥ï¡¼¥É¤¬¹ç¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï true¡¢
+	 *                 ¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getCustomerDataFromMobilePhoneIdPass($pass) {
+		if (!isset($_SESSION['mobile']['phone_id']) || $_SESSION['mobile']['phone_id'] === false) {
+			return false;
+		}
+
+		// ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤·¡¢ËÜÅÐÏ¿¤µ¤ì¤¿²ñ°÷¤ò¸¡º÷¤¹¤ë¡£
+		$sql = 'SELECT * FROM dtb_customer WHERE mobile_phone_id = ? AND del_flg = 0 AND status = 2';
+		@list($data) = $this->conn->getAll($sql, array($_SESSION['mobile']['phone_id']));
+
+		// ¥Ñ¥¹¥ï¡¼¥É¤¬¹ç¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¸ÜµÒ¾ðÊó¤òcustomer_data¤Ë³ÊÇ¼¤·¤Ætrue¤òÊÖ¤¹¡£
+		if (sha1($pass . ':' . AUTH_MAGIC) == @$data['password']) {
+			$this->customer_data = $data;
+			$this->startSession();
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * ·ÈÂÓÃ¼ËöID¤òÅÐÏ¿¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function updateMobilePhoneId() {
+		if (!isset($_SESSION['mobile']['phone_id']) || $_SESSION['mobile']['phone_id'] === false) {
+			return;
+		}
+
+		if ($this->customer_data['mobile_phone_id'] == $_SESSION['mobile']['phone_id']) {
+			return;
+		}
+
+		$objQuery = new SC_Query;
+		$sqlval = array('mobile_phone_id' => $_SESSION['mobile']['phone_id']);
+		$where = 'customer_id = ? AND del_flg = 0 AND status = 2';
+		$objQuery->update('dtb_customer', $sqlval, $where, array($this->customer_data['customer_id']));
+
+		$this->customer_data['mobile_phone_id'] = $_SESSION['mobile']['phone_id'];
+	}
+
+	/**
+	 * email ¤«¤é email_mobile ¤Ø·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¥³¥Ô¡¼¤¹¤ë¡£
+	 *
+	 * @return void
+	 */
+	function updateEmailMobile() {
+		// ¤¹¤Ç¤Ë email_mobile ¤ËÃÍ¤¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï²¿¤â¤·¤Ê¤¤¡£
+		if ($this->customer_data['email_mobile'] != '') {
+			return;
+		}
+
+		// email ¤¬·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï²¿¤â¤·¤Ê¤¤¡£
+		if (!gfIsMobileMailAddress($this->customer_data['email'])) {
+			return;
+		}
+
+		// email ¤«¤é email_mobile ¤Ø¥³¥Ô¡¼¤¹¤ë¡£
+		$objQuery = new SC_Query;
+		$sqlval = array('email_mobile' => $this->customer_data['email']);
+		$where = 'customer_id = ? AND del_flg = 0 AND status = 2';
+		$objQuery->update('dtb_customer', $sqlval, $where, array($this->customer_data['customer_id']));
+
+		$this->customer_data['email_mobile'] = $this->customer_data['email'];
 	}
 	
@@ -101,5 +196,5 @@
 	
 	// ¥í¥°¥¤¥ó¤ËÀ®¸ù¤·¤Æ¤¤¤ë¤«È½Äê¤¹¤ë¡£
-	function isLoginSuccess() {
+	function isLoginSuccess($dont_check_email_mobile = false) {
 		// ¥í¥°¥¤¥ó»þ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÈDB¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬°ìÃ×¤·¤Æ¤¤¤ë¾ì¹ç
 		if(sfIsInt($_SESSION['customer']['customer_id'])) {
@@ -107,4 +202,10 @@
 			$email = $objQuery->get("dtb_customer", "email", "customer_id = ?", array($_SESSION['customer']['customer_id']));
 			if($email == $_SESSION['customer']['email']) {
+				// ¥â¥Ð¥¤¥ë¥µ¥¤¥È¤Î¾ì¹ç¤Ï·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤³¤È¤â¥Á¥§¥Ã¥¯¤¹¤ë¡£
+				// ¤¿¤À¤· $dont_check_email_mobile ¤¬ true ¤Î¾ì¹ç¤Ï¥Á¥§¥Ã¥¯¤·¤Ê¤¤¡£
+				if (defined('MOBILE_SITE') && !$dont_check_email_mobile) {
+					$email_mobile = $objQuery->get("dtb_customer", "email_mobile", "customer_id = ?", array($_SESSION['customer']['customer_id']));
+					return isset($email_mobile);
+				}
 				return true;
 			}
@@ -121,4 +222,9 @@
 	function setValue($keyname, $val) {
 		$_SESSION['customer'][$keyname] = $val;
+	}
+
+	// ¥Ñ¥é¥á¡¼¥¿¤¬NULL¤«¤É¤¦¤«¤ÎÈ½Äê
+	function hasValue($keyname) {
+		return isset($_SESSION['customer'][$keyname]);
 	}
 	
Index: branches/dev/data/class/GC_MobileUserAgent.php
===================================================================
--- branches/dev/data/class/GC_MobileUserAgent.php	(revision 11460)
+++ branches/dev/data/class/GC_MobileUserAgent.php	(revision 11460)
@@ -0,0 +1,127 @@
+<?php
+require_once(dirname(__FILE__) . '/../module/Net/UserAgent/Mobile.php');
+
+/**
+ * ·ÈÂÓÃ¼Ëö¤Î¾ðÊó¤ò°·¤¦¥¯¥é¥¹
+ *
+ * ÂÐ¾Ý¤È¤¹¤ë·ÈÂÓÃ¼Ëö¤Ï $_SERVER ¤«¤é·èÄê¤¹¤ë¡£
+ * ¤¹¤Ù¤Æ¤Î¥á¥½¥Ã¥É¤Ï¥¯¥é¥¹¥á¥½¥Ã¥É¡£
+ */
+class GC_MobileUserAgent {
+	/**
+	 * ·ÈÂÓÃ¼Ëö¤Î¥­¥ã¥ê¥¢¤òÉ½¤¹Ê¸»úÎó¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * Ê¸»úÎó¤Ï docomo, ezweb, softbank ¤Î¤¤¤º¤ì¤«¡£
+	 *
+	 * @return string|false ·ÈÂÓÃ¼Ëö¤Î¥­¥ã¥ê¥¢¤òÉ½¤¹Ê¸»úÎó¤òÊÖ¤¹¡£
+	 *                      ·ÈÂÓÃ¼Ëö¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getCarrier() {
+		$objAgent =& Net_UserAgent_Mobile::singleton();
+		if (Net_UserAgent_Mobile::isError($objAgent)) {
+			return false;
+		}
+
+		switch ($objAgent->getCarrierShortName()) {
+		case 'I':
+			return 'docomo';
+		case 'E':
+			return 'ezweb';
+		case 'V':
+			return 'softbank';
+		default:
+			return false;
+		}
+	}
+
+	/**
+	 * ¾¡¼ê¥µ¥¤¥È¤ÇÍøÍÑ²ÄÇ½¤Ê·ÈÂÓÃ¼Ëö/ÍøÍÑ¼Ô¤ÎID¤ò¼èÆÀ¤¹¤ë¡£
+	 *
+	 * ³Æ¥­¥ã¥ê¥¢¤Ç»ÈÍÑ¤¹¤ëID¤Î¼ïÎà:
+	 * + docomo   ... UTN
+	 * + ezweb    ... EZÈÖ¹æ
+	 * + softbank ... Ã¼Ëö¥·¥ê¥¢¥ëÈÖ¹æ
+	 *
+	 * @return string|false ¼èÆÀ¤·¤¿ID¤òÊÖ¤¹¡£¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function getId() {
+		$objAgent =& Net_UserAgent_Mobile::singleton();
+		if (Net_UserAgent_Mobile::isError($objAgent)) {
+			return false;
+		} elseif ($objAgent->isDoCoMo() || $objAgent->isVodafone()) {
+			$id = $objAgent->getSerialNumber();
+		} elseif ($objAgent->isEZweb()) {
+			$id = @$_SERVER['HTTP_X_UP_SUBNO'];
+		}
+		return isset($id) ? $id : false;
+	}
+
+	/**
+	 * ·ÈÂÓÃ¼Ëö¤Îµ¡¼ï¤òÉ½¤¹Ê¸»úÎó¤ò¼èÆÀ¤¹¤ë¡£
+	 * ·ÈÂÓÃ¼Ëö¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤ÎÌ¾Á°¤ò¼èÆÀ¤¹¤ë¡£(Îã: "Mozilla")
+	 *
+	 * @return string ·ÈÂÓÃ¼Ëö¤Î¥â¥Ç¥ë¤òÉ½¤¹Ê¸»úÎó¤òÊÖ¤¹¡£
+	 */
+	function getModel() {
+		$objAgent =& Net_UserAgent_Mobile::singleton();
+		if (Net_UserAgent_Mobile::isError($objAgent)) {
+			return 'Unknown';
+		} elseif ($objAgent->isNonMobile()) {
+			return $objAgent->getName();
+		} else {
+			return $objAgent->getModel();
+		}
+	}
+
+	/**
+	 * EC-CUBE ¤¬¥µ¥Ý¡¼¥È¤¹¤ë·ÈÂÓ¥­¥ã¥ê¥¢¤«¤É¤¦¤«¤òÈ½ÊÌ¤¹¤ë¡£
+	 *
+	 * @return boolean ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¾ì¹ç¤Ï true¡¢¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function isMobile() {
+		$objAgent =& Net_UserAgent_Mobile::singleton();
+		if (Net_UserAgent_Mobile::isError($objAgent)) {
+			return false;
+		} else {
+			return $objAgent->isDoCoMo() || $objAgent->isEZweb() || $objAgent->isVodafone();
+		}
+	}
+
+	/**
+	 * EC-CUBE ¤¬¥µ¥Ý¡¼¥È¤¹¤ë·ÈÂÓ¥­¥ã¥ê¥¢¤«¤É¤¦¤«¤òÈ½ÊÌ¤¹¤ë¡£
+	 *
+	 * @return boolean ·ÈÂÓÃ¼Ëö¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï true¡¢¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function isNonMobile() {
+		return !GC_MobileUserAgent::isMobile();
+	}
+
+	/**
+	 * EC-CUBE ¤¬¥µ¥Ý¡¼¥È¤¹¤ë·ÈÂÓÃ¼Ëö¤«¤É¤¦¤«¤òÈ½ÊÌ¤¹¤ë¡£
+	 *
+	 * @return boolean ¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¾ì¹ç¤Ï true¡¢¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function isSupported() {
+		$objAgent =& Net_UserAgent_Mobile::singleton();
+
+		// ·ÈÂÓÃ¼Ëö¤À¤ÈÇ§¼±¤µ¤ì¤¿¤¬¡¢User-Agent ¤Î·Á¼°¤¬Ì¤ÃÎ¤Î¾ì¹ç
+		if (Net_UserAgent_Mobile::isError($objAgent)) {
+			gfPrintLog($objAgent->toString());
+			return false;
+		}
+
+		if ($objAgent->isDoCoMo()) {
+			$arrUnsupportedSeries = array('501i', '502i', '209i', '210i');
+			$arrUnsupportedModels = array('SH821i', 'N821i', 'P821i ', 'P651ps', 'R691i', 'F671i', 'SH251i', 'SH251iS');
+			return !in_array($objAgent->getSeries(), $arrUnsupportedSeries) && !in_array($objAgent->getModel(), $arrUnsupportedModels);
+		} elseif ($objAgent->isEZweb()) {
+			return $objAgent->isWAP2();
+		} elseif ($objAgent->isVodafone()) {
+			return $objAgent->isPacketCompliant();
+		} else {
+			// ·ÈÂÓÃ¼Ëö¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¤³¤È¤Ë¤¹¤ë¡£
+			return true;
+		}
+	}
+}
+?>
Index: branches/dev/data/class/GC_MobileEmoji.php
===================================================================
--- branches/dev/data/class/GC_MobileEmoji.php	(revision 11460)
+++ branches/dev/data/class/GC_MobileEmoji.php	(revision 11460)
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * 表示できない絵文字を置き換える文字列 (Shift JIS)
+ * デフォルトは空文字列。
+ */
+define('MOBILE_EMOJI_SUBSTITUTE', '');
+
+/**
+ * 携帯端末の絵文字を扱うクラス
+ */
+class GC_MobileEmoji {
+	/**
+	 * 絵文字タグを各キャリア用の文字コードに変換する
+	 * output buffering 用コールバック関数
+	 *
+	 * @param string 入力
+	 * @return string 出力
+	 */
+	function handler($buffer) {
+		$replace_callback = create_function('$matches', 'return GC_MobileEmoji::indexToCode($matches[1]);');
+		return preg_replace_callback('/\[emoji:(e?\d+)\]/', $replace_callback, $buffer);
+	}
+
+	/**
+	 * 絵文字番号を絵文字を表す Shift JIS の文字列に変換する。
+	 *
+	 * @param string $index 絵文字番号
+	 * @return string 絵文字を表す Shift JIS の文字列を返す。
+	 */
+	function indexToCode($index) {
+		$carrier = GC_MobileUserAgent::getCarrier();
+		if ($carrier === false) {
+			return MOBILE_EMOJI_SUBSTITUTE;
+		}
+
+		static $arrMap;
+		if (!isset($arrMap)) {
+			$arrMap = @include_once(dirname(__FILE__) . "/../include/mobile_emoji_map_$carrier.inc");
+		}
+
+		return isset($arrMap[$index]) ? $arrMap[$index] : MOBILE_EMOJI_SUBSTITUTE;
+	}
+}
+?>
