Index: /temp/branches/mobile/html/install/index.php
===================================================================
--- /temp/branches/mobile/html/install/index.php	(revision 10204)
+++ /temp/branches/mobile/html/install/index.php	(revision 11398)
@@ -324,4 +324,5 @@
 	$arrWriteFile = array(
 		"../../data/install.inc",
+		"../../data/install_mobile.inc",
 		"../user_data",
 		"../upload",
@@ -741,4 +742,33 @@
 		fclose($fp);
 	}
+
+	// ¥â¥Ð¥¤¥ëÈÇ¤ÎÀßÄê¥Õ¥¡¥¤¥ë install_mobile.inc ¤òºîÀ®¤¹¤ë¡£
+	$filepath = $data_path . "install_mobile.inc";
+	
+	$config_data = 
+	"<?php\n".
+	"    define ('ECCUBE_INSTALL', 'ON');\n" .
+	"    define ('HTML_PATH', '" . $root_dir . "mobile/');\n" .	 
+	"    define ('PC_HTML_PATH', '" . $root_dir . "');\n" .	 
+	"    define ('SITE_URL', '" . $normal_url . "mobile/');\n" .
+	"    define ('PC_SITE_URL', '" . $normal_url . "');\n" .
+	"    define ('SSL_URL', '" . $secure_url . "mobile/');\n" .
+	"    define ('PC_SSL_URL', '" . $secure_url . "');\n" .
+	"    define ('URL_DIR', '" . $url_dir . "mobile/');\n" .	
+	"    define ('PC_URL_DIR', '" . $url_dir . "');\n" .	
+	"    define ('DOMAIN_NAME', '" . $objWebParam->getValue('domain') . "');\n" .
+	"    define ('DB_TYPE', '" . $objDBParam->getValue('db_type') . "');\n" .
+	"    define ('DB_USER', '" . $objDBParam->getValue('db_user') . "');\n" . 
+	"    define ('DB_PASSWORD', '" . $objDBParam->getValue('db_password') . "');\n" .
+	"    define ('DB_SERVER', '" . $objDBParam->getValue('db_server') . "');\n" .
+	"    define ('DB_NAME', '" . $objDBParam->getValue('db_name') . "');\n" .
+	"    define ('DB_PORT', '" . $objDBParam->getValue('db_port') .  "');\n" .
+	"    define ('DATA_PATH', '".$data_path."');\n" .
+	"?>";
+	
+	if($fp = fopen($filepath,"w")) {
+		fwrite($fp, $config_data);
+		fclose($fp);
+	}
 }
 
Index: /temp/branches/mobile/html/mobile/.htaccess
===================================================================
--- /temp/branches/mobile/html/mobile/.htaccess	(revision 11398)
+++ /temp/branches/mobile/html/mobile/.htaccess	(revision 11398)
@@ -0,0 +1,4 @@
+php_flag mbstring.encoding_translation 0
+php_value output_handler null
+php_value variables_order EGPS
+php_flag session.auto_start 0
Index: /temp/branches/mobile/html/mobile/index.php
===================================================================
--- /temp/branches/mobile/html/mobile/index.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/index.php	(revision 11398)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¥È¥Ã¥×¥Ú¡¼¥¸
+ */
+
+require_once('./require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'top.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+	}
+}
+
+$objPage = new LC_Page();
+$conn = new SC_DBConn();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, 'index.php');
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: /temp/branches/mobile/html/mobile/frontparts/bloc/news.php
===================================================================
--- /temp/branches/mobile/html/mobile/frontparts/bloc/news.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/frontparts/bloc/news.php	(revision 11398)
@@ -0,0 +1,29 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+class LC_NewsPage {
+	function LC_NewsPage() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'frontparts/bloc/news.tpl';	// ¥á¥¤¥ó
+	}
+}
+
+$objSubPage = new LC_NewsPage();
+$objSubView = new SC_SiteView();
+
+//¿·Ãå¾ðÊó¼èÆÀ
+$objSubPage->arrNews = lfGetNews();
+
+$objSubView->assignobj($objSubPage);
+$objSubView->display($objSubPage->tpl_mainpage);
+//-----------------------------------------------------------------------------------------------------------------------------------
+function lfGetNews(){
+	$conn = new SC_DBConn();
+	$sql = "SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC";
+	$list_data = $conn->getAll($sql);
+	return $list_data;	
+}
+?>
Index: /temp/branches/mobile/html/mobile/frontparts/bloc/category.php
===================================================================
--- /temp/branches/mobile/html/mobile/frontparts/bloc/category.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/frontparts/bloc/category.php	(revision 11398)
@@ -0,0 +1,53 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¥á¥¤¥ó¥«¥Æ¥´¥ê¡¼
+ */
+
+class LC_CatPage {
+	function LC_CatPage() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'frontparts/bloc/category.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+	}
+}
+
+$objSubPage = new LC_CatPage();
+$objSubView = new SC_SiteView();
+
+$objSubPage = lfGetMainCat(true, $objSubPage);
+
+$objSubView->assignobj($objSubPage);
+$objSubView->display($objSubPage->tpl_mainpage);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+// ¥á¥¤¥ó¥«¥Æ¥´¥ê¡¼¤Î¼èÆÀ
+function lfGetMainCat($count_check = false, $objSubPage) {
+	$objQuery = new SC_Query();
+	$col = "*";
+	$from = "dtb_category left join dtb_category_total_count using (category_id)";
+	// ¥á¥¤¥ó¥«¥Æ¥´¥ê¡¼¤È¤½¤ÎÄ¾²¼¤Î¥«¥Æ¥´¥ê¡¼¤ò¼èÆÀ¤¹¤ë¡£
+	$where = 'level <= 2 AND del_flg = 0';
+	// ÅÐÏ¿¾¦ÉÊ¿ô¤Î¥Á¥§¥Ã¥¯
+	if($count_check) {
+		$where .= " AND product_count > 0";
+	}
+	$objQuery->setoption("ORDER BY rank DESC");
+	$arrRet = $objQuery->select($col, $from, $where);
+
+	// ¥á¥¤¥ó¥«¥Æ¥´¥ê¡¼¤òÃê½Ð¤¹¤ë¡£
+	$arrMainCat = array();
+	foreach ($arrRet as $cat) {
+		if ($cat['level'] != 1) {
+			continue;
+		}
+
+		// »Ò¥«¥Æ¥´¥ê¡¼¤ò»ý¤Ä¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
+		$arrChildrenID = sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $cat['category_id']);
+		$cat['has_children'] = count($arrChildrenID) > 0;
+		$arrMainCat[] = $cat;
+	}
+
+	$objSubPage->arrCat = $arrMainCat;
+	return $objSubPage;
+}
+?>
Index: /temp/branches/mobile/html/mobile/frontparts/bloc/best5.php
===================================================================
--- /temp/branches/mobile/html/mobile/frontparts/bloc/best5.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/frontparts/bloc/best5.php	(revision 11398)
@@ -0,0 +1,43 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+class LC_Best5Page {
+	function LC_Best5Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'frontparts/bloc/best5.tpl';	// ¥á¥¤¥ó
+	}
+}
+
+$objSubPage = new LC_Best5Page();
+$objSubView = new SC_SiteView();
+$objSiteInfo = $objView->objSiteInfo;
+
+// ´ðËÜ¾ðÊó¤òÅÏ¤¹
+$objSiteInfo = new SC_SiteInfo();
+$objSubPage->arrInfo = $objSiteInfo->data;
+
+//¤ª¤¹¤¹¤á¾¦ÉÊÉ½¼¨
+$objSubPage->arrBestProducts = lfGetRanking();
+
+$objSubView->assignobj($objSubPage);
+$objSubView->display($objSubPage->tpl_mainpage);
+//-----------------------------------------------------------------------------------------------------------------------------------
+//¤ª¤¹¤¹¤á¾¦ÉÊ¸¡º÷
+function lfGetRanking(){
+	$objQuery = new SC_Query();
+	
+	$col = "A.*, name, price02_min, price01_min, main_list_image ";
+	$from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)";
+	$where = "status = 1";
+	$order = "rank";
+	$objQuery->setorder($order);
+	
+	$arrBestProducts = $objQuery->select($col, $from, $where);
+		
+	return $arrBestProducts;
+}
+
+?>
Index: /temp/branches/mobile/html/mobile/require.php
===================================================================
--- /temp/branches/mobile/html/mobile/require.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/require.php	(revision 11398)
@@ -0,0 +1,36 @@
+<?php
+$include_dir = realpath(dirname( __FILE__));
+require_once($include_dir . "/../../data/conf/mobile.conf");
+require_once($include_dir . "/../../data/include/module.inc");
+require_once($include_dir . "/../../data/include/mobile.inc");
+require_once($include_dir . "/../../data/lib/glib.php");
+require_once($include_dir . "/../../data/lib/slib.php");
+require_once($include_dir . "/../../data/class/SC_View.php");
+require_once($include_dir . "/../../data/class/SC_DbConn.php");
+require_once($include_dir . "/../../data/class/SC_Session.php");
+require_once($include_dir . "/../../data/class/SC_Query.php");
+require_once($include_dir . "/../../data/class/SC_SelectSql.php");
+require_once($include_dir . "/../../data/class/SC_CheckError.php");
+require_once($include_dir . "/../../data/class/SC_PageNavi.php");
+require_once($include_dir . "/../../data/class/SC_Date.php");
+require_once($include_dir . "/../../data/class/SC_Image.php");
+require_once($include_dir . "/../../data/class/SC_UploadFile.php");
+require_once($include_dir . "/../../data/class/SC_SiteInfo.php");
+require_once($include_dir . "/../../data/class/GC_SendMail.php");
+require_once($include_dir . "/../../data/class/SC_FormParam.php");
+require_once($include_dir . "/../../data/class/SC_CartSession.php");
+require_once($include_dir . "/../../data/class/SC_SiteSession.php");
+require_once($include_dir . "/../../data/class/SC_Customer.php");
+require_once($include_dir . "/../../data/class/SC_Cookie.php");
+require_once($include_dir . "/../../data/class/SC_Page.php");
+require_once($include_dir . "/../../data/class/SC_Pdf.php");
+require_once($include_dir . "/../../data/class/GC_MobileUserAgent.php");
+require_once($include_dir . "/../../data/class/GC_MobileEmoji.php");
+require_once($include_dir . "/../../data/include/page_layout.inc");
+
+// ¥¢¥Ã¥×¥Ç¡¼¥È¤Ç¼èÆÀ¤·¤¿PHP¤òÆÉ¤ß½Ð¤¹
+sfLoadUpdateModule();
+
+// ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤Î½é´ü½èÍý¤ò¼Â¹Ô¤¹¤ë¡£
+sfMobileInit();
+?>
Index: /temp/branches/mobile/html/mobile/products/search.php
===================================================================
--- /temp/branches/mobile/html/mobile/products/search.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/products/search.php	(revision 11398)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¾¦ÉÊ¸¡º÷¥Õ¥©¡¼¥à
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		$this->tpl_mainpage = 'products/search.tpl';			// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¾¦ÉÊ¸¡º÷';
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: /temp/branches/mobile/html/mobile/products/category_list.php
===================================================================
--- /temp/branches/mobile/html/mobile/products/category_list.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/products/category_list.php	(revision 11398)
@@ -0,0 +1,89 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¥«¥Æ¥´¥ê¡¼°ìÍ÷
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		$this->tpl_mainpage = 'products/category_list.tpl';			// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¥«¥Æ¥´¥ê°ìÍ÷¥Ú¡¼¥¸';
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+// ¥«¥Æ¥´¥ê¡¼¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
+lfGetCategories(@$_GET['category_id'], true, $objPage);
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+/**
+ * ÁªÂò¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼¤È¤½¤Î»Ò¥«¥Æ¥´¥ê¡¼¤Î¾ðÊó¤ò¼èÆÀ¤·¡¢
+ * ¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤Ë³ÊÇ¼¤¹¤ë¡£
+ *
+ * @param string $category_id ¥«¥Æ¥´¥ê¡¼ID
+ * @param boolean $count_check Í­¸ú¤Ê¾¦ÉÊ¤¬¤Ê¤¤¥«¥Æ¥´¥ê¡¼¤ò½ü¤¯¤«¤É¤¦¤«
+ * @param object &$objPage ¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È
+ * @return void
+ */
+function lfGetCategories($category_id, $count_check = false, &$objPage) {
+	// ¥«¥Æ¥´¥ê¡¼¤ÎÀµ¤·¤¤ID¤ò¼èÆÀ¤¹¤ë¡£
+	$category_id = sfGetCategoryId('', $category_id);
+	if ($category_id == 0) {
+		sfDispSiteError(CATEGORY_NOT_FOUND);
+	}
+
+	$arrCategory = null;	// ÁªÂò¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼
+	$arrChildren = array();	// »Ò¥«¥Æ¥´¥ê¡¼
+
+	$arrAll = sfGetCatTree($category_id, $count_check);
+	foreach ($arrAll as $category) {
+		// ÁªÂò¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼¤Î¾ì¹ç
+		if ($category['category_id'] == $category_id) {
+			$arrCategory = $category;
+			continue;
+		}
+
+		// ´Ø·¸¤Î¤Ê¤¤¥«¥Æ¥´¥ê¡¼¤Ï¥¹¥­¥Ã¥×¤¹¤ë¡£
+		if ($category['parent_category_id'] != $category_id) {
+			continue;
+		}
+
+		// »Ò¥«¥Æ¥´¥ê¡¼¤Î¾ì¹ç¤Ï¡¢Â¹¥«¥Æ¥´¥ê¡¼¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£
+		$arrGrandchildrenID = sfGetUnderChildrenArray($arrAll, 'parent_category_id', 'category_id', $category['category_id']);
+		$category['has_children'] = count($arrGrandchildrenID) > 0;
+		$arrChildren[] = $category;
+	}
+
+	if (!isset($arrCategory)) {
+		sfDispSiteError(CATEGORY_NOT_FOUND);
+	}
+
+	// »Ò¥«¥Æ¥´¥ê¡¼¤Î¾¦ÉÊ¿ô¤ò¹ç·×¤¹¤ë¡£
+	$children_product_count = 0;
+	foreach ($arrChildren as $category) {
+		$children_product_count += $category['product_count'];
+	}
+
+	// ÁªÂò¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼¤ËÄ¾Â°¤Î¾¦ÉÊ¤¬¤¢¤ë¾ì¹ç¤Ï¡¢»Ò¥«¥Æ¥´¥ê¡¼¤ÎÀèÆ¬¤ËÄÉ²Ã¤¹¤ë¡£
+	if ($arrCategory['product_count'] > $children_product_count) {
+		$arrCategory['product_count'] -= $children_product_count;	// »Ò¥«¥Æ¥´¥ê¡¼¤Î¾¦ÉÊ¿ô¤ò½ü¤¯¡£
+		$arrCategory['has_children'] = false;	// ¾¦ÉÊ°ìÍ÷¥Ú¡¼¥¸¤ËÁ«°Ü¤µ¤»¤ë¤¿¤á¡£
+		array_unshift($arrChildren, $arrCategory);
+	}
+
+	// ·ë²Ì¤ò³ÊÇ¼¤¹¤ë¡£
+	$objPage->arrCategory = $arrCategory;
+	$objPage->arrChildren = $arrChildren;
+}
+?>
Index: /temp/branches/mobile/html/mobile/products/list.php
===================================================================
--- /temp/branches/mobile/html/mobile/products/list.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/products/list.php	(revision 11398)
@@ -0,0 +1,406 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¾¦ÉÊ°ìÍ÷
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		global $arrSTATUS;
+		$this->arrSTATUS = $arrSTATUS;
+		global $arrSTATUS_IMAGE;
+		$this->arrSTATUS_IMAGE = $arrSTATUS_IMAGE;
+		global $arrDELIVERYDATE;
+		$this->arrDELIVERYDATE = $arrDELIVERYDATE;
+		global $arrPRODUCTLISTMAX;
+		$this->arrPRODUCTLISTMAX = $arrPRODUCTLISTMAX;		
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');
+	}
+}
+
+$objPage = new LC_Page();
+$conn = new SC_DBConn();
+
+//É½¼¨·ï¿ô¤ÎÁªÂò
+if(sfIsInt($_POST['disp_number'])) {
+	$objPage->disp_number = $_POST['disp_number'];
+} else {
+	//ºÇ¾®É½¼¨·ï¿ô¤òÁªÂò
+	$objPage->disp_number = current(array_keys($arrPRODUCTLISTMAX));
+}
+
+//É½¼¨½ç½ø¤ÎÊÝÂ¸
+$objPage->orderby = $_POST['orderby'];
+
+// GET¤Î¥«¥Æ¥´¥êID¤ò¸µ¤ËÀµ¤·¤¤¥«¥Æ¥´¥êID¤ò¼èÆÀ¤¹¤ë¡£
+$category_id = sfGetCategoryId("", $_GET['category_id']);
+
+// ¥¿¥¤¥È¥ëÊÔ½¸
+$tpl_subtitle = "";
+if($_GET['mode'] == 'search'){
+	$tpl_subtitle = "¸¡º÷·ë²Ì";
+}elseif ($category_id == "" ) {
+	$tpl_subtitle = "Á´¾¦ÉÊ";
+}else{
+	$arrFirstCat = GetFirstCat($category_id);
+	$tpl_subtitle = $arrFirstCat['name'];
+}
+
+$objQuery = new SC_Query();
+$count = $objQuery->count("dtb_best_products", "category_id = ?", array($category_id));
+
+// °Ê²¼¤Î¾ò·ï¤ÇBEST¾¦ÉÊ¤òÉ½¼¨¤¹¤ë
+// ¡¦BESTºÇÂç¿ô¤Î¾¦ÉÊ¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¡£
+// ¡¦¥«¥Æ¥´¥êID¤¬¥ë¡¼¥ÈID¤Ç¤¢¤ë¡£
+// ¡¦¸¡º÷¥â¡¼¥É¤Ç¤Ê¤¤¡£
+if(($count >= BEST_MIN) && lfIsRootCategory($category_id) && ($_GET['mode'] != 'search') ) {
+	// ¾¦ÉÊTOP¤ÎÉ½¼¨½èÍý
+	/** É¬¤º»ØÄê¤¹¤ë **/
+	$objPage->tpl_mainpage = "products/list.tpl";		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È	
+	
+	$objPage->arrBestItems = sfGetBestProducts($conn, $category_id);
+	$objPage->BEST_ROOP_MAX = ceil((BEST_MAX-1)/2);
+} else {
+	if ($_GET['mode'] == 'search' && strlen($_GET['category_id']) == 0 ){
+		// ¸¡º÷»þ¤Ëcategory_id¤¬GET¤ËÂ¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï¡¢²¾¤ËËä¤á¤¿ID¤ò¶õÇò¤ËÌá¤¹
+		$category_id = '';	
+	}
+	
+	// ¾¦ÉÊ°ìÍ÷¤ÎÉ½¼¨½èÍý
+	$objPage = lfDispProductsList($category_id, $_GET['name'], $objPage->disp_number, $_POST['orderby']);
+	
+	// ¸¡º÷¾ò·ï¤ò²èÌÌ¤ËÉ½¼¨
+	// ¥«¥Æ¥´¥ê¡¼¸¡º÷¾ò·ï
+	if (strlen($_GET['category_id']) == 0) {
+		$arrSearch['category'] = "»ØÄê¤Ê¤·";
+	}else{
+		$arrCat = $conn->getOne("SELECT category_name FROM dtb_category WHERE category_id = ?",array($category_id));
+		$arrSearch['category'] = $arrCat;
+	}
+	
+	// ¾¦ÉÊÌ¾¸¡º÷¾ò·ï
+	if ($_GET['name'] === "") {
+		$arrSearch['name'] = "»ØÄê¤Ê¤·";
+	}else{
+		$arrSearch['name'] = $_GET['name'];
+	}
+}
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "products/list.php");
+
+if($_POST['mode'] == "cart" && $_POST['product_id'] != "") {
+	// ÃÍ¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯
+	if(!sfIsInt($_POST['product_id']) || !sfIsRecord("dtb_products", "product_id", $_POST['product_id'], "del_flg = 0 AND status = 1")) {
+		sfDispSiteError(PRODUCT_NOT_FOUND);
+	} else {
+		// ÆþÎÏÃÍ¤ÎÊÑ´¹
+		$objPage->arrErr = lfCheckError($_POST['product_id']);
+		if(count($objPage->arrErr) == 0) {
+			$objCartSess = new SC_CartSession();
+			$classcategory_id = "classcategory_id". $_POST['product_id'];
+			$classcategory_id1 = $_POST[$classcategory_id. '_1'];
+			$classcategory_id2 = $_POST[$classcategory_id. '_2'];
+			$quantity = "quantity". $_POST['product_id'];
+			// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+			if(!$objPage->tpl_classcat_find1[$_POST['product_id']]) {
+				$classcategory_id1 = '0';
+			}
+			// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+			if(!$objPage->tpl_classcat_find2[$_POST['product_id']]) {
+				$classcategory_id2 = '0';
+			}
+			$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
+			$objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $_POST[$quantity]);
+			header("Location: " . URL_CART_TOP);
+			exit;
+		}
+	}
+}
+
+
+$objPage->tpl_subtitle = $tpl_subtitle;
+
+// »ÙÊ§ÊýË¡¤Î¼èÆÀ
+$objPage->arrPayment = lfGetPayment();
+// ÆþÎÏ¾ðÊó¤òÅÏ¤¹
+$objPage->arrForm = $_POST;
+
+$objPage->category_id = $category_id;
+$objPage->arrSearch = $arrSearch;
+
+sfCustomDisplay($objPage);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+/* ¥«¥Æ¥´¥êID¤¬¥ë¡¼¥È¤«¤É¤¦¤«¤ÎÈ½Äê */
+function lfIsRootCategory($category_id) {
+	$objQuery = new SC_Query();
+	$level = $objQuery->get("dtb_category", "level", "category_id = ?", array($category_id));
+	if($level == 1) {
+		return true;
+	}
+	return false;
+}
+
+/* ¾¦ÉÊ°ìÍ÷¤ÎÉ½¼¨ */
+function lfDispProductsList($category_id, $name, $disp_num, $orderby) {
+	global $objPage;
+	$objQuery = new SC_Query();	
+	$objPage->tpl_pageno = $_POST['pageno'];
+
+	//É½¼¨·ï¿ô¤Ç¥Æ¥ó¥×¥ì¡¼¥È¤òÀÚ¤êÂØ¤¨¤ë
+	$objPage->tpl_mainpage = "products/list.tpl";		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È		
+
+	//É½¼¨½ç½ø
+	switch($orderby) {
+	//²Á³Ê½ç
+	case 'price':
+		$order = "price02_min ASC";
+		break;
+	//¿·Ãå½ç
+	case 'date':
+		$order = "create_date DESC";
+		break;
+	default:
+		$order = "category_rank DESC, rank DESC";
+		break;
+	}
+	
+	// ¾¦ÉÊ¸¡º÷¾ò·ï¤ÎºîÀ®¡ÊÌ¤ºï½ü¡¢É½¼¨¡Ë
+	$where = "del_flg = 0 AND status = 1 ";
+	// ¥«¥Æ¥´¥ê¤«¤é¤ÎWHEREÊ¸»úÎó¼èÆÀ
+	if ( $category_id ) {
+		$where .= 'AND category_id = ?';
+		$arrval = array($category_id);
+	}
+		
+	// ¾¦ÉÊÌ¾¤òwhereÊ¸¤Ë
+	$name = ereg_replace(",", "", $name);
+	if ( strlen($name) > 0 ){
+		$where .= " AND ( name ILIKE ? OR comment3 ILIKE ?) ";
+		$ret = sfManualEscape($name);		
+		$arrval[] = "%$ret%";
+		$arrval[] = "%$ret%";
+	}
+			
+	// ¹Ô¿ô¤Î¼èÆÀ
+	$linemax = $objQuery->count("vw_products_allclass AS allcls", $where, $arrval);
+	$objPage->tpl_linemax = $linemax;	// ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ
+	
+	// ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ
+	$objNavi = new SC_PageNavi($_POST['pageno'], $linemax, $disp_num, "fnNaviPage", NAVI_PMAX);
+	
+	$strnavi = $objNavi->strnavi;
+	$strnavi = str_replace('onclick="fnNaviPage', 'onclick="form1.mode.value=\''.'\'; fnNaviPage', $strnavi);
+	$objPage->tpl_strnavi = $strnavi;		// É½¼¨Ê¸»úÎó
+	$startno = $objNavi->start_row;					// ³«»Ï¹Ô
+	
+	// ¼èÆÀÈÏ°Ï¤Î»ØÄê(³«»Ï¹ÔÈÖ¹æ¡¢¹Ô¿ô¤Î¥»¥Ã¥È)
+	$objQuery->setlimitoffset($disp_num, $startno);
+	// É½¼¨½ç½ø
+	$objQuery->setorder($order);
+	// ¸¡º÷·ë²Ì¤Î¼èÆÀ
+	$objPage->arrProducts = $objQuery->select("*", "vw_products_allclass AS allcls", $where, $arrval);
+	
+	// µ¬³ÊÌ¾°ìÍ÷
+	$arrClassName = sfGetIDValueList("dtb_class", "class_id", "name");
+	// µ¬³ÊÊ¬ÎàÌ¾°ìÍ÷
+	$arrClassCatName = sfGetIDValueList("dtb_classcategory", "classcategory_id", "name");
+	// ´ë²è¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÀßÄê
+	if($disp_num == 15) {
+		for($i = 0; $i < count($objPage->arrProducts); $i++) {
+			$objPage = lfMakeSelect($objPage->arrProducts[$i]['product_id'], $arrClassName, $arrClassCatName);
+			// ¹ØÆþÀ©¸Â¿ô¤ò¼èÆÀ
+			$objPage = lfGetSaleLimit($objPage->arrProducts[$i]);
+		}
+	}
+
+	return $objPage;
+}
+
+/* µ¬³Ê¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹¤ÎºîÀ® */
+function lfMakeSelect($product_id, $arrClassName, $arrClassCatName) {
+	global $objPage;
+	
+	$classcat_find1 = false;
+	$classcat_find2 = false;
+	// ºß¸Ë¤¢¤ê¤Î¾¦ÉÊ¤ÎÍ­Ìµ
+	$stock_find = false;
+	
+	// ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ	
+	$arrProductsClass = lfGetProductsClass($product_id);
+	
+	// µ¬³Ê1¥¯¥é¥¹Ì¾¤Î¼èÆÀ
+	$objPage->tpl_class_name1[$product_id] = $arrClassName[$arrProductsClass[0]['class_id1']];
+	// µ¬³Ê2¥¯¥é¥¹Ì¾¤Î¼èÆÀ
+	$objPage->tpl_class_name2[$product_id] = $arrClassName[$arrProductsClass[0]['class_id2']];
+	
+	// ¤¹¤Ù¤Æ¤ÎÁÈ¤ß¹ç¤ï¤»¿ô	
+	$count = count($arrProductsClass);
+	
+	$classcat_id1 = "";
+	
+	$arrSele = array();
+	$arrList = array();
+	
+	$list_id = 0;
+	$arrList[0] = "\tlist". $product_id. "_0 = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤'";
+	$arrVal[0] = "\tval". $product_id. "_0 = new Array(''";
+	
+	for ($i = 0; $i < $count; $i++) {
+		// ºß¸Ë¤Î¥Á¥§¥Ã¥¯
+		if($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') {
+			continue;
+		}
+		
+		$stock_find = true;
+		
+		// µ¬³Ê1¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ
+		if($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']){
+			$arrList[$list_id].=");\n";
+			$arrVal[$list_id].=");\n";
+			$classcat_id1 = $arrProductsClass[$i]['classcategory_id1'];
+			$arrSele[$classcat_id1] = $arrClassCatName[$classcat_id1];
+			$list_id++;
+		}
+		
+		// µ¬³Ê2¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ
+		$classcat_id2 = $arrProductsClass[$i]['classcategory_id2'];
+		
+		// ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹É½¼¨ÃÍ
+		if($arrList[$list_id] == "") {
+			$arrList[$list_id] = "\tlist". $product_id. "_". $list_id. " = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤', '". $arrClassCatName[$classcat_id2]. "'";
+		} else {
+			$arrList[$list_id].= ", '".$arrClassCatName[$classcat_id2]."'";
+		}
+		
+		// ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹POSTÃÍ
+		if($arrVal[$list_id] == "") {
+			$arrVal[$list_id] = "\tval". $product_id. "_". $list_id. " = new Array('', '". $classcat_id2. "'";
+		} else {
+			$arrVal[$list_id].= ", '".$classcat_id2."'";
+		}
+	}	
+	
+	$arrList[$list_id].=");\n";
+	$arrVal[$list_id].=");\n";
+		
+	// µ¬³Ê1
+	$objPage->arrClassCat1[$product_id] = $arrSele;
+	
+	$lists = "\tlists".$product_id. " = new Array(";
+	$no = 0;
+	foreach($arrList as $val) {
+		$objPage->tpl_javascript.= $val;
+		if ($no != 0) {
+			$lists.= ",list". $product_id. "_". $no;
+		} else {
+			$lists.= "list". $product_id. "_". $no;
+		}
+		$no++;
+	}
+	$objPage->tpl_javascript.= $lists.");\n";
+	
+	$vals = "\tvals".$product_id. " = new Array(";
+	$no = 0;
+	foreach($arrVal as $val) {
+		$objPage->tpl_javascript.= $val;
+		if ($no != 0) {
+			$vals.= ",val". $product_id. "_". $no;
+		} else {
+			$vals.= "val". $product_id. "_". $no;
+		}
+		$no++;
+	}
+	$objPage->tpl_javascript.= $vals.");\n";
+	
+	// ÁªÂò¤µ¤ì¤Æ¤¤¤ëµ¬³Ê2ID
+	$classcategory_id = "classcategory_id". $product_id;
+	$objPage->tpl_onload .= "lnSetSelect('".$classcategory_id."_1','".$classcategory_id."_2','".$product_id."','".$_POST[$classcategory_id."_2"]."'); ";
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë
+	if($arrProductsClass[0]['classcategory_id1'] != '0') {
+		$classcat_find1 = true;
+	}
+	
+	// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë
+	if($arrProductsClass[0]['classcategory_id2'] != '0') {
+		$classcat_find2 = true;
+	}
+		
+	$objPage->tpl_classcat_find1[$product_id] = $classcat_find1;
+	$objPage->tpl_classcat_find2[$product_id] = $classcat_find2;
+	$objPage->tpl_stock_find[$product_id] = $stock_find;
+		
+	return $objPage;
+}
+/* ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ */
+function lfGetProductsClass($product_id) {
+	$arrRet = array();
+	if(sfIsInt($product_id)) {
+		// ¾¦ÉÊµ¬³Ê¼èÆÀ
+		$objQuery = new SC_Query();
+		$col = "product_class_id, classcategory_id1, classcategory_id2, class_id1, class_id2, stock, stock_unlimited";
+		$table = "vw_product_class AS prdcls";
+		$where = "product_id = ?";
+		$objQuery->setorder("rank1 DESC, rank2 DESC");
+		$arrRet = $objQuery->select($col, $table, $where, array($product_id));
+	}
+	return $arrRet;
+}
+
+/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+function lfCheckError($id) {
+	global $objPage;
+	
+	// ÆþÎÏ¥Ç¡¼¥¿¤òÅÏ¤¹¡£
+	$objErr = new SC_CheckError();
+	
+	$classcategory_id1 = "classcategory_id". $id. "_1";
+	$classcategory_id2 = "classcategory_id". $id. "_2";
+	$quantity = "quantity". $id;
+	// Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯
+	if ($objPage->tpl_classcat_find1[$id]) {
+		$objErr->doFunc(array("µ¬³Ê1", $classcategory_id1, INT_LEN), array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
+	}
+	if ($objPage->tpl_classcat_find2[$id]) {
+		$objErr->doFunc(array("µ¬³Ê2", $classcategory_id2, INT_LEN), array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
+	}
+	$objErr->doFunc(array("¸Ä¿ô", $quantity, INT_LEN), array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
+			
+	return $objErr->arrErr;
+}
+
+// ¹ØÆþÀ©¸Â¿ô¤ÎÀßÄê
+function lfGetSaleLimit($product) {
+	global $objPage;
+	//ºß¸Ë¤¬Ìµ¸Â¤Þ¤¿¤Ï¹ØÆþÀ©¸ÂÃÍ¤¬ÀßÄêÃÍ¤è¤êÂç¤­¤¤¾ì¹ç
+	if($product['sale_unlimited'] == 1 || $product['sale_limit'] > SALE_LIMIT_MAX) {
+		$objPage->tpl_sale_limit[$product['product_id']] = SALE_LIMIT_MAX;
+	} else {
+		$objPage->tpl_sale_limit[$product['product_id']] = $product['sale_limit'];
+	}
+	
+	return $objPage;
+}
+
+//»ÙÊ§ÊýË¡¤Î¼èÆÀ
+//payment_id	1:Âå¶â°ú´¹¡¡2:¶ä¹Ô¿¶¤ê¹þ¤ß¡¡3:¸½¶â½ñÎ±
+function lfGetPayment() {
+	$objQuery = new SC_Query;
+	$col = "payment_id, rule, payment_method";
+	$from = "dtb_payment";
+	$where = "del_flg = 0";
+	$order = "payment_id";
+	$objQuery->setorder($order);
+	$arrRet = $objQuery->select($col, $from, $where);
+	return $arrRet;
+}
+
+?>
Index: /temp/branches/mobile/html/mobile/products/detail.php
===================================================================
--- /temp/branches/mobile/html/mobile/products/detail.php	(revision 11398)
+++ /temp/branches/mobile/html/mobile/products/detail.php	(revision 11398)
@@ -0,0 +1,483 @@
+<?php
+
+require_once("../require.php");
+require_once(DATA_PATH . "include/page_layout.inc");
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		global $arrSTATUS;
+		$this->arrSTATUS = $arrSTATUS;
+		global $arrSTATUS_IMAGE;
+		$this->arrSTATUS_IMAGE = $arrSTATUS_IMAGE;
+		global $arrDELIVERYDATE;
+		$this->arrDELIVERYDATE = $arrDELIVERYDATE;
+		global $arrRECOMMEND;
+		$this->arrRECOMMEND = $arrRECOMMEND;
+		
+		$this->tpl_mainpage="products/detail.tpl";
+		
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objCustomer = new SC_Customer();
+$objQuery = new SC_Query();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "products/detail.php");
+
+// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
+$objFormParam = new SC_FormParam();
+// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+lfInitParam();
+// POSTÃÍ¤Î¼èÆÀ
+$objFormParam->setParam($_POST);
+
+// ¥Õ¥¡¥¤¥ë´ÉÍý¥¯¥é¥¹
+$objUpFile = new SC_UploadFile(IMAGE_TEMP_DIR, IMAGE_SAVE_DIR);
+// ¥Õ¥¡¥¤¥ë¾ðÊó¤Î½é´ü²½
+lfInitFile();
+
+// ´ÉÍý¥Ú¡¼¥¸¤«¤é¤Î³ÎÇ§¤Î¾ì¹ç¤Ï¡¢Èó¸ø³«¤Î¾¦ÉÊ¤âÉ½¼¨¤¹¤ë¡£
+if($_GET['admin'] == 'on') {
+	$where = "del_flg = 0";
+} else {
+	$where = "del_flg = 0 AND status = 1";
+}
+
+if($_POST['mode'] != "") {
+	$tmp_id = $_POST['product_id'];
+} else {
+	$tmp_id = $_GET['product_id'];
+}
+
+// ÃÍ¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯
+if(!sfIsInt($_GET['product_id']) || !sfIsRecord("dtb_products", "product_id", $tmp_id, $where)) {
+	sfDispSiteError(PRODUCT_NOT_FOUND);
+}
+// ¥í¥°¥¤¥óÈ½Äê
+if($objCustomer->isLoginSuccess()) {
+	//¤ªµ¤¤ËÆþ¤ê¥Ü¥¿¥óÉ½¼¨
+	$objPage->tpl_login = true;
+
+/* ±ÜÍ÷¥í¥°µ¡Ç½¤Ï¸½ºßÌ¤»ÈÍÑ
+	
+	$table = "dtb_customer_reading";
+	$where = "customer_id = ? ";
+	$arrval[] = $objCustomer->getValue('customer_id');
+	//¸ÜµÒ¤Î±ÜÍ÷¾¦ÉÊ¿ô
+	$rpcnt = $objQuery->count($table, $where, $arrval);
+
+	//±ÜÍ÷¿ô¤¬ÀßÄê¿ô°Ê²¼
+	if ($rpcnt < CUSTOMER_READING_MAX){
+		//±ÜÍ÷ÍúÎò¤Ë¿·µ¬ÄÉ²Ã
+		lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
+	} else {
+		//±ÜÍ÷ÍúÎò¤ÎÃæ¤Ç°ìÈÖ¸Å¤¤¤â¤Î¤òºï½ü¤·¤Æ¿·µ¬ÄÉ²Ã
+		$oldsql = "SELECT MIN(update_date) FROM ".$table." WHERE customer_id = ?";
+		$old = $objQuery->getone($oldsql, array($objCustomer->getValue("customer_id")));
+		$where = "customer_id = ? AND update_date = ? ";
+		$arrval = array($objCustomer->getValue("customer_id"), $old);
+		//ºï½ü
+		$objQuery->delete($table, $where, $arrval);
+		//ÄÉ²Ã
+		lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
+	}
+*/
+}
+
+
+// µ¬³ÊÁªÂò¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹¤ÎºîÀ®
+$objPage = lfMakeSelect($objPage, $tmp_id);
+
+// ¾¦ÉÊID¤òFORMÆâ¤ËÊÝ»ý¤¹¤ë¡£
+$objPage->tpl_product_id = $tmp_id;
+
+switch($_POST['mode']) {
+case 'select':
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find1) {
+		// template¤ÎÊÑ¹¹
+		$objPage->tpl_mainpage = HTML_PATH . "user_data/templates/select_find1.tpl";
+		break;
+	}
+
+case 'select2':
+	$objPage->arrErr = lfCheckError();
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find1 and $objPage->arrErr['classcategory_id1']) {
+		// template¤ÎÊÑ¹¹
+		$objPage->tpl_mainpage = HTML_PATH . "user_data/templates/select_find1.tpl";
+		break;
+	}
+
+	// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find2) {
+		$objPage->arrErr = array();
+
+		$objPage->tpl_mainpage = HTML_PATH . "user_data/templates/select_find2.tpl";
+		break;
+	}
+
+case 'selectItem':
+	$objPage->arrErr = lfCheckError();
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find2 and $objPage->arrErr['classcategory_id2']) {
+		// template¤ÎÊÑ¹¹
+		$objPage->tpl_mainpage = HTML_PATH . "user_data/templates/select_find2.tpl";
+		break;
+	}
+	// ¾¦ÉÊ¿ô¤ÎÁªÂò¤ò¹Ô¤¦
+	$objPage->tpl_mainpage = HTML_PATH . "user_data/templates/select_item.tpl";
+	break;
+
+case 'cart':
+	// ÆþÎÏÃÍ¤ÎÊÑ´¹
+	$objFormParam->convParam();
+	$objPage->arrErr = lfCheckError();
+	if(count($objPage->arrErr) == 0) {
+		$objCartSess = new SC_CartSession();
+		$classcategory_id1 = $_POST['classcategory_id1'];
+		$classcategory_id2 = $_POST['classcategory_id2'];
+				
+		// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+		if(!$objPage->tpl_classcat_find1) {
+			$classcategory_id1 = '0';
+		}
+		
+		// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+		if(!$objPage->tpl_classcat_find2) {
+			$classcategory_id2 = '0';
+		}
+		
+		$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
+		$objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $objFormParam->getValue('quantity'));
+
+		header("Location: " . URL_CART_TOP . "?" . session_name() . "=" . session_id());
+
+		exit;
+	}
+	break;
+		
+default:
+	break;
+}
+
+$objQuery = new SC_Query();
+// DB¤«¤é¾¦ÉÊ¾ðÊó¤ò¼èÆÀ¤¹¤ë¡£
+$arrRet = $objQuery->select("*", "vw_products_allclass_detail AS alldtl", "product_id = ?", array($tmp_id));
+$objPage->arrProduct = $arrRet[0];
+
+// ¾¦ÉÊ¥³¡¼¥É¤Î¼èÆÀ
+$code_sql = "SELECT product_code FROM dtb_products_class AS prdcls WHERE prdcls.product_id = ? GROUP BY product_code ORDER BY product_code";
+$arrProductCode = $objQuery->getall($code_sql, array($tmp_id));
+$arrProductCode = sfswaparray($arrProductCode);
+$objPage->arrProductCode = $arrProductCode["product_code"];
+
+// ¹ØÆþÀ©¸Â¿ô¤ò¼èÆÀ
+if($objPage->arrProduct['sale_unlimited'] == 1 || $objPage->arrProduct['sale_limit'] > SALE_LIMIT_MAX) {
+  $objPage->tpl_sale_limit = SALE_LIMIT_MAX;
+} else {
+  $objPage->tpl_sale_limit = $objPage->arrProduct['sale_limit'];
+}
+
+// ¥µ¥Ö¥¿¥¤¥È¥ë¤ò¼èÆÀ
+$arrFirstCat = GetFirstCat($arrRet[0]['category_id']);
+$tpl_subtitle = $arrFirstCat['name'];
+$objPage->tpl_subtitle = $tpl_subtitle;
+
+// DB¤«¤é¤Î¥Ç¡¼¥¿¤ò°ú¤­·Ñ¤°
+$objUpFile->setDBFileList($objPage->arrProduct);
+// ¥Õ¥¡¥¤¥ëÉ½¼¨ÍÑÇÛÎó¤òÅÏ¤¹
+$objPage->arrFile = $objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true);
+// »ÙÊ§ÊýË¡¤Î¼èÆÀ
+$objPage->arrPayment = lfGetPayment();
+// ÆþÎÏ¾ðÊó¤òÅÏ¤¹
+$objPage->arrForm = $objFormParam->getFormParamList();
+//¥ì¥Ó¥å¡¼¾ðÊó¤Î¼èÆÀ
+$objPage->arrReview = lfGetReviewData($tmp_id);
+// ¥¿¥¤¥È¥ë¤Ë¾¦ÉÊÌ¾¤òÆþ¤ì¤ë
+$objPage->tpl_title = "¾¦ÉÊ¾ÜºÙ ". $objPage->arrProduct["name"];
+//¥ª¥¹¥¹¥á¾¦ÉÊ¾ðÊóÉ½¼¨
+$objPage->arrRecommend = lfPreGetRecommendProducts($tmp_id);
+//¤³¤Î¾¦ÉÊ¤òÇã¤Ã¤¿¿Í¤Ï¤³¤ó¤Ê¾¦ÉÊ¤âÇã¤Ã¤Æ¤¤¤Þ¤¹
+$objPage->arrRelateProducts = lfGetRelateProducts($tmp_id);
+
+// ³ÈÂç²èÁü¤Î¥¦¥£¥ó¥É¥¦¥µ¥¤¥º¤ò¥»¥Ã¥È
+list($large_width, $large_height) = getimagesize(IMAGE_SAVE_DIR . basename($objPage->arrFile["main_large_image"]["filepath"]));
+$objPage->tpl_large_width = $large_width + 60;
+$objPage->tpl_large_height = $large_height + 80;
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//-----------------------------------------------------------------------------------------------------------------------------------
+/* ¥Õ¥¡¥¤¥ë¾ðÊó¤Î½é´ü²½ */
+function lfInitFile() {
+	global $objUpFile;
+	$objUpFile->addFile("°ìÍ÷-¥á¥¤¥ó²èÁü", 'main_list_image', array('jpg','gif'),IMAGE_SIZE, true, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
+	$objUpFile->addFile("¾ÜºÙ-¥á¥¤¥ó²èÁü", 'main_image', array('jpg'), IMAGE_SIZE, true, NORMAL_IMAGE_WIDTH, NORMAL_IMAGE_HEIGHT);
+	$objUpFile->addFile("¾ÜºÙ-¥á¥¤¥ó³ÈÂç²èÁü", 'main_large_image', array('jpg'), IMAGE_SIZE, false, LARGE_IMAGE_HEIGHT, LARGE_IMAGE_HEIGHT);
+	for ($cnt = 1; $cnt <= PRODUCTSUB_MAX; $cnt++) {
+		$objUpFile->addFile("¾ÜºÙ-¥µ¥Ö²èÁü$cnt", "sub_image$cnt", array('jpg'), IMAGE_SIZE, false, NORMAL_SUBIMAGE_HEIGHT, NORMAL_SUBIMAGE_HEIGHT);	
+		$objUpFile->addFile("¾ÜºÙ-¥µ¥Ö³ÈÂç²èÁü$cnt", "sub_large_image$cnt", array('jpg'), IMAGE_SIZE, false, LARGE_SUBIMAGE_HEIGHT, LARGE_SUBIMAGE_HEIGHT);
+	}
+	$objUpFile->addFile("¾¦ÉÊÈæ³Ó²èÁü", 'file1', array('jpg'), IMAGE_SIZE, false, NORMAL_IMAGE_HEIGHT, NORMAL_IMAGE_HEIGHT);
+	$objUpFile->addFile("¾¦ÉÊ¾ÜºÙ¥Õ¥¡¥¤¥ë", 'file2', array('pdf'), PDF_SIZE, false, 0, 0, false);
+}
+
+/* µ¬³ÊÁªÂò¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹¤ÎºîÀ® */
+function lfMakeSelect($objPage, $product_id) {
+	global $objPage;
+	$classcat_find1 = false;
+	$classcat_find2 = false;
+	// ºß¸Ë¤¢¤ê¤Î¾¦ÉÊ¤ÎÍ­Ìµ
+	$stock_find = false;
+	
+	// µ¬³ÊÌ¾°ìÍ÷
+	$arrClassName = sfGetIDValueList("dtb_class", "class_id", "name");
+	// µ¬³ÊÊ¬ÎàÌ¾°ìÍ÷
+	$arrClassCatName = sfGetIDValueList("dtb_classcategory", "classcategory_id", "name");
+	// ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ	
+	$arrProductsClass = lfGetProductsClass($product_id);
+	
+	// µ¬³Ê1¥¯¥é¥¹Ì¾¤Î¼èÆÀ
+	$objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']];
+	// µ¬³Ê2¥¯¥é¥¹Ì¾¤Î¼èÆÀ
+	$objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']];
+	
+	// ¤¹¤Ù¤Æ¤ÎÁÈ¤ß¹ç¤ï¤»¿ô	
+	$count = count($arrProductsClass);
+	
+	$classcat_id1 = "";
+	
+	$arrSele1 = array();
+	$arrSele2 = array();
+	$arrList = array();
+	
+	$list_id = 0;
+	$arrList[0] = "\tlist0 = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤'";
+	$arrVal[0] = "\tval0 = new Array(''";
+	
+	for ($i = 0; $i < $count; $i++) {
+		// ºß¸Ë¤Î¥Á¥§¥Ã¥¯
+		if($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') {
+			continue;
+		}
+		
+		$stock_find = true;
+		
+		// µ¬³Ê1¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ
+		if($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']){
+			$arrList[$list_id].=");\n";
+			$arrVal[$list_id].=");\n";
+			$classcat_id1 = $arrProductsClass[$i]['classcategory_id1'];
+			$arrSele1[$classcat_id1] = $arrClassCatName[$classcat_id1];
+		}
+
+		// µ¬³Ê2¤Î¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹ÍÑ
+		if($arrProductsClass[$i]['classcategory_id1'] == $_POST['classcategory_id1'] and $classcat_id2 != $arrProductsClass[$i]['classcategory_id2']) {
+			$classcat_id2 = $arrProductsClass[$i]['classcategory_id2'];
+			$arrSele2[$list_id] = $arrClassCatName[$classcat_id2];
+		}
+
+		$list_id++;
+
+		// ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹É½¼¨ÃÍ
+		if($arrList[$list_id] == "") {
+			$arrList[$list_id] = "\tlist".$list_id." = new Array('ÁªÂò¤·¤Æ¤¯¤À¤µ¤¤', '".$arrClassCatName[$classcat_id2]."'";
+		} else {
+			$arrList[$list_id].= ", '".$arrClassCatName[$classcat_id2]."'";
+		}
+		
+		// ¥»¥ì¥¯¥È¥Ü¥Ã¥¯¥¹POSTÃÍ
+		if($arrVal[$list_id] == "") {
+			$arrVal[$list_id] = "\tval".$list_id." = new Array('', '".$classcat_id2."'";
+		} else {
+			$arrVal[$list_id].= ", '".$classcat_id2."'";
+		}
+	}	
+	
+	//$arrList[$list_id].=");\n";
+	$arrVal[$list_id].=");\n";
+		
+	// µ¬³Ê1
+	$objPage->arrClassCat1 = $arrSele1;
+	$objPage->arrClassCat2 = $arrSele2;
+	
+	//$lists = "\tlists = new Array(";
+	//$no = 0;
+	
+	//foreach($arrList as $val) {
+	//	$objPage->tpl_javascript.= $val;
+	//	if ($no != 0) {
+	//		$lists.= ",list".$no;
+	//	} else {
+	//		$lists.= "list".$no;
+	//	}
+	//	$no++;
+	//}
+	//$objPage->tpl_javascript.=$lists.");\n";
+	
+	$vals = "\tvals = new Array(";
+	$no = 0;
+	
+	//foreach($arrVal as $val) {
+	//	$objPage->tpl_javascript.= $val;
+	//	if ($no != 0) {
+	//		$vals.= ",val".$no;
+	//	} else {
+	//		$vals.= "val".$no;
+	//	}
+	//	$no++;
+	//}
+	//$objPage->tpl_javascript.=$vals.");\n";
+	
+	// ÁªÂò¤µ¤ì¤Æ¤¤¤ëµ¬³Ê2ID
+	$objPage->tpl_onload = "lnSetSelect('form1', 'classcategory_id1', 'classcategory_id2', '" . $_POST['classcategory_id2'] . "');";
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë
+	if($arrProductsClass[0]['classcategory_id1'] != '0') {
+		$classcat_find1 = true;
+	}
+	
+	// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë
+	if($arrProductsClass[0]['classcategory_id2'] != '0') {
+		$classcat_find2 = true;
+	}
+		
+	$objPage->tpl_classcat_find1 = $classcat_find1;
+	$objPage->tpl_classcat_find2 = $classcat_find2;
+	$objPage->tpl_stock_find = $stock_find;
+		
+	return $objPage;
+}
+
+/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+function lfInitParam() {
+	global $objFormParam;
+
+	$objFormParam->addParam("µ¬³Ê1", "classcategory_id1", INT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("µ¬³Ê2", "classcategory_id2", INT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¸Ä¿ô", "quantity", INT_LEN, "n", array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
+}
+
+/* ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ */
+function lfGetProductsClass($product_id) {
+	$arrRet = array();
+	if(sfIsInt($product_id)) {
+		// ¾¦ÉÊµ¬³Ê¼èÆÀ
+		$objQuery = new SC_Query();
+		$col = "product_class_id, classcategory_id1, classcategory_id2, class_id1, class_id2, stock, stock_unlimited";
+		$table = "vw_product_class AS prdcls";
+		$where = "product_id = ?";
+		$objQuery->setorder("rank1 DESC, rank2 DESC");
+		$arrRet = $objQuery->select($col, $table, $where, array($product_id));
+	}
+	return $arrRet;
+}
+
+/* ÅÐÏ¿ºÑ¤ß¥ª¥¹¥¹¥á¾¦ÉÊ¤ÎÆÉ¤ß¹þ¤ß */
+function lfPreGetRecommendProducts($product_id) {
+	$objQuery = new SC_Query();
+	$objQuery->setorder("rank DESC");
+	$arrRet = $objQuery->select("recommend_product_id, comment", "dtb_recommend_products", "product_id = ?", array($product_id));
+	$max = count($arrRet);
+	$no = 0;
+	for($i = 0; $i < $max; $i++) {
+		$where = "del_flg = 0 AND product_id = ? AND status = 1";
+		$arrProductInfo = $objQuery->select("main_list_image, price02_min, price02_max, price01_min, price01_max, name, point_rate", "vw_products_allclass  AS allcls", $where, array($arrRet[$i]['recommend_product_id'])); 
+				
+		if(count($arrProductInfo) > 0) {
+			$arrRecommend[$no] = $arrProductInfo[0];
+			$arrRecommend[$no]['product_id'] = $arrRet[$i]['recommend_product_id'];
+			$arrRecommend[$no]['comment'] = $arrRet[$i]['comment'];
+			$no++;
+		}	
+	}
+	return $arrRecommend;
+}
+
+/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+function lfCheckError() {
+	global $objFormParam;
+	global $objPage;
+	// ÆþÎÏ¥Ç¡¼¥¿¤òÅÏ¤¹¡£
+	$arrRet =  $objFormParam->getHashArray();
+	$objErr = new SC_CheckError($arrRet);
+	$objErr->arrErr = $objFormParam->checkError();
+		
+	// Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯
+	if ($objPage->tpl_classcat_find1) {
+		$objErr->doFunc(array("µ¬³Ê1", "classcategory_id1"), array("EXIST_CHECK"));
+	}
+	if ($objPage->tpl_classcat_find2) {
+		$objErr->doFunc(array("µ¬³Ê2", "classcategory_id2"), array("EXIST_CHECK"));
+	}
+
+	return $objErr->arrErr;
+}
+
+//±ÜÍ÷ÍúÎò¿·µ¬ÅÐÏ¿
+function lfRegistReadingData($tmp_id, $customer_id){
+	$objQuery = new SC_Query;
+	$sqlval['customer_id'] = $customer_id;
+	$sqlval['reading_product_id'] = $tmp_id;
+	$sqlval['create_date'] = 'NOW()';
+	$sqlval['update_date'] = 'NOW()';
+	$objQuery->insert("dtb_customer_reading", $sqlval);
+}
+
+//¤³¤Î¾¦ÉÊ¤òÇã¤Ã¤¿¿Í¤Ï¤³¤ó¤Ê¾¦ÉÊ¤âÇã¤Ã¤Æ¤¤¤Þ¤¹
+function lfGetRelateProducts($tmp_id) {
+	$objQuery = new SC_Query;
+	//¼«Æ°Ãê½Ð
+	$objQuery->setorder("random()");
+	//É½¼¨·ï¿ô¤ÎÀ©¸Â
+	$objQuery->setlimit(RELATED_PRODUCTS_MAX);
+	//¸¡º÷¾ò·ï
+	$col = "name, main_list_image, price01_min, price02_min, price01_max, price02_max, point_rate";
+	$from = "vw_products_allclass AS allcls ";
+	$where = "del_flg = 0 AND status = 1 AND (stock_max <> 0 OR stock_max IS NULL) AND product_id = ? ";
+	$arrval[] = $tmp_id;
+	//·ë²Ì¤Î¼èÆÀ
+	$arrProducts = $objQuery->select($col, $from, $where, $arrval);
+	
+	return $arrProducts;
+}
+
+//¾¦ÉÊ¤´¤È¤Î¥ì¥Ó¥å¡¼¾ðÊó¤ò¼èÆÀ¤¹¤ë
+function lfGetReviewData($id) {
+	$objQuery = new SC_Query;
+	//¾¦ÉÊ¤´¤È¤Î¥ì¥Ó¥å¡¼¾ðÊó¤ò¼èÆÀ¤¹¤ë
+	$col = "create_date, reviewer_url, reviewer_name, recommend_level, title, comment";
+	$from = "dtb_review";
+	$where = "del_flg = 0 AND status = 1 AND product_id = ? ";
+	$arrval[] = $id;
+	$arrReview = $objQuery->select($col, $from, $where, $arrval);
+	return $arrReview; 
+}
+
+//»ÙÊ§ÊýË¡¤Î¼èÆÀ
+//payment_id	1:¥¯¥ì¥¸¥Ã¥È¡¡2:¥·¥ç¥Ã¥Ô¥ó¥°¥í¡¼¥ó	
+function lfGetPayment() {
+	$objQuery = new SC_Query;
+	$col = "payment_id, rule, payment_method";
+	$from = "dtb_payment";
+	$where = "del_flg = 0";
+	$order = "payment_id";
+	$objQuery->setorder($order);
+	$arrRet = $objQuery->select($col, $from, $where);
+	return $arrRet;
+}
+
+?>
Index: /temp/branches/mobile/html/require.php
===================================================================
--- /temp/branches/mobile/html/require.php	(revision 9552)
+++ /temp/branches/mobile/html/require.php	(revision 11398)
@@ -30,4 +30,6 @@
 require_once($include_dir . "/../data/class/SC_Page.php");
 require_once($include_dir . "/../data/class/SC_Pdf.php");
+require_once($include_dir . "/../data/class/GC_MobileUserAgent.php");
+require_once($include_dir . "/../data/class/GC_MobileEmoji.php");
 require_once($include_dir . "/../data/include/page_layout.inc");
 
@@ -35,3 +37,11 @@
 sfLoadUpdateModule();
 
+// ·ÈÂÓÃ¼Ëö¤Î¾ì¹ç¤Ï mobile °Ê²¼¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+if (GC_MobileUserAgent::isMobile()) {
+	header("Location: " . URL_DIR . "mobile/");
+	exit;
+}
+
+// ³¨Ê¸»úÊÑ´¹ (½üµî) ¥Õ¥£¥ë¥¿¡¼¤òÁÈ¤ß¹þ¤à¡£
+ob_start(array('GC_MobileEmoji', 'handler'));
 ?>
Index: /temp/branches/mobile/data/Smarty/templates/mobile/top.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/top.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/top.tpl	(revision 11398)
@@ -0,0 +1,35 @@
+<!-- ¢§¥í¥´ ¤³¤³¤«¤é -->
+<center><img src="<!--{$smarty.const.PC_URL_DIR}-->img/header/logo.gif"></center>
+<!-- ¢¥¥í¥´ ¤³¤³¤Þ¤Ç -->
+
+<br>
+
+<!-- ¢§¿·Ãå¾ðÊó ¤³¤³¤«¤é -->
+<!--{include_php file=`$smarty.const.HTML_PATH`frontparts/bloc/news.php}-->
+<!-- ¢¥¿·Ãå¾ðÊó ¤³¤³¤Þ¤Ç -->
+
+<br>
+
+<!-- ¢§¥Ô¥Ã¥¯¥¢¥Ã¥×¾¦ÉÊ ¤³¤³¤«¤é -->
+<hr>
+<!--{include_php file=`$smarty.const.HTML_PATH`frontparts/bloc/best5.php}-->
+<hr>
+<!-- ¢¥¥Ô¥Ã¥¯¥¢¥Ã¥×¾¦ÉÊ ¤³¤³¤Þ¤Ç -->
+
+<br>
+
+<!-- ¢§¥á¥Ë¥å¡¼ ¤³¤³¤«¤é -->
+<!--{1|numeric_emoji}-->¾¦ÉÊ¥«¥Æ¥´¥ê<br>
+<!--{include_php file=`$smarty.const.HTML_PATH`frontparts/bloc/category.php}-->
+<a href="products/search.php" accesskey="2"><!--{2|numeric_emoji}-->¾¦ÉÊ¸¡º÷</a><br>
+<!--XXX--><a href="#" accesskey="3"><!--{3|numeric_emoji}-->¥á¥ë¥Þ¥¬ÅÐÏ¿</a><br>
+<!--XXX--><a href="#" accesskey="4"><!--{4|numeric_emoji}-->²ñ°÷ÅÐÏ¿¡¦Âà²ñ</a><br>
+<!--XXX--><a href="#" accesskey="5"><!--{5|numeric_emoji}-->¤´ÍøÍÑ¥¬¥¤¥É</a><br>
+<!--XXX--><a href="#" accesskey="6"><!--{6|numeric_emoji}-->¤ªÌä¤¤¹ç¤»</a><br>
+<!-- ¢¥¥á¥Ë¥å¡¼ ¤³¤³¤Þ¤Ç -->
+
+<br>
+
+<!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é -->
+<!--{include file='footer.tpl'}-->
+<!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç -->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/news.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/news.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/news.tpl	(revision 11398)
@@ -0,0 +1,11 @@
+<!--{if count($arrNews) > 0}-->
+<center>
+¡½¡½¡½¡½¡½¡½¡½¡½¡½<br>
+<marquee>
+<!--{if $arrNews[0].news_url}--><a href="<!--{$arrNews[0].news_url|escape}-->"><!--{/if}-->
+<!--{$arrNews[0].news_title|escape}-->
+<!--{if $arrNews[0].news_url}--></a><!--{/if}-->
+</marquee>
+¡½¡½¡½¡½¡½¡½¡½¡½¡½<br>
+</center>
+<!--{/if}-->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/category.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/category.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/category.tpl	(revision 11398)
@@ -0,0 +1,11 @@
+<!--¢§¾¦ÉÊ¥«¥Æ¥´¥ê¡¼¤³¤³¤«¤é-->
+<!--{section name=cnt loop=$arrCat}-->
+<!--{assign var=disp_name value="`$arrCat[cnt].category_name`"}-->
+<!--{if $arrCat[cnt].has_children}-->
+<!--{assign var=path value="`$smarty.const.URL_DIR`products/category_list.php"}-->
+<!--{else}-->
+<!--{assign var=path value="`$smarty.const.URL_DIR`products/list.php"}-->
+<!--{/if}-->
+¡¡<font color="<!--{cycle values="#000000,#880000,#8888ff,#88ff88,#ff0000"}-->">¢£</font><a href="<!--{$path}-->?category_id=<!--{$arrCat[cnt].category_id}-->"><!--{$disp_name|sfCutString:20|escape}--></a><br>
+<!--{/section}-->
+<!--¢¥¾¦ÉÊ¥«¥Æ¥´¥ê¡¼¤³¤³¤Þ¤Ç-->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/best5.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/best5.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/frontparts/bloc/best5.tpl	(revision 11398)
@@ -0,0 +1,14 @@
+<!--{if count($arrBestProducts) > 0}-->
+<center>
+<!--{foreach from=$arrBestProducts item=arrProduct name=best_products}-->
+
+<!-- ¢§¥ª¥¹¥¹¥á¥³¥á¥ó¥È ¤³¤³¤«¤é -->
+<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->">
+<!--{$arrProduct.comment|escape|nl2br}-->
+</a>
+<!-- ¢¥¥ª¥¹¥¹¥á¥³¥á¥ó¥È ¤³¤³¤Þ¤Ç -->
+
+<!--{if !$smarty.foreach.best_products.last}--><br><br><!--{/if}-->
+<!--{/foreach}-->
+</center>
+<!--{/if}-->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/products/detail.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/products/detail.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/products/detail.tpl	(revision 11398)
@@ -0,0 +1,74 @@
+<!--¢§CONTENTS-->
+<!--¢§MAIN CONTENTS-->
+<!--À²ÄÙ¤³¤³¤«¤é-->
+<!--¡ú¾¦ÉÊÌ¾¡ú-->
+<div align="center"><font color="#FF8C00"><!--{$arrProduct.name|escape}-->
+&nbsp;
+<!--¡ú¾¦ÉÊº°ÄÞ¡ú-->
+<!--{assign var=codecnt value=$arrProductCode|@count}-->
+<!--{assign var=codemax value=`$codecnt-1`}-->
+<!--{if $codecnt > 1}-->
+	<!--{$arrProductCode.0}-->¥<!--{$arrProductCode[$codemax]}-->
+<!--{else}-->
+	<!--{$arrProductCode.0}-->
+<!--{/if}-->
+</font></div>
+<hr>
+<!--À²ÄÙ¤³¤³¤Þ¤Ç-->
+<!--¾ÜºÙ¤³¤³¤«¤é-->
+<!--{assign var=key value="main_image"}-->
+<img src="<!--{$arrFile[$key].filepath}-->" /><br>
+<!--¡ú¾ÜºÙÒ²ÝºÒÝÄ¡ú-->
+[emoji:76]<!--{$arrProduct.main_comment|nl2br}--><br>
+<br>
+<!--±²ºÝ-->
+<!--¡ú²Á³Ê¡ú-->
+<font color="#FF0000">²Á³Ê(ÀÇ¹þ):
+<!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
+	<!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
+<!--{else}-->
+	<!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->¥<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
+<!--{/if}-->
+±ß</font><br/>
+<!--{if $arrProduct.price01_max > 0}-->
+<font color="#FF0000">»²¹Í»Ô¾ì²Á³Ê:
+<!--{if $arrProduct.price01_min == $arrProduct.price01_max}-->
+<!--{$arrProduct.price01_min|number_format}-->
+<!--{else}-->
+<!--{$arrProduct.price01_min|number_format}-->¥<!--{$arrProduct.price01_max|number_format}-->
+<!--{/if}-->
+±ß</font><br>
+<!--{/if}-->
+<!--¡úÎß²ÝÄ¡ú-->
+<font color="#FF0000">Îß²ÝÄ:
+<!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
+	<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
+<!--{else}-->
+	<!--{if $arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id == $arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
+		<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
+	<!--{else}-->
+		<!--{$arrProduct.price02_min|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->¥<!--{$arrProduct.price02_max|sfPrePoint:$arrProduct.point_rate:$smarty.const.POINT_RULE:$arrProduct.product_id}-->
+	<!--{/if}-->
+<!--{/if}-->
+Pt</font><br>
+<form name="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->">
+	<input type="hidden" name="mode" value="select">
+	<input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->">
+<!--{if $tpl_stock_find}-->
+	<!--¡ú¾¦ÉÊ¤òÁª¤Ö¡ú-->
+	<input type="submit" name="select" id="cart" value="¤³¤Î¾¦ÉÊ¤òÁª¤Ö"><br>
+<!--{else}-->
+	<font color="#FF0000">¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬¤Âþº£ÉÊÀÚ¤ìÃæ¤Ç¤¹¡</font><br>
+<!--{/if}-->
+<!--¾ÜºÙ¤³¤³¤Þ¤Ç-->
+<!--¢¥CONTENTS-->
+
+<br>
+<a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>
+<a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>
+
+<br>
+
+<!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é -->
+<center>LOCKON CO.,LTD.</center>
+<!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --><!--¢¥MAIN-->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/products/search.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/products/search.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/products/search.tpl	(revision 11398)
@@ -0,0 +1,24 @@
+<center>¾¦ÉÊ¸¡º÷</center>
+
+<hr>
+
+¤ªÃµ¤·¤Î¾¦ÉÊÌ¾¡¦·¿ÈÖ¤òÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br>
+
+<form method="get" action="<!--{$smarty.const.URL_DIR}-->products/list.php">
+<center>
+<input type="hidden" name="mode" value="search">
+<input type="text" name="name" size="18" maxlength="50" value="<!--{$smarty.get.name|escape}-->"><br>
+<input type="submit" name="search" value="¸¡º÷">
+</center>
+</form>
+
+<hr>
+
+<!--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>
+<a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>
+
+<br>
+
+<!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é -->
+<center>LOCKON CO.,LTD.</center>
+<!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç -->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/products/category_list.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/products/category_list.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/products/category_list.tpl	(revision 11398)
@@ -0,0 +1,28 @@
+<center><!--{$arrCategory.category_name|escape}--></center>
+
+<hr>
+
+<!--{foreach from=$arrChildren key=i item=arrChild}-->
+<!--{if $arrChild.has_children}-->
+<!--{assign var=path value="`$smarty.const.URL_DIR`products/category_list.php"}-->
+<!--{else}-->
+<!--{assign var=path value="`$smarty.const.URL_DIR`products/list.php"}-->
+<!--{/if}-->
+<!--{if $i+1<9}-->
+[emoji:<!--{$i+125}-->]<a href="<!--{$path}-->?category_id=<!--{$arrChild.category_id}-->" accesskey="<!--{$i+1}-->"><!--{$arrChild.category_name|escape}-->(<!--{$arrChild.product_count}-->)</a><br>
+<!--{else}-->
+[<!--{$i+1}-->]<a href="<!--{$path}-->?category_id=<!--{$arrChild.category_id}-->"><!--{$arrChild.category_name|escape}-->(<!--{$arrChild.product_count}-->)</a><br>
+<!--{/if}-->
+<!--{/foreach}-->
+
+<br>
+<hr>
+
+<!--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>
+<a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>
+
+<br>
+
+<!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é -->
+<center>LOCKON CO.,LTD.</center>
+<!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç -->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/products/list.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/products/list.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/products/list.tpl	(revision 11398)
@@ -0,0 +1,40 @@
+<!-- ¢§¥¿¥¤¥È¥ë ¤³¤³¤«¤é -->
+<center><!--{$tpl_subtitle|escape}--></center>
+<!-- ¢¥¥¿¥¤¥È¥ë ¤³¤³¤Þ¤Ç -->
+
+<hr>
+
+<!--{foreach from=$arrProducts key=i item=arrProduct}-->
+<!-- ¢§¾¦ÉÊ ¤³¤³¤«¤é -->
+<!--{if $i+1<9}-->[emoji:<!--{$i+125}-->]<!--{else}-->[<!--{$i+1}-->]<!--{/if}-->
+<!-- ¾¦ÉÊÌ¾ --><!--{$arrProduct.name|escape}--><br>
+
+²Á³Ê¡§
+<!--{if $arrProduct.price02_min == $arrProduct.price02_max}-->
+¡ï<!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
+<!--{else}-->
+¡ï<!--{$arrProduct.price02_min|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->¡Á¡ï<!--{$arrProduct.price02_max|sfPreTax:$arrSiteInfo.tax:$arrSiteInfo.tax_rule|number_format}-->
+<!--{/if}-->
+<br>
+
+<div align="right">
+<!--{if $i+1<9}-->
+<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->" accesskey="<!--{$i+1}-->">¾¦ÉÊ¾ÜºÙ¤Ø¢ª</a>
+<!--{else}-->
+<a href="<!--{$smarty.const.DETAIL_P_HTML}--><!--{$arrProduct.product_id}-->">¾¦ÉÊ¾ÜºÙ¤Ø¢ª</a>
+<!--{/if}-->
+</div>
+
+<br>
+<!-- ¢¥¾¦ÉÊ ¤³¤³¤Þ¤Ç -->
+<!--{/foreach}-->
+
+<hr>
+
+<!--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>
+<a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>
+<br>
+
+<!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é -->
+<center>LOCKON CO.,LTD.</center>
+<!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç -->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/site_main.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/site_main.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/site_main.tpl	(revision 11398)
@@ -0,0 +1,9 @@
+<body bgcolor="#ffffff" text="#555555" link="#3a75af" vlink="#3a75af" alink="#3a75af">
+<!--¢§MAIN-->
+<!--{include file=$tpl_mainpage}-->
+<!--¢¥MAIN-->
+<!--{* EBiS¥¿¥°É½¼¨ÍÑ *}-->
+<!--{$tpl_mainpage|sfPrintEbisTag}-->
+<!--{* ¥¢¥Õ¥£¥ê¥¨¥¤¥È¥¿¥°É½¼¨ÍÑ *}-->
+<!--{$tpl_conv_page|sfPrintAffTag:$tpl_aff_option}-->
+</body>
Index: /temp/branches/mobile/data/Smarty/templates/mobile/error.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/error.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/error.tpl	(revision 11398)
@@ -0,0 +1,8 @@
+<!--¢§CONTENTS-->
+<!--¢§MAIN ONTENTS-->
+<!--¡ú¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸--><!--{$tpl_error|escape}--><br>
+<!--{if $return_top}-->
+<a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"><!--{0|numeric_emoji}-->TOP¥Ú¡¼¥¸¤Ø</a>
+<!--{/if}-->
+<!--¢¥MAIN ONTENTS-->
+<!--¢¥CONTENTS-->
Index: /temp/branches/mobile/data/Smarty/templates/mobile/footer.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/footer.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/footer.tpl	(revision 11398)
@@ -0,0 +1,1 @@
+<center>LOCKON CO.,LTD.</center>
Index: /temp/branches/mobile/data/Smarty/templates/mobile/site_frame.tpl
===================================================================
--- /temp/branches/mobile/data/Smarty/templates/mobile/site_frame.tpl	(revision 11398)
+++ /temp/branches/mobile/data/Smarty/templates/mobile/site_frame.tpl	(revision 11398)
@@ -0,0 +1,12 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
+<title><!--{$arrSiteInfo.shop_name|escape}-->/<!--{$tpl_title|escape}--></title>
+<meta name="author" content="<!--{$arrPageLayout.author|escape}-->">
+<meta name="description" content="<!--{$arrPageLayout.description|escape}-->">
+<meta name="keywords" content="<!--{$arrPageLayout.keyword|escape}-->">
+</head>
+<!-- ¢§ £Â£Ï£Ä£ÙÉô ¥¹¥¿¡¼¥È -->
+<!--{include file='./site_main.tpl'}-->
+<!-- ¢¥ £Â£Ï£Ä£ÙÉô ¥¨¥ó¥É -->
+</html>
Index: /temp/branches/mobile/data/include/mobile_emoji_map_softbank.inc
===================================================================
--- /temp/branches/mobile/data/include/mobile_emoji_map_softbank.inc	(revision 11398)
+++ /temp/branches/mobile/data/include/mobile_emoji_map_softbank.inc	(revision 11398)
@@ -0,0 +1,260 @@
+<?php
+/**
+ * SoftBankÍÑ³¨Ê¸»ú¥³¡¼¥É (Shift JIS)
+ */
+
+return array(
+	'1'   => "\x1b\$Gj\x0f",
+	'2'   => "\x1b\$Gi\x0f",
+	'3'   => "\x1b\$Gk\x0f",
+	'4'   => "\x1b\$Gh\x0f",
+	'5'   => "\x1b\$E]\x0f",
+	'6'   => "\x1b\$Pc\x0f",
+	'7'   => "[\x96\xb6]", // [Ì¸]
+	'8'   => "\x1b\$P\\\x0f",
+	'9'   => "\x1b\$F_\x0f",
+	'10'  => "\x1b\$F`\x0f",
+	'11'  => "\x1b\$Fa\x0f",
+	'12'  => "\x1b\$Fb\x0f",
+	'13'  => "\x1b\$Fc\x0f",
+	'14'  => "\x1b\$Fd\x0f",
+	'15'  => "\x1b\$Fe\x0f",
+	'16'  => "\x1b\$Ff\x0f",
+	'17'  => "\x1b\$Fg\x0f",
+	'18'  => "\x1b\$Fh\x0f",
+	'19'  => "\x1b\$Fi\x0f",
+	'20'  => "\x1b\$Fj\x0f",
+	'21'  => null,
+	'22'  => "\x1b\$G6\x0f",
+	'23'  => "\x1b\$G4\x0f",
+	'24'  => "\x1b\$G5\x0f",
+	'25'  => "\x1b\$G8\x0f",
+	'26'  => "\x1b\$G3\x0f",
+	'27'  => "\x1b\$PJ\x0f",
+	'28'  => "\x1b\$ER\x0f",
+	'29'  => "[\xce\xdf\xb9\xaf\xc4\xcd\xde\xd9]", // [¥Ý¥±¥Ã¥È¥Ù¥ë]
+	'30'  => "\x1b\$G>\x0f",
+	'31'  => "\x1b\$PT\x0f",
+	'32'  => "\x1b\$PU\x0f",
+	'33'  => "\x1b\$G;\x0f",
+	'34'  => "\x1b\$PN\x0f",
+	'35'  => "\x1b\$Ey\x0f",
+	'36'  => "\x1b\$F\"\x0f",
+	'37'  => "\x1b\$G=\x0f",
+	'38'  => "\x1b\$GV\x0f",
+	'39'  => "\x1b\$GX\x0f",
+	'40'  => "\x1b\$Es\x0f",
+	'41'  => "\x1b\$Eu\x0f",
+	'42'  => "\x1b\$Em\x0f",
+	'43'  => "\x1b\$Et\x0f",
+	'44'  => "\x1b\$Ex\x0f",
+	'45'  => "\x1b\$Ev\x0f",
+	'46'  => "\x1b\$GZ\x0f",
+	'47'  => "\x1b\$Eo\x0f",
+	'48'  => "\x1b\$En\x0f",
+	'49'  => "\x1b\$Eq\x0f",
+	'50'  => "\x1b\$Gc\x0f",
+	'51'  => "\x1b\$Ge\x0f",
+	'52'  => "\x1b\$Gd\x0f",
+	'53'  => "\x1b\$Gg\x0f",
+	'54'  => "\x1b\$E@\x0f",
+	'55'  => "\x1b\$E^\x0f",
+	'56'  => "\x1b\$O3\x0f",
+	'57'  => "\x1b\$G\\\x0f",
+	'58'  => "\x1b\$G]\x0f",
+	'59'  => "\x1b\$FV\x0f",
+	'60'  => null,
+	'61'  => "\x1b\$O*\x0f",
+	'62'  => "\x1b\$Q\"\x0f",
+	'63'  => "\x1b\$Q#\x0f",
+	'64'  => null,
+	'65'  => "\x1b\$EE\x0f",
+	'66'  => "\x1b\$O.\x0f",
+	'67'  => "\x1b\$F(\x0f",
+	'68'  => "\x1b\$G(\x0f",
+	'69'  => "\x1b\$OC\x0f",
+	'70'  => "\x1b\$Eh\x0f",
+	'71'  => "\x1b\$O4\x0f",
+	'72'  => "\x1b\$E2\x0f",
+	'73'  => "\x1b\$Ok\x0f",
+	'74'  => "\x1b\$G)\x0f",
+	'75'  => "\x1b\$G*\x0f",
+	'76'  => "\x1b\$O!\x0f",
+	'77'  => "\x1b\$EJ\x0f",
+	'78'  => "[\xb9\xde\xb0\xd1]", // [¥²¡¼¥à]
+	'79'  => "\x1b\$EF\x0f",
+	'80'  => "\x1b\$F,\x0f",
+	'81'  => "\x1b\$F.\x0f",
+	'82'  => "\x1b\$F-\x0f",
+	'83'  => "\x1b\$F/\x0f",
+	'84'  => "\x1b\$P9\x0f",
+	'85'  => "\x1b\$P;\x0f",
+	'86'  => "\x1b\$G0\x0f",
+	'87'  => "\x1b\$G1\x0f",
+	'88'  => "\x1b\$G2\x0f",
+	'89'  => "\x1b\$FX\x0f",
+	'90'  => "\x1b\$FW\x0f",
+	'91'  => "\x1b\$QV\x0f",
+	'92'  => "\x1b\$G'\x0f",
+	'93'  => "[\xd2\xb6\xde\xc8]", // [¥á¥¬¥Í]
+	'94'  => "\x1b\$F*\x0f",
+	'95'  => "\x81\x9c", // ¡ü
+	'96'  => "\x1b\$Gl\x0f",
+	'97'  => "\x1b\$Gl\x0f",
+	'98'  => "\x1b\$Gl\x0f",
+	'99'  => "\x81\x9b", // ¡û
+	'100' => "\x1b\$Gr\x0f",
+	'101' => "\x1b\$Go\x0f",
+	'102' => "\x1b\$G<\x0f",
+	'103' => "\x1b\$GS\x0f",
+	'104' => "\x1b\$FY\x0f",
+	'105' => "\x1b\$E\$\x0f",
+	'106' => "\x1b\$E#\x0f",
+	'107' => "\x1b\$G+\x0f",
+	'108' => "[i\xd3\xb0\xc4\xde]", // [i¥â¡¼¥É]
+	'109' => "[i\xd3\xb0\xc4\xde]", // [i¥â¡¼¥É]
+	'110' => "\x1b\$E#\x0f",
+	'111' => "[\xc4\xde\xba\xd3]", // [¥É¥³¥â]
+	'112' => "[\xc4\xde\xba\xd3\xce\xdf\xb2\xdd\xc4]", // [¥É¥³¥â¥Ý¥¤¥ó¥È]
+	'113' => '\\',
+	'114' => '[FREE]',
+	'115' => "\x1b\$FI\x0f",
+	'116' => "\x1b\$G_\x0f",
+	'117' => null,
+	'118' => '[CL]',
+	'119' => "\x1b\$E4\x0f",
+	'120' => "\x1b\$F2\x0f",
+	'121' => null,
+	'122' => "\x1b\$F1\x0f",
+	'123' => "\x1b\$F0\x0f",
+	'124' => '[Q]',
+	'125' => "\x1b\$F<\x0f",
+	'126' => "\x1b\$F=\x0f",
+	'127' => "\x1b\$F>\x0f",
+	'128' => "\x1b\$F?\x0f",
+	'129' => "\x1b\$F@\x0f",
+	'130' => "\x1b\$FA\x0f",
+	'131' => "\x1b\$FB\x0f",
+	'132' => "\x1b\$FC\x0f",
+	'133' => "\x1b\$FD\x0f",
+	'134' => "\x1b\$FE\x0f",
+	'135' => "\x1b\$Fm\x0f",
+	'136' => "\x1b\$GB\x0f",
+	'137' => "\x1b\$OG\x0f",
+	'138' => "\x1b\$GC\x0f",
+	'139' => "\x1b\$OG\x0f",
+	'140' => "\x1b\$Gw\x0f",
+	'141' => "\x1b\$Gy\x0f",
+	'142' => "\x1b\$Gx\x0f",
+	'143' => "\x1b\$P'\x0f",
+	'144' => "\x1b\$P&\x0f",
+	'145' => "\x1b\$FV\x0f",
+	'146' => "\x1b\$G^\x0f",
+	'147' => "\x1b\$EC\x0f",
+	'148' => null,
+	'149' => "\x1b\$G#\x0f",
+	'150' => "\x1b\$ON\x0f",
+	'151' => "\x1b\$E/\x0f",
+	'152' => "\x1b\$OT\x0f",
+	'153' => "\x1b\$G-\x0f",
+	'154' => "\x1b\$O1\x0f",
+	'155' => "\x1b\$OF\x0f",
+	'156' => "\x1b\$FX\x0f",
+	'157' => "\x1b\$E\\\x0f",
+	'158' => "\x1b\$GA\x0f",
+	'159' => '!?',
+	'160' => '!!',
+	'161' => null,
+	'162' => "\x1b\$OQ\x0f",
+	'163' => "\x1b\$OQ\x0f",
+	'164' => "\x1b\$OP\x0f",
+	'165' => null,
+	'166' => null,
+	'167' => "\x1b\$OD\x0f",
+	'168' => "[\x82\xd3\x82\xad\x82\xeb]", // [¤Õ¤¯¤í]
+	'169' => "[\xcd\xdf\xdd]", // [¥Ú¥ó]
+	'170' => null,
+	'171' => "\x1b\$E?\x0f",
+	'172' => "\x1b\$Pk\x0f",
+	'173' => '[SOON]',
+	'174' => '[ON]',
+	'175' => '[end]',
+	'176' => "\x1b\$GM\x0f",
+	'e1'  => "[i\xb1\xcc\xdf\xd8]", // [i¥¢¥×¥ê]
+	'e2'  => "[i\xb1\xcc\xdf\xd8]", // [i¥¢¥×¥ê]
+	'e3'  => "\x1b\$G&\x0f",
+	'e4'  => "[\x8d\xe0\x95\x7a]", // [ºâÉÛ]
+	'e5'  => "\x1b\$O<\x0f",
+	'e6'  => "[\xbc\xde\xb0\xdd\xbd\xde]", // [¥¸¡¼¥ó¥º]
+	'e7'  => "[\xbd\xc9\xce\xde]", // [¥¹¥Î¥Ü]
+	'e8'  => "\x1b\$OE\x0f",
+	'e9'  => "[\xc4\xde\xb1]", // [¥É¥¢]
+	'e10' => "\x1b\$EO\x0f",
+	'e11' => "\x1b\$G,\x0f",
+	'e12' => "\x1b\$E#\x0f\x1b\$OH\x0f",
+	'e13' => "[\xda\xdd\xc1]", // [¥ì¥ó¥Á]
+	'e14' => "\x1b\$O!\x0f",
+	'e15' => "\x1b\$E.\x0f",
+	'e16' => "\x1b\$GT\x0f",
+	'e17' => "[\x8d\xbb\x8e\x9e\x8c\x76]", // [º½»þ·×]
+	'e18' => "\x1b\$EV\x0f",
+	'e19' => "\x1b\$OX\x0f",
+	'e20' => "[\x98\x72\x8e\x9e\x8c\x76]", // [ÏÓ»þ·×]
+	'e21' => "\x1b\$P#\x0f",
+	'e22' => "\x1b\$P*\x0f",
+	'e23' => "\x1b\$P5\x0f\x1b\$OQ\x0f",
+	'e24' => "\x1b\$E(\x0f",
+	'e25' => "\x1b\$P6\x0f",
+	'e26' => "\x1b\$P.\x0f",
+	'e27' => "\x1b\$E&\x0f",
+	'e28' => "\x1b\$G.\x0f",
+	'e29' => "\x1b\$E%\x0f",
+	'e30' => "\x1b\$P%\x0f",
+	'e31' => "\x1b\$P*\x0f",
+	'e32' => "\x1b\$P&\x0f",
+	'e33' => "\x1b\$P\"\x0f",
+	'e34' => "\x1b\$P1\x0f",
+	'e35' => "\x1b\$P3\x0f",
+	'e36' => '[NG]',
+	'e37' => "[\xb8\xd8\xaf\xcc\xdf]", // [¥¯¥ê¥Ã¥×]
+	'e38' => "\x1b\$Fn\x0f",
+	'e39' => "\x1b\$QW\x0f",
+	'e40' => "\x1b\$E5\x0f",
+	'e41' => "\x1b\$O5\x0f",
+	'e42' => null,
+	'e43' => "\x1b\$Fo\x0f",
+	'e44' => "\x1b\$Fr\x0f",
+	'e45' => "[\x8b\xd6]", // [¶Ø]
+	'e46' => "\x1b\$FK\x0f",
+	'e47' => "[\x8d\x87]", // [¹ç]
+	'e48' => "\x1b\$FJ\x0f",
+	'e49' => "\x81\xcc", // ¢Î
+	'e50' => "\x81\xaa\x81\xab", // ¢¬¢­
+	'e51' => "\x1b\$Ew\x0f",
+	'e52' => "\x1b\$P^\x0f",
+	'e53' => "\x1b\$G[\x0f",
+	'e54' => "\x1b\$E0\x0f",
+	'e55' => "[\xc1\xaa\xd8\xb0]", // [¥Á¥§¥ê¡¼]
+	'e56' => "\x1b\$O\$\x0f",
+	'e57' => "[\xca\xde\xc5\xc5]", // [¥Ð¥Ê¥Ê]
+	'e58' => "\x1b\$Oe\x0f",
+	'e59' => "\x1b\$E0\x0f",
+	'e60' => "\x1b\$E8\x0f",
+	'e61' => "\x1b\$GP\x0f",
+	'e62' => "\x1b\$Ob\x0f",
+	'e63' => "\x1b\$Gf\x0f",
+	'e64' => "\x1b\$O+\x0f",
+	'e65' => "\x1b\$O`\x0f",
+	'e66' => "\x1b\$OY\x0f",
+	'e67' => "[\xb6\xc0\xc2\xd1\xd8]", // [¥«¥¿¥Ä¥à¥ê]
+	'e68' => "\x1b\$QC\x0f",
+	'e69' => "\x1b\$Gu\x0f",
+	'e70' => "\x1b\$G9\x0f",
+	'e71' => "\x1b\$Gv\x0f",
+	'e72' => "\x1b\$P\$\x0f",
+	'e73' => "\x1b\$G:\x0f",
+	'e74' => "\x1b\$E+\x0f",
+	'e75' => "\x1b\$Gd\x0f",
+	'e76' => "\x1b\$E'\x0f"
+);
+?>
Index: /temp/branches/mobile/data/include/mobile_emoji_map_ezweb.inc
===================================================================
--- /temp/branches/mobile/data/include/mobile_emoji_map_ezweb.inc	(revision 11398)
+++ /temp/branches/mobile/data/include/mobile_emoji_map_ezweb.inc	(revision 11398)
@@ -0,0 +1,260 @@
+<?php
+/**
+ * EZwebÍÑ³¨Ê¸»ú¥³¡¼¥É (Shift JIS)
+ */
+
+return array(
+	'1'   => '<img localsrc="44">',
+	'2'   => '<img localsrc="107">',
+	'3'   => '<img localsrc="95">',
+	'4'   => '<img localsrc="191">',
+	'5'   => '<img localsrc="16">',
+	'6'   => '<img localsrc="190">',
+	'7'   => '<img localsrc="305">',
+	'8'   => '<img localsrc="481">',
+	'9'   => '<img localsrc="192">',
+	'10'  => '<img localsrc="193">',
+	'11'  => '<img localsrc="194">',
+	'12'  => '<img localsrc="195">',
+	'13'  => '<img localsrc="196">',
+	'14'  => '<img localsrc="197">',
+	'15'  => '<img localsrc="198">',
+	'16'  => '<img localsrc="199">',
+	'17'  => '<img localsrc="200">',
+	'18'  => '<img localsrc="201">',
+	'19'  => '<img localsrc="202">',
+	'20'  => '<img localsrc="203">',
+	'21'  => null,
+	'22'  => '<img localsrc="45">',
+	'23'  => '<img localsrc="306">',
+	'24'  => '<img localsrc="220">',
+	'25'  => '<img localsrc="219">',
+	'26'  => '<img localsrc="421">',
+	'27'  => '<img localsrc="307">',
+	'28'  => '<img localsrc="222">',
+	'29'  => '<img localsrc="308">',
+	'30'  => '<img localsrc="172">',
+	'31'  => '<img localsrc="341">',
+	'32'  => '<img localsrc="217">',
+	'33'  => '<img localsrc="125">',
+	'34'  => '<img localsrc="125">',
+	'35'  => '<img localsrc="216">',
+	'36'  => '<img localsrc="379">',
+	'37'  => '<img localsrc="168">',
+	'38'  => '<img localsrc="112">',
+	'39'  => '<img localsrc="156">',
+	'40'  => '<img localsrc="375">',
+	'41'  => '<img localsrc="376">',
+	'42'  => '<img localsrc="212">',
+	'43'  => '<img localsrc="205">',
+	'44'  => '<img localsrc="378">',
+	'45'  => '<img localsrc="206">',
+	'46'  => '<img localsrc="213">',
+	'47'  => '<img localsrc="208">',
+	'48'  => '<img localsrc="99">',
+	'49'  => '<img localsrc="207">',
+	'50'  => '<img localsrc="146">',
+	'51'  => '<img localsrc="93">',
+	'52'  => '<img localsrc="52">',
+	'53'  => '<img localsrc="65">',
+	'54'  => '<img localsrc="245">',
+	'55'  => '<img localsrc="124">',
+	'56'  => '<img localsrc="104">',
+	'57'  => '<img localsrc="289">',
+	'58'  => '<img localsrc="110">',
+	'59'  => '<img localsrc="70">',
+	'60'  => null,
+	'61'  => '<img localsrc="294">',
+	'62'  => '<img localsrc="309">',
+	'63'  => '<img localsrc="494">',
+	'64'  => '<img localsrc="311">',
+	'65'  => '<img localsrc="106">',
+	'66'  => '<img localsrc="176">',
+	'67'  => '<img localsrc="177">',
+	'68'  => '<img localsrc="94">',
+	'69'  => '<img localsrc="83">',
+	'70'  => '<img localsrc="122">',
+	'71'  => '<img localsrc="312">',
+	'72'  => '<img localsrc="144">',
+	'73'  => '<img localsrc="313">',
+	'74'  => '<img localsrc="85">',
+	'75'  => '<img localsrc="161">',
+	'76'  => '<img localsrc="395">',
+	'77'  => '<img localsrc="288">',
+	'78'  => '<img localsrc="232">',
+	'79'  => '<img localsrc="300">',
+	'80'  => '<img localsrc="414">',
+	'81'  => '<img localsrc="314">',
+	'82'  => '<img localsrc="315">',
+	'83'  => '<img localsrc="316">',
+	'84'  => '<img localsrc="317">',
+	'85'  => '<img localsrc="318">',
+	'86'  => '<img localsrc="817">',
+	'87'  => '<img localsrc="319">',
+	'88'  => '<img localsrc="320">',
+	'89'  => '<img localsrc="43">',
+	'90'  => '<img localsrc="42">',
+	'91'  => '<img localsrc="728">',
+	'92'  => '<img localsrc="729">',
+	'93'  => '<img localsrc="116">',
+	'94'  => '<img localsrc="178">',
+	'95'  => '<img localsrc="321">',
+	'96'  => '<img localsrc="322">',
+	'97'  => '<img localsrc="323">',
+	'98'  => '<img localsrc="15">',
+	'99'  => "\x81\x9b", // ¡û
+	'100' => '<img localsrc="134">',
+	'101' => '<img localsrc="251">',
+	'102' => '<img localsrc="169">',
+	'103' => '<img localsrc="234">',
+	'104' => '<img localsrc="71">',
+	'105' => '<img localsrc="513">',
+	'106' => '<img localsrc="784">',
+	'107' => '<img localsrc="166">',
+	'108' => "[i\xd3\xb0\xc4\xde]", // [i¥â¡¼¥É]
+	'109' => "[i\xd3\xb0\xc4\xde]", // [i¥â¡¼¥É]
+	'110' => '<img localsrc="108">',
+	'111' => "[\xc4\xde\xba\xd3]", // [¥É¥³¥â]
+	'112' => "[\xc4\xde\xba\xd3\xce\xdf\xb2\xdd\xc4]", // [¥É¥³¥â¥Ý¥¤¥ó¥È]
+	'113' => '<img localsrc="109">',
+	'114' => '<img localsrc="299">',
+	'115' => '<img localsrc="385">',
+	'116' => '<img localsrc="120">',
+	'117' => '<img localsrc="118">',
+	'118' => '<img localsrc="324">',
+	'119' => '<img localsrc="119">',
+	'120' => '<img localsrc="334">',
+	'121' => '<img localsrc="730">',
+	'122' => "[\xcc\xd8\xb0\xc0\xde\xb2\xd4\xd9]", // [¥Õ¥ê¡¼¥À¥¤¥ä¥ë]
+	'123' => '<img localsrc="818">',
+	'124' => '<img localsrc="4">',
+	'125' => '<img localsrc="180">',
+	'126' => '<img localsrc="181">',
+	'127' => '<img localsrc="182">',
+	'128' => '<img localsrc="183">',
+	'129' => '<img localsrc="184">',
+	'130' => '<img localsrc="185">',
+	'131' => '<img localsrc="186">',
+	'132' => '<img localsrc="187">',
+	'133' => '<img localsrc="188">',
+	'134' => '<img localsrc="325">',
+	'135' => '<img localsrc="326">',
+	'136' => '<img localsrc="51">',
+	'137' => '<img localsrc="803">',
+	'138' => '<img localsrc="265">',
+	'139' => '<img localsrc="266">',
+	'140' => '<img localsrc="257">',
+	'141' => '<img localsrc="258">',
+	'142' => '<img localsrc="441">',
+	'143' => '<img localsrc="444">',
+	'144' => '<img localsrc="327">',
+	'145' => '<img localsrc="731">',
+	'146' => '<img localsrc="343">',
+	'147' => '<img localsrc="224">',
+	'148' => null,
+	'149' => '<img localsrc="273">',
+	'150' => '<img localsrc="420">',
+	'151' => '<img localsrc="77">',
+	'152' => '<img localsrc="262">',
+	'153' => '<img localsrc="281">',
+	'154' => '<img localsrc="268">',
+	'155' => '<img localsrc="291">',
+	'156' => '<img localsrc="732">',
+	'157' => '<img localsrc="261">',
+	'158' => '<img localsrc="2">',
+	'159' => '<img localsrc="733">',
+	'160' => '<img localsrc="734">',
+	'161' => '<img localsrc="329">',
+	'162' => '<img localsrc="330">',
+	'163' => '<img localsrc="263">',
+	'164' => '<img localsrc="282">',
+	'165' => null,
+	'166' => '<img localsrc="735">',
+	'167' => '<img localsrc="226">',
+	'168' => "[\x82\xd3\x82\xad\x82\xeb]", // [¤Õ¤¯¤í]
+	'169' => '<img localsrc="508">',
+	'170' => null,
+	'171' => "[\x82\xa2\x82\xb7]", // [¤¤¤¹]
+	'172' => '<img localsrc="490">',
+	'173' => '[SOON]',
+	'174' => '[ON]',
+	'175' => '[end]',
+	'176' => '<img localsrc="46">',
+	'e1'  => "[i\xb1\xcc\xdf\xd8]", // [i¥¢¥×¥ê]
+	'e2'  => "[i\xb1\xcc\xdf\xd8]", // [i¥¢¥×¥ê]
+	'e3'  => '<img localsrc="335">',
+	'e4'  => '<img localsrc="290">',
+	'e5'  => '<img localsrc="295">',
+	'e6'  => '<img localsrc="805">',
+	'e7'  => '<img localsrc="221">',
+	'e8'  => '<img localsrc="48">',
+	'e9'  => "[\xc4\xde\xb1]", // [¥É¥¢]
+	'e10' => '<img localsrc="233">',
+	'e11' => '<img localsrc="337">',
+	'e12' => '<img localsrc="806">',
+	'e13' => '<img localsrc="152">',
+	'e14' => '<img localsrc="149">',
+	'e15' => '<img localsrc="354">',
+	'e16' => '<img localsrc="72">',
+	'e17' => '<img localsrc="58">',
+	'e18' => '<img localsrc="215">',
+	'e19' => '<img localsrc="423">',
+	'e20' => '<img localsrc="25">',
+	'e21' => '<img localsrc="441">',
+	'e22' => '<img localsrc="446">',
+	'e23' => '<img localsrc="257"><img localsrc="330">',
+	'e24' => '<img localsrc="351">',
+	'e25' => '<img localsrc="779">',
+	'e26' => '<img localsrc="450">',
+	'e27' => '<img localsrc="349">',
+	'e28' => '<img localsrc="287">',
+	'e29' => '<img localsrc="264">',
+	'e30' => '<img localsrc="348">',
+	'e31' => '<img localsrc="446">',
+	'e32' => '<img localsrc="443">',
+	'e33' => '<img localsrc="440">',
+	'e34' => '<img localsrc="259">',
+	'e35' => '<img localsrc="791">',
+	'e36' => '[NG]',
+	'e37' => '<img localsrc="143">',
+	'e38' => '<img localsrc="81">',
+	'e39' => '<img localsrc="54">',
+	'e40' => '<img localsrc="218">',
+	'e41' => '<img localsrc="279">',
+	'e42' => '<img localsrc="807">',
+	'e43' => '<img localsrc="82">',
+	'e44' => '<img localsrc="1">',
+	'e45' => "[\x8b\xd6]", // [¶Ø]
+	'e46' => '<img localsrc="387">',
+	'e47' => "[\x8d\x87]", // [¹ç]
+	'e48' => '<img localsrc="386">',
+	'e49' => '<img localsrc="808">',
+	'e50' => '<img localsrc="809">',
+	'e51' => '<img localsrc="377">',
+	'e52' => '<img localsrc="810">',
+	'e53' => '<img localsrc="342">',
+	'e54' => '<img localsrc="53">',
+	'e55' => '<img localsrc="241">',
+	'e56' => '<img localsrc="113">',
+	'e57' => '<img localsrc="739">',
+	'e58' => '<img localsrc="434">',
+	'e59' => '<img localsrc="811">',
+	'e60' => '<img localsrc="133">',
+	'e61' => '<img localsrc="235">',
+	'e62' => '<img localsrc="244">',
+	'e63' => '<img localsrc="239">',
+	'e64' => '<img localsrc="400">',
+	'e65' => '<img localsrc="333">',
+	'e66' => '<img localsrc="424">',
+	'e67' => '<img localsrc="812">',
+	'e68' => '<img localsrc="78">',
+	'e69' => '<img localsrc="252">',
+	'e70' => '<img localsrc="203">',
+	'e71' => '<img localsrc="454">',
+	'e72' => '<img localsrc="814">',
+	'e73' => '<img localsrc="248">',
+	'e74' => '<img localsrc="254">',
+	'e75' => '<img localsrc="12">',
+	'e76' => '<img localsrc="350">'
+);
+?>
Index: /temp/branches/mobile/data/include/mobile.inc
===================================================================
--- /temp/branches/mobile/data/include/mobile.inc	(revision 10576)
+++ /temp/branches/mobile/data/include/mobile.inc	(revision 11398)
@@ -1,2 +1,199 @@
 <?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¶¦Í­´Ø¿ô¥Õ¥¡¥¤¥ë
+ */
+
+/**
+ * EC-CUBE ¤¬¥µ¥Ý¡¼¥È¤¹¤ë·ÈÂÓÃ¼Ëö¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+ * ÈóÂÐ±þÃ¼Ëö¤Î¾ì¹ç¤Ï unsupported/index.php ¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+ *
+ * @return void
+ */
+function lfMobileCheckCompatibility() {
+	if (!GC_MobileUserAgent::isSupported()) {
+		header('Location: ' . URL_DIR . 'unsupported/index.php');
+		exit;
+	}
+}
+
+/**
+ * ÆþÎÏ¥Ç¡¼¥¿¤òÆâÉô¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ËÊÑ´¹¤·¡¢³¨Ê¸»ú¤ò½üµî¤¹¤ë¡£
+ *
+ * @param string &$value ÆþÎÏ¥Ç¡¼¥¿¤Ø¤Î»²¾È
+ * @return void
+ */
+function lfMobileConvertInputValue(&$value) {
+	// Shift JIS ¤«¤éÆâÉô¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ËÊÑ´¹¤¹¤ë¡£
+	// SoftBank °Ê³°¤Î³¨Ê¸»ú¤Ï³°»úÎÎ°è¤Ë´Þ¤Þ¤ì¤ë¤¿¤á¡¢¤³¤ÎÃÊ³¬¤Ç½üµî¤µ¤ì¤ë¡£
+	$value = mb_convert_encoding($value, CHAR_CODE, 'SJIS');
+
+	// SoftBank ¤Î³¨Ê¸»ú¤ò½üµî¤¹¤ë¡£
+	$value = preg_replace('/\\x1b\\$[^\\x0f]*\\x0f/', '', $value);
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤ÎÆþÎÏ¤Î½é´ü½èÍý¤ò¹Ô¤¦¡£
+ *
+ * @return void
+ */
+function lfMobileInitInput() {
+	array_walk($_GET, 'lfMobileConvertInputValue');
+	array_walk($_POST, 'lfMobileConvertInputValue');
+	array_walk($_REQUEST, 'lfMobileConvertInputValue');
+}
+
+/**
+ * ¥Ñ¥é¥á¡¼¥¿¡¼¤«¤éÍ­¸ú¤Ê¥»¥Ã¥·¥ç¥óID¤ò¼èÆÀ¤¹¤ë¡£
+ *
+ * @return string|false ¼èÆÀ¤·¤¿Í­¸ú¤Ê¥»¥Ã¥·¥ç¥óID¤òÊÖ¤¹¡£
+ *                      ¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+ */
+function lfMobileGetSessionId() {
+	// ¥Ñ¥é¥á¡¼¥¿¡¼¤«¤é¥»¥Ã¥·¥ç¥óID¤ò¼èÆÀ¤¹¤ë¡£
+	$sessionId = @$_POST[session_name()];
+	if (!isset($sessionId)) {
+		$sessionId = @$_GET[session_name()];
+	}
+	if (!isset($sessionId)) {
+		return false;
+	}
+
+	// ¥»¥Ã¥·¥ç¥óID¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	if (preg_match('/^[0-9a-zA-Z,-]{32,}$/', $sessionId) < 1) {
+		gfPrintLog("Invalid session id : sid=$sessionId");
+		return false;
+	}
+
+	// ¥»¥Ã¥·¥ç¥óID¤ÎÂ¸ºß¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	if (sfSessRead($sessionId) === null) {
+		gfPrintLog("Non-existent session id : sid=$sessionId");
+		return false;
+	}
+
+	return session_id($sessionId);
+}
+
+/**
+ * ¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤¬Í­¸ú¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+ *
+ * @return boolean ¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤¬Í­¸ú¤Ê¾ì¹ç¤Ï true¡¢Ìµ¸ú¤Ê¾ì¹ç¤Ï false ¤òÊÖ¤¹¡£
+ */
+function lfMobileValidateSession() {
+	// ÇÛÎó mobile ¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	if (!is_array(@$_SESSION['mobile'])) {
+		return false;
+	}
+
+	// Í­¸ú´ü¸Â¤ò²á¤®¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	if (intval(@$_SESSION['mobile']['expires']) < time()) {
+		gfPrintLog("Session expired at " .
+		           date('Y/m/d H:i:s', @$_SESSION['mobile']['expires']) .
+		           ' : sid=' . session_id());
+
+		return false;
+	}
+
+	// ·ÈÂÓÃ¼Ëö¤Îµ¡¼ï¤¬°ìÃ×¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	$model = GC_MobileUserAgent::getModel();
+	if (@$_SESSION['mobile']['model'] != $model) {
+		gfPrintLog("User agent model mismatch : " .
+		           "\"$model\" != \"" . @$_SESSION['mobile']['model'] .
+		           '" (expected), sid=' . session_id());
+		return false;
+	}
+
+	return true;
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤Î¥»¥Ã¥·¥ç¥ó´ØÏ¢¤Î½é´ü½èÍý¤ò¹Ô¤¦¡£
+ *
+ * @return void
+ */
+function lfMobileInitSession() {
+	// ¥»¥Ã¥·¥ç¥óID¤Î¼õ¤±ÅÏ¤·¤Ë¥¯¥Ã¥­¡¼¤ò»ÈÍÑ¤·¤Ê¤¤¡£
+	ini_set('session.use_cookies', '0');
+	ini_set('session.use_trans_sid', '1');
+
+	// ¥Ñ¥é¥á¡¼¥¿¡¼¤«¤éÍ­¸ú¤Ê¥»¥Ã¥·¥ç¥óID¤ò¼èÆÀ¤¹¤ë¡£
+	$sessionId = lfMobileGetSessionId();
+
+	session_start();
+
+	// ¥»¥Ã¥·¥ç¥óID¤Þ¤¿¤Ï¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤¬Ìµ¸ú¤Ê¾ì¹ç¤Ï¡¢¥»¥Ã¥·¥ç¥óID¤òºÆÀ¸À®
+	// ¤·¡¢¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤ò½é´ü²½¤¹¤ë¡£
+	if ($sessionId === false || !lfMobileValidateSession()) {
+		session_regenerate_id();
+		$_SESSION = array('mobile' => array('model'    => GC_MobileUserAgent::getModel(),
+		                                    'phone_id' => GC_MobileUserAgent::getId(),
+		                                    'expires'  => time() + MOBILE_SESSION_LIFETIME));
+
+		// ¿·¤·¤¤¥»¥Ã¥·¥ç¥óID¤òÉÕ²Ã¤·¤Æ¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+		if ($_SERVER['REQUEST_METHOD'] == 'GET') {
+			// GET ¤Î¾ì¹ç¤ÏÆ±¤¸¥Ú¡¼¥¸¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+			require_once(DATA_PATH . 'module/Net/URL.php');
+			$url = new Net_URL();
+			$url->addQueryString(session_name(), session_id());
+			header('Location: ' . $url->getURL());
+		} else {
+			// GET °Ê³°¤Î¾ì¹ç¤Ï¥È¥Ã¥×¥Ú¡¼¥¸¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+			header('Location: ' . URL_SITE_TOP . '?' . SID);
+		}
+		exit;
+	}
+
+	// ·ÈÂÓÃ¼ËöID¤ò¼èÆÀ¤Ç¤­¤¿¾ì¹ç¤Ï¥»¥Ã¥·¥ç¥ó¥Ç¡¼¥¿¤ËÊÝÂ¸¤¹¤ë¡£
+	$phoneId = GC_MobileUserAgent::getId();
+	if ($phoneId !== false) {
+		$_SESSION['mobile']['phone_id'] = $phoneId;
+	}
+
+	// ¥»¥Ã¥·¥ç¥ó¤ÎÍ­¸ú´ü¸Â¤ò¹¹¿·¤¹¤ë¡£
+	$_SESSION['mobile']['expires'] = time() + MOBILE_SESSION_LIFETIME;
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤Î½ÐÎÏ¤Î½é´ü½èÍý¤ò¹Ô¤¦¡£
+ *
+ * ½ÐÎÏ¤ÎÎ®¤ì
+ * 1. Smarty
+ * 2. ÆâÉô¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤«¤é Shift JIS ¤ËÊÑ´¹¤¹¤ë¡£
+ * 3. Á´³Ñ¥«¥¿¥«¥Ê¤òÈ¾³Ñ¥«¥¿¥«¥Ê¤ËÊÑ´¹¤¹¤ë¡£
+ * 4. ³¨Ê¸»ú¥¿¥°¤ò³¨Ê¸»ú¥³¡¼¥É¤ËÊÑ´¹¤¹¤ë¡£
+ * 5. ½ÐÎÏ
+ *
+ * @return void
+ */
+function lfMobileInitOutput() {
+	// Smarty ÍÑ¤Î¥Ç¥£¥ì¥¯¥È¥ê¡¼¤òºîÀ®¤¹¤ë¡£
+	@mkdir(COMPILE_DIR);
+
+	// ½ÐÎÏÍÑ¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò Shift JIS ¤Ë¸ÇÄê¤¹¤ë¡£
+	mb_http_output('SJIS-win');
+
+	// ³¨Ê¸»ú¥¿¥°¤ò³¨Ê¸»ú¥³¡¼¥É¤ËÊÑ´¹¤¹¤ë¡£
+	ob_start(array('GC_MobileEmoji', 'handler'));
+
+	// Á´³Ñ¥«¥¿¥«¥Ê¤òÈ¾³Ñ¥«¥¿¥«¥Ê¤ËÊÑ´¹¤¹¤ë¡£
+	ob_start(create_function('$buffer', 'return mb_convert_kana($buffer, "k", "SJIS-win");'));
+
+	// ÆâÉô¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤«¤é Shift JIS ¤ËÊÑ´¹¤¹¤ë¡£
+	ob_start('mb_output_handler');
+}
+
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤Î½é´ü½èÍý¤ò¹Ô¤¦¡£
+ *
+ * @return void
+ */
+function sfMobileInit() {
+	lfMobileInitInput();
+
+	if (basename(dirname($_SERVER['SCRIPT_NAME'])) != 'unsupported') {
+		lfMobileCheckCompatibility();
+		lfMobileInitSession();
+	}
+
+	lfMobileInitOutput();
+}
 ?>
Index: /temp/branches/mobile/data/include/mobile_emoji_map_docomo.inc
===================================================================
--- /temp/branches/mobile/data/include/mobile_emoji_map_docomo.inc	(revision 11398)
+++ /temp/branches/mobile/data/include/mobile_emoji_map_docomo.inc	(revision 11398)
@@ -0,0 +1,260 @@
+<?php
+/**
+ * i¥â¡¼¥ÉÍÑ³¨Ê¸»ú¥³¡¼¥É (Shift JIS)
+ */
+
+return array(
+	'1'   => "\xf8\x9f",
+	'2'   => "\xf8\xa0",
+	'3'   => "\xf8\xa1",
+	'4'   => "\xf8\xa2",
+	'5'   => "\xf8\xa3",
+	'6'   => "\xf8\xa4",
+	'7'   => "\xf8\xa5",
+	'8'   => "\xf8\xa6",
+	'9'   => "\xf8\xa7",
+	'10'  => "\xf8\xa8",
+	'11'  => "\xf8\xa9",
+	'12'  => "\xf8\xaa",
+	'13'  => "\xf8\xab",
+	'14'  => "\xf8\xac",
+	'15'  => "\xf8\xad",
+	'16'  => "\xf8\xae",
+	'17'  => "\xf8\xaf",
+	'18'  => "\xf8\xb0",
+	'19'  => "\xf8\xb1",
+	'20'  => "\xf8\xb2",
+	'21'  => "\xf8\xb3",
+	'22'  => "\xf8\xb4",
+	'23'  => "\xf8\xb5",
+	'24'  => "\xf8\xb6",
+	'25'  => "\xf8\xb7",
+	'26'  => "\xf8\xb8",
+	'27'  => "\xf8\xb9",
+	'28'  => "\xf8\xba",
+	'29'  => "\xf8\xbb",
+	'30'  => "\xf8\xbc",
+	'31'  => "\xf8\xbd",
+	'32'  => "\xf8\xbe",
+	'33'  => "\xf8\xbf",
+	'34'  => "\xf8\xc0",
+	'35'  => "\xf8\xc1",
+	'36'  => "\xf8\xc2",
+	'37'  => "\xf8\xc3",
+	'38'  => "\xf8\xc4",
+	'39'  => "\xf8\xc5",
+	'40'  => "\xf8\xc6",
+	'41'  => "\xf8\xc7",
+	'42'  => "\xf8\xc8",
+	'43'  => "\xf8\xc9",
+	'44'  => "\xf8\xca",
+	'45'  => "\xf8\xcb",
+	'46'  => "\xf8\xcc",
+	'47'  => "\xf8\xcd",
+	'48'  => "\xf8\xce",
+	'49'  => "\xf8\xcf",
+	'50'  => "\xf8\xd0",
+	'51'  => "\xf8\xd1",
+	'52'  => "\xf8\xd2",
+	'53'  => "\xf8\xd3",
+	'54'  => "\xf8\xd4",
+	'55'  => "\xf8\xd5",
+	'56'  => "\xf8\xd6",
+	'57'  => "\xf8\xd7",
+	'58'  => "\xf8\xd8",
+	'59'  => "\xf8\xd9",
+	'60'  => "\xf8\xda",
+	'61'  => "\xf8\xdb",
+	'62'  => "\xf8\xdc",
+	'63'  => "\xf8\xdd",
+	'64'  => "\xf8\xde",
+	'65'  => "\xf8\xdf",
+	'66'  => "\xf8\xe0",
+	'67'  => "\xf8\xe1",
+	'68'  => "\xf8\xe2",
+	'69'  => "\xf8\xe3",
+	'70'  => "\xf8\xe4",
+	'71'  => "\xf8\xe5",
+	'72'  => "\xf8\xe6",
+	'73'  => "\xf8\xe7",
+	'74'  => "\xf8\xe8",
+	'75'  => "\xf8\xe9",
+	'76'  => "\xf8\xea",
+	'77'  => "\xf8\xeb",
+	'78'  => "\xf8\xec",
+	'79'  => "\xf8\xed",
+	'80'  => "\xf8\xee",
+	'81'  => "\xf8\xef",
+	'82'  => "\xf8\xf0",
+	'83'  => "\xf8\xf1",
+	'84'  => "\xf8\xf2",
+	'85'  => "\xf8\xf3",
+	'86'  => "\xf8\xf4",
+	'87'  => "\xf8\xf5",
+	'88'  => "\xf8\xf6",
+	'89'  => "\xf8\xf7",
+	'90'  => "\xf8\xf8",
+	'91'  => "\xf8\xf9",
+	'92'  => "\xf8\xfa",
+	'93'  => "\xf8\xfb",
+	'94'  => "\xf8\xfc",
+	'95'  => "\xf9\x40",
+	'96'  => "\xf9\x41",
+	'97'  => "\xf9\x42",
+	'98'  => "\xf9\x43",
+	'99'  => "\xf9\x44",
+	'100' => "\xf9\x45",
+	'101' => "\xf9\x46",
+	'102' => "\xf9\x47",
+	'103' => "\xf9\x48",
+	'104' => "\xf9\x49",
+	'105' => "\xf9\x72",
+	'106' => "\xf9\x73",
+	'107' => "\xf9\x74",
+	'108' => "\xf9\x75",
+	'109' => "\xf9\x76",
+	'110' => "\xf9\x77",
+	'111' => "\xf9\x78",
+	'112' => "\xf9\x79",
+	'113' => "\xf9\x7a",
+	'114' => "\xf9\x7b",
+	'115' => "\xf9\x7c",
+	'116' => "\xf9\x7d",
+	'117' => "\xf9\x7e",
+	'118' => "\xf9\x80",
+	'119' => "\xf9\x81",
+	'120' => "\xf9\x82",
+	'121' => "\xf9\x83",
+	'122' => "\xf9\x84",
+	'123' => "\xf9\x85",
+	'124' => "\xf9\x86",
+	'125' => "\xf9\x87",
+	'126' => "\xf9\x88",
+	'127' => "\xf9\x89",
+	'128' => "\xf9\x8a",
+	'129' => "\xf9\x8b",
+	'130' => "\xf9\x8c",
+	'131' => "\xf9\x8d",
+	'132' => "\xf9\x8e",
+	'133' => "\xf9\x8f",
+	'134' => "\xf9\x90",
+	'135' => "\xf9\xb0",
+	'136' => "\xf9\x91",
+	'137' => "\xf9\x92",
+	'138' => "\xf9\x93",
+	'139' => "\xf9\x94",
+	'140' => "\xf9\x95",
+	'141' => "\xf9\x96",
+	'142' => "\xf9\x97",
+	'143' => "\xf9\x98",
+	'144' => "\xf9\x99",
+	'145' => "\xf9\x9a",
+	'146' => "\xf9\x9b",
+	'147' => "\xf9\x9c",
+	'148' => "\xf9\x9d",
+	'149' => "\xf9\x9e",
+	'150' => "\xf9\x9f",
+	'151' => "\xf9\xa0",
+	'152' => "\xf9\xa1",
+	'153' => "\xf9\xa2",
+	'154' => "\xf9\xa3",
+	'155' => "\xf9\xa4",
+	'156' => "\xf9\xa5",
+	'157' => "\xf9\xa6",
+	'158' => "\xf9\xa7",
+	'159' => "\xf9\xa8",
+	'160' => "\xf9\xa9",
+	'161' => "\xf9\xaa",
+	'162' => "\xf9\xab",
+	'163' => "\xf9\xac",
+	'164' => "\xf9\xad",
+	'165' => "\xf9\xae",
+	'166' => "\xf9\xaf",
+	'167' => "\xf9\x50",
+	'168' => "\xf9\x51",
+	'169' => "\xf9\x52",
+	'170' => "\xf9\x55",
+	'171' => "\xf9\x56",
+	'172' => "\xf9\x57",
+	'173' => "\xf9\x5b",
+	'174' => "\xf9\x5c",
+	'175' => "\xf9\x5d",
+	'176' => "\xf9\x5e",
+	'e1'  => "\xf9\xb1",
+	'e2'  => "\xf9\xb2",
+	'e3'  => "\xf9\xb3",
+	'e4'  => "\xf9\xb4",
+	'e5'  => "\xf9\xb5",
+	'e6'  => "\xf9\xb6",
+	'e7'  => "\xf9\xb7",
+	'e8'  => "\xf9\xb8",
+	'e9'  => "\xf9\xb9",
+	'e10' => "\xf9\xba",
+	'e11' => "\xf9\xbb",
+	'e12' => "\xf9\xbc",
+	'e13' => "\xf9\xbd",
+	'e14' => "\xf9\xbe",
+	'e15' => "\xf9\xbf",
+	'e16' => "\xf9\xc0",
+	'e17' => "\xf9\xc1",
+	'e18' => "\xf9\xc2",
+	'e19' => "\xf9\xc3",
+	'e20' => "\xf9\xc4",
+	'e21' => "\xf9\xc5",
+	'e22' => "\xf9\xc6",
+	'e23' => "\xf9\xc7",
+	'e24' => "\xf9\xc8",
+	'e25' => "\xf9\xc9",
+	'e26' => "\xf9\xca",
+	'e27' => "\xf9\xcb",
+	'e28' => "\xf9\xcc",
+	'e29' => "\xf9\xcd",
+	'e30' => "\xf9\xce",
+	'e31' => "\xf9\xcf",
+	'e32' => "\xf9\xd0",
+	'e33' => "\xf9\xd1",
+	'e34' => "\xf9\xd2",
+	'e35' => "\xf9\xd3",
+	'e36' => "\xf9\xd4",
+	'e37' => "\xf9\xd5",
+	'e38' => "\xf9\xd6",
+	'e39' => "\xf9\xd7",
+	'e40' => "\xf9\xd8",
+	'e41' => "\xf9\xd9",
+	'e42' => "\xf9\xda",
+	'e43' => "\xf9\xdb",
+	'e44' => "\xf9\xdc",
+	'e45' => "\xf9\xdd",
+	'e46' => "\xf9\xde",
+	'e47' => "\xf9\xdf",
+	'e48' => "\xf9\xe0",
+	'e49' => "\xf9\xe1",
+	'e50' => "\xf9\xe2",
+	'e51' => "\xf9\xe3",
+	'e52' => "\xf9\xe4",
+	'e53' => "\xf9\xe5",
+	'e54' => "\xf9\xe6",
+	'e55' => "\xf9\xe7",
+	'e56' => "\xf9\xe8",
+	'e57' => "\xf9\xe9",
+	'e58' => "\xf9\xea",
+	'e59' => "\xf9\xeb",
+	'e60' => "\xf9\xec",
+	'e61' => "\xf9\xed",
+	'e62' => "\xf9\xee",
+	'e63' => "\xf9\xef",
+	'e64' => "\xf9\xf0",
+	'e65' => "\xf9\xf1",
+	'e66' => "\xf9\xf2",
+	'e67' => "\xf9\xf3",
+	'e68' => "\xf9\xf4",
+	'e69' => "\xf9\xf5",
+	'e70' => "\xf9\xf6",
+	'e71' => "\xf9\xf7",
+	'e72' => "\xf9\xf8",
+	'e73' => "\xf9\xf9",
+	'e74' => "\xf9\xfa",
+	'e75' => "\xf9\xfb",
+	'e76' => "\xf9\xfc"
+);
+?>
Index: /temp/branches/mobile/data/class/SC_Customer.php
===================================================================
--- /temp/branches/mobile/data/class/SC_Customer.php	(revision 5934)
+++ /temp/branches/mobile/data/class/SC_Customer.php	(revision 11398)
@@ -63,4 +63,69 @@
 		}
 		return false;
+	}
+
+	/**
+	 * ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+	 *
+	 * @return boolean ³ºÅö¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï true¡¢¤½¤ì°Ê³°¤Î¾ì¹ç
+	 *                 ¤Ï false ¤òÊÖ¤¹¡£
+	 */
+	function checkMobilePhoneId() {
+		if (!isset($_SESSION['mobile']['phone_id'])) {
+			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'])) {
+			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'])) {
+			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'];
 	}
 	
Index: /temp/branches/mobile/data/class/GC_MobileUserAgent.php
===================================================================
--- /temp/branches/mobile/data/class/GC_MobileUserAgent.php	(revision 11398)
+++ /temp/branches/mobile/data/class/GC_MobileUserAgent.php	(revision 11398)
@@ -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: /temp/branches/mobile/data/class/GC_MobileEmoji.php
===================================================================
--- /temp/branches/mobile/data/class/GC_MobileEmoji.php	(revision 11398)
+++ /temp/branches/mobile/data/class/GC_MobileEmoji.php	(revision 11398)
@@ -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;
+	}
+}
+?>
Index: /temp/branches/mobile/data/conf/mobile.conf
===================================================================
--- /temp/branches/mobile/data/conf/mobile.conf	(revision 10576)
+++ /temp/branches/mobile/data/conf/mobile.conf	(revision 11398)
@@ -1,2 +1,55 @@
 <?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¶¦Í­ÀßÄê¥Õ¥¡¥¤¥ë
+ */
+
+// ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÀßÄê¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤à¡£
+require_once(dirname(__FILE__) . '/../install_mobile.inc');
+
+
+//--------------------------------------------------------------------------------------------------------
+// conf.php ¤ÇÄêµÁ¤µ¤ì¤ëÄê¿ô¤Î¤¦¤Á¡¢¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤ËÊÑ¹¹¤¬É¬Í×¤Ê¤â¤Î
+
+define('TEMPLATE_DIR', DATA_PATH . 'Smarty/templates/mobile');	// SMARTY¥Æ¥ó¥×¥ì¡¼¥È
+define('COMPILE_DIR', DATA_PATH . 'Smarty/templates_c/mobile');	// SMARTY¥³¥ó¥Ñ¥¤¥ë
+define('IMAGE_TEMP_DIR', PC_HTML_PATH . '/upload/temp_image/');	// ²èÁü°ì»þÊÝÂ¸
+define('IMAGE_SAVE_DIR', PC_HTML_PATH . '/upload/save_image/');	// ²èÁüÊÝÂ¸Àè
+define('IMAGE_TEMP_URL', PC_URL_DIR . '/upload/temp_image/');	// ²èÁü°ì»þÊÝÂ¸URL
+define('IMAGE_SAVE_URL', PC_URL_DIR . '/upload/save_image/');	// ²èÁüÊÝÂ¸ÀèURL
+
+
+//--------------------------------------------------------------------------------------------------------
+// ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÀìÍÑ¤ÎÀßÄê
+
+/**
+ * ¥»¥Ã¥·¥ç¥ó¤ÎÂ¸Â³»þ´Ö (ÉÃ)
+ */
+define('MOBILE_SESSION_LIFETIME', 1800);
+
+/**
+ * ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¥¢¥É¥ì¥¹¤Î¥æ¡¼¥¶¡¼Ì¾ÉôÊ¬
+ */
+define('MOBILE_KARA_MAIL_ADDRESS_USER', 'eccube');
+
+/**
+ * ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¥¢¥É¥ì¥¹¤Î¥æ¡¼¥¶¡¼Ì¾¤È¥³¥Þ¥ó¥É¤Î´Ö¤Î¶èÀÚ¤êÊ¸»ú
+ * qmail ¤Î¾ì¹ç¤Ï '-'
+ */
+define('MOBILE_KARA_MAIL_ADDRESS_DELIMITER', '+');
+
+/**
+ * ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¥¢¥É¥ì¥¹¤Î¥É¥á¥¤¥óÉôÊ¬
+ */
+define('MOBILE_KARA_MAIL_ADDRESS_DOMAIN', 'example.com');
+
+
+//--------------------------------------------------------------------------------------------------------
+// conf.php ¤«¤é»Ä¤ê¤ÎÀßÄê¤òÆÉ¤ß¹þ¤à¡£
+// Äê¿ô¤ÎÄêµÁ¤¬½ÅÊ£¤¹¤ë¤¿¤á¡¢error_reporting ¤Î¥ì¥Ù¥ë¤òÄ´À°¤¹¤ë¡£
+
+$error_reporting = error_reporting();
+error_reporting($error_reporting & ~E_NOTICE);
+require_once(DATA_PATH . 'conf/conf.php');
+error_reporting($error_reporting);
+unset($error_reporting);
 ?>
Index: /temp/branches/mobile/data/install_mobile.inc
===================================================================
--- /temp/branches/mobile/data/install_mobile.inc	(revision 11398)
+++ /temp/branches/mobile/data/install_mobile.inc	(revision 11398)
@@ -0,0 +1,2 @@
+<?php
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/EZweb.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/EZweb.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/EZweb.php	(revision 11398)
@@ -0,0 +1,347 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: EZweb.php,v 1.15 2006/11/07 09:25:14 kuboa Exp $
+ * @link       http://www.au.kddi.com/ezfactory/tec/spec/4_4.html
+ * @link       http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html
+ * @see        Net_UserAgent_Mobile_Common
+ * @since      File available since Release 0.1.0
+ */
+
+require_once(dirname(__FILE__) . '/Common.php');
+require_once(dirname(__FILE__) . '/Display.php');
+
+// {{{ Net_UserAgent_Mobile_EZweb
+
+/**
+ * EZweb implementation
+ *
+ * Net_UserAgent_Mobile_EZweb is a subclass of
+ * {@link Net_UserAgent_Mobile_Common}, which implements EZweb (WAP1.0/2.0)
+ * user agents.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $_SERVER['HTTP_USER_AGENT'] = 'UP.Browser/3.01-HI02 UP.Link/3.2.1.2';
+ * $agent = &Net_UserAgent_Mobile::factory();
+ *
+ * printf("Name: %s\n", $agent->getName()); // 'UP.Browser'
+ * printf("Version: %s\n", $agent->getVersion()); // 3.01
+ * printf("DeviceID: %s\n", $agent->getDeviceID()); // 'HI02'
+ * printf("Server: %s\n", $agent->getServer()); // 'UP.Link/3.2.1.2'
+ *
+ * e.g.) 'UP.Browser/3.01-HI02 UP.Link/3.2.1.2 (Google WAP Proxy/1.0)'
+ * printf("Comment: %s\n", $agent->getComment()); // 'Google WAP Proxy/1.0'
+ *
+ * e.g.) 'KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1'
+ * if ($agent->isXHTMLCompliant()) {
+ *     print "XHTML compliant!\n"; // true
+ * }
+ * </code>
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @link       http://www.au.kddi.com/ezfactory/tec/spec/4_4.html
+ * @link       http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html
+ * @see        Net_UserAgent_Mobile_Common
+ * @since      Class available since Release 0.1.0
+ */
+class Net_UserAgent_Mobile_EZweb extends Net_UserAgent_Mobile_Common
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * name of the model like 'P502i'
+     * @var string
+     */
+    var $_model = '';
+
+    /**
+     * device ID like 'TS21'
+     * @var string
+     */
+    var $_deviceID = '';
+
+    /**
+     * server string like 'UP.Link/3.2.1.2'
+     * @var string
+     */
+    var $_serverName = '';
+
+    /**
+     * comment like 'Google WAP Proxy/1.0'
+     * @var string
+     */
+    var $_comment = null;
+
+    /**
+     * whether it's XHTML compliant or not
+     * @var boolean
+     */
+    var $_xhtmlCompliant = false;
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isEZweb()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isEZweb()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ isTUKa()
+
+    /**
+     * returns true if the agent is TU-Ka
+     *
+     * @return boolean
+     */
+    function isTUKa()
+    {
+        $tuka = substr($this->_deviceID, 2, 1);
+        if ($this->isWAP2()) {
+            if ($tuka == 'U') {
+                return true;
+            }
+        } else {
+            if ($tuka == 'T') {
+                return true;
+            }
+        }
+        
+        return false;
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string
+     */
+    function parse()
+    {
+        $agent = $this->getUserAgent();
+
+        if (preg_match('/^KDDI-(.*)/', $agent, $matches)) {
+
+            // KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
+            $this->_xhtmlCompliant = true;
+            list($this->_deviceID, $browser, $opt, $this->_serverName) =
+                explode(' ', $matches[1], 4);
+            list($this->name, $version) = explode('/', $browser);
+            $this->version = "$version $opt";
+        } else {
+
+            // UP.Browser/3.01-HI01 UP.Link/3.4.5.2
+            @list($browser, $this->_serverName, $comment) =
+                explode(' ', $agent, 3);
+            list($this->name, $software) = explode('/', $browser);
+            list($this->version, $this->_deviceID) =
+                explode('-', $software);
+            if ($comment) {
+                $this->_comment =
+                    preg_replace('/^\((.*)\)$/', '$1', $comment);
+            }
+        }
+
+        $this->_model = $this->_deviceID;
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Display} class instance
+     *
+     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
+     *     object
+     * @see Net_UserAgent_Mobile_Display
+     */
+    function makeDisplay()
+    {
+        @list($width, $height) =
+            explode(',', $this->getHeader('x-up-devcap-screenpixels'));
+        $screenDepth =
+            explode(',', $this->getHeader('x-up-devcap-screendepth'));
+        $depth = $screenDepth[0] ? pow(2, (integer)$screenDepth[0]) : 0;
+        $color =
+            $this->getHeader('x-up-devcap-iscolor') === '1' ? true : false;
+        return new Net_UserAgent_Mobile_Display(array(
+                                                      'width'  => $width,
+                                                      'height' => $height,
+                                                      'color'  => $color,
+                                                      'depth'  => $depth
+                                                      )
+                                                );
+    }
+
+    // }}}
+    // {{{ getModel()
+
+    /**
+     * returns name of the model (device ID) like 'TS21'
+     *
+     * @return string
+     */
+    function getModel()
+    {
+        return $this->_model;
+    }
+
+    // }}}
+    // {{{ getDeviceID()
+
+    /**
+     * returns device ID like 'TS21'
+     *
+     * @return string
+     */
+    function getDeviceID()
+    {
+        return $this->_deviceID;
+    }
+
+    // }}}
+    // {{{ getServer()
+
+    /**
+     * returns server string like 'UP.Link/3.2.1.2'
+     *
+     * @return string
+     */
+    function getServer()
+    {
+        return $this->_serverName;
+    }
+
+    // }}}
+    // {{{ getComment()
+
+    /**
+     * returns comment like 'Google WAP Proxy/1.0'. returns null if nothinng.
+     *
+     * @return boolean
+     */
+    function getComment()
+    {
+        return $this->_comment;
+    }
+
+    // }}}
+    // {{{ isXHTMLCompliant()
+
+    /**
+     * returns whether it's XHTML compliant or not
+     *
+     * @return boolean
+     */
+    function isXHTMLCompliant()
+    {
+        return $this->_xhtmlCompliant;
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierShortName()
+    {
+        return 'E';
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierLongName()
+    {
+        return 'EZweb';
+    }
+
+    // }}}
+    // {{{ isWIN()
+
+    /**
+     * Returns whether the agent is CDMA 1X WIN or not.
+     *
+     * @return boolean
+     */
+    function isWIN()
+    {
+        return substr($this->_deviceID, 2, 1) == 3 ? true : false;
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/AirHPhone.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/AirHPhone.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/AirHPhone.php	(revision 11398)
@@ -0,0 +1,264 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license,       |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available through the world-wide-web at the following url:           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net>                            |
+// +----------------------------------------------------------------------+
+//
+// $Id: AirHPhone.php,v 1.9 2006/11/07 09:25:14 kuboa Exp $
+//
+
+require_once(dirname(__FILE__) . '/Common.php');
+require_once(dirname(__FILE__) . '/Display.php');
+
+/**
+ * AirH"PHONE implementation
+ *
+ * Net_UserAgent_Mobile_AirHPhone is a subclass of
+ * {@link Net_UserAgent_Mobile_Common}, which implements DDI POCKET's
+ * AirH"PHONE user agents.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $_SERVER['HTTP_USER_AGENT'] =
+ *     'Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0';
+ * $agent = &Net_UserAgent_Mobile::factory();
+ *
+ * printf("Name: %s\n", $agent->getName()); // 'DDIPOCKET'
+ * printf("Verdor: %s\n", $agent->getVendor()); // 'JRC'
+ * printf("Model: %s\n", $agent->getModel()); // 'AH-J3001V,AH-J3002V'
+ * printf("Model Version: %s\n", $agent->getModelVersion()); // '1.0'
+ * printf("Browser Version: %s\n", $agent->getBrowserVersion()); // '0100'
+ * printf("Cache Size: %s\n", $agent->getCacheSize()); // 50
+ * </code>
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.9 $
+ * @see      Net_UserAgent_Mobile_Common
+ * @link     http://www.ddipocket.co.jp/airh_phone/i_hp.html
+ */
+class Net_UserAgent_Mobile_AirHPhone extends Net_UserAgent_Mobile_Common
+{
+
+    // {{{ properties
+
+    /**
+     * User-Agent name
+     * @var string
+     * @access public
+     */
+    var $name = 'WILLCOM';
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * vendor name
+     * @var string
+     */
+    var $_vendor;
+
+    /**
+     * model name
+     * @var string
+     */
+    var $_model;
+
+    /**
+     * version number of the model
+     * @var string
+     */
+    var $_modelVersion;
+
+    /**
+     * version number of the browser
+     * @var string
+     */
+    var $_browserVersion;
+
+    /**
+     * cache size as killobytes unit
+     * @var integer
+     */
+    var $_cacheSize;
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isAirHPhone()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isAirHPhone()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string
+     */
+    function parse()
+    {
+        $agent = $this->getUserAgent();
+        if (preg_match('!^Mozilla/3\.0\((?:DDIPOCKET|WILLCOM);(.*)\)!',
+                       $agent, $matches)
+            ) {
+            list($this->_vendor, $this->_model, $this->_modelVersion,
+                 $this->_browserVersion, $cache) =
+                explode('/', $matches[1]);
+            if (!preg_match('/^[Cc](\d+)/', $cache, $matches)) {
+                return $this->noMatch();
+            }
+            $this->_cacheSize = (integer)$matches[1];
+        } else {
+            $this->noMatch();
+        }
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Display} class instance
+     *
+     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
+     *     object
+     * @see Net_UserAgent_Mobile_Display
+     */
+    function makeDisplay()
+    {
+        return new Net_UserAgent_Mobile_Display(null);
+    }
+
+    // }}}
+    // {{{ getVendor()
+
+    /**
+     * returns vendor name
+     *
+     * @return string
+     */
+    function getVendor()
+    {
+        return $this->_vendor;
+    }
+
+    // }}}
+    // {{{ getModel()
+
+    /**
+     * returns model name. Note that model names are separated with ','.
+     *
+     * @return string
+     */
+    function getModel()
+    {
+        return $this->_model;
+    }
+
+    // }}}
+    // {{{ getModelVersion()
+
+    /**
+     * returns version number of the model
+     *
+     * @return string
+     */
+    function getModelVersion()
+    {
+        return $this->_modelVersion;
+    }
+
+    // }}}
+    // {{{ getBrowserVersion()
+
+    /**
+     * returns version number of the browser
+     *
+     * @return string
+     */
+    function getBrowserVersion()
+    {
+        return $this->_browserVersion;
+    }
+
+    // }}}
+    // {{{ getCacheSize()
+
+    /**
+     * returns cache size as killobytes unit
+     *
+     * @return integer
+     */
+    function getCacheSize()
+    {
+        return $this->_cacheSize;
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierShortName()
+    {
+        return 'H';
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierLongName()
+    {
+        return 'AirH';
+    }
+
+    /**#@-*/
+}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMo.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMo.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMo.php	(revision 11398)
@@ -0,0 +1,585 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: DoCoMo.php,v 1.29 2006/11/07 09:25:14 kuboa Exp $
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/useragent/index.html
+ * @see        Net_UserAgent_Mobile_Common
+ * @since      File available since Release 0.1
+ */
+
+require_once dirname(__FILE__) . '/Common.php';
+require_once dirname(__FILE__) . '/Display.php';
+require_once dirname(__FILE__) . '/DoCoMoDisplayMap.php';
+
+// {{{ Net_UserAgent_Mobile_DoCoMo
+
+/**
+ * NTT DoCoMo implementation
+ *
+ * Net_UserAgent_Mobile_DoCoMo is a subclass of
+ * {@link Net_UserAgent_Mobile_Common}, which implements NTT docomo i-mode
+ * user agents.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $_SERVER['HTTP_USER_AGENT'] = 'DoCoMo/1.0/P502i/c10';
+ * $agent = &Net_UserAgent_Mobile::factory();
+ *
+ * printf("Name: %s\n", $agent->getName()); // 'DoCoMo'
+ * printf("Version: %s\n", $agent->getVersion()); // 1.0
+ * printf("HTML version: %s\n", $agent->getHTMLVersion()); // 2.0
+ * printf("Model: %s\n", $agent->getModel()); // 'P502i'
+ * printf("Cache: %dk\n", $agent->getCacheSize()); // 10
+ * if ($agent->isFOMA()) {
+ *     print "FOMA\n";             // false
+ * }
+ * printf("Vendor: %s\n", $agent->getVendor()); // 'P'
+ * printf("Series: %s\n", $agent->getSeries()); // '502i'
+ *
+ * // only available with <form utn>
+ * // e.g.) 'DoCoMo/1.0/P503i/c10/serNMABH200331';
+ * printf("Serial: %s\n", $agent->getSerialNumber()); // 'NMABH200331'
+ *
+ * // e.g.) 'DoCoMo/2.0 N2001(c10;ser0123456789abcde;icc01234567890123456789)';
+ * printf("Serial: %s\n", $agent->getSerialNumber()); // '0123456789abcde'
+ * printf("Card ID: %s\n", $agent->getCardID()); // '01234567890123456789'
+ *
+ * // e.g.) 'DoCoMo/1.0/P502i (Google CHTML Proxy/1.0)'
+ * printf("Comment: %s\n", $agent->getComment()); // 'Google CHTML Proxy/1.0'
+ *
+ * // e.g.) 'DoCoMo/1.0/D505i/c20/TB/W20H10'
+ * printf("Status: %s\n", $agent->getStatus()); // 'TB'
+ *
+ * // only available in eggy/M-stage
+ * // e.g.) 'DoCoMo/1.0/eggy/c300/s32/kPHS-K'
+ * printf("Bandwidth: %dkbps\n", $agent->getBandwidth()); // 32
+ * </code>
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/useragent/index.html
+ * @see        Net_UserAgent_Mobile_Common
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile_DoCoMo extends Net_UserAgent_Mobile_Common
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * name of the model like 'P502i'
+     * @var string
+     */
+    var $_model = '';
+
+    /**
+     * status of the cache (TC, TB, TD, TJ)
+     * @var string
+     */
+    var $_status = '';
+
+    /**
+     * bandwidth like 32 as kilobytes unit
+     * @var integer
+     */
+    var $_bandwidth = null;
+
+    /**
+     * hardware unique serial number
+     * @var string
+     */
+    var $_serialNumber = null;
+
+    /**
+     * whether it's FOMA or not
+     * @var boolean
+     */
+    var $_isFOMA = false;
+
+    /**
+     * FOMA Card ID (20 digit alphanumeric)
+     * @var string
+     */
+    var $_cardID = null;
+
+    /**
+     * comment on user agent string like 'Google Proxy'
+     * @var string
+     */
+    var $_comment = null;
+
+    /**
+     * cache size as killobytes unit
+     * @var integer
+     */
+    var $_cacheSize;
+
+    /**
+     * width and height of the display
+     * @var string
+     */
+    var $_displayBytes = '';
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isDoCoMo()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isDoCoMo()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string
+     *
+     * @return mixed void, or a PEAR error object on error
+     */
+    function parse()
+    {
+        @list($main, $foma_or_comment) =
+            explode(' ', $this->getUserAgent(), 2);
+
+        if ($foma_or_comment
+            && preg_match('/^\((.*)\)$/', $foma_or_comment, $matches)
+            ) {
+
+            // DoCoMo/1.0/P209is (Google CHTML Proxy/1.0)
+            $this->_comment = $matches[1];
+            $result = $this->_parseMain($main);
+        } elseif ($foma_or_comment) {
+
+            // DoCoMo/2.0 N2001(c10;ser0123456789abcde;icc01234567890123456789)
+            $this->_isFOMA = true;
+            list($this->name, $this->version) = explode('/', $main);
+            $result = $this->_parseFOMA($foma_or_comment);
+        } else {
+
+            // DoCoMo/1.0/R692i/c10
+            $result = $this->_parseMain($main);
+        }
+
+        if (Net_UserAgent_Mobile::isError($result)) {
+            return $result;
+        }
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Display} class instance
+     *
+     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
+     *     object
+     * @see Net_UserAgent_Mobile_Display
+     * @see Net_UserAgent_Mobile_DoCoMoDisplayMap::get()
+     */
+    function makeDisplay()
+    {
+        $display = Net_UserAgent_Mobile_DoCoMoDisplayMap::get($this->_model);
+        if ($this->_displayBytes !== '') {
+            list($widthBytes, $heightBytes) =
+                explode('*', $this->_displayBytes);
+            $display['width_bytes']  = $widthBytes;
+            $display['height_bytes'] = $heightBytes;
+        }
+        return new Net_UserAgent_Mobile_Display($display);
+    }
+
+    // }}}
+    // {{{ getHTMLVersion()
+
+    /**
+     * returns supported HTML version like '3.0'. retuns null if unknown.
+     *
+     * @return string
+     */
+    function getHTMLVersion()
+    {
+        static $htmlVersionMap;
+        if (!isset($htmlVersionMap)) {
+            $htmlVersionMap = array(
+                                    '[DFNP]501i' => '1.0',
+                                    '502i|821i|209i|651|691i|(F|N|P|KO)210i|^F671i$' => '2.0',
+                                    '(D210i|SO210i)|503i|211i|SH251i|692i|200[12]|2101V' => '3.0',
+                                    '504i|251i|^F671iS$|212i|2051|2102V|661i|2701|672i|SO213i|850i' => '4.0',
+                                    'eggy|P751v' => '3.2',
+                                    '505i|252i|900i|506i|880i|253i|P213i|901i|700i|851i|701i|881i|800i|600i|882i' => '5.0',
+                                    '902i|702i|851i' => '6.0',
+                                    '903i' => '7.0'
+                                    );
+        }
+
+        foreach ($htmlVersionMap as $key => $value) {
+            if (preg_match("/$key/", $this->_model)) {
+                return $value;
+            }
+        }
+        return null;
+    }
+
+    // }}}
+    // {{{ getCacheSize()
+
+    /**
+     * returns cache size as kilobytes unit. returns 5 if unknown.
+     *
+     * @return integer
+     */
+    function getCacheSize()
+    {
+        if ($this->_cacheSize) {
+            return $this->_cacheSize;
+        }
+
+        static $defaultCacheSize;
+        if (!isset($defaultCacheSize)) {
+            $defaultCacheSize = 5;
+        }
+        return $defaultCacheSize;
+    }
+
+    // }}}
+    // {{{ getSeries()
+
+    /**
+     * returns series name like '502i'. returns null if unknown.
+     *
+     * @return string
+     */
+    function getSeries()
+    {
+        if ($this->isFOMA() && preg_match('/(\d{4})/', $this->_model)) {
+            return 'FOMA';
+        }
+
+        if (preg_match('/(\d{3}i)/', $this->_model, $matches)) {
+            return $matches[1];
+        }
+
+        if ($this->_model == 'P651ps') {
+            return '651';
+        }
+
+        return null;
+    }
+
+    // }}}
+    // {{{ getVendor()
+
+    /**
+     * returns vender code like 'SO' for Sony. returns null if unknown.
+     *
+     * @return string
+     */
+    function getVendor()
+    {
+        if (preg_match('/([A-Z]+)\d/', $this->_model, $matches)) {
+            return $matches[1];
+        }
+        return null;
+    }
+
+    // }}}
+    // {{{ getModel()
+
+    /**
+     * returns name of the model like 'P502i'
+     *
+     * @return string
+     */
+    function getModel()
+    {
+        return $this->_model;
+    }
+
+    // }}}
+    // {{{ getStatus()
+
+    /**
+     * returns status like "TB", "TC", "TD" or "TJ", which means:
+     * 
+     * TB | Browsers
+     * TC | Browsers with image off (only Available in HTML 5.0)
+     * TD | Fetching JAR
+     * TJ | i-Appli
+     *
+     * @return string
+     */
+    function getStatus()
+    {
+        return $this->_status;
+    }
+
+    // }}}
+    // {{{ getBandwidth()
+
+    /**
+     * returns bandwidth like 32 as killobytes unit. Only vailable in eggy,
+     * returns null otherwise.
+     *
+     * @return integer
+     */
+    function getBandwidth()
+    {
+        return $this->_bandwidth;
+    }
+
+    // }}}
+    // {{{ getSerialNumber()
+
+    /**
+     * returns hardware unique serial number (15 digit in FOMA, 11 digit
+     * otherwise alphanumeric). Only available with form utn attribute.
+     * returns null otherwise.
+     *
+     * @return string
+     */
+    function getSerialNumber()
+    {
+        return $this->_serialNumber;
+    }
+
+    // }}}
+    // {{{ isFOMA()
+
+    /**
+     * retuns whether it's FOMA or not
+     *
+     * @return boolean
+     */
+    function isFOMA()
+    {
+        return $this->_isFOMA;
+    }
+
+    // }}}
+    // {{{ getComment()
+
+    /**
+     * returns comment on user agent string like 'Google Proxy'. returns null
+     * otherwise.
+     *
+     * @return string
+     */
+    function getComment()
+    {
+        return $this->_comment;
+    }
+
+    // }}}
+    // {{{ getCardID()
+
+    /**
+     * returns FOMA Card ID (20 digit alphanumeric). Only available in FOMA
+     * with <form utn> attribute. returns null otherwise.
+     *
+     * @return string
+     */ 
+    function getCardID()
+    {
+        return $this->_cardID;
+    }
+
+    // }}}
+    // {{{ isGPS()
+
+    /**
+     * @return boolean
+     */ 
+    function isGPS()
+    {
+        static $gpsModels;
+        if (!isset($gpsModels)) {
+            $gpsModels = array('F661i', 'F505iGPS');
+        }
+        return in_array($this->_model, $gpsModels);
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierShortName()
+    {
+        return 'I';
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierLongName()
+    {
+        return 'DoCoMo';
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    // }}}
+    // {{{ _parseMain()
+
+    /**
+     * parse main part of HTTP_USER_AGENT string (not FOMA)
+     *
+     * @param string $main main part of HTTP_USER_AGENT string
+     * @return mixed void, or a PEAR error object on error
+     */ 
+    function _parseMain($main)
+    {
+        @list($this->name, $this->version, $this->_model, $cache, $rest) =
+            explode('/', $main, 5);
+        if ($this->_model === 'SH505i2') {
+            $this->_model = 'SH505i';
+        }
+
+        if ($cache) {
+            if (!preg_match('/^c(\d+)/', $cache, $matches)) {
+                return $this->noMatch();
+            }
+            $this->_cacheSize = (integer)$matches[1];
+        }
+
+        if ($rest) {
+            $rest = explode('/', $rest);
+            foreach ($rest as $value) {
+                if (preg_match('/^ser(\w{11})$/', $value, $matches)) {
+                    $this->_serialNumber = $matches[1];
+                    continue;
+                }
+                if (preg_match('/^(T[CDBJ])$/', $value, $matches)) {
+                    $this->_status = $matches[1];
+                    continue;
+                }
+                if (preg_match('/^s(\d+)$/', $value, $matches)) {
+                    $this->_bandwidth = (integer)$matches[1];
+                    continue;
+                }
+                if (preg_match('/^W(\d+)H(\d+)$/', $value, $matches)) {
+                    $this->_displayBytes = "{$matches[1]}*{$matches[2]}";
+                    continue;
+                }
+            }
+        }
+    }
+
+    // }}}
+    // {{{ _parseFOMA()
+
+    /**
+     * parse main part of HTTP_USER_AGENT string (FOMA)
+     *
+     * @param string $foma main part of HTTP_USER_AGENT string
+     * @return mixed void, or a PEAR error object on error
+     */ 
+    function _parseFOMA($foma)
+    {
+        if (!preg_match('/^([^(]+)/', $foma, $matches)) {
+            return $this->noMatch();
+        }
+        $this->_model = $matches[1];
+        if ($matches[1] === 'MST_v_SH2101V') {
+            $this->_model = 'SH2101V';
+        }
+
+        if (preg_match('/^[^(]+\((.*?)\)$/', $foma, $matches)) {
+            $rest = explode(';', $matches[1]);
+            foreach ($rest as $value) {
+                if (preg_match('/^c(\d+)/', $value, $matches)) {
+                    $this->_cacheSize = (integer)$matches[1];
+                    continue;
+                }
+                if (preg_match('/^ser(\w{15})$/', $value, $matches)) {
+                    $this->_serialNumber = $matches[1];
+                    continue;
+                }
+                if (preg_match('/^(T[CDBJ])$/', $value, $matches)) {
+                    $this->_status = $matches[1];
+                    continue;
+                }
+                if (preg_match('/^icc(\w{20})$/', $value, $matches)) {
+                    $this->_cardID = $matches[1];
+                    continue;
+                }
+                if (preg_match('/^W(\d+)H(\d+)$/', $value, $matches)) {
+                    $this->_displayBytes = "{$matches[1]}*{$matches[2]}";
+                    continue;
+                }
+                return $this->noMatch();
+            }
+        }
+    }
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Vodafone.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Vodafone.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Vodafone.php	(revision 11398)
@@ -0,0 +1,557 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: Vodafone.php,v 1.8 2006/11/07 09:25:14 kuboa Exp $
+ * @since      File available since Release 0.1
+ */
+
+require_once dirname(__FILE__) . '/Common.php';
+require_once dirname(__FILE__) . '/Display.php';
+
+/**
+ * Vodafone implementation
+ *
+ * Net_UserAgent_Mobile_Vodafone is a subclass of
+ * {@link Net_UserAgent_Mobile_Common}, which implements Vodafone user agents.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $_SERVER['HTTP_USER_AGENT'] = 'J-PHONE/2.0/J-DN02';
+ * $agent = &Net_UserAgent_Mobile::factory();
+ *
+ * printf("Name: %s\n", $agent->getName()); // 'J-PHONE'
+ * printf("Version: %s\n", $agent->getVersion()); // 2.0
+ * printf("Model: %s\n", $agent->getModel()); // 'J-DN02'
+ * if ($agent->isPacketCompliant()) {
+ *     print "Packet is compliant.\n"; // false
+ * }
+ *
+ * // only availabe in Java compliant
+ * // e.g.) 'J-PHONE/4.0/J-SH51/SNXXXXXXXXX SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0'
+ * printf("Serial: %s\n", $agent->getSerialNumber()); // XXXXXXXXX
+ * printf("Vendor: %s\n", $agent->getVendor()); // 'SH'
+ * printf("Vendor Version: %s\n", $agent->getVendorVersion()); // '0001a'
+ *
+ * $info = $agent->getJavaInfo();  // array
+ * foreach ($info as $key => $value) {
+ *     print "$key: $value\n";
+ * }
+ * </code>
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @link       http://developers.vodafone.jp/dp/tool_dl/web/useragent.php
+ * @link       http://developers.vodafone.jp/dp/tool_dl/web/position.php
+ * @see        Net_UserAgent_Mobile_Common
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile_Vodafone extends Net_UserAgent_Mobile_Common
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * name of the model like 'J-DN02'
+     * @var string
+     */
+    var $_model = '';
+
+    /**
+     * whether the agent is packet connection complicant or not
+     * @var boolean
+     */
+    var $_packetCompliant = false;
+
+    /**
+     * terminal unique serial number
+     * @var string
+     */
+    var $_serialNumber = null;
+
+    /**
+     * vendor code like 'SH'
+     * @var string
+     */
+    var $_vendor = '';
+
+    /**
+     * vendor version like '0001a'
+     * @var string
+     */
+    var $_vendorVersion = null;
+
+    /**
+     * Java profiles
+     * @var array
+     */
+    var $_javaInfo = array();
+
+    /**
+     * whether the agent is 3G
+     * @var boolean
+     */
+    var $_is3G = true;
+
+    /**
+     * the name of the mobile phone
+     * @var string
+     */
+    var $_msname = '';
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isJPhone()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isJPhone()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ isVodafone()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isVodafone()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string
+     *
+     * @return mixed void, or a PEAR error object on error
+     */
+    function parse()
+    {
+        $agent = explode(' ', $this->getUserAgent());
+        preg_match('!^(?:(SoftBank|Vodafone|J-PHONE)/\d\.\d|MOT-)!',
+                   $agent[0], $matches
+                   );
+        if (count($matches) > 1) {
+            $carrier = $matches[1];
+        } else {
+            $carrier = 'Motorola';
+        }
+
+        switch ($carrier) {
+        case 'Vodafone':
+        case 'SoftBank':
+            $result = $this->_parseVodafone($agent);
+            break;
+        case 'J-PHONE':
+            $result = $this->_parseJphone($agent);
+            break;
+        case 'Motorola':
+            $result = $this->_parseMotorola($agent);
+            break;
+        }
+
+        if (Net_UserAgent_Mobile::isError($result)) {
+            return $result;
+        }
+
+        $this->_msname = $this->getHeader('x-jphone-msname');
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Display} class instance
+     *
+     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
+     *     object
+     * @see Net_UserAgent_Mobile_Display
+     */
+    function makeDisplay() 
+    {
+        @list($width, $height) =
+            explode('*', $this->getHeader('x-jphone-display'));
+        $color = false;
+        $depth = 0;
+        if ($color_string = $this->getHeader('x-jphone-color')) {
+            preg_match('!^([CG])(\d+)$!', $color_string, $matches);
+            $color = $matches[1] === 'C' ? true : false;
+            $depth = $matches[2];
+        }
+        return new Net_UserAgent_Mobile_Display(array(
+                                                      'width'  => $width,
+                                                      'height' => $height,
+                                                      'depth'  => $depth,
+                                                      'color'  => $color)
+                                                );
+    }
+
+    // }}}
+    // {{{ getModel()
+
+    /**
+     * returns name of the model like 'J-DN02'
+     *
+     * @return string
+     */
+    function getModel()
+    {
+        return $this->_model;
+    }
+
+    // }}}
+    // {{{ isPacketCompliant()
+
+    /**
+     * returns whether the agent is packet connection complicant or not
+     *
+     * @return boolean
+     */
+    function isPacketCompliant()
+    {
+        return $this->_packetCompliant;
+    }
+
+    // }}}
+    // {{{ getSerialNumber()
+
+    /**
+     * return terminal unique serial number. returns null if user forbids to
+     * send his/her serial number.
+     *
+     * @return string
+     */
+    function getSerialNumber()
+    {
+        return $this->_serialNumber;
+    }
+
+    // }}}
+    // {{{ getVendor()
+
+    /**
+     * returns vendor code like 'SH'
+     *
+     * @return string
+     */
+    function getVendor()
+    {
+        return $this->_vendor;
+    }
+
+    // }}}
+    // {{{ getVendorVersion()
+
+    /**
+     * returns vendor version like '0001a'. returns null if unknown.
+     *
+     * @return string
+     */
+    function getVendorVersion()
+    {
+        return $this->_vendorVersion;
+    }
+
+    // }}}
+    // {{{ getJavaInfo()
+
+    /**
+     * returns array of Java profiles
+     *
+     * Array structure is something like:
+     *
+     * - 'Profile'       => 'MIDP-1.0',
+     * - 'Configuration' => 'CLDC-1.0',
+     * - 'Ext-Profile'   => 'JSCL-1.1.0'
+     *
+     * @return array
+     */
+    function getJavaInfo()
+    {
+        return $this->_javaInfo;
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierShortName()
+    {
+        return 'V';
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierLongName()
+    {
+        return 'Vodafone';
+    }
+
+    // }}}
+    // {{{ isTypeC()
+
+    /**
+     * returns true if the type is C
+     *
+     * @return boolean
+     */
+    function isTypeC()
+    {
+        if ($this->_is3G || !preg_match('!^[32]\.!', $this->version)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    // }}}
+    // {{{ isTypeP()
+
+    /**
+     * returns true if the type is P
+     *
+     * @return boolean
+     */
+    function isTypeP()
+    {
+        if ($this->_is3G || !preg_match('!^4\.!', $this->version)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    // }}}
+    // {{{ isTypeW()
+
+    /**
+     * returns true if the type is W
+     *
+     * @return boolean
+     */
+    function isTypeW()
+    {
+        if ($this->_is3G || !preg_match('!^5\.!', $this->version)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    // }}}
+    // {{{ isType3GC()
+
+    /**
+     * returns true if the type is 3GC
+     *
+     * @return boolean
+     */
+    function isType3GC()
+    {
+        return $this->_is3G;
+    }
+
+    // }}}
+    // {{{ getMsname()
+
+    /**
+     * returns the name of the mobile phone
+     *
+     * @return string the name of the mobile phone
+     */
+    function getMsname()
+    {
+        return $this->_msname;
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    // }}}
+    // {{{ _parseVodafone()
+
+    /**
+     * parse HTTP_USER_AGENT string for the Vodafone 3G aegnt
+     *
+     * @param array $agent parts of the User-Agent string
+     * @return mixed void, or a PEAR error object on error
+     */
+    function _parseVodafone(&$agent)
+    {
+        $count = count($agent);
+        $this->_packetCompliant = true;
+
+        // Vodafone/1.0/V702NK/NKJ001 Series60/2.6 Nokia6630/2.39.148 Profile/MIDP-2.0 Configuration/CLDC-1.1
+        // Vodafone/1.0/V702NK/NKJ001/SN123456789012345 Series60/2.6 Nokia6630/2.39.148 Profile/MIDP-2.0 Configuration/CLDC-1.1
+        // Vodafone/1.0/V802SE/SEJ001/SN123456789012345 Browser/SEMC-Browser/4.1 Profile/MIDP-2.0 Configuration/CLDC-1.1
+        @list($this->name, $this->version, $this->_model, $modelVersion,
+              $serialNumber) = explode('/', $agent[0]);
+        if ($serialNumber) {
+            if ($serialNumber) {
+                if (!preg_match('!^SN(.+)!', $serialNumber, $matches)) {
+                    return $this->noMatch();
+                }
+                $this->_serialNumber = $matches[1];
+            }
+        }
+
+        if (!preg_match('!^([a-z]+)([a-z]\d{2,3})$!i', $modelVersion, $matches)) {
+            return $this->noMatch();
+        }
+
+        $this->_vendor = $matches[1];
+        $this->_vendorVersion = $matches[2];
+
+        for ($i = 2; $i < $count; ++$i) {
+            list($key, $value) = explode('/', $agent[$i]);
+            $this->_javaInfo[$key] = $value;
+        }
+    }
+
+    // }}}
+    // {{{ _parseJphone()
+
+    /**
+     * parse HTTP_USER_AGENT string for the ancient agent
+     *
+     * @param array $agent parts of the User-Agent string
+     * @return mixed void, or a PEAR error object on error
+     */
+    function _parseJphone(&$agent)
+    {
+        $count = count($agent);
+        $this->_is3G = false;
+
+        if ($count > 1) {
+
+            // J-PHONE/4.0/J-SH51/SNJSHA3029293 SH/0001aa Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0
+            $this->_packetCompliant = true;
+            @list($this->name, $this->version, $this->_model,
+                  $serialNumber) = explode('/', $agent[0]);
+            if ($serialNumber) {
+                if (!preg_match('!^SN(.+)!', $serialNumber, $matches)) {
+                    return $this->noMatch();
+                }
+                $this->_serialNumber = $matches[1];
+            }
+            list($this->_vendor, $this->_vendorVersion) =
+                explode('/', $agent[1]);
+            for ($i = 2; $i < $count; ++$i) {
+                list($key, $value) = explode('/', $agent[$i]);
+                $this->_javaInfo[$key] = $value;
+            }
+        } else {
+
+            // J-PHONE/2.0/J-DN02
+            @list($this->name, $this->version, $model) =
+                explode('/', $agent[0]);
+            $this->_model  = (string)$model;
+            if ($this->_model) {
+                if (preg_match('!V\d+([A-Z]+)!', $this->_model, $matches)) {
+                    $this->_vendor = $matches[1];
+                } elseif (preg_match('!J-([A-Z]+)!', $this->_model, $matches)) {
+                    $this->_vendor = $matches[1];
+                }
+            }
+        }
+    }
+
+    // }}}
+    // {{{ _parseMotorola()
+
+    /**
+     * parse HTTP_USER_AGENT string for the Motorola 3G aegnt
+     *
+     * @param array $agent parts of the User-Agent string
+     * @return mixed void, or a PEAR error object on error
+     */
+    function _parseMotorola(&$agent)
+    {
+        $count = count($agent);
+        $this->_packetCompliant = true;
+        $this->_vendor = 'MOT';
+
+        // MOT-V980/80.2F.2E. MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1
+        list($name, $this->_vendorVersion) = explode('/', $agent[0]);
+        $this->_model = substr(strrchr($name, '-'), 1);
+
+        for ($i = 2; $i < $count; ++$i) {
+            list($key, $value) = explode('/', $agent[$i]);
+            $this->_javaInfo[$key] = $value;
+        }
+    }
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/NonMobile.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/NonMobile.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/NonMobile.php	(revision 11398)
@@ -0,0 +1,159 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license,       |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available through the world-wide-web at the following url:           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net>                            |
+// +----------------------------------------------------------------------+
+//
+// $Id: NonMobile.php,v 1.10 2006/11/07 09:25:14 kuboa Exp $
+//
+
+require_once(dirname(__FILE__) . '/Common.php');
+require_once(dirname(__FILE__) . '/Display.php');
+
+/**
+ * Non-Mobile Agent implementation
+ *
+ * Net_UserAgent_Mobile_NonMobile is a subclass of
+ * {@link Net_UserAgent_Mobile_Common}, which implements non-mobile or
+ * unimplemented user agents.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0';
+ * $agent = &Net_UserAgent_Mobile::factory();
+ * </code>
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.10 $
+ * @see      Net_UserAgent_Mobile_Common
+ */
+class Net_UserAgent_Mobile_NonMobile extends Net_UserAgent_Mobile_Common
+{
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isNonMobile()
+
+    /**
+     * returns true
+     *
+     * @return boolean
+     */
+    function isNonMobile()
+    {
+        return true;
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string
+     */
+    function parse()
+    {
+        @list($this->name, $this->version) =
+            explode('/', $this->getUserAgent());
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Display} class instance
+     *
+     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
+     *     object
+     * @see Net_UserAgent_Mobile_Display
+     */
+    function makeDisplay()
+    {
+        return new Net_UserAgent_Mobile_Display(null);
+    }
+
+    // }}}
+    // {{{ getModel()
+
+    /**
+     * returns name of the model
+     *
+     * @return string
+     */
+    function getModel()
+    {
+        return '';
+    }
+
+    // }}}
+    // {{{ getDeviceID()
+
+    /**
+     * returns device ID
+     *
+     * @return string
+     */
+    function getDeviceID()
+    {
+        return '';
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierShortName()
+    {
+        return 'N';
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @return string
+     */
+    function getCarrierLongName()
+    {
+        return 'NonMobile';
+    }
+
+    /**#@-*/
+}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMoDisplayMap.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMoDisplayMap.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/DoCoMoDisplayMap.php	(revision 11398)
@@ -0,0 +1,1339 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: DoCoMoDisplayMap.php,v 1.29 2006/11/07 09:25:14 kuboa Exp $
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
+ * @see        Net_UserAgent_Mobile_Display
+ * @since      File available since Release 0.1
+ */
+
+// {{{ Net_UserAgent_Mobile_DoCoMoDisplayMap
+
+/**
+ * Display information mapping for DoCoMo.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
+ * @see        Net_UserAgent_Mobile_Display
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile_DoCoMoDisplayMap
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ get()
+
+    /**
+     * Returns the display information of the model.
+     *
+     * @param string $model the name of the model
+     * @return array
+     * @static
+     */
+    function get($model)
+    {
+        static $displayMap;
+        if (!isset($displayMap)) {
+            if (isset($_SERVER['DOCOMO_MAP'])) {
+
+                // using the specified XML data
+                while (true) {
+                    if (!function_exists('xml_parser_create')
+                        || !is_readable($_SERVER['DOCOMO_MAP'])
+                        ) {
+                        break;
+                    }
+                    $xml = file_get_contents($_SERVER['DOCOMO_MAP']);
+                    $parser = xml_parser_create();
+                    if ($parser === false) {
+                        break;
+                    }
+                    xml_parse_into_struct($parser, $xml, $values, $indexes);
+                    if (!xml_parser_free($parser)) {
+                        break;
+                    }
+                    if (isset($indexes['OPT'])) {
+                        unset($indexes['OPT']);
+                    }
+                    foreach ($indexes as $modelName => $modelIndexes) {
+                        $displayMap[$modelName] = array();
+                        foreach ($values[ $modelIndexes[0] ]['attributes'] as $attributeName => $attributeValue) {
+                            $displayMap[$modelName][ strtolower($attributeName) ] = $attributeValue;
+                        }
+                    }
+                    break;
+                }
+            }
+
+            if (!isset($displayMap)) {
+                $displayMap = array(
+
+                                    // i-mode compliant HTML 1.0
+                                    'D501I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 72,
+                                                     'depth'  => 2,
+                                                     'color'  => 0
+                                                     ),
+                                    'F501I' => array(
+                                                     'width'  => 112,
+                                                     'height' => 84,
+                                                     'depth'  => 2,
+                                                     'color'  => 0
+                                                     ),
+                                    'N501I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 2,
+                                                     'color'  => 0
+                                                     ),
+                                    'P501I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 120,
+                                                     'depth'  => 2,
+                                                     'color'  => 0
+                                                     ),
+
+                                    // i-mode compliant HTML 2.0
+                                    'D502I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 90,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'F502I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 91,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'N502I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'P502I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 117,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'NM502I' => array(
+                                                      'width'  => 111,
+                                                      'height' => 106,
+                                                      'depth'  => 2,
+                                                      'color'  => 0
+                                                      ),
+                                    'SO502I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 120,
+                                                      'depth'  => 4,
+                                                      'color'  => 0
+                                                      ),
+                                    'F502IT' => array(
+                                                      'width'  => 96,
+                                                      'height' => 91,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'N502IT' => array(
+                                                      'width'  => 118,
+                                                      'height' => 128,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO502IWM' => array(
+                                                        'width'  => 120,
+                                                        'height' => 113,
+                                                        'depth'  => 256,
+                                                        'color'  => 1
+                                                        ),
+                                    'SH821I' => array(
+                                                      'width'  => 96,
+                                                      'height' => 78,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'N821I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'P821I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'D209I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 90,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'ER209I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 72,
+                                                      'depth'  => 2,
+                                                      'color'  => 0
+                                                      ),
+                                    'F209I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 91,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'KO209I' => array(
+                                                      'width'  => 96,
+                                                      'height' => 96,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'N209I' => array(
+                                                     'width'  => 108,
+                                                     'height' => 82,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'P209I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 87,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'P209IS' => array(
+                                                      'width'  => 96,
+                                                      'height' => 87,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'R209I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 72,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'P651PS' => array(
+                                                      'width'  => 96,
+                                                      'height' => 87,
+                                                      'depth'  => 4,
+                                                      'color'  => 0
+                                                      ),
+                                    'R691I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 72,
+                                                     'depth'  => 4,
+                                                     'color'  => 0
+                                                     ),
+                                    'F671I' => array(
+                                                     'width'  => 120,
+                                                     'height' => 126,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'F210I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 113,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'N210I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 113,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'P210I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 91,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'KO210I' => array(
+                                                      'width'  => 96,
+                                                      'height' => 96,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+
+                                    // i-mode compliant HTML 3.0
+                                    'F503I' => array(
+                                                     'width'  => 120,
+                                                     'height' => 130,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'F503IS' => array(
+                                                      'width'  => 120,
+                                                      'height' => 130,
+                                                      'depth'  => 4096,
+                                                      'color'  => 1
+                                                      ),
+                                    'P503I' => array(
+                                                     'width'  => 120,
+                                                     'height' => 130,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'P503IS' => array(
+                                                      'width'  => 120,
+                                                      'height' => 130,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'N503I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'N503IS' => array(
+                                                      'width'  => 118,
+                                                      'height' => 128,
+                                                      'depth'  => 4096,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO503I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 113,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO503IS' => array(
+                                                       'width'  => 120,
+                                                       'height' => 113,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'D503I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 126,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'D503IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 126,
+                                                      'depth'  => 4096,
+                                                      'color'  => 1
+                                                      ),
+                                    'D210I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 91,
+                                                     'depth'  => 256,
+                                                     'color'  => 1
+                                                     ),
+                                    'SO210I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 113,
+                                                      'depth'  => 256,
+                                                      'color'  => 1
+                                                      ),
+                                    'F211I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 113,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'D211I' => array(
+                                                     'width'  => 100,
+                                                     'height' => 91,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'N211I' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'N211IS' => array(
+                                                      'width'  => 118,
+                                                      'height' => 128,
+                                                      'depth'  => 4096,
+                                                      'color'  => 1
+                                                      ),
+                                    'P211I' => array(
+                                                     'width'  => 120,
+                                                     'height' => 130,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P211IS' => array(
+                                                      'width'  => 120,
+                                                      'height' => 130,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO211I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 112,
+                                                      'depth'  => 4096,
+                                                      'color'  => 1
+                                                      ),
+                                    'R211I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 98,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'SH251I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 130,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH251IS' => array(
+                                                       'width'  => 176,
+                                                       'height' => 187,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'R692I' => array(
+                                                     'width'  => 96,
+                                                     'height' => 98,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+
+                                    // i-mode compliant HTML 3.0
+                                    // (FOMA 2001/2002/2101V)
+                                    'N2001' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 4096,
+                                                     'color'  => 1
+                                                     ),
+                                    'N2002' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P2002' => array(
+                                                     'width'  => 118,
+                                                     'height' => 128,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'D2101V' => array(
+                                                      'width'  => 120,
+                                                      'height' => 130,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P2101V' => array(
+                                                      'width'  => 163,
+                                                      'height' => 182,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH2101V' => array(
+                                                       'width'  => 800,
+                                                       'height' => 600,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'T2101V' => array(
+                                                      'width'  => 176,
+                                                      'height' => 144,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+
+                                    // i-mode compliant HTML 4.0
+                                    'D504I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'F504I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 136,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'F504IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 136,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N504I' => array(
+                                                     'width'  => 160,
+                                                     'height' => 180,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N504IS' => array(
+                                                      'width'  => 160,
+                                                      'height' => 180,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO504I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 112,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'P504I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P504IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 144,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'D251I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'D251IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 144,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'F251I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 140,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N251I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 140,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N251IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 140,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'P251IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 144,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'F671IS' => array(
+                                                      'width'  => 160,
+                                                      'height' => 120,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'F212I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 136,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'SO212I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 112,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'F661I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 136,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'F672I' => array(
+                                                     'width'  => 160,
+                                                     'height' => 120,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'SO213I' => array(
+                                                      'width'  => 120,
+                                                      'height' => 112,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO213IS' => array(
+                                                       'width'  => 120,
+                                                       'height' => 112,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'SO213IWR' => array(
+                                                        'width'  => 120,
+                                                        'height' => 112,
+                                                        'depth'  => 65536,
+                                                        'color'  => 1
+                                                        ),
+
+                                    // i-mode compliant HTML 4.0
+                                    // (FOMA 2051/2102V/2701 etc.)
+                                    'F2051' => array(
+                                                     'width'  => 176,
+                                                     'height' => 182,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N2051' => array(
+                                                     'width'  => 176,
+                                                     'height' => 198,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P2102V' => array(
+                                                      'width'  => 176,
+                                                      'height' => 198,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P2102V' => array(
+                                                      'width'  => 176,
+                                                      'height' => 198,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'F2102V' => array(
+                                                      'width'  => 176,
+                                                      'height' => 182,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N2102V' => array(
+                                                      'width'  => 176,
+                                                      'height' => 198,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N2701' => array(
+                                                     'width'  => 176,
+                                                     'height' => 198,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'NM850IG' => array(
+                                                       'width'  => 176,
+                                                       'height' => 144,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+
+                                    // i-mode compliant HTML 5.0 (505i etc.)
+                                    'D505I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'SO505I' => array(
+                                                      'width'  => 256,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH505I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'N505I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'F505I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 268,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'P505I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 266,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'D505IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P505IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 266,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N505IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO505IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'SH505IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'F505IGPS' => array(
+                                                        'width'  => 240,
+                                                        'height' => 268,
+                                                        'depth'  => 262144,
+                                                        'color'  => 1
+                                                        ),
+                                    'D252I' => array(
+                                                     'width'  => 176,
+                                                     'height' => 198,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'SH252I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P252I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N252I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 140,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P252IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 144,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'D506I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'F506I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 268,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'N506I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 295,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'P506IC' => array(
+                                                      'width'  => 240,
+                                                      'height' => 266,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH506IC' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'SO506IC' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'N506IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 295,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO506I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 256,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO506IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'N506ISII' => array(
+                                                        'width'  => 240,
+                                                        'height' => 295,
+                                                        'depth'  => 262144,
+                                                        'color'  => 1
+                                                        ),
+                                    'P506ICII' => array(
+                                                        'width'  => 240,
+                                                        'height' => 266,
+                                                        'depth'  => 65536,
+                                                        'color'  => 1
+                                                        ),
+                                    'D253I' => array(
+                                                     'width'  => 176,
+                                                     'height' => 198,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'N253I' => array(
+                                                     'width'  => 160,
+                                                     'height' => 180,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P253I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'D253IWM' => array(
+                                                       'width'  => 220,
+                                                       'height' => 144,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'P253IS' => array(
+                                                      'width'  => 132,
+                                                      'height' => 144,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'P213I' => array(
+                                                     'width'  => 132,
+                                                     'height' => 144,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+
+                                    // i-mode compliant HTML 5.0
+                                    // (FOMA 900i etc.)
+                                    'F900I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'N900I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 269,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P900I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 266,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'SH900I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'F900IT' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P900IV' => array(
+                                                      'width'  => 240,
+                                                      'height' => 266,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'N900IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 269,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'D900I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'F900IC' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'F880IES' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'N900IL' => array(
+                                                      'width'  => 240,
+                                                      'height' => 269,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N900IG' => array(
+                                                      'width'  => 240,
+                                                      'height' => 269,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH901IC' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'F901IC' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'N901IC' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'D901I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'P901I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'F700I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'SH700I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'N700I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P700I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'F700IS' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH700IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'SA700IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+
+                                    'SH901IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 252,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'F901IS' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'D901IS' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P901IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'N901IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'P901ITV' => array(
+                                                       'width'  => 240,
+                                                       'height' => 270,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'SH851I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P851I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'F881IES' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'D701I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N701I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'P701ID' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'D701IWM' => array(
+                                                       'width'  => 230,
+                                                       'height' => 240,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+                                    'N701IECO' => array(
+                                                        'width'  => 240,
+                                                        'height' => 270,
+                                                        'depth'  => 65536,
+                                                        'color'  => 1
+                                                        ),
+                                    'SA800I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'L600I' => array(
+                                                     'width'  => 176,
+                                                     'height' => 189,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+                                    'N600I' => array(
+                                                     'width'  => 176,
+                                                     'height' => 180,
+                                                     'depth'  => 65536,
+                                                     'color'  => 1
+                                                     ),
+
+                                    // i-mode compliant HTML 6.0
+                                    // (FOMA 902i etc.)
+                                    'F902I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'D902I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'N902I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'P902I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'SH902I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO902I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 256,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH902IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 240,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'P902IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'N902IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'D902IS' => array(
+                                                      'width'  => 230,
+                                                      'height' => 320,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'F902IS' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SO902IWP+' => array(
+                                                         'width'  => 240,
+                                                         'height' => 256,
+                                                         'depth'  => 262144,
+                                                         'color'  => 1
+                                                         ),
+                                    'SH902ISL' => array(
+                                                        'width'  => 240,
+                                                        'height' => 240,
+                                                        'depth'  => 262144,
+                                                        'color'  => 1
+                                                        ),
+                                    'N902IX' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P702I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'N702ID' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'F702ID' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH702ID' => array(
+                                                       'width'  => 240,
+                                                       'height' => 240,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'D702I' => array(
+                                                     'width'  => 230,
+                                                     'height' => 240,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     ),
+                                    'SO702I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 256,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'D702IBCL' => array(
+                                                        'width'  => 230,
+                                                        'height' => 240,
+                                                        'depth'  => 262144,
+                                                        'color'  => 1
+                                                        ),
+                                    'SA702I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 252,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'SH702IS' => array(
+                                                       'width'  => 240,
+                                                       'height' => 240,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'N702IS' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 65536,
+                                                      'color'  => 1
+                                                      ),
+                                    'P702ID' => array(
+                                                      'width'  => 240,
+                                                      'height' => 270,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'D702IF' => array(
+                                                      'width'  => 230,
+                                                      'height' => 240,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'D851IWM' => array(
+                                                       'width'  => 230,
+                                                       'height' => 320,
+                                                       'depth'  => 262144,
+                                                       'color'  => 1
+                                                       ),
+                                    'F882IES' => array(
+                                                       'width'  => 240,
+                                                       'height' => 256,
+                                                       'depth'  => 65536,
+                                                       'color'  => 1
+                                                       ),
+
+                                    // i-mode compliant HTML 7.0
+                                    // (FOMA 903i etc.)
+                                    'SH903I' => array(
+                                                      'width'  => 240,
+                                                      'height' => 320,
+                                                      'depth'  => 262144,
+                                                      'color'  => 1
+                                                      ),
+                                    'P903I' => array(
+                                                     'width'  => 240,
+                                                     'height' => 270,
+                                                     'depth'  => 262144,
+                                                     'color'  => 1
+                                                     )
+                                    );
+            }
+        }
+
+        return @$displayMap[ strtoupper($model) ];
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Display.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Display.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Display.php	(revision 11398)
@@ -0,0 +1,248 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license,       |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available through the world-wide-web at the following url:           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net>                            |
+// +----------------------------------------------------------------------+
+//
+// $Id: Display.php,v 1.9 2006/11/07 09:25:14 kuboa Exp $
+//
+
+/**
+ * Display information for Net_UserAgent_Mobile
+ *
+ * Net_UserAgent_Mobile_Display is a class for display information on
+ * {@link Net_UserAgent_Mobile}. Handy for image resizing or dispatching.
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $agent = &Net_UserAgent_Mobile::factory();
+ * $display = $agent->getDisplay();
+ *
+ * $width  = $display->getWidth();
+ * $height = $display->getHeight();
+ * list($width, $height) = $display->getSize();
+ *
+ * if ($display->isColor()) {
+ *     $depth = $display->getDepth();
+ * }
+ *
+ * // only available in DoCoMo 505i
+ * $width_bytes  = $display->getWidthBytes();
+ * $height_bytes = $display->getHeightBytes();
+ * </code>
+ *
+ * USING EXTERNAL MAP FILE:
+ * If the environment variable DOCOMO_MAP exists, the specified XML data will
+ * be used for DoCoMo display information.
+ *
+ * ex) Please add the following code.
+ * $_SERVER['DOCOMO_MAP'] = '/path/to/DoCoMoMap.xml';
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.9 $
+ */
+class Net_UserAgent_Mobile_Display
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * width of the display
+     * @var integer
+     */
+    var $_width;
+
+    /**
+     * height of the display
+     * @var integer
+     */
+    var $_height;
+
+    /**
+     * depth of the display
+     * @var integer
+     */
+    var $_depth;
+
+    /**
+     * color capability of the display
+     * @var boolean
+     */
+    var $_color;
+
+    /**
+     * width (bytes) of the display
+     * @var integer
+     */
+    var $_widthBytes;
+
+    /**
+     * height (bytes) of the display
+     * @var integer
+     */
+    var $_heightBytes;
+
+    /**#@-*/
+
+    // }}}
+    // {{{ constructor
+
+    /**
+     * constructor
+     *
+     * @param array $data display infomation
+     */
+    function Net_UserAgent_Mobile_Display($data)
+    {
+        $this->_width  = (integer)@$data['width'];
+        $this->_height = (integer)@$data['height'];
+        $this->_depth  = (integer)@$data['depth'];
+        $this->_color  = (boolean)@$data['color'];
+
+        $this->_widthBytes  = (integer)@$data['width_bytes'];
+        $this->_heightBytes = (integer)@$data['height_bytes'];
+    }
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ calcSize()
+
+    /**
+     * returns width * height of the display
+     *
+     * @return integer
+     */
+    function calcSize()
+    {
+        return $this->_width * $this->_height;
+    }
+
+    // }}}
+    // {{{ getSize()
+
+    /**
+     * returns width with height of the display
+     *
+     * @return array
+     */
+    function getSize()
+    {
+        return array($this->_width, $this->_height);
+    }
+
+    // }}}
+    // {{{ getWidth()
+
+    /**
+     * returns width of the display
+     *
+     * @return integer
+     */
+    function getWidth()
+    {
+        return $this->_width;
+    }
+
+    // }}}
+    // {{{ getHeight()
+
+    /**
+     * returns height of the display
+     *
+     * @return integer
+     */
+    function getHeight()
+    {
+        return $this->_height;
+    }
+
+    // }}}
+    // {{{ getDepth()
+
+    /**
+     * returns depth of the display
+     *
+     * @return integer
+     */
+    function getDepth()
+    {
+        return $this->_depth;
+    }
+
+    // }}}
+    // {{{ isColor()
+
+    /**
+     * returns true if the display has color capability
+     *
+     * @return boolean
+     */
+    function isColor()
+    {
+        return $this->_color;
+    }
+
+    // }}}
+    // {{{ getWidthBytes()
+
+    /**
+     * returns width (bytes) of the display
+     *
+     * @return integer
+     */
+    function getWidthBytes()
+    {
+        return $this->_widthBytes;
+    }
+
+    // }}}
+    // {{{ getHeightBytes()
+
+    /**
+     * returns height (bytes) of the display
+     *
+     * @return integer
+     */
+    function getHeightBytes()
+    {
+        return $this->_heightBytes;
+    }
+
+    /**#@-*/
+}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Common.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Common.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Common.php	(revision 11398)
@@ -0,0 +1,434 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license,       |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available through the world-wide-web at the following url:           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net>                            |
+// +----------------------------------------------------------------------+
+//
+// $Id: Common.php,v 1.12 2006/11/07 09:25:14 kuboa Exp $
+//
+
+/**
+ * Base class that is extended by each user agents implementor
+ *
+ * Net_UserAgent_Mobile_Common is a class for mobile user agent
+ * abstraction layer on Net_UserAgent_Mobile.
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @abstract
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.12 $
+ */
+class Net_UserAgent_Mobile_Common extends PEAR
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**
+     * User-Agent name like 'DoCoMo'
+     * @var string
+     */
+    var $name = '';
+
+    /**
+     * User-Agent version number like '1.0'
+     * @var string
+     */
+    var $version = '';
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * {@link Net_UserAgent_Mobile_Display} object
+     * @var object {@link Net_UserAgent_Mobile_Display}
+     */
+    var $_display;
+
+    /**
+     * Net_UserAgent_Mobile_Request_XXX object
+     * @var object {@link Net_UserAgent_Mobile_Request_Env}
+     */
+    var $_request;
+
+    /**
+     * {@link Net_UserAgent_Mobile_Error} object for error handling in the
+     *     constructor
+     * @var object
+     **/
+    var $_error = null;
+
+    /**#@-*/
+
+    // }}}
+    // {{{ constructor
+
+    /**
+     * constructor
+     *
+     * @param object $request a {@link Net_UserAgent_Mobile_Request_Env}
+     *     object
+     */
+    function Net_UserAgent_Mobile_Common($request)
+    {
+        parent::PEAR('Net_UserAgent_Mobile_Error');
+        $this->_request = $request;
+        if (Net_UserAgent_Mobile::isError($result = $this->parse())) {
+            $this->isError($result);
+        }
+    }
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ isError
+
+    /**
+     * Returns/set an error when the instance couldn't initialize properly
+     *
+     * @param object {@link Net_UserAgent_Mobile_Error} object when setting
+     *     an error
+     * @return object {@link Net_UserAgent_Mobile_Error} object
+     */
+    function &isError($error = null)
+    {
+        if ($error !== null) {
+            $this->_error = &$error;
+        }
+
+        return $this->_error;
+    }
+
+    // }}}
+    // {{{ raiseError()
+
+    /**
+     * This method is used to communicate an error and invoke error
+     * callbacks etc. Basically a wrapper for PEAR::raiseError without
+     * the message string.
+     *
+     * @param mixed $code integer error code, or a PEAR error object (all
+     *     other parameters are ignored if this parameter is an object
+     * @param int $mode error mode, see PEAR_Error docs
+     * @param mixed $options If error mode is PEAR_ERROR_TRIGGER, this is the
+     *     error level (E_USER_NOTICE etc). If error mode is
+     *     PEAR_ERROR_CALLBACK, this is the callback function, either as a
+     *     function name, or as an array of an object and method name. For
+     *     other error modes this parameter is ignored.
+     * @param string $userinfo Extra debug information. Defaults to the last
+     *     query and native error code.
+     * @return object a PEAR error object
+     * @see PEAR_Error
+     */
+    function &raiseError($code = NET_USERAGENT_MOBILE_ERROR, $mode = null,
+                         $options = null, $userinfo = null
+                         )
+    {
+
+        // The error is yet a Net_UserAgent_Mobile error object
+        if (is_object($code)) {
+            $error = &PEAR::raiseError($code, null, null, null, null, null,
+                                       true
+                                       );
+            return $error;
+        }
+
+        $error = &PEAR::raiseError(null, $code, $mode, $options, $userinfo,
+                                   'Net_UserAgent_Mobile_Error', true
+                                   );
+        return $error;
+    }
+
+    // }}}
+    // {{{ getUserAgent()
+
+    /**
+     * returns User-Agent string
+     *
+     * @return string
+     */
+    function getUserAgent()
+    {
+        return $this->getHeader('User-Agent');
+    }
+
+    // }}}
+    // {{{ getHeader()
+
+    /**
+     * returns a specified HTTP header
+     *
+     * @param string $header
+     * @return string
+     */
+    function getHeader($header)
+    {
+        return $this->_request->get($header);
+    }
+
+    // }}}
+    // {{{ getName()
+
+    /**
+     * returns User-Agent name like 'DoCoMo'
+     *
+     * @return string
+     */
+    function getName()
+    {
+        return $this->name;
+    }
+
+    // }}}
+    // {{{ getDisplay()
+
+    /**
+     * returns {@link Net_UserAgent_Mobile_Disply} object
+     *
+     * @return object a {@link Net_UserAgent_Mobile_Display} object, or a
+     *     PEAR error object on error
+     * @see Net_UserAgent_Mobile_Display
+     */
+    function getDisplay()
+    {
+        if (!is_object($this->_display)) {
+            $this->_display = $this->makeDisplay();
+        }
+        return $this->_display;
+    }
+
+    // }}}
+    // {{{ getVersion()
+
+    /**
+     * returns User-Agent version number like '1.0'
+     *
+     * @return string
+     */
+    function getVersion()
+    {
+        return $this->version;
+    }
+
+    // }}}
+    // {{{ noMatch()
+
+    /**
+     * generates a warning message for new variants
+     *
+     * @return object a PEAR error object
+     */
+    function noMatch()
+    {
+        return $this->raiseError(NET_USERAGENT_MOBILE_ERROR_NOMATCH, null,
+                                 null, $this->getUserAgent() .
+                                 ': might be new variants. Please contact the author of Net_UserAgent_Mobile!'
+                                 );
+    }
+
+    // }}}
+    // {{{ parse()
+
+    /**
+     * parse HTTP_USER_AGENT string (should be implemented in subclasses)
+     *
+     * @abstract
+     */
+    function parse()
+    {
+        die();
+    }
+
+    // }}}
+    // {{{ makeDisplay()
+
+    /**
+     * create a new Net_UserAgent_Mobile_Display class instance (should be
+     * implemented in subclasses)
+     *
+     * @abstract
+     */
+    function makeDisplay()
+    {
+        die();
+    }
+
+    // }}}
+    // {{{ isDoCoMo()
+
+    /**
+     * returns true if the agent is DoCoMo
+     *
+     * @return boolean
+     */
+    function isDoCoMo()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isJPhone()
+
+    /**
+     * returns true if the agent is J-PHONE
+     *
+     * @return boolean
+     */
+    function isJPhone()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isVodafone()
+
+    /**
+     * returns true if the agent is Vodafone
+     *
+     * @return boolean
+     */
+    function isVodafone()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isEZweb()
+
+    /**
+     * returns true if the agent is EZweb
+     *
+     * @return boolean
+     */
+    function isEZweb()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isAirHPhone()
+
+    /**
+     * returns true if the agent is AirH"PHONE
+     *
+     * @return boolean
+     */
+    function isAirHPhone()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isNonMobile()
+
+    /**
+     * returns true if the agent is NonMobile
+     *
+     * @return boolean
+     */
+    function isNonMobile()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isTUKa()
+
+    /**
+     * returns true if the agent is TU-Ka
+     *
+     * @return boolean
+     */
+    function isTUKa()
+    {
+        return false;
+    }
+
+    // }}}
+    // {{{ isWAP1()
+
+    /**
+     * returns true if the agent can speak WAP1 protocol
+     *
+     * @return boolean
+     */
+    function isWAP1()
+    {
+        return $this->isEZweb() && !$this->isWAP2();
+    }
+
+    // }}}
+    // {{{ isWAP2()
+
+    /**
+     * returns true if the agent can speak WAP2 protocol
+     *
+     * @return boolean
+     */
+    function isWAP2()
+    {
+        return $this->isEZweb() && $this->isXHTMLCompliant();
+    }
+
+    // }}}
+    // {{{ getCarrierShortName()
+
+    /**
+     * returns the short name of the carrier
+     *
+     * @abstract
+     */
+    function getCarrierShortName()
+    {
+        die();
+    }
+
+    // }}}
+    // {{{ getCarrierLongName()
+
+    /**
+     * returns the long name of the carrier
+     *
+     * @abstract
+     */
+    function getCarrierLongName()
+    {
+        die();
+    }
+
+    /**#@-*/
+}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Request.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Request.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile/Request.php	(revision 11398)
@@ -0,0 +1,138 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4                                                        |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group                                |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license,       |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available through the world-wide-web at the following url:           |
+// | http://www.php.net/license/3_0.txt.                                  |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net>                            |
+// +----------------------------------------------------------------------+
+//
+// $Id: Request.php,v 1.5 2006/11/07 09:25:14 kuboa Exp $
+//
+
+/**
+ * Utility class that constructs appropriate class instance for miscellaneous
+ * HTTP header containers
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.5 $
+ */
+class Net_UserAgent_Mobile_Request
+{
+
+    /**#@+
+     * @access public
+     * @static
+     */
+
+    // }}}
+    // {{{ factory()
+
+    /**
+     * create a new Net_UserAgent_Mobile_Request_XXX instance
+     *
+     * parses HTTP headers and constructs appropriate class instance.
+     * If no argument is supplied, $_SERVER is used.
+     *
+     * @param mixed $stuff User-Agent string or object that works with
+     *     HTTP_Request (not implemented)
+     * @return mixed a newly created Net_UserAgent_Request object
+     * @global array $_SERVER
+     */
+    function &factory($stuff = null)
+    {
+        if ($stuff === null) {
+            $request = &new Net_UserAgent_Mobile_Request_Env($_SERVER);
+        } else {
+            $request =
+                &new Net_UserAgent_Mobile_Request_Env(array(
+                                                            'HTTP_USER_AGENT' => $stuff)
+                                                      );
+        }
+        return $request;
+    }
+
+    /**#@-*/
+}
+
+/**
+ * provides easy way to access environment variables
+ *
+ * @package  Net_UserAgent_Mobile
+ * @category Networking
+ * @author   KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @access   public
+ * @version  $Revision: 1.5 $
+ */
+class Net_UserAgent_Mobile_Request_Env
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access private
+     */
+
+    /**
+     * array of environment variables defined by Web Server
+     * @var array
+     */
+    var $_env;
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ constructor
+
+    /**
+     * constructor
+     *
+     * @param array $env
+     */
+    function Net_UserAgent_Mobile_Request_Env($env)
+    {
+        $this->_env = $env;
+    }
+
+    /**
+     * returns a specified HTTP Header
+     *
+     * @param string $header
+     * @return string
+     */
+    function get($header)
+    {
+        $header = strtr($header, '-', '_');
+        return @$this->_env[ 'HTTP_' . strtoupper($header) ];
+    }
+
+    /**#@-*/
+}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/module/Net/UserAgent/Mobile.php
===================================================================
--- /temp/branches/mobile/data/module/Net/UserAgent/Mobile.php	(revision 11398)
+++ /temp/branches/mobile/data/module/Net/UserAgent/Mobile.php	(revision 11398)
@@ -0,0 +1,366 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.0 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    CVS: $Id: Mobile.php,v 1.25 2006/11/07 09:25:14 kuboa Exp $
+ * @since      File available since Release 0.1
+ */
+
+require_once dirname(__FILE__) . '/../../PEAR.php';
+require_once dirname(__FILE__) . '/Mobile/Request.php';
+
+// {{{ constants
+
+/**
+ * Constants for error handling.
+ */
+define('NET_USERAGENT_MOBILE_OK',               1);
+define('NET_USERAGENT_MOBILE_ERROR',           -1);
+define('NET_USERAGENT_MOBILE_ERROR_NOMATCH',   -2);
+define('NET_USERAGENT_MOBILE_ERROR_NOT_FOUND', -3);
+
+// }}}
+// {{{ GLOBALS
+
+/**
+ * globals for fallback on no match
+ *
+ * @global boolean $GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH']
+ */
+$GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH'] = false;
+
+// }}}
+// {{{ Net_UserAgent_Mobile
+
+/**
+ * HTTP mobile user agent string parser
+ *
+ * Net_UserAgent_Mobile parses HTTP_USER_AGENT strings of (mainly Japanese)
+ * mobile HTTP user agents. It'll be useful in page dispatching by user
+ * agents.
+ * This package was ported from Perl's HTTP::MobileAgent.
+ * See {@link http://search.cpan.org/search?mode=module&query=HTTP-MobileAgent}
+ * The author of the HTTP::MobileAgent module is Tatsuhiko Miyagawa
+ * <miyagawa@bulknews.net>
+ *
+ * SYNOPSIS:
+ * <code>
+ * require_once('Net/UserAgent/Mobile.php');
+ *
+ * $agent = &Net_UserAgent_Mobile::factory($agent_string);
+ * // or $agent = &Net_UserAgent_Mobile::factory(); // to get from $_SERVER
+ *
+ * if ($agent->isDoCoMo()) {
+ *     // or if ($agent->getName() == 'DoCoMo')
+ *     // or if (strtolower(get_class($agent)) == 'http_mobileagent_docomo')
+ *     // it's NTT DoCoMo i-mode
+ *     // see what's available in Net_UserAgent_Mobile_DoCoMo
+ * } elseif ($agent->isVodafone()) {
+ *     // it's Vodafone(J-PHONE)
+ *     // see what's available in Net_UserAgent_Mobile_Vodafone
+ * } elseif ($agent->isEZweb()) {
+ *     // it's KDDI/EZWeb
+ *     // see what's available in Net_UserAgent_Mobile_EZweb
+ * } else {
+ *     // may be PC
+ *     // $agent is Net_UserAgent_Mobile_NonMobile
+ * }
+ *
+ * $display = $agent->getDisplay();    // Net_UserAgent_Mobile_Display
+ * if ($display->isColor()) {
+ *    ...
+ * }
+ * </code>
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     * @static
+     */
+
+    // }}}
+    // {{{ factory()
+
+    /**
+     * create a new {@link Net_UserAgent_Mobile_Common} subclass instance
+     *
+     * parses HTTP headers and constructs {@link Net_UserAgent_Mobile_Common}
+     * subclass instance.
+     * If no argument is supplied, $_SERVER{'HTTP_*'} is used.
+     *
+     * @param mixed $stuff User-Agent string or object that works with
+     *     HTTP_Request (not implemented)
+     * @return mixed a newly created Net_UserAgent_Mobile object, or a PEAR
+     *     error object on error
+     * @see Net_UserAgent_Mobile_Request::factory()
+     */
+    function &factory($stuff = null)
+    {
+        static $mobileRegex;
+        if (!isset($mobileRegex)) {
+            $docomoRegex    = '^DoCoMo/\d\.\d[ /]';
+            $vodafoneRegex  = '^(?:(?:SoftBank|Vodafone|J-PHONE|Vemulator|J-EMULATOR)/\d\.\d|(?:MOT|MOTEMULATOR)-)';
+            $ezwebRegex     = '^(?:KDDI-[A-Z]+\d+[A-Z]? )?UP\.Browser\/';
+            $airhphoneRegex = '^Mozilla/3\.0\((?:DDIPOCKET|WILLCOM);';
+            $mobileRegex =
+                "(?:($docomoRegex)|($vodafoneRegex)|($ezwebRegex)|($airhphoneRegex))";
+        }
+
+        $request = &Net_UserAgent_Mobile_Request::factory($stuff);
+
+        // parse User-Agent string
+        $ua = $request->get('User-Agent');
+        $sub = 'NonMobile';
+        if (preg_match("!$mobileRegex!", $ua, $matches)) {
+            $sub = @$matches[1] ? 'DoCoMo' :
+                (@$matches[2] ? 'Vodafone' :
+                 (@$matches[3] ? 'EZweb' : 'AirHPhone'));
+        }
+        $className = "Net_UserAgent_Mobile_{$sub}";
+        $include    = dirname(__FILE__) . "/Mobile/{$sub}.php";
+
+        if (!class_exists($className)) {
+            if (!is_readable($include)) {
+                return PEAR::raiseError(null,
+                                        NET_USERAGENT_MOBILE_ERROR_NOT_FOUND,
+                                        null, null,
+                                        "Unable to read the $include file",
+                                        'Net_UserAgent_Mobile_Error', true
+                                        );
+            }
+            if (!include_once $include) {
+                return PEAR::raiseError(null,
+                                        NET_USERAGENT_MOBILE_ERROR_NOT_FOUND,
+                                        null, null,
+                                        "Unable to include the $include file",
+                                        'Net_UserAgent_Mobile_Error', true
+                                        );
+            }
+        }
+
+        $instance = &new $className($request);
+        $error = &$instance->isError();
+        if (Net_UserAgent_Mobile::isError($error)) {
+            if ($GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH']
+                && $error->getCode() == NET_USERAGENT_MOBILE_ERROR_NOMATCH
+                ) {
+                $instance = &Net_UserAgent_Mobile::factory('Net_UserAgent_Mobile_Fallback_On_NoMatch');
+                return $instance;
+            }
+
+            $instance = &$error;
+        }
+
+        return $instance;
+    }
+
+    // }}}
+    // {{{ singleton()
+
+    /**
+     * creates a new {@link Net_UserAgent_Mobile_Common} subclass instance or
+     * returns a instance from existent ones
+     *
+     * @param mixed $stuff User-Agent string or object that works with
+     *     HTTP_Request (not implemented)
+     * @return mixed a newly created or a existent Net_UserAgent_Mobile
+     *     object, or a PEAR error object on error
+     * @see Net_UserAgent_Mobile::factory()
+     */
+     function &singleton($stuff = null)
+     {
+         static $instance;
+         if (!isset($instance)) {
+             $instance = Net_UserAgent_Mobile::factory($stuff);
+         }
+
+         return $instance;
+     }
+
+    // }}}
+    // {{{ isError()
+
+    /**
+     * tell whether a result code from a Net_UserAgent_Mobile method
+     * is an error
+     *
+     * @param integer $value result code
+     * @return boolean whether $value is an {@link Net_UserAgent_Mobile_Error}
+     */
+    function isError($value)
+    {
+        return is_a($value, 'Net_UserAgent_Mobile_Error');
+    }
+
+    // }}}
+    // {{{ errorMessage()
+
+    /**
+     * return a textual error message for a Net_UserAgent_Mobile error code
+     *
+     * @param integer $value error code
+     * @return string error message, or false if the error code was not
+     *     recognized
+     */
+    function errorMessage($value)
+    {
+        static $errorMessages;
+        if (!isset($errorMessages)) {
+            $errorMessages = array(
+                                   NET_USERAGENT_MOBILE_ERROR           => 'unknown error',
+                                   NET_USERAGENT_MOBILE_ERROR_NOMATCH   => 'no match',
+                                   NET_USERAGENT_MOBILE_ERROR_NOT_FOUND => 'not found',
+                                   NET_USERAGENT_MOBILE_OK              => 'no error'
+                                   );
+        }
+
+        if (Net_UserAgent_Mobile::isError($value)) {
+            $value = $value->getCode();
+        }
+
+        return isset($errorMessages[$value]) ?
+            $errorMessages[$value] :
+            $errorMessages[NET_USERAGENT_MOBILE_ERROR];
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+// {{{ Net_UserAgent_Mobile_Error
+
+/**
+ * Net_UserAgent_Mobile_Error implements a class for reporting user
+ * agent error messages
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @copyright  2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
+ * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @version    Release: @package_version@
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile_Error extends PEAR_Error
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ constructor
+
+    /**
+     * constructor
+     *
+     * @param mixed   $code     Net_UserAgent_Mobile error code, or string
+     *     with error message.
+     * @param integer $mode     what 'error mode' to operate in
+     * @param integer $level    what error level to use for $mode and
+     *     PEAR_ERROR_TRIGGER
+     * @param mixed   $userinfo additional user/debug info
+     * @access public
+     */
+    function Net_UserAgent_Mobile_Error($code = NET_USERAGENT_MOBILE_ERROR,
+                                        $mode = PEAR_ERROR_RETURN,
+                                        $level = E_USER_NOTICE,
+                                        $userinfo = null
+                                        )
+    {
+        if (is_int($code)) {
+            $this->PEAR_Error('Net_UserAgent_Mobile Error: ' .
+                              Net_UserAgent_Mobile::errorMessage($code),
+                              $code, $mode, $level, $userinfo
+                              );
+        } else {
+            $this->PEAR_Error("Net_UserAgent_Mobile Error: $code",
+                              NET_USERAGENT_MOBILE_ERROR, $mode, $level,
+                              $userinfo
+                              );
+        }
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
+?>
Index: /temp/branches/mobile/data/lib/slib.php
===================================================================
--- /temp/branches/mobile/data/lib/slib.php	(revision 10399)
+++ /temp/branches/mobile/data/lib/slib.php	(revision 11398)
@@ -2013,4 +2013,5 @@
 		if(strlen($str) > ($len + 2)) {
 			$ret =substr($str, 0, $len);
+			$cut = substr($str, $len);
 		} else {
 			$ret = $str;
@@ -2020,4 +2021,5 @@
 		if(mb_strlen($str) > ($len + 1)) {
 			$ret = mb_substr($str, 0, $len);
+			$cut = mb_substr($str, $len);
 		} else {
 			$ret = $str;
@@ -2025,4 +2027,27 @@
 		}
 	}
+
+	// ³¨Ê¸»ú¥¿¥°¤ÎÅÓÃæ¤ÇÊ¬ÃÇ¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡£
+	if (isset($cut)) {
+		// Ê¬³ä°ÌÃÖ¤è¤êÁ°¤ÎºÇ¸å¤Î [ °Ê¹ß¤ò¼èÆÀ¤¹¤ë¡£
+		$head = strrchr($ret, '[');
+
+		// Ê¬³ä°ÌÃÖ¤è¤ê¸å¤ÎºÇ½é¤Î ] °ÊÁ°¤ò¼èÆÀ¤¹¤ë¡£
+		$tail_pos = strpos($cut, ']');
+		if ($tail_pos !== false) {
+			$tail = substr($cut, 0, $tail_pos + 1);
+		}
+
+		// Ê¬³ä°ÌÃÖ¤è¤êÁ°¤Ë [¡¢¸å¤Ë ] ¤¬¸«¤Ä¤«¤Ã¤¿¾ì¹ç¤Ï¡¢[ ¤«¤é ] ¤Þ¤Ç¤ò
+		// ÀÜÂ³¤·¤Æ³¨Ê¸»ú¥¿¥°1¸ÄÊ¬¤Ë¤Ê¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+		if ($head !== false && $tail_pos !== false) {
+			$subject = $head . $tail;
+			if (preg_match('/^\[emoji:e?\d+\]$/', $subject)) {
+				// ³¨Ê¸»ú¥¿¥°¤¬¸«¤Ä¤«¤Ã¤¿¤Î¤Çºï½ü¤¹¤ë¡£
+				$ret = substr($ret, 0, -strlen($head));
+			}
+		}
+	}
+
 	if($commadisp){
 		$ret = $ret . "...";
Index: /temp/branches/mobile/data/smarty_extends/modifier.numeric_emoji.php
===================================================================
--- /temp/branches/mobile/data/smarty_extends/modifier.numeric_emoji.php	(revision 11398)
+++ /temp/branches/mobile/data/smarty_extends/modifier.numeric_emoji.php	(revision 11398)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * ¿ôÃÍ¤ò¿ô»ú³¨Ê¸»ú¤ËÊÑ´¹¤¹¤ë¡£
+ *
+ * ÆþÎÏ¤¬0¡Á9¤Ç¤Ï¤Ê¤¤¾ì¹ç¡¢¤Þ¤¿¤Ï¡¢·ÈÂÓÃ¼Ëö¤«¤é¤Î¥¢¥¯¥»¥¹¤Ç¤Ï¤Ê¤¤¾ì¹ç¤Ï¡¢
+ * ÆþÎÏ¤ò [ ¤È ] ¤Ç°Ï¤ó¤ÀÊ¸»úÎó¤òÊÖ¤¹¡£
+ *
+ * @param string $value ÆþÎÏ
+ * @return string ½ÐÎÏ
+ */
+function smarty_modifier_numeric_emoji($value) {
+	// ¿ô»ú³¨Ê¸»ú (0¡Á9) ¤Î³¨Ê¸»úÈÖ¹æ
+	static $numeric_emoji_index = array('134', '125', '126', '127', '128', '129', '130', '131', '132', '133');
+
+	if (GC_MobileUserAgent::isMobile() && isset($numeric_emoji_index[$value])) {
+		return '[emoji:' . $numeric_emoji_index[$value] . ']';
+	} else {
+		return '[' . $value . ']';
+	}
+}
+?>
