Index: branches/dev/html/require.php
===================================================================
--- branches/dev/html/require.php	(revision 17)
+++ branches/dev/html/require.php	(revision 11460)
@@ -31,4 +31,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");
 
@@ -36,3 +38,16 @@
 sfLoadUpdateModule();
 
+// ·ÈÂÓÃ¼Ëö¤Î¾ì¹ç¤Ï mobile °Ê²¼¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£
+if (GC_MobileUserAgent::isMobile()) {
+	if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) {
+		$path = $matches[1];
+	} else {
+		$path = '';
+	}
+	header("Location: " . URL_DIR . "mobile/$path");
+	exit;
+}
+
+// ³¨Ê¸»úÊÑ´¹ (½üµî) ¥Õ¥£¥ë¥¿¡¼¤òÁÈ¤ß¹þ¤à¡£
+ob_start(array('GC_MobileEmoji', 'handler'));
 ?>
Index: branches/dev/html/install/index.php
===================================================================
--- branches/dev/html/install/index.php	(revision 399)
+++ branches/dev/html/install/index.php	(revision 11460)
@@ -99,4 +99,8 @@
 	$objPage->arrErr = lfAddTable("dtb_module", $dsn);			// ¥â¥¸¥å¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë
 	$objPage->arrErr = lfAddTable("dtb_campaign_order", $dsn);	// ¥­¥ã¥ó¥Ú¡¼¥ó¼õÃí¥Æ¡¼¥Ö¥ë
+	// ¥Æ¡¼¥Ö¥ë¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤ËÄÉ²Ã¤µ¤ì¤ë¡£
+	$objPage->arrErr = lfAddTable("dtb_mobile_kara_mail", $dsn);	// ¶õ¥á¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë
+	// ¥Æ¡¼¥Ö¥ë¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤ËÄÉ²Ã¤µ¤ì¤ë¡£
+	$objPage->arrErr = lfAddTable("dtb_mobile_ext_session_id", $dsn);	// ¥»¥Ã¥·¥ç¥óID´ÉÍý¥Æ¡¼¥Ö¥ë
 	
 	// ¥«¥é¥à¤òÄÉ²Ã
@@ -345,8 +349,10 @@
 	$arrWriteFile = array(
 		"../../data/install.inc",
+		"../../data/install_mobile.inc",
 		"../user_data",
 		"../cp",
 		"../upload",
-		"../../data/Smarty/templates_c",		
+		"../mobile/converted_images",
+		"../../data/Smarty/templates_c",
 		"../../data/downloads",
 		"../../data/logs"
@@ -767,4 +773,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);
+	}
 }
 
@@ -803,4 +838,6 @@
 // ¥«¥é¥à¤ÎÄÉ²Ã¡Ê´û¤Ë¥«¥é¥à¤¬Â¸ºß¤¹¤ë¾ì¹ç¤ÏºîÀ®¤·¤Ê¤¤¡Ë
 function lfAddColumn($dsn) {
+	global $objDBParam;
+
 	// ¼õÃí¥Æ¡¼¥Ö¥ë	
 	sfColumnExists("dtb_order", "memo01", "text", $dsn, true);	
@@ -853,4 +890,22 @@
 	sfColumnExists("dtb_campaign", "cart_flg", "int2 NOT NULL DEFAULT 0", $dsn, true);
 	sfColumnExists("dtb_campaign", "deliv_free_flg", "int2 NOT NULL DEFAULT 0", $dsn, true);	
+
+	// ¸ÜµÒ
+	if (!sfColumnExists("dtb_customer", "mobile_phone_id", "", $dsn)) {
+		sfColumnExists("dtb_customer", "mobile_phone_id", "text", $dsn, true);
+		$objQuery = new SC_Query($dsn);
+		if ($objDBParam->getValue('db_type') == 'mysql') {
+			$objQuery->query("CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64))");
+		} else {
+			$objQuery->query("CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id)");
+		}
+	}
+
+	// ¸ÜµÒ¥á¡¼¥ë
+	if ($objDBParam->getValue('db_type') == 'mysql') {
+		sfColumnExists("dtb_customer_mail", "secret_key", "varchar(50) unique", $dsn, true);
+	} else {
+		sfColumnExists("dtb_customer_mail", "secret_key", "text unique", $dsn, true);
+	}
 }
 
Index: branches/dev/html/install/sql/column_comment.sql
===================================================================
--- branches/dev/html/install/sql/column_comment.sql	(revision 8)
+++ branches/dev/html/install/sql/column_comment.sql	(revision 11460)
@@ -368,6 +368,8 @@
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer','cell02','·ÈÂÓÅÅÏÃÈÖ¹æ2');
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer','cell03','·ÈÂÓÅÅÏÃÈÖ¹æ3');
+INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer','mobile_phone_id','·ÈÂÓÃ¼ËöID');
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer_mail','email','¥á¡¼¥ë¥¢¥É¥ì¥¹');
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer_mail','mail_flag','1:HTML 2:TEXT 3:´õË¾¤·¤Ê¤¤ 4:²¾ÅÐÏ¿¡ÊHTML¡Ë 5:²¾ÅÐÏ¿(TEXT) 6:²¾ÅÐÏ¿(´õË¾¤·¤Ê¤¤)');
+INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer_mail','secret_key','°Å¹æ²½¸ÜµÒID');
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer_mail_temp','email','¥á¡¼¥ë¥¢¥É¥ì¥¹');
 INSERT INTO dtb_table_comment(table_name,column_name,description) values ('dtb_customer_mail_temp','mail_flag','1:HTML 2:TEXT 3:´õË¾¤·¤Ê¤¤(Ää»ß)');
Index: branches/dev/html/install/sql/create_table_mysql.sql
===================================================================
--- branches/dev/html/install/sql/create_table_mysql.sql	(revision 8)
+++ branches/dev/html/install/sql/create_table_mysql.sql	(revision 11460)
@@ -517,10 +517,14 @@
     cell01 text,
     cell02 text,
-    cell03 text
-) TYPE=InnoDB ;
+    cell03 text,
+    mobile_phone_id text
+) TYPE=InnoDB ;
+
+CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id(64));
 
 CREATE TABLE dtb_customer_mail (
     email varchar(50) NOT NULL UNIQUE,
     mail_flag smallint,
+    secret_key varchar(50) UNIQUE,
     create_date datetime NOT NULL ,
     update_date datetime 
Index: branches/dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- branches/dev/html/install/sql/create_table_pgsql.sql	(revision 8)
+++ branches/dev/html/install/sql/create_table_pgsql.sql	(revision 11460)
@@ -517,10 +517,14 @@
     cell01 text,
     cell02 text,
-    cell03 text
-);
+    cell03 text,
+    mobile_phone_id text
+);
+
+CREATE INDEX dtb_customer_mobile_phone_id_key ON dtb_customer (mobile_phone_id);
 
 CREATE TABLE dtb_customer_mail (
     email text NOT NULL UNIQUE,
     mail_flag int2,
+    secret_key text UNIQUE,
     create_date timestamp NOT NULL DEFAULT now(),
     update_date timestamp DEFAULT now()
Index: branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_mysql.sql
===================================================================
--- branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_mysql.sql	(revision 11460)
+++ branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_mysql.sql	(revision 11460)
@@ -0,0 +1,19 @@
+CREATE TABLE dtb_mobile_ext_session_id (
+    session_id text NOT NULL,
+    param_key text,
+    param_value text,
+    url text,
+    create_date timestamp NOT NULL DEFAULT now()
+);
+
+CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key(64));
+CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value(64));
+CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url(64));
+CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
+
+INSERT INTO dtb_table_comment (table_name, description) VALUES ('dtb_mobile_ext_session_id', '¥»¥Ã¥·¥ç¥óID´ÉÍý');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'session_id', '¥»¥Ã¥·¥ç¥óID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'param_key', '¥Ñ¥é¥á¡¼¥¿Ì¾');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'param_value', '¥Ñ¥é¥á¡¼¥¿ÃÍ');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'url', 'URL');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'create_date', 'ºîÀ®Æü»þ');
Index: branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_pgsql.sql
===================================================================
--- branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_pgsql.sql	(revision 11460)
+++ branches/dev/html/install/sql/add/dtb_mobile_ext_session_id_pgsql.sql	(revision 11460)
@@ -0,0 +1,19 @@
+CREATE TABLE dtb_mobile_ext_session_id (
+    session_id text NOT NULL,
+    param_key text,
+    param_value text,
+    url text,
+    create_date timestamp NOT NULL DEFAULT now()
+);
+
+CREATE INDEX dtb_mobile_ext_session_id_param_key_key ON dtb_mobile_ext_session_id (param_key);
+CREATE INDEX dtb_mobile_ext_session_id_param_value_key ON dtb_mobile_ext_session_id (param_value);
+CREATE INDEX dtb_mobile_ext_session_id_url_key ON dtb_mobile_ext_session_id (url);
+CREATE INDEX dtb_mobile_ext_session_id_create_date_key ON dtb_mobile_ext_session_id (create_date);
+
+INSERT INTO dtb_table_comment (table_name, description) VALUES ('dtb_mobile_ext_session_id', '¥»¥Ã¥·¥ç¥óID´ÉÍý');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'session_id', '¥»¥Ã¥·¥ç¥óID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'param_key', '¥Ñ¥é¥á¡¼¥¿Ì¾');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'param_value', '¥Ñ¥é¥á¡¼¥¿ÃÍ');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'url', 'URL');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_ext_session_id', 'create_date', 'ºîÀ®Æü»þ');
Index: branches/dev/html/install/sql/add/dtb_mobile_kara_mail_mysql.sql
===================================================================
--- branches/dev/html/install/sql/add/dtb_mobile_kara_mail_mysql.sql	(revision 11460)
+++ branches/dev/html/install/sql/add/dtb_mobile_kara_mail_mysql.sql	(revision 11460)
@@ -0,0 +1,22 @@
+CREATE TABLE dtb_mobile_kara_mail (
+    kara_mail_id serial PRIMARY KEY,
+    session_id text NOT NULL,
+    token text NOT NULL,
+    next_url text NOT NULL,
+    create_date timestamp NOT NULL DEFAULT now(),
+    email text,
+    receive_date timestamp
+);
+
+CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token(64));
+CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
+CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
+
+INSERT INTO dtb_table_comment (table_name, description) VALUES ('dtb_mobile_kara_mail', '¶õ¥á¡¼¥ë´ÉÍý');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'kara_mail_id', '¶õ¥á¡¼¥ë´ÉÍýID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'session_id', '¥»¥Ã¥·¥ç¥óID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'token', '¥È¡¼¥¯¥ó');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'next_url', '¼¡¥Ú¡¼¥¸URL');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'create_date', 'ºîÀ®Æü»þ');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'email', '¥á¡¼¥ë¥¢¥É¥ì¥¹');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'receive_date', '¼õ¿®Æü»þ');
Index: branches/dev/html/install/sql/add/dtb_mobile_kara_mail_pgsql.sql
===================================================================
--- branches/dev/html/install/sql/add/dtb_mobile_kara_mail_pgsql.sql	(revision 11460)
+++ branches/dev/html/install/sql/add/dtb_mobile_kara_mail_pgsql.sql	(revision 11460)
@@ -0,0 +1,22 @@
+CREATE TABLE dtb_mobile_kara_mail (
+    kara_mail_id serial PRIMARY KEY,
+    session_id text NOT NULL,
+    token text NOT NULL,
+    next_url text NOT NULL,
+    create_date timestamp NOT NULL DEFAULT now(),
+    email text,
+    receive_date timestamp
+);
+
+CREATE INDEX dtb_mobile_kara_mail_token_key ON dtb_mobile_kara_mail (token);
+CREATE INDEX dtb_mobile_kara_mail_create_date_key ON dtb_mobile_kara_mail (create_date);
+CREATE INDEX dtb_mobile_kara_mail_receive_date_key ON dtb_mobile_kara_mail (receive_date);
+
+INSERT INTO dtb_table_comment (table_name, description) VALUES ('dtb_mobile_kara_mail', '¶õ¥á¡¼¥ë´ÉÍý');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'kara_mail_id', '¶õ¥á¡¼¥ë´ÉÍýID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'session_id', '¥»¥Ã¥·¥ç¥óID');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'token', '¥È¡¼¥¯¥ó');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'next_url', '¼¡¥Ú¡¼¥¸URL');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'create_date', 'ºîÀ®Æü»þ');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'email', '¥á¡¼¥ë¥¢¥É¥ì¥¹');
+INSERT INTO dtb_table_comment (table_name, column_name, description) VALUES ('dtb_mobile_kara_mail', 'receive_date', '¼õ¿®Æü»þ');
Index: branches/dev/html/install/sql/insert_data.sql
===================================================================
--- branches/dev/html/install/sql/insert_data.sql	(revision 24)
+++ branches/dev/html/install/sql/insert_data.sql	(revision 11460)
@@ -23,25 +23,25 @@
 update dtb_pagelayout set page_id = 0 where page_id = 5;
 
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'category'),2,'category');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'guide'),3,'guide');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'cart'),1,'cart');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'search_products'),2,'search_products');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'news'),1,'news');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'login'),1,'login');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'best5'),2,'best5');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'category'),2,'category');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'guide'),3,'guide');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'cart'),1,'cart');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'search_products'),0,'search_products');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'news'),0,'news');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'login'),0,'login');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'best5'),0,'best5');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'category'),2,'category');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'guide'),3,'guide');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'cart'),1,'cart');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'search_products'),0,'search_products');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'news'),0,'news');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'login'),0,'login');
-INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,(SELECT bloc_id FROM dtb_bloc WHERE filename = 'best5'),0,'best5');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,1,2,'category');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,2,3,'guide');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,1,3,1,'cart');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,4,2,'search_products');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,5,1,'news');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,3,6,1,'login');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(1,4,7,2,'best5');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,1,2,'category');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,2,3,'guide');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,1,3,1,'cart');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,4,0,'search_products');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,5,0,'news');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,6,0,'login');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(2,5,7,0,'best5');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,1,2,'category');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,2,3,'guide');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,1,3,1,'cart');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,4,0,'search_products');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,5,0,'news');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,6,0,'login');
+INSERT INTO dtb_blocposition (page_id,target_id,bloc_id,bloc_row,filename)values(3,5,7,0,'best5');
 
 insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date)values(1,'product_id','¾¦ÉÊID',1,now(),now());
Index: branches/dev/html/mobile/mypage/change_complete.php
===================================================================
--- branches/dev/html/mobile/mypage/change_complete.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/change_complete.php	(revision 11460)
@@ -0,0 +1,38 @@
+<?php
+/*
+ * ÊÑ¹¹´°Î»
+ */
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page(){
+		$this->tpl_mainpage = 'mypage/change_complete.tpl';
+		$this->tpl_title = 'MY¥Ú¡¼¥¸/²ñ°÷ÅÐÏ¿ÆâÍÆÊÑ¹¹(´°Î»¥Ú¡¼¥¸)';
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objCustomer = new SC_Customer();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+//¥»¥Ã¥·¥ç¥ó¾ðÊó¤òºÇ¿·¤Î¾õÂÖ¤Ë¹¹¿·¤¹¤ë
+$objCustomer->updateSession();
+
+//¥í¥°¥¤¥óÈ½Äê
+if (!$objCustomer->isLoginSuccess()){
+	sfDispSiteError(CUSTOMER_ERROR);
+}else {
+	//¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóÉ½¼¨ÍÑ
+	$objPage->CustomerName1 = $objCustomer->getvalue('name01');
+	$objPage->CustomerName2 = $objCustomer->getvalue('name02');
+	$objPage->CustomerPoint = $objCustomer->getvalue('point');
+}
+
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+?>
Index: branches/dev/html/mobile/mypage/history.php
===================================================================
--- branches/dev/html/mobile/mypage/history.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/history.php	(revision 11460)
@@ -0,0 +1,68 @@
+<?php
+/*
+ * MyPage
+ */
+
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page() {
+		$this->tpl_mainpage = 'mypage/history.tpl';
+		$this->tpl_title = 'MY¥Ú¡¼¥¸/¹ØÆþÍúÎò°ìÍ÷';
+		session_cache_limiter('private-no-expire');
+	}
+}
+
+define ("HISTORY_NUM", 5);
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objQuery = new SC_Query();
+$objCustomer = new SC_Customer();
+$pageNo = isset($_GET['pageno']) ? $_GET['pageno'] : 0;
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if(!isset($_SESSION['customer'])) {
+	sfDispSiteError(CUSTOMER_ERROR);
+}
+
+$col = "order_id, create_date, payment_id, payment_total";
+$from = "dtb_order";
+$where = "del_flg = 0 AND customer_id=?";
+$arrval = array($objCustomer->getvalue('customer_id'));
+$order = "order_id DESC";
+
+$linemax = $objQuery->count($from, $where, $arrval);
+$objPage->tpl_linemax = $linemax;
+
+// ¼èÆÀÈÏ°Ï¤Î»ØÄê(³«»Ï¹ÔÈÖ¹æ¡¢¹Ô¿ô¤Î¥»¥Ã¥È)
+$objQuery->setlimitoffset(HISTORY_NUM, $pageNo);
+// É½¼¨½ç½ø
+$objQuery->setorder($order);
+
+//¹ØÆþÍúÎò¤Î¼èÆÀ
+$objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval);
+
+// next
+if ($pageNo + HISTORY_NUM < $linemax) {
+	$next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>¼¡¤Ø¢ª</a>";
+} else {
+	$next = "¼¡¤Ø¢ª";
+}
+
+// previous
+if ($pageNo - HISTORY_NUM > 0) {
+	$previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>¢«Á°</a>";
+} elseif ($pageNo == 0) {
+	$previous = "¢«Á°";
+} else {
+	$previous = "<a href='history.php?pageno=0'>¢«Á°</a>";
+}
+
+$objPage->tpl_strnavi = $previous . " | " . $next;
+$objView->assignobj($objPage);				//$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊÇ¼
+$objView->display(SITE_FRAME);				//¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
+?>
Index: branches/dev/html/mobile/mypage/refusal.php
===================================================================
--- branches/dev/html/mobile/mypage/refusal.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/refusal.php	(revision 11460)
@@ -0,0 +1,54 @@
+<?php
+/*
+ * Âà²ñ½èÍý
+ */
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page(){
+		$this->tpl_mainpage = 'mypage/refusal.tpl';
+		$this->tpl_title = "MY¥Ú¡¼¥¸/Âà²ñ¼êÂ³¤­(ÆþÎÏ¥Ú¡¼¥¸)";
+		//session_cache_limiter('private-no-expire');
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objCustomer = new SC_Customer();
+$objQuery = new SC_Query();
+
+//¥í¥°¥¤¥óÈ½Äê
+if (!$objCustomer->isLoginSuccess()){
+	sfDispSiteError(CUSTOMER_ERROR);
+}else {
+	//¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóÉ½¼¨ÍÑ
+	$objPage->CustomerName1 = $objCustomer->getvalue('name01');
+	$objPage->CustomerName2 = $objCustomer->getvalue('name02');
+	$objPage->CustomerPoint = $objCustomer->getvalue('point');
+}
+
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+if (isset($_POST['no'])) {
+	header("Location: " . gfAddSessionId("index.php"));
+	exit;
+} elseif (isset($_POST['complete'])){
+	//²ñ°÷ºï½ü
+	$objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id')));
+
+	$where = "email ILIKE ?";
+	if (DB_TYPE == "mysql")	$where = sfChangeILIKE($where);
+
+	$objQuery->delete("dtb_customer_mail", $where, array($objCustomer->getValue('email')));
+	$objCustomer->EndSession();
+	//´°Î»¥Ú¡¼¥¸¤Ø
+	header("Location: " . gfAddSessionId("refusal_complete.php"));
+	exit;
+}
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+?>
Index: branches/dev/html/mobile/mypage/history_detail.php
===================================================================
--- branches/dev/html/mobile/mypage/history_detail.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/history_detail.php	(revision 11460)
@@ -0,0 +1,84 @@
+<?php
+/*
+ * ÍúÎò
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'mypage/history_detail.tpl';
+		$this->tpl_title = "MY¥Ú¡¼¥¸/¹ØÆþÍúÎò¾ÜºÙ";
+		session_cache_limiter('private-no-expire');
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objQuery = new SC_Query();
+$objCustomer = new SC_Customer();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+//ÉÔÀµ¥¢¥¯¥»¥¹È½Äê
+$from = "dtb_order";
+$where = "del_flg = 0 AND customer_id = ? AND order_id = ? ";
+$arrval = array($objCustomer->getValue('customer_id'), $_POST['order_id']);
+//DB¤Ë¾ðÊó¤¬¤¢¤ë¤«È½Äê
+$cnt = $objQuery->count($from, $where, $arrval);
+
+//¥í¥°¥¤¥ó¤·¤Æ¤¤¤Ê¤¤¡¢¤Þ¤¿¤ÏDB¤Ë¾ðÊó¤¬Ìµ¤¤¾ì¹ç
+if (!$objCustomer->isLoginSuccess() or $cnt == 0){
+	sfDispSiteError(CUSTOMER_ERROR);
+} else {
+	//¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+	$objPage->arrDisp = lfGetOrderData($_POST['order_id']);
+	// »ÙÊ§¤¤ÊýË¡¤Î¼èÆÀ
+	$objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
+	// ÇÛÁ÷»þ´Ö¤Î¼èÆÀ
+	$arrRet = sfGetDelivTime($objPage->arrDisp['payment_id']);
+	$objPage->arrDelivTime = sfArrKeyValue($arrRet, 'time_id', 'deliv_time');
+
+	//¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóÉ½¼¨ÍÑ
+	$objPage->CustomerName1 = $objCustomer->getvalue('name01');
+	$objPage->CustomerName2 = $objCustomer->getvalue('name02');
+	$objPage->CustomerPoint = $objCustomer->getvalue('point');
+}
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+//¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+function lfGetOrderData($order_id) {
+	//¼õÃíÈÖ¹æ¤¬¿ô»ú¤Ç¤¢¤ì¤Ð
+	if(sfIsInt($order_id)) {
+		// DB¤«¤é¼õÃí¾ðÊó¤òÆÉ¤ß¹þ¤à
+		$objQuery = new SC_Query();
+		$col = "order_id, create_date, payment_id, subtotal, tax, use_point, add_point, discount, ";
+		$col .= "deliv_fee, charge, payment_total, deliv_name01, deliv_name02, deliv_kana01, deliv_kana02, ";
+		$col .= "deliv_zip01, deliv_zip02, deliv_pref, deliv_addr01, deliv_addr02, deliv_tel01, deliv_tel02, deliv_tel03, deliv_time_id, deliv_date ";
+		$from = "dtb_order";
+		$where = "order_id = ?";
+		$arrRet = $objQuery->select($col, $from, $where, array($order_id));
+		$arrOrder = $arrRet[0];
+		// ¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+		$arrRet = lfGetOrderDetail($order_id);
+		$arrOrderDetail = sfSwapArray($arrRet);
+		$arrData = array_merge($arrOrder, $arrOrderDetail);
+	}
+	return $arrData;
+}
+
+// ¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+function lfGetOrderDetail($order_id) {
+	$objQuery = new SC_Query();
+	$col = "product_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate";
+	$where = "order_id = ?";
+	$objQuery->setorder("classcategory_id1, classcategory_id2");
+	$arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id));
+	return $arrRet;
+}
+
+?>
Index: branches/dev/html/mobile/mypage/change.php
===================================================================
--- branches/dev/html/mobile/mypage/change.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/change.php	(revision 11460)
@@ -0,0 +1,470 @@
+<?php
+/*
+ * ¾ðÊóÊÑ¹¹
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'mypage/change.tpl';		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title .= 'ÅÐÏ¿ÊÑ¹¹(1/3)';			//¡¡¥Ú¡¼¥¸¥¿¥¤¥È¥ë
+	}
+}
+
+//---- ¥Ú¡¼¥¸½é´üÀßÄê
+$CONF = sf_getBasisData();					// Å¹ÊÞ´ðËÜ¾ðÊó
+$objConn = new SC_DbConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now")));
+$objQuery = new SC_Query();
+$objCustomer = new SC_Customer();
+$objPage->arrPref = $arrPref;
+$objPage->arrJob = $arrJob;
+$objPage->arrReminder = $arrReminder;
+$objPage->arrYear = $objDate->getYear('', 1950);	//¡¡ÆüÉÕ¥×¥ë¥À¥¦¥óÀßÄê
+$objPage->arrMonth = $objDate->getMonth();
+$objPage->arrDay = $objDate->getDay();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+//---- ÅÐÏ¿ÍÑ¥«¥é¥àÇÛÎó
+$arrRegistColumn = array(
+							 array(  "column" => "name01", "convert" => "aKV" ),
+							 array(  "column" => "name02", "convert" => "aKV" ),
+							 array(  "column" => "kana01", "convert" => "CKV" ),
+							 array(  "column" => "kana02", "convert" => "CKV" ),
+							 array(  "column" => "zip01", "convert" => "n" ),
+							 array(  "column" => "zip02", "convert" => "n" ),
+							 array(  "column" => "pref", "convert" => "n" ),
+							 array(  "column" => "addr01", "convert" => "aKV" ),
+							 array(  "column" => "addr02", "convert" => "aKV" ),
+							 array(  "column" => "email", "convert" => "a" ),
+							 array(  "column" => "email_mobile", "convert" => "a" ),
+							 array(  "column" => "tel01", "convert" => "n" ),
+							 array(  "column" => "tel02", "convert" => "n" ),
+							 array(  "column" => "tel03", "convert" => "n" ),
+							 array(  "column" => "fax01", "convert" => "n" ),
+							 array(  "column" => "fax02", "convert" => "n" ),
+							 array(  "column" => "fax03", "convert" => "n" ),
+							 array(  "column" => "sex", "convert" => "n" ),
+							 array(  "column" => "job", "convert" => "n" ),
+							 array(  "column" => "birth", "convert" => "n" ),
+							 array(  "column" => "reminder", "convert" => "n" ),
+							 array(  "column" => "reminder_answer", "convert" => "aKV"),
+							 array(  "column" => "password", "convert" => "a" ),
+						 );
+
+//---- ÅÐÏ¿½ü³°ÍÑ¥«¥é¥àÇÛÎó
+$arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
+
+$objPage->arrForm = lfGetCustomerData();
+$objPage->arrForm['password'] = DEFAULT_PASSWORD;
+
+if ($_SERVER["REQUEST_METHOD"] == "POST") {
+
+	//-- POST¥Ç¡¼¥¿¤Î°ú¤­·Ñ¤®
+	$objPage->arrForm = array_merge($objPage->arrForm, $_POST);
+
+	if($objPage->arrForm['year'] == '----') {
+		$objPage->arrForm['year'] = '';
+	}
+	
+	$objPage->arrForm['email'] = strtolower($objPage->arrForm['email']);		// email¤Ï¤¹¤Ù¤Æ¾®Ê¸»ú¤Ç½èÍý
+	
+	//-- ÆþÎÏ¥Ç¡¼¥¿¤ÎÊÑ´¹
+	$objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn);
+
+	//--¡¡ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+	if ($_POST["mode"] == "set1") {
+		$objPage->arrErr = lfErrorCheck1($objPage->arrForm);
+		$objPage->tpl_mainpage = 'mypage/change.tpl';
+		$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(1/3)';
+	} elseif ($_POST["mode"] == "set2") {
+		$objPage->arrErr = lfErrorCheck2($objPage->arrForm);
+		$objPage->tpl_mainpage = 'mypage/set1.tpl';
+		$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(2/3)';
+	} else {
+		$objPage->arrErr = lfErrorCheck3($objPage->arrForm);
+		$objPage->tpl_mainpage = 'mypage/set2.tpl';
+		$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(3/3)';
+	}
+
+	if ($objPage->arrErr || $_POST["mode"] == "return") {		// ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯
+		foreach($objPage->arrForm as $key => $val) {
+			$objPage->$key = $val;
+		}
+
+		//-- ¥Ç¡¼¥¿¤ÎÀßÄê
+		if ($_POST["mode"] == "set1") {
+			$checkVal = array("email", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+
+		} elseif ($_POST["mode"] == "set2") {
+			$checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+		} else {
+			$checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+		}
+
+
+	} else {
+
+		//--¡¡¥Æ¥ó¥×¥ì¡¼¥ÈÀßÄê
+		if ($_POST["mode"] == "set1") {
+			$objPage->tpl_mainpage = 'mypage/set1.tpl';
+			$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(2/3)';
+		} elseif ($_POST["mode"] == "set2") {
+			$objPage->tpl_mainpage = 'mypage/set2.tpl';
+			$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(3/3)';
+
+			$address = lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']);
+
+			$objPage->arrForm['pref'] = @$address[0]['state'];
+			$objPage->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town'];
+		} elseif ($_POST["mode"] == "confirm") {
+			//¥Ñ¥¹¥ï¡¼¥ÉÉ½¼¨
+			$passlen = strlen($objPage->arrForm['password']);
+			$objPage->passlen = lfPassLen($passlen);
+			
+			//¥á¡¼¥ë¼õ¤±¼è¤ê
+			if ($objPage->arrForm['mail_flag'] = "ON") {
+				$objPage->arrForm['mail_flag']  = "2";
+			}
+
+			$objPage->tpl_mainpage = 'mypage/change_confirm.tpl';
+			$objPage->tpl_title = 'ÅÐÏ¿ÊÑ¹¹(³ÎÇ§¥Ú¡¼¥¸)';
+
+		}
+
+		//-- ¥Ç¡¼¥¿ÀßÄê
+		unset($objPage->list_data);
+		foreach($_POST as $key => $val) {
+			if ($key != "mode" && $key != "subm") $objPage->list_data[ $key ] = $val;
+		}
+
+
+		//--¡¡²¾ÅÐÏ¿¤È´°Î»²èÌÌ
+		if ($_POST["mode"] == "complete") {
+
+			//-- ÆþÎÏ¥Ç¡¼¥¿¤ÎÊÑ´¹
+			$arrForm = lfConvertParam($_POST, $arrRegistColumn);
+			$arrForm['email'] = strtolower($arrForm['email']);		// email¤Ï¤¹¤Ù¤Æ¾®Ê¸»ú¤Ç½èÍý
+	
+			//¥¨¥é¡¼¥Á¥§¥Ã¥¯
+			$objPage->arrErr = lfErrorCheck($objPage->arrForm);
+			$email_flag = true;
+
+			if($objPage->arrForm['email'] != $objCustomer->getValue('email')) {
+				//¥á¡¼¥ë¥¢¥É¥ì¥¹¤Î½ÅÊ£¥Á¥§¥Ã¥¯
+				$email_cnt = $objQuery->count("dtb_customer","del_flg=0 AND email=?", array($objPage->arrForm['email']));
+				if ($email_cnt > 0){
+					$email_flag = false;
+				}
+			}
+
+			//¥¨¥é¡¼¤Ê¤·¤Ç¤«¤Ä¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬½ÅÊ£¤·¤Æ¤¤¤Ê¤¤¾ì¹ç
+			if($objPage->arrErr == "" && $email_flag) {
+				$arrForm['customer_id'] = $objCustomer->getValue('customer_id');
+				//-- ÊÔ½¸ÅÐÏ¿
+				sfEditCustomerData($arrForm, $arrRegistColumn);
+				//¥»¥Ã¥·¥ç¥ó¾ðÊó¤òºÇ¿·¤Î¾õÂÖ¤Ë¹¹¿·¤¹¤ë
+				$objCustomer->updateSession();
+				//´°Î»¥Ú¡¼¥¸¤Ø
+				header("Location: " . gfAddSessionId("change_complete.php"));
+				exit;
+			} else {
+				sfDispSiteError(CUSTOMER_ERROR);
+			}
+
+		}
+	}
+}
+
+if($objPage->year == '') {
+	$objPage->year = '----';
+}
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//----------------------------------------------------------------------------------------------------------------------
+
+//---- function·²
+function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn) {
+	global $objConn;
+
+	// ²¾ÅÐÏ¿
+	foreach ($arrRegistColumn as $data) {
+		if (strlen($array[ $data["column"] ]) > 0 && ! in_array($data["column"], $arrRejectRegistColumn)) {
+			$arrRegist[ $data["column"] ] = $array[ $data["column"] ];
+		}
+	}
+		
+	// ÃÂÀ¸Æü¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if (strlen($array["year"]) > 0 ) {
+		$arrRegist["birth"] = $array["year"] ."/". $array["month"] ."/". $array["day"] ." 00:00:00";
+	}
+	
+	// ¥Ñ¥¹¥ï¡¼¥É¤Î°Å¹æ²½
+	$arrRegist["password"] = sha1($arrRegist["password"] . ":" . AUTH_MAGIC);
+	
+	$count = 1;
+	while ($count != 0) {
+		$uniqid = sfGetUniqRandomId("t");
+		$count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid));
+	}
+	
+	$arrRegist["secret_key"] = $uniqid;		// ²¾ÅÐÏ¿IDÈ¯¹Ô
+	$arrRegist["create_date"] = "now()"; 	// ºîÀ®Æü
+	$arrRegist["update_date"] = "now()"; 	// ¹¹¿·Æü
+	$arrRegist["first_buy_date"] = "";	 	// ºÇ½é¤Î¹ØÆþÆü
+	
+	// ·ÈÂÓ¥á¡¼¥ë¥¢¥É¥ì¥¹
+	$arrRegist['email_mobile'] = $arrRegist['email'];
+
+	//-- ²¾ÅÐÏ¿¼Â¹Ô
+	$objConn->query("BEGIN");
+
+	$objQuery = new SC_Query();
+	$objQuery->insert("dtb_customer", $arrRegist);
+
+	//--¡¡Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎÈ½Äê
+	$sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?";
+	$mailResult = $objConn->getOne($sql, array($arrRegist["email"]));
+
+	//--¡¡¥á¥ë¥Þ¥¬²¾ÅÐÏ¿¼Â¹Ô
+	$arrRegistMail["email"] = $arrRegist["email"];	
+	if ($array["mail_flag"] == 1) {
+		$arrRegistMail["mail_flag"] = 4; 
+	} elseif ($array["mail_flag"] == 2) {
+		$arrRegistMail["mail_flag"] = 5; 
+	} else {
+		$arrRegistMail["mail_flag"] = 6; 
+	}
+	$arrRegistMail["update_date"] = "now()";
+	
+	// Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¾ì¹ç
+	if ($mailResult == 1) {		
+		$objQuery->update("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($arrRegistMail["email"]). "'");			
+	} else {				//¡¡¿·µ¬ÅÐÏ¿¤Î¾ì¹ç
+		$arrRegistMail["create_date"] = "now()";
+		$objQuery->insert("dtb_customer_mail", $arrRegistMail);		
+	}
+	$objConn->query("COMMIT");
+
+	return $uniqid;
+}
+
+//----¡¡¼èÆÀÊ¸»úÎó¤ÎÊÑ´¹
+function lfConvertParam($array, $arrRegistColumn) {
+	/*
+	 *	Ê¸»úÎó¤ÎÊÑ´¹
+	 *	K :  ¡ÖÈ¾³Ñ(ÊÝ¶¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹
+	 *	C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹
+	 *	V :  ÂùÅÀÉÕ¤­¤ÎÊ¸»ú¤ò°ìÊ¸»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍÑ¤·¤Þ¤¹	
+	 *	n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖÈ¾³Ñ(ÊÝ¶¸)¡×¤ËÊÑ´¹
+	 *  a :  Á´³Ñ±Ñ¿ô»ú¤òÈ¾³Ñ±Ñ¿ô»ú¤ËÊÑ´¹¤¹¤ë
+	 */
+	// ¥«¥é¥àÌ¾¤È¥³¥ó¥Ð¡¼¥È¾ðÊó
+	foreach ($arrRegistColumn as $data) {
+		$arrConvList[ $data["column"] ] = $data["convert"];
+	}
+	// Ê¸»úÊÑ´¹
+	foreach ($arrConvList as $key => $val) {
+		// POST¤µ¤ì¤Æ¤­¤¿ÃÍ¤Î¤ßÊÑ´¹¤¹¤ë¡£
+		if(strlen(($array[$key])) > 0) {
+			$array[$key] = mb_convert_kana($array[$key] ,$val);
+		}
+	}
+	return $array;
+}
+
+
+//¥¨¥é¡¼¥Á¥§¥Ã¥¯
+
+function lfErrorCheck($array) {
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK")); 
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
+	$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê1", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê2", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', "email", MTEXT_LEN) ,array("EXIST_CHECK", "EMAIL_CHECK", "NO_SPTAB" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));
+	$objErr->doFunc(array("FAXÈÖ¹æ", "fax01", "fax02", "fax03", TEL_LEN) ,array("TEL_CHECK"));
+	$objErr->doFunc(array("¤´À­ÊÌ", "sex") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("¤´¿¦¶È", "job") ,array("NUM_CHECK"));
+	$objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE"));
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "ALNUM_CHECK", "NUM_RANGE_CHECK"));
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¼ÁÌä", "reminder") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤ÎÅú¤¨", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+	return $objErr->arrErr;
+	
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck1($array) {
+
+	global $objConn;
+	global $objCustomer;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', "email", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
+
+	//¸½²ñ°÷¤ÎÈ½Äê ¢ª¡¡¸½²ñ°÷¤â¤·¤¯¤Ï²¾ÅÐÏ¿Ãæ¤Ï¡¢¥á¥¢¥É°ì°Õ¤¬Á°Äó¤Ë¤Ê¤Ã¤Æ¤ë¤Î¤ÇÆ±¤¸¥á¥¢¥É¤ÇÅÐÏ¿ÉÔ²Ä
+	$array["customer_id"] = $objCustomer->getValue('customer_id');
+	if (strlen($array["email"]) > 0) {
+		$objQuery = new SC_Query();
+		$arrRet = $objQuery->select("email, update_date, del_flg", "dtb_customer","customer_id <> ? and (email ILIKE ? OR email_mobile ILIKE ?) ORDER BY del_flg", array($array["customer_id"], $array["email"], $array["email"]));
+
+		if(count($arrRet) > 0) {
+			if($arrRet[0]['del_flg'] != '1') {
+				// ²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+				$objErr->arrErr["email"] .= "¢¨ ¤¹¤Ç¤Ë²ñ°÷ÅÐÏ¿¤Ç»ÈÍÑ¤µ¤ì¤Æ¤¤¤ë¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤¹¡£<br />";
+			} else {
+				// Âà²ñ¤·¤¿²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+				$leave_time = sfDBDatetoTime($arrRet[0]['update_date']);
+				$now_time = time();
+				$pass_time = $now_time - $leave_time;
+				// Âà²ñ¤«¤é²¿»þ´Ö-·Ð²á¤·¤Æ¤¤¤ë¤«È½Äê¤¹¤ë¡£
+				$limit_time = ENTRY_LIMIT_HOUR * 3600;						
+				if($pass_time < $limit_time) {
+					$objErr->arrErr["email"] .= "¢¨ Âà²ñ¤«¤é°ìÄê´ü´Ö¤Î´Ö¤Ï¡¢Æ±¤¸¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò»ÈÍÑ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£<br />";
+				}
+			}
+		}
+	}
+
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK", "NUM_RANGE_CHECK"));
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È ¼ÁÌä", "reminder") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È Åú¤¨", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+	
+	return $objErr->arrErr;
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck2($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK")); 
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
+
+	$objErr->doFunc(array("¤´À­ÊÌ", "sex") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("SELECT_CHECK", "CHECK_DATE"));
+	
+	return $objErr->arrErr;
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck3($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê1", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê2", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03",TEL_ITEM_LEN) ,array("TEL_CHECK"));
+	
+	return $objErr->arrErr;
+}
+
+//³ÎÇ§¥Ú¡¼¥¸ÍÑ¥Ñ¥¹¥ï¡¼¥ÉÉ½¼¨ÍÑ
+
+function lfPassLen($passlen){
+	$ret = "";
+	for ($i=0;$i<$passlen;true){
+	$ret.="*";
+	$i++;
+	}
+	return $ret;
+}
+
+
+// Í¹ÊØÈÖ¹æ¤«¤é½»½ê¤Î¼èÆÀ
+function lfGetAddress($zipcode) {
+	global $arrPref;
+
+	$conn = new SC_DBconn(ZIP_DSN);
+
+	// Í¹ÊØÈÖ¹æ¸¡º÷Ê¸ºîÀ®
+	$zipcode = mb_convert_kana($zipcode ,"n");
+	$sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?";
+
+	$data_list = $conn->getAll($sqlse, array($zipcode));
+
+	// ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÈÃÍ¤òÈ¿Å¾¤µ¤»¤ë¡£
+	$arrREV_PREF = array_flip($arrPref);
+
+	/*
+		ÁíÌ³¾Ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Ç¡¼¥¿¤ò¤½¤Î¤Þ¤Þ¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤È
+		°Ê²¼¤Î¤è¤¦¤ÊÊ¸»úÎó¤¬Æþ¤Ã¤Æ¤¤¤ë¤Î¤Ç	ÂÐºö¤¹¤ë¡£
+		¡¦¡Ê£±¡¦£±£¹ÃúÌÜ¡Ë
+		¡¦°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç
+	*/
+	$town =  $data_list[0]['town'];
+	$town = ereg_replace("¡Ê.*¡Ë$","",$town);
+	$town = ereg_replace("°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç","",$town);
+	$data_list[0]['town'] = $town;
+	$data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']];
+
+	return $data_list;
+}
+
+//¸ÜµÒ¾ðÊó¤Î¼èÆÀ
+function lfGetCustomerData(){
+	global $objQuery;
+	global $objCustomer;
+	//¸ÜµÒ¾ðÊó¼èÆÀ
+	$ret = $objQuery->select("*","dtb_customer","customer_id=?", array($objCustomer->getValue('customer_id')));
+	$arrForm = $ret[0];
+
+	//¥á¥ë¥Þ¥¬¥Õ¥é¥°¼èÆÀ
+	$arrForm['mail_flag'] = $objQuery->get("dtb_customer_mail","mail_flag","email=?", array($objCustomer->getValue('email')));
+	
+	//ÃÂÀ¸Æü¤ÎÇ¯·îÆü¼èÆÀ
+	if (isset($arrForm['birth'])){
+		$birth = split(" ", $arrForm["birth"]);
+		list($year, $month, $day) = split("-",$birth[0]);
+		
+		$arrForm['year'] = $year;
+		$arrForm['month'] = $month;
+		$arrForm['day'] = $day;
+		
+	}
+	return $arrForm;
+}
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/mypage/index.php
===================================================================
--- branches/dev/html/mobile/mypage/index.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/index.php	(revision 11460)
@@ -0,0 +1,95 @@
+<?php
+/*
+ * MyPage
+ */
+
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page() {
+		$this->tpl_mainpage = 'mypage/index.tpl';
+		$this->tpl_title = 'MY¥Ú¡¼¥¸/¹ØÆþÍúÎò°ìÍ÷';
+		session_cache_limiter('private-no-expire');
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objQuery = new SC_Query();
+$objCustomer = new SC_Customer();
+// ¥¯¥Ã¥­¡¼´ÉÍý¥¯¥é¥¹
+$objCookie = new SC_Cookie(COOKIE_EXPIRE);
+// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
+$objFormParam = new SC_FormParam();
+// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+lfInitParam();
+// POSTÃÍ¤Î¼èÆÀ
+$objFormParam->setParam($_POST);
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+// ¥í¥°¥¤¥ó½èÍý
+if($_POST['mode'] == 'login') {
+	$objFormParam->toLower('login_email');
+	$arrErr = $objFormParam->checkError();
+	$arrForm =  $objFormParam->getHashArray();
+	
+	// ¥¯¥Ã¥­¡¼ÊÝÂ¸È½Äê
+	if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
+		$objCookie->setCookie('login_email', $_POST['login_email']);
+	} else {
+		$objCookie->setCookie('login_email', '');
+	}
+
+	if (count($arrErr) == 0){
+		if($objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) {
+			// ¥í¥°¥¤¥ó¤¬À®¸ù¤·¤¿¾ì¹ç¤Ï·ÈÂÓÃ¼ËöID¤òÊÝÂ¸¤¹¤ë¡£
+			$objCustomer->updateMobilePhoneId();
+
+			// ·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¥³¥Ô¡¼¤¹¤ë¡£
+			$objCustomer->updateEmailMobile();
+
+			// ·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+			if (!$objCustomer->hasValue('email_mobile')) {
+				header('Location: ' . gfAddSessionId('../entry/email_mobile.php'));
+				exit;
+			}
+		} else {
+			$objQuery = new SC_Query;
+			$where = "email = ? AND status = 1 AND del_flg = 0";
+			$ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email']));
+			
+			if($ret > 0) {
+				sfDispSiteError(TEMP_LOGIN_ERROR);
+			} else {
+				sfDispSiteError(SITE_LOGIN_ERROR);
+			}
+		}
+	}
+}
+
+
+// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if(!isset($_SESSION['customer'])) {
+	$objPage->tpl_mainpage = 'mypage/login.tpl';
+	$objView->assignArray($objFormParam->getHashArray());
+	$objView->assignArray(array("arrErr" => $arrErr));
+}else {
+	//¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóÉ½¼¨ÍÑ
+	$objPage->CustomerName1 = $objCustomer->getvalue('name01');
+	$objPage->CustomerName2 = $objCustomer->getvalue('name02');
+}
+
+$objView->assignobj($objPage);				//$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊÇ¼
+$objView->display(SITE_FRAME);				//¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
+
+//-------------------------------------------------------------------------------------------------------------------------
+/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+function lfInitParam() {
+	global $objFormParam;
+	$objFormParam->addParam("µ­²±¤¹¤ë", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "login_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "login_pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+}
+?>
Index: branches/dev/html/mobile/mypage/refusal_complete.php
===================================================================
--- branches/dev/html/mobile/mypage/refusal_complete.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/refusal_complete.php	(revision 11460)
@@ -0,0 +1,31 @@
+<?php
+/*
+ * Âà²ñ´°Î»
+ */
+
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page(){
+		$this->tpl_mainpage = 'mypage/refusal_complete.tpl';
+		$this->tpl_title = "MY¥Ú¡¼¥¸/Âà²ñ¼êÂ³¤­(´°Î»¥Ú¡¼¥¸)";
+		$this->point_disp = false;
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+$objCustomer = new SC_Customer();
+//¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóÉ½¼¨ÍÑ
+$objPage->CustomerName1 = $objCustomer->getvalue('name01');
+$objPage->CustomerName2 = $objCustomer->getvalue('name02');
+$objPage->CustomerPoint = $objCustomer->getvalue('point');
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+?>
Index: branches/dev/html/mobile/mypage/order.php
===================================================================
--- branches/dev/html/mobile/mypage/order.php	(revision 11460)
+++ branches/dev/html/mobile/mypage/order.php	(revision 11460)
@@ -0,0 +1,41 @@
+<?
+/*
+ * ÍúÎò¤«¤éÃíÊ¸¤ò¼èÆÀ¡¦ÅÐÏ¿¤·¡¢¥«¡¼¥È¤ËÁ«°Ü¤¹¤ë¡£
+ */
+require_once("../require.php");
+
+$objCustomer = new SC_Customer();
+$objCartSess = new SC_CartSession();
+
+//¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+$arrDisp = lfGetOrderDetail($_POST['order_id']);
+
+//¥í¥°¥¤¥ó¤·¤Æ¤¤¤Ê¤¤¡¢¤Þ¤¿¤ÏDB¤Ë¾ðÊó¤¬Ìµ¤¤¾ì¹ç
+if (!$objCustomer->isLoginSuccess() or count($arrDisp) == 0){
+	sfDispSiteError(CUSTOMER_ERROR);
+}
+
+for($num = 0; $num < count($arrDisp); $num++) {
+	$product_id = $arrDisp[$num]['product_id'];
+	$cate_id1 = $arrDisp[$num]['classcategory_id1'];
+	$cate_id2 = $arrDisp[$num]['classcategory_id2'];
+	$quantity = $arrDisp[$num]['quantity'];
+
+	$objCartSess->addProduct(array($product_id, $cate_id1, $cate_id2), $quantity);
+}
+
+header("Location: " . gfAddSessionId(URL_CART_TOP));
+
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+// ¼õÃí¾ÜºÙ¥Ç¡¼¥¿¤Î¼èÆÀ
+function lfGetOrderDetail($order_id) {
+	$objQuery = new SC_Query();
+	$col = "product_id, classcategory_id1, classcategory_id2, quantity";
+	$where = "order_id = ?";
+	$objQuery->setorder("classcategory_id1, classcategory_id2");
+	$arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id));
+	return $arrRet;
+}
+
+?>
Index: branches/dev/html/mobile/redirect.php
===================================================================
--- branches/dev/html/mobile/redirect.php	(revision 11460)
+++ branches/dev/html/mobile/redirect.php	(revision 11460)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¶õ¥á¡¼¥ë¤ÎÊÖ¿®¤«¤é¤ÎÁ«°Ü
+ */
+
+define('SKIP_MOBILE_INIT', true);
+require_once 'require.php';
+
+if (isset($_GET['token'])) {
+	$next_url = gfFinishKaraMail($_GET['token']);
+}
+
+if (isset($next_url) && $next_url !== false) {
+	header("Location: $next_url");
+} else {
+	header('Location: ' . SITE_URL);
+}
+?>
Index: branches/dev/html/mobile/shopping/load_payment_module.php
===================================================================
--- branches/dev/html/mobile/shopping/load_payment_module.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/load_payment_module.php	(revision 11460)
@@ -0,0 +1,42 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+require_once("../require.php");
+
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+$objQuery = new SC_Query();
+
+// Á°¤Î¥Ú¡¼¥¸¤ÇÀµ¤·¤¯ÅÐÏ¿¼êÂ³¤­¤¬¹Ô¤ï¤ì¤¿µ­Ï¿¤¬¤¢¤ë¤«È½Äê
+sfIsPrePage($objSiteSess);
+
+// ¥¢¥¯¥»¥¹¤ÎÀµÅöÀ­¤ÎÈ½Äê
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+
+$payment_id = $_SESSION["payment_id"];
+
+// »ÙÊ§¤¤ID¤¬Ìµ¤¤¾ì¹ç¤Ë¤Ï¥¨¥é¡¼
+if($payment_id == ""){
+	sfDispSiteError(PAGE_ERROR, "", true);
+}
+
+// ·èºÑ¾ðÊó¤ò¼èÆÀ¤¹¤ë
+if(sfColumnExists("dtb_payment", "memo01")){
+	$sql = "SELECT module_path, memo01, memo02, memo03, memo04, memo05, memo06, memo07, memo08, memo09, memo10 FROM dtb_payment WHERE payment_id = ?";
+	$arrPayment = $objQuery->getall($sql, array($payment_id));
+}
+
+if(count($arrPayment) > 0) {
+	$path = $arrPayment[0]['module_path'];
+	if(file_exists($path)) {
+		require_once($path);
+		exit;
+	} else {
+		sfDispSiteError(FREE_ERROR_MSG, "", true, "¥â¥¸¥å¡¼¥ë¥Õ¥¡¥¤¥ë¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br />¤³¤Î¼êÂ³¤­¤ÏÌµ¸ú¤È¤Ê¤ê¤Þ¤·¤¿¡£");
+	}
+}
+
+?>
Index: branches/dev/html/mobile/shopping/deliv.php
===================================================================
--- branches/dev/html/mobile/shopping/deliv.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/deliv.php	(revision 11460)
@@ -0,0 +1,315 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	var $arrSession;
+	var $tpl_mode;
+	var $arrAddr;
+	function LC_Page() {
+		$this->tpl_mainpage = 'shopping/deliv.tpl';
+		$this->tpl_css = '/css/layout/shopping/index.css';
+		global $arrPref;
+		$this->arrPref = $arrPref;
+		$this->tpl_title = "¤ªÆÏ¤±Àè»ØÄê";		// ¥¿¥¤¥È¥ë
+
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');		
+
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+$objCustomer = new SC_Customer();
+// ¥¯¥Ã¥­¡¼´ÉÍý¥¯¥é¥¹
+$objCookie = new SC_Cookie(COOKIE_EXPIRE);
+// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
+$objFormParam = new SC_FormParam();
+// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+lfInitParam();
+// POSTÃÍ¤Î¼èÆÀ
+$objFormParam->setParam($_POST);
+
+$objLoginFormParam = new SC_FormParam();	// ¥í¥°¥¤¥ó¥Õ¥©¡¼¥àÍÑ
+lfInitLoginFormParam();						// ½é´üÀßÄê
+$objLoginFormParam->setParam($_POST);		// POSTÃÍ¤Î¼èÆÀ
+
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+$objPage->tpl_uniqid = $uniqid;
+
+// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if($_POST['mode'] != 'login' && !$objCustomer->isLoginSuccess()) {
+	// ÉÔÀµ¥¢¥¯¥»¥¹¤È¤ß¤Ê¤¹
+	sfDispSiteError(CUSTOMER_ERROR);
+}
+
+switch($_POST['mode']) {
+case 'login':
+	$objLoginFormParam->toLower('login_email');
+	$objPage->arrErr = $objLoginFormParam->checkError();
+	$arrForm =  $objLoginFormParam->getHashArray();
+	// ¥¯¥Ã¥­¡¼ÊÝÂ¸È½Äê
+	if($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
+		$objCookie->setCookie('login_email', $_POST['login_email']);
+	} else {
+		$objCookie->setCookie('login_email', '');
+	}
+
+	if(count($objPage->arrErr) == 0) {
+		// ¥í¥°¥¤¥óÈ½Äê
+		if(!$objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) &&
+		   !$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
+			// ²¾ÅÐÏ¿¤ÎÈ½Äê
+			$objQuery = new SC_Query;
+			$where = "email = ? AND status = 1 AND del_flg = 0";
+			$ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email']));
+			
+			if($ret > 0) {
+				sfDispSiteError(TEMP_LOGIN_ERROR);
+			} else {
+				sfDispSiteError(SITE_LOGIN_ERROR);
+			}
+		} 
+	} else {
+		// ¥í¥°¥¤¥ó¥Ú¡¼¥¸¤ËÌá¤ë
+		header("Location: " . gfAddSessionId(URL_SHOP_TOP));
+		exit;
+	}
+
+	// ¥í¥°¥¤¥ó¤¬À®¸ù¤·¤¿¾ì¹ç¤Ï·ÈÂÓÃ¼ËöID¤òÊÝÂ¸¤¹¤ë¡£
+	$objCustomer->updateMobilePhoneId();
+
+	// ·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¥³¥Ô¡¼¤¹¤ë¡£
+	$objCustomer->updateEmailMobile();
+
+	// ·ÈÂÓ¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+	if (!$objCustomer->hasValue('email_mobile')) {
+		header('Location: ' . gfAddSessionId('../entry/email_mobile.php'));
+		exit;
+	}
+	break;
+// ºï½ü
+case 'delete':
+	if (sfIsInt($_POST['other_deliv_id'])) {
+		$objQuery = new SC_Query();
+		$where = "other_deliv_id = ?";
+		$arrRet = $objQuery->delete("dtb_other_deliv", $where, array($_POST['other_deliv_id']));
+		$objFormParam->setValue('select_addr_id', '');
+	}
+	break;
+// ²ñ°÷ÅÐÏ¿½»½ê¤ËÁ÷¤ë
+case 'customer_addr':
+	// ¤ªÆÏ¤±Àè¤¬¥Á¥§¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¹¹¿·½èÍý¤ò¹Ô¤¦
+	if ($_POST['deli'] != "") {
+		// ²ñ°÷¾ðÊó¤Î½»½ê¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Ë½ñ¤­¹þ¤à
+		lfRegistDelivData($uniqid, $objCustomer);
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		$objSiteSess->setRegistFlag();
+		// ¤ª»ÙÊ§¤¤ÊýË¡ÁªÂò¥Ú¡¼¥¸¤Ø°ÜÆ°
+		header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT));
+		exit;
+	}else{
+		// ¥¨¥é¡¼¤òÊÖ¤¹
+		$arrErr['deli'] = '¢¨ ¤ªÆÏ¤±Àè¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£';
+	}
+	break;
+	
+// ÅÐÏ¿ºÑ¤ß¤ÎÊÌ¤Î¤ªÆÏ¤±Àè¤ËÁ÷¤ë
+case 'other_addr':
+	// ¤ªÆÏ¤±Àè¤¬¥Á¥§¥Ã¥¯¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¹¹¿·½èÍý¤ò¹Ô¤¦
+	if ($_POST['deli'] != "") {
+		if (sfIsInt($_POST['other_deliv_id'])) {
+			// ÅÐÏ¿ºÑ¤ß¤ÎÊÌ¤Î¤ªÆÏ¤±Àè¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Ë½ñ¤­¹þ¤à
+			lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['other_deliv_id']);
+			// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+			$objSiteSess->setRegistFlag();
+			// ¤ª»ÙÊ§¤¤ÊýË¡ÁªÂò¥Ú¡¼¥¸¤Ø°ÜÆ°
+			header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT));
+			exit;
+		}
+	}else{
+		// ¥¨¥é¡¼¤òÊÖ¤¹
+		$arrErr['deli'] = '¢¨ ¤ªÆÏ¤±Àè¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£';
+	}
+	break;
+
+/*
+// ÊÌ¤Î¤ªÆÏ¤±Àè¤ò»ØÄê
+case 'new_addr':
+	// ÆþÎÏÃÍ¤ÎÊÑ´¹
+	$objFormParam->convParam();
+	$objPage->arrErr = lfCheckError($arrRet);
+	// ÆþÎÏ¥¨¥é¡¼¤Ê¤·
+	if(count($objPage->arrErr) == 0) {
+		// DB¤Ø¤ªÆÏ¤±Àè¤òÅÐÏ¿
+		lfRegistNewAddrData($uniqid, $objCustomer);
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		$objSiteSess->setRegistFlag();
+		// ¤ª»ÙÊ§¤¤ÊýË¡ÁªÂò¥Ú¡¼¥¸¤Ø°ÜÆ°
+		header("Location: " . URL_SHOP_PAYMENT);
+		exit;
+	}
+	break;
+*/
+
+// Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë
+case 'return':
+	// ³ÎÇ§¥Ú¡¼¥¸¤Ø°ÜÆ°
+	header("Location: " . URL_CART_TOP);
+	exit;
+	break;
+default:
+	$objQuery = new SC_Query();
+	$where = "order_temp_id = ?";
+	$arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
+	$objFormParam->setParam($arrRet[0]);
+	break;
+}
+
+/** É½¼¨½èÍý **/
+
+// ²ñ°÷ÅÐÏ¿½»½ê¤Î¼èÆÀ
+$col = "name01, name02, pref, addr01, addr02, zip01, zip02";
+$where = "customer_id = ?";
+$objQuery = new SC_Query();
+$arrCustomerAddr = $objQuery->select($col, "dtb_customer", $where, array($_SESSION['customer']['customer_id']));
+// ÊÌ¤Î¤ªÆÏ¤±Àè½»½ê¤Î¼èÆÀ
+$col = "other_deliv_id, name01, name02, pref, addr01, addr02, zip01, zip02";
+$objQuery->setorder("other_deliv_id DESC");
+$objOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($_SESSION['customer']['customer_id']));
+$objPage->arrAddr = $arrCustomerAddr;
+$cnt = 1;
+foreach($objOtherAddr as $val) {
+	$objPage->arrAddr[$cnt] = $val;
+	$cnt++;
+}
+
+// ÆþÎÏÃÍ¤Î¼èÆÀ
+$objPage->arrForm = $objFormParam->getFormParamList();
+$objPage->arrErr = $arrErr;
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+function lfInitParam() {
+	global $objFormParam;
+	$objFormParam->addParam("¤ªÌ¾Á°1", "deliv_name01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¤ªÌ¾Á°2", "deliv_name02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê1", "deliv_kana01", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê2", "deliv_kana02", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ1", "deliv_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ2", "deliv_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("ÅÔÆ»ÉÜ¸©", "deliv_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("½»½ê1", "deliv_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("½»½ê2", "deliv_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "deliv_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "deliv_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "deliv_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+}
+
+function lfInitLoginFormParam() {
+	global $objLoginFormParam;
+	$objLoginFormParam->addParam("µ­²±¤¹¤ë", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objLoginFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "login_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+	$objLoginFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "login_pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+}
+
+/* DB¤Ø¥Ç¡¼¥¿¤ÎÅÐÏ¿ */
+function lfRegistNewAddrData($uniqid, $objCustomer) {
+	global $objFormParam;
+	$arrRet = $objFormParam->getHashArray();
+	$sqlval = $objFormParam->getDbArray();
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['deliv_check'] = '1';
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['update_date'] = 'Now()';
+	$sqlval['customer_id'] = $objCustomer->getValue('customer_id');
+	$sqlval['order_birth'] = $objCustomer->getValue('birth');
+	
+	sfRegistTempOrder($uniqid, $sqlval);
+}
+
+/* ²ñ°÷¾ðÊó¤Î½»½ê¤ò°ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤Ø */
+function lfRegistDelivData($uniqid, $objCustomer) {
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['update_date'] = 'Now()';
+	$sqlval['customer_id'] = $objCustomer->getValue('customer_id');
+    $sqlval['deliv_check'] = '1';
+	$sqlval['deliv_name01'] = $objCustomer->getValue('name01');
+    $sqlval['deliv_name02'] = $objCustomer->getValue('name02');
+    $sqlval['deliv_kana01'] = $objCustomer->getValue('kana01');
+    $sqlval['deliv_kana02'] = $objCustomer->getValue('kana02');
+    $sqlval['deliv_zip01'] = $objCustomer->getValue('zip01');
+    $sqlval['deliv_zip02'] = $objCustomer->getValue('zip02');
+    $sqlval['deliv_pref'] = $objCustomer->getValue('pref');
+    $sqlval['deliv_addr01'] = $objCustomer->getValue('addr01');
+    $sqlval['deliv_addr02'] = $objCustomer->getValue('addr02');
+    $sqlval['deliv_tel01'] = $objCustomer->getValue('tel01');
+    $sqlval['deliv_tel02'] = $objCustomer->getValue('tel02');
+	$sqlval['deliv_tel03'] = $objCustomer->getValue('tel03');
+
+    $sqlval['deliv_fax01'] = $objCustomer->getValue('fax01');
+    $sqlval['deliv_fax02'] = $objCustomer->getValue('fax02');
+	$sqlval['deliv_fax03'] = $objCustomer->getValue('fax03');
+
+	sfRegistTempOrder($uniqid, $sqlval);
+}
+
+/* ÊÌ¤Î¤ªÆÏ¤±Àè½»½ê¤ò°ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤Ø */
+function lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id) {
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['update_date'] = 'Now()';
+	$sqlval['customer_id'] = $objCustomer->getValue('customer_id');
+	$sqlval['order_birth'] = $objCustomer->getValue('birth');
+		
+	$objQuery = new SC_Query();
+	$where = "other_deliv_id = ?";
+	$arrRet = $objQuery->select("*", "dtb_other_deliv", $where, array($other_deliv_id));
+	
+	$sqlval['deliv_check'] = '1';
+    $sqlval['deliv_name01'] = $arrRet[0]['name01'];
+    $sqlval['deliv_name02'] = $arrRet[0]['name02'];
+    $sqlval['deliv_kana01'] = $arrRet[0]['kana01'];
+    $sqlval['deliv_kana02'] = $arrRet[0]['kana02'];
+    $sqlval['deliv_zip01'] = $arrRet[0]['zip01'];
+    $sqlval['deliv_zip02'] = $arrRet[0]['zip02'];
+    $sqlval['deliv_pref'] = $arrRet[0]['pref'];
+    $sqlval['deliv_addr01'] = $arrRet[0]['addr01'];
+    $sqlval['deliv_addr02'] = $arrRet[0]['addr02'];
+    $sqlval['deliv_tel01'] = $arrRet[0]['tel01'];
+    $sqlval['deliv_tel02'] = $arrRet[0]['tel02'];
+	$sqlval['deliv_tel03'] = $arrRet[0]['tel03'];
+	sfRegistTempOrder($uniqid, $sqlval);
+}
+
+/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+function lfCheckError() {
+	global $objFormParam;
+	// ÆþÎÏ¥Ç¡¼¥¿¤òÅÏ¤¹¡£
+	$arrRet =  $objFormParam->getHashArray();
+	$objErr = new SC_CheckError($arrRet);
+	$objErr->arrErr = $objFormParam->checkError();
+	// Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯
+	if ($_POST['mode'] == 'login'){
+	$objErr->doFunc(array("¥á¡¼¥ë¥¢¥É¥ì¥¹", "login_email", STEXT_LEN), array("EXIST_CHECK"));
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É", "login_pass", STEXT_LEN), array("EXIST_CHECK"));
+	}
+	$objErr->doFunc(array("TEL", "deliv_tel01", "deliv_tel02", "deliv_tel03", TEL_ITEM_LEN), array("TEL_CHECK"));
+	return $objErr->arrErr;
+}
+?>
Index: branches/dev/html/mobile/shopping/index.php
===================================================================
--- branches/dev/html/mobile/shopping/index.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/index.php	(revision 11460)
@@ -0,0 +1,248 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	var $arrSession;
+	var $tpl_mode;
+	var $tpl_login_email;
+	function LC_Page() {
+		$this->tpl_mainpage = 'shopping/index.tpl';
+		global $arrPref;
+		$this->arrPref = $arrPref;
+		global $arrSex;
+		$this->arrSex = $arrSex;
+		global $arrJob;
+		$this->arrJob = $arrJob;
+		$this->tpl_onload = 'fnCheckInputDeliv();';
+		
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');				
+	}
+}
+
+$conn = new SC_DBConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+$objCustomer = new SC_Customer();
+$objCookie = new SC_Cookie();
+$objFormParam = new SC_FormParam();			// ¥Õ¥©¡¼¥àÍÑ
+lfInitParam();								// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+$objFormParam->setParam($_POST);			// POSTÃÍ¤Î¼èÆÀ
+
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+
+$objPage->tpl_uniqid = $uniqid;
+
+// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if($objCustomer->isLoginSuccess()) {
+	// ¤¹¤Ç¤Ë¥í¥°¥¤¥ó¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤ªÆÏ¤±ÀèÀßÄê²èÌÌ¤ËÅ¾Á÷
+	header("Location: " . gfAddSessionId('deliv.php'));
+	exit;
+}
+
+// ·ÈÂÓÃ¼ËöID¤¬°ìÃ×¤¹¤ë²ñ°÷¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+$objPage->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
+
+switch($_POST['mode']) {
+case 'nonmember_confirm':
+	$objPage = lfSetNonMember($objPage);
+	// ¢¨break¤Ê¤·
+case 'confirm':
+	// ÆþÎÏÃÍ¤ÎÊÑ´¹
+	$objFormParam->convParam();
+	$objFormParam->toLower('order_mail');
+	$objFormParam->toLower('order_mail_check');
+	
+	$objPage->arrErr = lfCheckError();
+
+	// ÆþÎÏ¥¨¥é¡¼¤Ê¤·
+	if(count($objPage->arrErr) == 0) {
+		// DB¤Ø¤Î¥Ç¡¼¥¿ÅÐÏ¿
+		lfRegistData($uniqid);
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		$objSiteSess->setRegistFlag();
+		// ¤ª»ÙÊ§¤¤ÊýË¡ÁªÂò¥Ú¡¼¥¸¤Ø°ÜÆ°
+		header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT));
+		exit;		
+	}
+	
+	break;
+// Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë
+case 'return':
+	// ³ÎÇ§¥Ú¡¼¥¸¤Ø°ÜÆ°
+	header("Location: " . gfAddSessionId(URL_CART_TOP));
+	exit;
+	break;
+case 'nonmember':
+	$objPage = lfSetNonMember($objPage);
+	// ¢¨break¤Ê¤·
+default:
+	if($_GET['from'] == 'nonmember') {
+		$objPage = lfSetNonMember($objPage);
+	}
+	// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ
+	$uniqid = $objSiteSess->getUniqId();
+	$objQuery = new SC_Query();
+	$where = "order_temp_id = ?";
+	$arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
+	// DBÃÍ¤Î¼èÆÀ
+	$objFormParam->setParam($arrRet[0]);
+	$objFormParam->setValue('order_email_check', $arrRet[0]['order_email']);
+	$objFormParam->setDBDate($arrRet[0]['order_birth']);
+	break;
+}
+
+// ¥¯¥Ã¥­¡¼È½Äê
+$objPage->tpl_login_email = $objCookie->getCookie('login_email');
+if($objPage->tpl_login_email != "") {
+	$objPage->tpl_login_memory = "1";
+}
+
+// ÁªÂòÍÑÆüÉÕ¤Î¼èÆÀ
+$objDate = new SC_Date(START_BIRTH_YEAR);
+$objPage->arrYear = $objDate->getYear('', 1950);	//¡¡ÆüÉÕ¥×¥ë¥À¥¦¥óÀßÄê
+$objPage->arrMonth = $objDate->getMonth();
+$objPage->arrDay = $objDate->getDay();
+
+if($objPage->year == '') {
+	$objPage->year = '----';
+}
+
+// ÆþÎÏÃÍ¤Î¼èÆÀ
+$objPage->arrForm = $objFormParam->getFormParamList();
+
+if($objPage->arrForm['year']['value'] == ""){
+	$objPage->arrForm['year']['value'] = '----';	
+}
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+/* Èó²ñ°÷ÆþÎÏ¥Ú¡¼¥¸¤Î¥»¥Ã¥È */
+function lfSetNonMember($objPage) {
+	$objPage->tpl_mainpage = 'shopping/nonmember_input.tpl';
+	$objPage->tpl_css = array();
+	$objPage->tpl_css[] = '/css/layout/login/nonmember.css';
+	return $objPage;
+}
+
+/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+function lfInitParam() {
+	global $objFormParam;
+	$objFormParam->addParam("¤ªÌ¾Á°¡ÊÀ«¡Ë", "order_name01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¤ªÌ¾Á°¡ÊÌ¾¡Ë", "order_name02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "order_kana01", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "order_kana02", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ1", "order_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ2", "order_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("ÅÔÆ»ÉÜ¸©", "order_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("½»½ê1", "order_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("½»½ê2", "order_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "order_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "order_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "order_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("FAXÈÖ¹æ1", "order_fax01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("FAXÈÖ¹æ2", "order_fax02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("FAXÈÖ¹æ3", "order_fax03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "order_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "NO_SPTAB", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK"));
+	$objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹¡Ê³ÎÇ§¡Ë", "order_email_check", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "NO_SPTAB", "MAX_LENGTH_CHECK", "EMAIL_CHECK", "EMAIL_CHAR_CHECK"), "", false);
+	$objFormParam->addParam("Ç¯", "year", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+	$objFormParam->addParam("·î", "month", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+	$objFormParam->addParam("Æü", "day", INT_LEN, "n", array("MAX_LENGTH_CHECK"), "", false);
+	$objFormParam->addParam("À­ÊÌ", "order_sex", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("¿¦¶È", "order_job", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("ÊÌ¤Î¤ªÆÏ¤±Àè", "deliv_check", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("¤ªÌ¾Á°¡ÊÀ«¡Ë", "deliv_name01", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¤ªÌ¾Á°¡ÊÌ¾¡Ë", "deliv_name02", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "deliv_kana01", STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "deliv_kana02", STEXT_LEN, "KVCa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ1", "deliv_zip01", ZIP01_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("Í¹ÊØÈÖ¹æ2", "deliv_zip02", ZIP02_LEN, "n", array("NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objFormParam->addParam("ÅÔÆ»ÉÜ¸©", "deliv_pref", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("½»½ê1", "deliv_addr01", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("½»½ê2", "deliv_addr02", STEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ1", "deliv_tel01", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ2", "deliv_tel02", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("ÅÅÏÃÈÖ¹æ3", "deliv_tel03", TEL_ITEM_LEN, "n", array("MAX_LENGTH_CHECK" ,"NUM_CHECK"));
+	$objFormParam->addParam("¥á¡¼¥ë¥Þ¥¬¥¸¥ó", "mail_flag", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), 1);
+}
+
+/* DB¤Ø¥Ç¡¼¥¿¤ÎÅÐÏ¿ */
+function lfRegistData($uniqid) {
+	global $objFormParam;
+	$arrRet = $objFormParam->getHashArray();
+	$sqlval = $objFormParam->getDbArray();
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['order_birth'] = sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']);
+	$sqlval['update_date'] = 'Now()';
+	$sqlval['customer_id'] = '0';
+	
+	// ´ûÂ¸¥Ç¡¼¥¿¤Î¥Á¥§¥Ã¥¯
+	$objQuery = new SC_Query();
+	$where = "order_temp_id = ?";
+	$cnt = $objQuery->count("dtb_order_temp", $where, array($uniqid));
+	// ´ûÂ¸¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç
+	if ($cnt == 0) {
+		$sqlval['create_date'] = 'Now()';
+		$objQuery->insert("dtb_order_temp", $sqlval);
+	} else {
+		$objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid));
+	}
+}
+
+/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+function lfCheckError() {
+	global $objFormParam;
+	// ÆþÎÏ¥Ç¡¼¥¿¤òÅÏ¤¹¡£
+	$arrRet =  $objFormParam->getHashArray();
+	$objErr = new SC_CheckError($arrRet);
+	$objErr->arrErr = $objFormParam->checkError();
+		
+	// ÊÌ¤Î¤ªÆÏ¤±Àè¥Á¥§¥Ã¥¯
+	if($_POST['deliv_check'] == "1") { 
+		$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", "deliv_name01"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", "deliv_name02"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", "deliv_kana01"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", "deliv_kana02"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "deliv_zip01"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "deliv_zip02"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", "deliv_pref"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("½»½ê1", "deliv_addr01"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("½»½ê2", "deliv_addr02"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("ÅÅÏÃÈÖ¹æ1", "deliv_tel01"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("ÅÅÏÃÈÖ¹æ2", "deliv_tel02"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("ÅÅÏÃÈÖ¹æ3", "deliv_tel03"), array("EXIST_CHECK"));
+	}
+	
+	// Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯
+	$objErr->doFunc(array("TEL", "order_tel01", "order_tel02", "order_tel03", TEL_ITEM_LEN), array("TEL_CHECK"));
+	$objErr->doFunc(array("FAX", "order_fax01", "order_fax02", "order_fax03", TEL_ITEM_LEN), array("TEL_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "order_zip01", "order_zip02"), array("ALL_EXIST_CHECK"));
+	$objErr->doFunc(array("TEL", "deliv_tel01", "deliv_tel02", "deliv_tel03", TEL_ITEM_LEN), array("TEL_CHECK"));
+	$objErr->doFunc(array("FAX", "deliv_fax01", "deliv_fax02", "deliv_fax03", TEL_ITEM_LEN), array("TEL_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "deliv_zip01", "deliv_zip02"), array("ALL_EXIST_CHECK"));
+	$objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("CHECK_DATE"));
+	$objErr->doFunc(array("¥á¡¼¥ë¥¢¥É¥ì¥¹", "¥á¡¼¥ë¥¢¥É¥ì¥¹¡Ê³ÎÇ§¡Ë", "order_email", "order_email_check"), array("EQUAL_CHECK"));
+	
+	// ¤¹¤Ç¤Ë¥á¥ë¥Þ¥¬¥Æ¡¼¥Ö¥ë¤Ë²ñ°÷¤È¤·¤Æ¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if(sfCheckCustomerMailMaga($arrRet['order_email'])) {
+		$objErr->arrErr['order_email'] = "¤³¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ï¤¹¤Ç¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£<br>";
+	}
+		
+	return $objErr->arrErr;
+}
+?>
Index: branches/dev/html/mobile/shopping/complete.php
===================================================================
--- branches/dev/html/mobile/shopping/complete.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/complete.php	(revision 11460)
@@ -0,0 +1,524 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'shopping/complete.tpl';
+		$this->tpl_css = '/css/layout/shopping/complete.css';
+		$this->tpl_title = "¤´ÃíÊ¸´°Î»";
+		global $arrCONVENIENCE;
+		$this->arrCONVENIENCE = $arrCONVENIENCE;
+		global $arrCONVENIMESSAGE;
+		$this->arrCONVENIMESSAGE = $arrCONVENIMESSAGE;
+		global $arrCONVENIENCE;
+		global $arrCONVENIMESSAGE;
+		$objPage->arrCONVENIENCE = $arrCONVENIENCE;
+		$objPage->arrCONVENIMESSAGE = $arrCONVENIMESSAGE;
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');		
+
+	}
+}
+
+$conn = new SC_DBConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+$objSiteInfo = $objView->objSiteInfo;
+$arrInfo = $objSiteInfo->data;
+$objCustomer = new SC_Customer();
+
+// Á°¤Î¥Ú¡¼¥¸¤ÇÀµ¤·¤¯ÅÐÏ¿¼êÂ³¤­¤¬¹Ô¤ï¤ì¤¿¤«È½Äê
+sfIsPrePage($objSiteSess);
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+if ($uniqid != "") {
+	
+	// ´°Î»½èÍý
+	$objQuery = new SC_Query();
+	$objQuery->begin();
+	$order_id = lfDoComplete($objQuery, $uniqid);
+	$objQuery->commit();
+	
+	// ¥»¥Ã¥·¥ç¥ó¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤ë¾ðÊó¤ò¹¹¿·¤¹¤ë
+	$objCustomer->updateSession();
+
+	// ´°Î»¥á¡¼¥ëÁ÷¿®
+	if($order_id != "") {
+		sfSendOrderMail($order_id, '1');
+	}
+
+	//¤½¤ÎÂ¾¾ðÊó¤Î¼èÆÀ
+	$other_data = $objQuery->get("dtb_order", "memo02", "order_id = ? ", array($order_id));
+	if($other_data != "") {
+		$arrOther = unserialize($other_data);
+		
+		// ¥Ç¡¼¥¿¤òÊÔ½¸
+		foreach($arrOther as $key => $val){
+			// URL¤Î¾ì¹ç¤Ë¤Ï¥ê¥ó¥¯¤Ä¤­¤ÇÉ½¼¨¤µ¤»¤ë
+			if (preg_match('/^(https?|ftp)(:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)$/', $val["value"])) {
+				$arrOther[$key]["value"] = "<a href='#' onClick=\"window.open('". $val["value"] . "'); \" >" . $val["value"] ."</a>";
+			}
+		}
+				
+		$objPage->arrOther = $arrOther;
+		
+	}
+	
+	// ¥¢¥Õ¥£¥ê¥¨¥¤¥ÈÍÑ¥³¥ó¥Ð¡¼¥¸¥ç¥ó¥¿¥°¤ÎÀßÄê
+	$objPage->tpl_conv_page = AFF_SHOPPING_COMPLETE;
+	$objPage->tpl_aff_option = "order_id=$order_id";
+	//¹ç·×²Á³Ê¤Î¼èÆÀ
+	$total = $objQuery->get("dtb_order", "total", "order_id = ? ", array($order_id));
+	if($total != "") {
+		$objPage->tpl_aff_option.= "|total=$total";
+	}
+}
+
+$objPage->arrInfo = $arrInfo;
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+// ¥¨¥Ó¥¹¥¿¥°°úÅÏ¤·ÍÑ¥Ç¡¼¥¿¤òÀ¸À®¤¹¤ë
+function lfGetEbisData($order_id) {
+	$objQuery = new SC_Query();
+	$col = "customer_id, total, order_sex, order_job, to_number(to_char(age(current_timestamp, order_birth), 'YYY'), 999) AS order_age";
+	$arrRet = $objQuery->select($col, "dtb_order", "order_id = ?", array($order_id));
+	
+	if($arrRet[0]['customer_id'] > 0) {
+		// ²ñ°÷ÈÖ¹æ
+		$arrEbis['m1id'] = $arrRet[0]['customer_id'];
+		// Èó²ñ°÷or²ñ°÷
+		$arrEbis['o5id'] = '1';
+	} else {
+		// ²ñ°÷ÈÖ¹æ
+		$arrEbis['m1id'] = '';
+		// Èó²ñ°÷or²ñ°÷
+		$arrEbis['o5id'] = '2';	
+	}
+	
+	// ¹ØÆþ¶â³Û
+	$arrEbis['a1id'] = $arrRet[0]['total'];
+	// À­ÊÌ
+	$arrEbis['o2id'] = $arrRet[0]['order_sex'];
+	// Ç¯Îð
+	$arrEbis['o3id'] = $arrRet[0]['order_age'];
+	// ¿¦¶È
+	$arrEbis['o4id'] = $arrRet[0]['order_job'];
+		
+	$objQuery->setgroupby("product_id");
+	$arrRet = $objQuery->select("product_id", "dtb_order_detail", "order_id = ?", array($order_id));
+	$arrProducts = sfSwapArray($arrRet);
+	
+	$line = "";
+	// ¾¦ÉÊID¤ò¥¢¥ó¥À¡¼¥Ð¡¼¤ÇÀÜÂ³¤¹¤ë¡£
+	foreach($arrProducts['product_id'] as $val) {
+		if($line != "") {
+			$line .= "_$val";		
+		} else {
+			$line .= "$val";
+		}
+	}
+	
+	// ¾¦ÉÊID	
+	$arrEbis['o1id'] = $line;
+	
+	return $arrEbis;
+}
+
+// ´°Î»½èÍý
+function lfDoComplete($objQuery, $uniqid) {
+	global $objCartSess;
+	global $objSiteSess;
+	global $objCustomer;
+	global $arrInfo;
+	
+	// °ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤ÎÆÉ¹þ
+	$arrData = sfGetOrderTemp($uniqid);
+	
+	// ²ñ°÷¾ðÊóÅÐÏ¿½èÍý
+	if ($objCustomer->isLoginSuccess()) {
+		// ¿·¤ªÆÏ¤±Àè¤ÎÅÐÏ¿
+		lfSetNewAddr($uniqid, $objCustomer->getValue('customer_id'));
+		// ¹ØÆþ½¸·×¤ò¸ÜµÒ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç
+		lfSetCustomerPurchase($objCustomer->getValue('customer_id'), $arrData, $objQuery);
+	} else {
+		//¹ØÆþ»þ¶¯À©²ñ°÷ÅÐÏ¿
+		switch(PURCHASE_CUSTOMER_REGIST) {
+		//Ìµ¸ú
+		case '0':
+			// ¹ØÆþ»þ²ñ°÷ÅÐÏ¿
+			if($arrData['member_check'] == '1') {
+				// ²¾²ñ°÷ÅÐÏ¿
+				$customer_id = lfRegistPreCustomer($arrData, $arrInfo);
+				// ¹ØÆþ½¸·×¤ò¸ÜµÒ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç
+				lfSetCustomerPurchase($customer_id, $arrData, $objQuery);
+			}
+			break;
+		//Í­¸ú
+		case '1':
+			// ²¾²ñ°÷ÅÐÏ¿
+			$customer_id = lfRegistPreCustomer($arrData, $arrInfo);
+			// ¹ØÆþ½¸·×¤ò¸ÜµÒ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç
+			lfSetCustomerPurchase($customer_id, $arrData, $objQuery);
+			break;
+		}
+		
+	}
+	// °ì»þ¥Æ¡¼¥Ö¥ë¤ò¼õÃí¥Æ¡¼¥Ö¥ë¤Ë³ÊÇ¼¤¹¤ë
+	$order_id = lfRegistOrder($objQuery, $arrData);
+	// ¥«¡¼¥È¾¦ÉÊ¤ò¼õÃí¾ÜºÙ¥Æ¡¼¥Ö¥ë¤Ë³ÊÇ¼¤¹¤ë
+	lfRegistOrderDetail($objQuery, $order_id, $objCartSess);
+	// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Î¾ðÊó¤òºï½ü¤¹¤ë¡£
+	lfDeleteTempOrder($objQuery, $uniqid);
+	
+	// ¥»¥Ã¥·¥ç¥ó¥«¡¼¥ÈÆâ¤Î¾¦ÉÊ¤òºï½ü¤¹¤ë¡£
+	$objCartSess->delAllProducts();
+	// ÃíÊ¸°ì»þID¤ò²ò½ü¤¹¤ë¡£
+	$objSiteSess->unsetUniqId();
+	
+	return $order_id;
+}
+
+// ²ñ°÷ÅÐÏ¿¡Ê²¾ÅÐÏ¿¡Ë
+function lfRegistPreCustomer($arrData, $arrInfo) {
+	// ¹ØÆþ»þ¤Î²ñ°÷ÅÐÏ¿
+	$sqlval['name01'] = $arrData['order_name01'];
+	$sqlval['name02'] = $arrData['order_name02'];
+	$sqlval['kana01'] = $arrData['order_kana01'];
+	$sqlval['kana02'] = $arrData['order_kana02'];
+	$sqlval['zip01'] = $arrData['order_zip01'];
+	$sqlval['zip02'] = $arrData['order_zip02'];
+	$sqlval['pref'] = $arrData['order_pref'];
+	$sqlval['addr01'] = $arrData['order_addr01'];
+	$sqlval['addr02'] = $arrData['order_addr02'];
+	$sqlval['email'] = $arrData['order_email'];
+	$sqlval['tel01'] = $arrData['order_tel01'];
+	$sqlval['tel02'] = $arrData['order_tel02'];
+	$sqlval['tel03'] = $arrData['order_tel03'];
+	$sqlval['fax01'] = $arrData['order_fax01'];
+	$sqlval['fax02'] = $arrData['order_fax02'];
+	$sqlval['fax03'] = $arrData['order_fax03'];
+	$sqlval['sex'] = $arrData['order_sex'];
+	$sqlval['password'] = $arrData['password'];
+	$sqlval['reminder'] = $arrData['reminder'];
+	$sqlval['reminder_answer'] = $arrData['reminder_answer'];
+	// ²ñ°÷²¾ÅÐÏ¿
+	$sqlval['status'] = 1;
+	// URLÈ½ÄêÍÑ¥­¡¼
+	$sqlval['secret_key'] = sfGetUniqRandomId("t"); 
+	
+	$objQuery = new SC_Query();
+	$sqlval['create_date'] = "now()";
+	$sqlval['update_date'] = "now()";
+	$objQuery->insert("dtb_customer", $sqlval);
+	
+	// ¸ÜµÒID¤Î¼èÆÀ
+	$arrRet = $objQuery->select("customer_id", "dtb_customer", "secret_key = ?", array($sqlval['secret_key']));
+	$customer_id = $arrRet[0]['customer_id'];
+	
+	// ¥á¥ë¥Þ¥¬ÇÛ¿®ÍÑ¥Õ¥é¥°¤ÎÈ½Äê
+	switch($arrData['mail_flag']) {
+	case '1':	// HTML¥á¡¼¥ë
+		$mail_flag = 4;
+		break;
+	case '2':	// TEXT¥á¡¼¥ë
+		$mail_flag = 5;
+		break;
+	case '3':	// ´õË¾¤Ê¤·
+		$mail_flag = 6;
+		break;
+	default:
+		$mail_flag = 6;
+		break;
+	}
+
+	$objQuery = new SC_Query();
+	$objQuery->begin();	
+	// ¥á¥ë¥Þ¥¬ÇÛ¿®ÍÑ¥Æ¡¼¥Ö¥ëÅÐÏ¿
+	lfRegistNonCustomer($arrData['order_email'], $mail_flag, $objQuery);
+	$objQuery->commit();
+
+	//¡¡²¾ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®
+	$objMailPage = new LC_Page();
+	$objMailPage->to_name01 = $arrData['order_name01'];
+	$objMailPage->to_name02 = $arrData['order_name02'];
+	$objMailPage->CONF = $arrInfo;
+	$objMailPage->uniqid = $sqlval['secret_key'];
+	$objMailView = new SC_SiteView();
+	$objMailView->assignobj($objMailPage);
+	$body = $objMailView->fetch("mail_templates/customer_mail.tpl");
+	
+	$objMail = new GC_SendMail();
+	$objMail->setItem(
+						''										//¡¡°¸Àè
+						, sfMakeSubject("²ñ°÷ÅÐÏ¿¤Î¤´³ÎÇ§")		//¡¡¥µ¥Ö¥¸¥§¥¯¥È
+						, $body									//¡¡ËÜÊ¸
+						, $arrInfo['email03']					//¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
+						, $arrInfo['shop_name']					//¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
+						, $arrInfo["email03"]					//¡¡reply_to
+						, $arrInfo["email04"]					//¡¡return_path
+						, $arrInfo["email04"]					//  Errors_to
+						, $arrInfo["email01"]					//  Bcc
+														);
+	// °¸Àè¤ÎÀßÄê
+	$name = $arrData['order_name01'] . $arrData['order_name02'] ." ÍÍ";
+	$objMail->setTo($arrData['order_email'], $name);			
+	$objMail->sendMail();
+	
+	return $customer_id;
+}
+
+// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Î¤ªÆÏ¤±Àè¤ò¥³¥Ô¡¼¤¹¤ë
+function lfCopyDeliv($uniqid, $arrData) {
+	$objQuery = new SC_Query();
+	
+	// ÊÌ¤Î¤ªÆÏ¤±Àè¤ò»ØÄê¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ÇÛÁ÷Àè¤ËÅÐÏ¿½»½ê¤ò¥³¥Ô¡¼¤¹¤ë¡£
+	if($arrData["deliv_check"] != "1") {
+		$sqlval['deliv_name01'] = $arrData['order_name01'];
+		$sqlval['deliv_name02'] = $arrData['order_name02'];
+		$sqlval['deliv_kana01'] = $arrData['order_kana01'];
+		$sqlval['deliv_kana02'] = $arrData['order_kana02'];
+		$sqlval['deliv_pref'] = $arrData['order_pref'];
+		$sqlval['deliv_zip01'] = $arrData['order_zip01'];
+		$sqlval['deliv_zip02'] = $arrData['order_zip02'];
+		$sqlval['deliv_addr01'] = $arrData['order_addr01'];
+		$sqlval['deliv_addr02'] = $arrData['order_addr02'];
+		$sqlval['deliv_tel01'] = $arrData['order_tel01'];
+		$sqlval['deliv_tel02'] = $arrData['order_tel02'];
+		$sqlval['deliv_tel03'] = $arrData['order_tel03'];
+		$where = "order_temp_id = ?";
+		$objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid));
+	}
+}
+
+// ¼õÃí¥Æ¡¼¥Ö¥ë¤ØÅÐÏ¿
+function lfRegistOrder($objQuery, $arrData) {
+	$sqlval = $arrData;
+
+	// ¼õÃí¥Æ¡¼¥Ö¥ë¤Ë½ñ¤­¹þ¤Þ¤Ê¤¤Îó¤ò½üµî
+	unset($sqlval['mail_flag']);		// ¥á¥ë¥Þ¥¬¥Á¥§¥Ã¥¯
+	unset($sqlval['deliv_check']);		// ÊÌ¤Î¤ªÆÏ¤±Àè¥Á¥§¥Ã¥¯
+	unset($sqlval['point_check']);		// ¥Ý¥¤¥ó¥ÈÍøÍÑ¥Á¥§¥Ã¥¯
+	unset($sqlval['member_check']);		// ¹ØÆþ»þ²ñ°÷¥Á¥§¥Ã¥¯
+	unset($sqlval['password']);			// ¥í¥°¥¤¥ó¥Ñ¥¹¥ï¡¼¥É
+	unset($sqlval['reminder']);			// ¥ê¥Þ¥¤¥ó¥À¡¼¼ÁÌä
+	unset($sqlval['reminder_answer']);	// ¥ê¥Þ¥¤¥ó¥À¡¼Åú¤¨
+
+	// ÃíÊ¸¥¹¥Æ¡¼¥¿¥¹:»ØÄê¤¬Ìµ¤±¤ì¤Ð¿·µ¬¼õÉÕ¤ËÀßÄê
+	if($sqlval["status"] == ""){
+		$sqlval['status'] = '1';			
+	}
+	
+	// ÊÌ¤Î¤ªÆÏ¤±Àè¤ò»ØÄê¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ÇÛÁ÷Àè¤ËÅÐÏ¿½»½ê¤ò¥³¥Ô¡¼¤¹¤ë¡£
+	if($arrData["deliv_check"] != "1") {
+		$sqlval['deliv_name01'] = $arrData['order_name01'];
+		$sqlval['deliv_name02'] = $arrData['order_name02'];
+		$sqlval['deliv_kana01'] = $arrData['order_kana01'];
+		$sqlval['deliv_kana02'] = $arrData['order_kana02'];
+		$sqlval['deliv_pref'] = $arrData['order_pref'];
+		$sqlval['deliv_zip01'] = $arrData['order_zip01'];
+		$sqlval['deliv_zip02'] = $arrData['order_zip02'];
+		$sqlval['deliv_addr01'] = $arrData['order_addr01'];
+		$sqlval['deliv_addr02'] = $arrData['order_addr02'];
+		$sqlval['deliv_tel01'] = $arrData['order_tel01'];
+		$sqlval['deliv_tel02'] = $arrData['order_tel02'];
+		$sqlval['deliv_tel03'] = $arrData['order_tel03'];
+	}
+	
+	$order_id = $arrData['order_id'];		// ¥ª¡¼¥À¡¼ID
+	$sqlval['create_date'] = 'now()';		// ¼õÃíÆü
+	
+	// ¥²¥Ã¥È¤ÎÃÍ¤ò¥¤¥ó¥µ¡¼¥È
+	//$sqlval = lfGetInsParam($sqlval);
+	
+	// INSERT¤Î¼Â¹Ô
+	$objQuery->insert("dtb_order", $sqlval);
+	
+	// ¥á¥ë¥Þ¥¬ÇÛ¿®´õË¾¾ðÊó¤ÎÅÐÏ¿
+	lfRegistNonCustomer($arrData['order_email'], $arrData['mail_flag'], $objQuery);
+	
+	return $order_id;
+}
+
+// ¼õÃí¾ÜºÙ¥Æ¡¼¥Ö¥ë¤ØÅÐÏ¿
+function lfRegistOrderDetail($objQuery, $order_id, $objCartSess) {
+	// ¥«¡¼¥ÈÆâ¾ðÊó¤Î¼èÆÀ
+	$arrCart = $objCartSess->getCartList();
+	$max = count($arrCart);
+	
+	// ´û¤ËÂ¸ºß¤¹¤ë¾ÜºÙ¥ì¥³¡¼¥É¤ò¾Ã¤·¤Æ¤ª¤¯¡£
+	$objQuery->delete("dtb_order_detail", "order_id = $order_id");
+
+	// µ¬³ÊÌ¾°ìÍ÷
+	$arrClassName = sfGetIDValueList("dtb_class", "class_id", "name");
+	// µ¬³ÊÊ¬ÎàÌ¾°ìÍ÷
+	$arrClassCatName = sfGetIDValueList("dtb_classcategory", "classcategory_id", "name");
+			
+	for ($i = 0; $i < $max; $i++) {
+		// ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ	
+		$arrData = sfGetProductsClass($arrCart[$i]['id']);
+		
+		// Â¸ºß¤¹¤ë¾¦ÉÊ¤Î¤ßÉ½¼¨¤¹¤ë¡£
+		if($arrData != "") {
+			$sqlval['order_id'] = $order_id;
+			$sqlval['product_id'] = $arrCart[$i]['id'][0];
+			$sqlval['classcategory_id1'] = $arrCart[$i]['id'][1];
+			$sqlval['classcategory_id2'] = $arrCart[$i]['id'][2];
+			$sqlval['product_name'] = $arrData['name'];
+			$sqlval['product_code'] = $arrData['product_code'];
+			$sqlval['classcategory_name1'] = $arrClassCatName[$arrData['classcategory_id1']];
+			$sqlval['classcategory_name2'] = $arrClassCatName[$arrData['classcategory_id2']];
+			$sqlval['point_rate'] = $arrCart[$i]['point_rate'];			
+			$sqlval['price'] = $arrCart[$i]['price'];
+			$sqlval['quantity'] = $arrCart[$i]['quantity'];
+			lfReduceStock($objQuery, $arrCart[$i]['id'], $arrCart[$i]['quantity']);
+			// INSERT¤Î¼Â¹Ô
+			$objQuery->insert("dtb_order_detail", $sqlval);
+		} else {
+			sfDispSiteError(CART_NOT_FOUND);
+		}
+	}
+}
+
+/* ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Îºï½ü */
+function lfDeleteTempOrder($objQuery, $uniqid) {
+	$where = "order_temp_id = ?";
+	$sqlval['del_flg'] = 1;
+	$objQuery->update("dtb_order_temp", $sqlval, $where, array($uniqid));
+	// $objQuery->delete("dtb_order_temp", $where, array($uniqid));
+}
+
+// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Î½»½ê¤¬ÅÐÏ¿ºÑ¤ß¥Æ¡¼¥Ö¥ë¤È°Û¤Ê¤ë¾ì¹ç¤Ï¡¢ÊÌ¤Î¤ªÆÏ¤±Àè¤ËÄÉ²Ã¤¹¤ë
+function lfSetNewAddr($uniqid, $customer_id) {
+	$objQuery = new SC_Query();
+	$diff = false;
+	$find_same = false;
+	
+	$col = "deliv_name01,deliv_name02,deliv_kana01,deliv_kana02,deliv_tel01,deliv_tel02,deliv_tel03,deliv_zip01,deliv_zip02,deliv_pref,deliv_addr01,deliv_addr02";
+	$where = "order_temp_id = ?";
+	$arrRet = $objQuery->select($col, "dtb_order_temp", $where, array($uniqid));
+	
+	// Í×ÁÇÌ¾¤Îdeliv_¤òºï½ü¤¹¤ë¡£
+	foreach($arrRet[0] as $key => $val) {
+		$keyname = ereg_replace("^deliv_", "", $key);
+		$arrNew[$keyname] = $val;
+	}
+	
+	// ²ñ°÷¾ðÊó¥Æ¡¼¥Ö¥ë¤È¤ÎÈæ³Ó
+	$col = "name01,name02,kana01,kana02,tel01,tel02,tel03,zip01,zip02,pref,addr01,addr02";
+	$where = "customer_id = ?";
+	$arrCustomerAddr = $objQuery->select($col, "dtb_customer", $where, array($customer_id));
+	
+	// ²ñ°÷¾ðÊó¤Î½»½ê¤È°Û¤Ê¤ë¾ì¹ç
+	if($arrNew != $arrCustomerAddr[0]) {
+		// ÊÌ¤Î¤ªÆÏ¤±Àè¥Æ¡¼¥Ö¥ë¤Î½»½ê¤ÈÈæ³Ó¤¹¤ë
+		$col = "name01,name02,kana01,kana02,tel01,tel02,tel03,zip01,zip02,pref,addr01,addr02";
+		$where = "customer_id = ?";
+		$arrOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($customer_id));
+
+		foreach($arrOtherAddr as $arrval) {
+			if($arrNew == $arrval) {
+				// ¤¹¤Ç¤ËÆ±¤¸½»½ê¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë
+				$find_same = true;
+			}
+		}
+		
+		if(!$find_same) {
+			$diff = true;
+		}
+	}
+	
+	// ¿·¤·¤¤¤ªÆÏ¤±Àè¤¬ÅÐÏ¿ºÑ¤ß¤Î¤â¤Î¤È°Û¤Ê¤ë¾ì¹ç¤ÏÊÌ¤Î¤ªÆÏ¤±Àè¥Æ¡¼¥Ö¥ë¤ËÅÐÏ¿¤¹¤ë
+	if($diff) {
+		$sqlval = $arrNew;
+		$sqlval['customer_id'] = $customer_id;
+		$objQuery->insert("dtb_other_deliv", $sqlval);
+	}
+}
+
+/* ¹ØÆþ¾ðÊó¤ò²ñ°÷¥Æ¡¼¥Ö¥ë¤ËÅÐÏ¿¤¹¤ë */
+function lfSetCustomerPurchase($customer_id, $arrData, $objQuery) {
+	$col = "first_buy_date, last_buy_date, buy_times, buy_total, point";
+	$where = "customer_id = ?";
+	$arrRet = $objQuery->select($col, "dtb_customer", $where, array($customer_id));
+	$sqlval = $arrRet[0];
+	
+	if($sqlval['first_buy_date'] == "") {
+		$sqlval['first_buy_date'] = "Now()";
+	}
+	$sqlval['last_buy_date'] = "Now()";
+	$sqlval['buy_times']++;
+	$sqlval['buy_total']+= $arrData['total'];
+	$sqlval['point'] = ($sqlval['point'] + $arrData['add_point'] - $arrData['use_point']);
+	
+	// ¥Ý¥¤¥ó¥È¤¬ÉÔÂ­¤·¤Æ¤¤¤ë¾ì¹ç
+	if($sqlval['point'] < 0) {
+		$objQuery->rollback();
+		sfDispSiteError(LACK_POINT);
+	}
+	
+	$objQuery->update("dtb_customer", $sqlval, $where, array($customer_id));
+}
+
+/* Èó²ñ°÷¤Î¥á¥ë¥Þ¥¬¥Æ¡¼¥Ö¥ë¤Ø¤ÎÅÐÏ¿ */
+function lfRegistNonCustomer($email, $mail_flag, $objQuery) {
+	// ²ñ°÷¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+	if(!sfCheckCustomerMailMaga($email)) {
+		$where = "email = ?";
+		$objQuery->delete("dtb_customer_mail", $where, array($email));
+		$sqlval['email'] = $email;
+		$sqlval['mail_flag'] = $mail_flag;
+		$sqlval['create_date'] = "now()";
+		$sqlval['update_date'] = "now()";
+		$objQuery->insert("dtb_customer_mail", $sqlval);
+	}
+}
+
+// ºß¸Ë¤ò¸º¤é¤¹½èÍý
+function lfReduceStock($objQuery, $arrID, $quantity) {
+	$where = "product_id = ? AND classcategory_id1 = ? AND classcategory_id2 = ?";
+	$arrRet = $objQuery->select("stock, stock_unlimited", "dtb_products_class", $where, $arrID);
+	
+	// Çä¤êÀÚ¤ì¥¨¥é¡¼
+	if(($arrRet[0]['stock_unlimited'] != '1' && $arrRet[0]['stock'] < $quantity) || $quantity == 0) {
+		$objQuery->rollback();
+		sfDispSiteError(SOLD_OUT, "", true);
+	// ÌµÀ©¸Â¤Î¾ì¹ç¡¢ºß¸Ë¤ÏNULL
+	} elseif($arrRet[0]['stock_unlimited'] == '1') {
+		$sqlval['stock'] = null;
+		$objQuery->update("dtb_products_class", $sqlval, $where, $arrID);
+	// ºß¸Ë¤ò¸º¤é¤¹
+	} else {
+		$sqlval['stock'] = ($arrRet[0]['stock'] - $quantity);
+		if($sqlval['stock'] == "") {
+			$sqlval['stock'] = '0';
+		}		
+		$objQuery->update("dtb_products_class", $sqlval, $where, $arrID);
+	}
+}
+
+// GET¤ÎÃÍ¤ò¥¤¥ó¥µ¡¼¥ÈÍÑ¤ËÀ°¤¨¤ë
+function lfGetInsParam($sqlVal){
+	
+	foreach($_GET as $key => $val){
+		// ¥«¥é¥à¤ÎÂ¸ºß¥Á¥§¥Ã¥¯
+		if(sfColumnExists("dtb_order", $key)) $sqlVal[$key] = $val;
+	}
+	
+	return $sqlVal;
+}
+
+?>
Index: branches/dev/html/mobile/shopping/confirm.php
===================================================================
--- branches/dev/html/mobile/shopping/confirm.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/confirm.php	(revision 11460)
@@ -0,0 +1,120 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	var $arrSession;
+	var $tpl_mode;
+	var $tpl_total_deliv_fee;
+	function LC_Page() {
+		$this->tpl_mainpage = 'shopping/confirm.tpl';
+		$this->tpl_css = '/css/layout/shopping/confirm.css';
+		$this->tpl_title = "¤´ÆþÎÏÆâÍÆ¤Î¤´³ÎÇ§";
+		global $arrPref;
+		$this->arrPref = $arrPref;
+		global $arrSex;
+		$this->arrSex = $arrSex;
+		global $arrMAILMAGATYPE;
+		$this->arrMAILMAGATYPE = $arrMAILMAGATYPE;
+		global $arrReminder;
+		$this->arrReminder = $arrReminder;
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');		
+
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objCartSess = new SC_CartSession();
+$objSiteInfo = $objView->objSiteInfo;
+$objSiteSess = new SC_SiteSession();
+$objCustomer = new SC_Customer();
+$arrInfo = $objSiteInfo->data;
+$objQuery = new SC_Query();
+
+// Á°¤Î¥Ú¡¼¥¸¤ÇÀµ¤·¤¯ÅÐÏ¿¼êÂ³¤­¤¬¹Ô¤ï¤ì¤¿µ­Ï¿¤¬¤¢¤ë¤«È½Äê
+sfIsPrePage($objSiteSess);
+
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+$objPage->tpl_uniqid = $uniqid;
+
+// ¥«¡¼¥È½¸·×½èÍý
+$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo);
+// °ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤ÎÆÉ¹þ
+$arrData = sfGetOrderTemp($uniqid);
+// ¥«¡¼¥È½¸·×¤ò¸µ¤ËºÇ½ª·×»»
+$arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer);
+
+// ¥«¡¼ÅÔÆâ¤Î¾¦ÉÊ¤ÎÇä¤êÀÚ¤ì¥Á¥§¥Ã¥¯
+$objCartSess->chkSoldOut($objCartSess->getCartList());
+
+// ²ñ°÷¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if($objCustomer->isLoginSuccess()) {
+	$objPage->tpl_login = '1';
+	$objPage->tpl_user_point = $objCustomer->getValue('point');
+}
+
+// ·èºÑ¶èÊ¬¤ò¼èÆÀ¤¹¤ë
+$payment_type = "";
+if(sfColumnExists("dtb_payment", "memo01")){
+	// MEMO03¤ËÃÍ¤¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¥â¥¸¥å¡¼¥ëÄÉ²Ã¤µ¤ì¤¿¤â¤Î¤È¤ß¤Ê¤¹
+	$sql = "SELECT memo03 FROM dtb_payment WHERE payment_id = ?";
+	$arrPayment = $objQuery->getall($sql, array($arrData['payment_id']));
+	$payment_type = $arrPayment[0]["memo03"];
+}
+$objPage->payment_type = $payment_type;
+
+
+switch($_POST['mode']) {
+// Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë
+case 'return':
+	// Àµ¾ï¤Ê¿ä°Ü¤Ç¤¢¤ë¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+	$objSiteSess->setRegistFlag();
+	header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT));
+	exit;
+	break;
+case 'confirm':
+	// ¤³¤Î»þÅÀ¤Ç¥ª¡¼¥À¡¼ID¤ò³ÎÊÝ¤·¤Æ¤ª¤¯¡Ê¥¯¥ì¥¸¥Ã¥È¡¢¥³¥ó¥Ó¥Ë·èºÑ¤ÇÉ¬Í×¤Ê¤¿¤á¡Ë
+	// postgresql¤Èmysql¤È¤Ç½èÍý¤òÊ¬¤±¤ë
+	if (DB_TYPE == "pgsql") {
+		$order_id = $objQuery->nextval("dtb_order","order_id");
+	}elseif (DB_TYPE == "mysql") {
+		$order_id = $objQuery->get_auto_increment("dtb_order");
+	}
+	$arrData["order_id"] = $order_id;
+	
+	// ½¸·×·ë²Ì¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç
+	sfRegistTempOrder($uniqid, $arrData);
+	// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+	$objSiteSess->setRegistFlag();
+	
+	// ·èºÑÊýË¡¤Ë¤è¤ê²èÌÌÀÚÂØ
+	if($payment_type != "") {
+		$_SESSION["payment_id"] = $arrData['payment_id'];
+		header("Location: " . gfAddSessionId(URL_SHOP_MODULE));
+	}else{
+		header("Location: " . gfAddSessionId(URL_SHOP_COMPLETE));
+	}
+	break;
+default:
+	break;
+}
+
+
+$objPage->arrData = $arrData;
+$objPage->arrInfo = $arrInfo;
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/shopping/deliv_addr.php
===================================================================
--- branches/dev/html/mobile/shopping/deliv_addr.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/deliv_addr.php	(revision 11460)
@@ -0,0 +1,277 @@
+<?php
+/**
+ * ÇÛÁ÷Àè¤ÎÄÉ²Ã
+ */
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page(){
+		$this->tpl_mainpage = 'shopping/deliv_addr.tpl';
+		$this->tpl_title = "¿·¤·¤¤¤ªÆÏ¤±Àè¤ÎÄÉ²Ã";
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView(false);
+$objQuery = new SC_Query();
+$objCustomer = new SC_Customer();
+$objConn = new SC_DBConn();
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+
+//¥í¥°¥¤¥óÈ½Äê
+if (!$objCustomer->isLoginSuccess()){
+	sfDispSiteError(CUSTOMER_ERROR);
+}
+
+$objPage->arrForm = $_POST;
+$objPage->arrPref = $arrPref;
+//-- ¥Ç¡¼¥¿ÀßÄê
+foreach($_POST as $key => $val) {
+	if ($key != "mode") $objPage->list_data[ $key ] = $val;
+}
+
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+
+//ÊÌ¤Î¤ªÆÏ¤±Àè£Ä£ÂÅÐÏ¿ÍÑ¥«¥é¥àÇÛÎó
+$arrRegistColumn = array(
+							 array(  "column" => "name01",		"convert" => "aKV" ),
+							 array(  "column" => "name02",		"convert" => "aKV" ),
+							 array(  "column" => "kana01",		"convert" => "CKV" ),
+							 array(  "column" => "kana02",		"convert" => "CKV" ),
+							 array(  "column" => "zip01",		"convert" => "n" ),
+							 array(  "column" => "zip02",		"convert" => "n" ),
+							 array(  "column" => "pref",		"convert" => "n" ),
+							 array(  "column" => "addr01",		"convert" => "aKV" ),
+							 array(  "column" => "addr02",		"convert" => "aKV" ),
+							 array(  "column" => "tel01",		"convert" => "n" ),
+							 array(  "column" => "tel02",		"convert" => "n" ),
+							 array(  "column" => "tel03",		"convert" => "n" ),
+						);
+
+switch ($_POST['mode']){
+	case 'set1':
+		$objPage->arrErr = lfErrorCheck1($objPage->arrForm);
+		if (count($objPage->arrErr) == 0) {
+			$objPage->tpl_mainpage = 'shopping/set1.tpl';
+
+			// Í¹ÊØÈÖ¹æ¤«¤é½»½ê¤Î¼èÆÀ
+			$address = lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']);
+
+			$objPage->arrForm['pref'] = @$address[0]['state'];
+			$objPage->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town'];
+		}
+		break;
+	case 'set2':
+		$objPage->arrErr = lfErrorCheck2($objPage->arrForm);
+		if (count($objPage->arrErr) == 0) {
+			$objPage->tpl_mainpage = 'shopping/set2.tpl';
+		} else {
+			$objPage->tpl_mainpage = 'shopping/set1.tpl';
+
+			$checkVal = array("pref", "addr01", "addr02", "addr03", "tel01", "tel02", "tel03");
+			//-- ¥Ç¡¼¥¿ÀßÄê
+			unset($objPage->list_data);
+			foreach($_POST as $key => $val) {
+				if ($key != "mode" && !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+		}
+		break;
+	case 'complete':
+		$objPage->arrErr = lfErrorCheck($objPage->arrForm);
+		if (count($objPage->arrErr) == 0) {
+			// ÅÐÏ¿
+			$other_deliv_id = lfRegistData($_POST,$arrRegistColumn);
+
+			// ÅÐÏ¿ºÑ¤ß¤ÎÊÌ¤Î¤ªÆÏ¤±Àè¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Ë½ñ¤­¹þ¤à
+			lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id);
+
+			// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+			$objSiteSess->setRegistFlag();
+			// ¤ª»ÙÊ§¤¤ÊýË¡ÁªÂò¥Ú¡¼¥¸¤Ø°ÜÆ°
+			header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT));
+			exit;
+		} else {
+			sfDispSiteError(CUSTOMER_ERROR);
+		}
+		break;
+	default:
+		$deliv_count = $objQuery->count("dtb_other_deliv", "customer_id=?", array($objCustomer->getValue('customer_id')));
+		if ($deliv_count >= DELIV_ADDR_MAX){
+			sfDispSiteError(FREE_ERROR_MSG, "", false, "ºÇÂçÅÐÏ¿·ï¿ô¤òÄ¶¤¨¤Æ¤¤¤Þ¤¹¡£");
+		}
+}
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-------------------------------------------------------------------------------------------------------------
+
+/* ¥¨¥é¡¼¥Á¥§¥Ã¥¯ */
+function lfErrorCheck() {
+	$objErr = new SC_CheckError();
+	
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡ÊÀ«¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡ÊÌ¾¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
+	$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê¡Ê1¡Ë", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê¡Ê2¡Ë", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));
+	return $objErr->arrErr;
+	
+}
+
+/* ¥¨¥é¡¼¥Á¥§¥Ã¥¯ */
+function lfErrorCheck1() {
+	$objErr = new SC_CheckError();
+	
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡ÊÀ«¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡ÊÌ¾¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK")); 
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
+	return $objErr->arrErr;
+	
+}
+
+/* ¥¨¥é¡¼¥Á¥§¥Ã¥¯ */
+function lfErrorCheck2() {
+	$objErr = new SC_CheckError();
+	
+	$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê¡Ê1¡Ë", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê¡Ê2¡Ë", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));
+	return $objErr->arrErr;
+	
+}
+
+
+
+/* ÅÐÏ¿¼Â¹Ô */
+function lfRegistData($array, $arrRegistColumn) {
+	global $objConn;
+	global $objCustomer;
+	
+	foreach ($arrRegistColumn as $data) {
+		if (strlen($array[ $data["column"] ]) > 0) {
+			$arrRegist[ $data["column"] ] = $array[ $data["column"] ];
+		}
+	}
+	
+	$arrRegist['customer_id'] = $objCustomer->getvalue('customer_id');
+	
+	//-- ÊÔ½¸ÅÐÏ¿¼Â¹Ô
+	$objConn->query("BEGIN");
+	if ($array['other_deliv_id'] != ""){
+		$objConn->autoExecute("dtb_other_deliv", $arrRegist, "other_deliv_id='" .addslashes($array["other_deliv_id"]). "'");
+	}else{
+		$objConn->autoExecute("dtb_other_deliv", $arrRegist);
+
+		$sqlse = "SELECT max(other_deliv_id) FROM dtb_other_deliv WHERE customer_id = ?";
+		$array['other_deliv_id'] = $objConn->getOne($sqlse, array($arrRegist['customer_id']));
+	}
+
+	$objConn->query("COMMIT");
+
+	return $array['other_deliv_id'];
+}
+
+//----¡¡¼èÆÀÊ¸»úÎó¤ÎÊÑ´¹
+function lfConvertParam($array, $arrRegistColumn) {
+	/*
+	 *	Ê¸»úÎó¤ÎÊÑ´¹
+	 *	K :  ¡ÖÈ¾³Ñ(ÊÝ¶¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹
+	 *	C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹
+	 *	V :  ÂùÅÀÉÕ¤­¤ÎÊ¸»ú¤ò°ìÊ¸»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍÑ¤·¤Þ¤¹	
+	 *	n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖÈ¾³Ñ(ÊÝ¶¸)¡×¤ËÊÑ´¹
+	 *  a :  Á´³Ñ±Ñ¿ô»ú¤òÈ¾³Ñ±Ñ¿ô»ú¤ËÊÑ´¹¤¹¤ë
+	 */
+	// ¥«¥é¥àÌ¾¤È¥³¥ó¥Ð¡¼¥È¾ðÊó
+	foreach ($arrRegistColumn as $data) {
+		$arrConvList[ $data["column"] ] = $data["convert"];
+	}
+	
+	// Ê¸»úÊÑ´¹
+	foreach ($arrConvList as $key => $val) {
+		// POST¤µ¤ì¤Æ¤­¤¿ÃÍ¤Î¤ßÊÑ´¹¤¹¤ë¡£
+		if(strlen(($array[$key])) > 0) {
+			$array[$key] = mb_convert_kana($array[$key] ,$val);
+		}
+	}
+	return $array;
+}
+
+// Í¹ÊØÈÖ¹æ¤«¤é½»½ê¤Î¼èÆÀ
+function lfGetAddress($zipcode) {
+	global $arrPref;
+
+	$conn = new SC_DBconn(ZIP_DSN);
+
+	// Í¹ÊØÈÖ¹æ¸¡º÷Ê¸ºîÀ®
+	$zipcode = mb_convert_kana($zipcode ,"n");
+	$sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?";
+
+	$data_list = $conn->getAll($sqlse, array($zipcode));
+
+	// ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÈÃÍ¤òÈ¿Å¾¤µ¤»¤ë¡£
+	$arrREV_PREF = array_flip($arrPref);
+
+	/*
+		ÁíÌ³¾Ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Ç¡¼¥¿¤ò¤½¤Î¤Þ¤Þ¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤È
+		°Ê²¼¤Î¤è¤¦¤ÊÊ¸»úÎó¤¬Æþ¤Ã¤Æ¤¤¤ë¤Î¤Ç	ÂÐºö¤¹¤ë¡£
+		¡¦¡Ê£±¡¦£±£¹ÃúÌÜ¡Ë
+		¡¦°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç
+	*/
+	$town =  $data_list[0]['town'];
+	$town = ereg_replace("¡Ê.*¡Ë$","",$town);
+	$town = ereg_replace("°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç","",$town);
+	$data_list[0]['town'] = $town;
+	$data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']];
+
+	return $data_list;
+}
+
+/* ÊÌ¤Î¤ªÆÏ¤±Àè½»½ê¤ò°ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤Ø */
+function lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id) {
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['update_date'] = 'Now()';
+	$sqlval['customer_id'] = $objCustomer->getValue('customer_id');
+	$sqlval['order_birth'] = $objCustomer->getValue('birth');
+
+	$objQuery = new SC_Query();
+	$where = "other_deliv_id = ?";
+	$arrRet = $objQuery->select("*", "dtb_other_deliv", $where, array($other_deliv_id));
+	
+	$sqlval['deliv_check'] = '1';
+    $sqlval['deliv_name01'] = $arrRet[0]['name01'];
+    $sqlval['deliv_name02'] = $arrRet[0]['name02'];
+    $sqlval['deliv_kana01'] = $arrRet[0]['kana01'];
+    $sqlval['deliv_kana02'] = $arrRet[0]['kana02'];
+    $sqlval['deliv_zip01'] = $arrRet[0]['zip01'];
+    $sqlval['deliv_zip02'] = $arrRet[0]['zip02'];
+    $sqlval['deliv_pref'] = $arrRet[0]['pref'];
+    $sqlval['deliv_addr01'] = $arrRet[0]['addr01'];
+    $sqlval['deliv_addr02'] = $arrRet[0]['addr02'];
+    $sqlval['deliv_tel01'] = $arrRet[0]['tel01'];
+    $sqlval['deliv_tel02'] = $arrRet[0]['tel02'];
+	$sqlval['deliv_tel03'] = $arrRet[0]['tel03'];
+	sfRegistTempOrder($uniqid, $sqlval);
+}
+
+?>
Index: branches/dev/html/mobile/shopping/payment.php
===================================================================
--- branches/dev/html/mobile/shopping/payment.php	(revision 11460)
+++ branches/dev/html/mobile/shopping/payment.php	(revision 11460)
@@ -0,0 +1,333 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	var $arrSession;
+	var $tpl_mode;
+	function LC_Page() {
+		$this->tpl_css = '/css/layout/shopping/pay.css';
+		$this->tpl_mainpage = 'shopping/payment.tpl';
+		$this->tpl_onload = 'fnCheckInputPoint();';
+		$this->tpl_title = "¤ª»ÙÊ§ÊýË¡¡¦¤ªÆÏ¤±»þ´ÖÅù¤Î»ØÄê";
+		/*
+		 session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
+		 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìÉ½¼¨¤òÍÞÀ©¤¹¤ë¡£
+		 private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
+		*/
+		session_cache_limiter('private-no-expire');		
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objSiteSess = new SC_SiteSession();
+$objCartSess = new SC_CartSession();
+$objCustomer = new SC_Customer();
+$objSiteInfo = $objView->objSiteInfo;
+$arrInfo = $objSiteInfo->data;
+
+// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
+$objFormParam = new SC_FormParam();
+// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+lfInitParam();
+// POSTÃÍ¤Î¼èÆÀ
+$objFormParam->setParam($_POST);
+
+// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯
+$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess);
+// ¥æ¥Ë¡¼¥¯ID¤ò°ú¤­·Ñ¤°
+$objPage->tpl_uniqid = $uniqid;
+
+// ²ñ°÷¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
+if($objCustomer->isLoginSuccess()) {
+	$objPage->tpl_login = '1';
+	$objPage->tpl_user_point = $objCustomer->getValue('point');
+}
+
+// ¶â³Û¤Î¼èÆÀ (¹ØÆþÅÓÃæ¤ÇÇä¤êÀÚ¤ì¤¿¾ì¹ç¤Ë¤Ï¤³¤Î´Ø¿ôÆâ¤Ë¤Æ¤½¤Î¾¦ÉÊ¤Î¸Ä¿ô¤¬£°¤Ë¤Ê¤ë)
+$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo);
+$objPage->arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo);
+
+// ¥«¡¼ÅÔÆâ¤Î¾¦ÉÊ¤ÎÇä¤êÀÚ¤ì¥Á¥§¥Ã¥¯
+$objCartSess->chkSoldOut($objCartSess->getCartList());
+
+switch($_POST['mode']) {
+case 'confirm':
+	// ÆþÎÏÃÍ¤ÎÊÑ´¹
+	$objFormParam->convParam();
+	$objPage->arrErr = lfCheckError($objPage->arrData );
+	// ÆþÎÏ¥¨¥é¡¼¤Ê¤·
+	if(count($objPage->arrErr) == 0) {
+		// DB¤Ø¤Î¥Ç¡¼¥¿ÅÐÏ¿
+		lfRegistData($uniqid);
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		$objSiteSess->setRegistFlag();
+		// ³ÎÇ§¥Ú¡¼¥¸¤Ø°ÜÆ°
+		header("Location: " . gfAddSessionId(URL_SHOP_CONFIRM));
+		exit;
+	}else{
+		// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ
+		$uniqid = $objSiteSess->getUniqId();
+		// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤«¤é¤Î¾ðÊó¤ò³ÊÇ¼
+		lfSetOrderTempData($uniqid);
+	}
+	break;
+// Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë
+case 'return':
+	// Èó²ñ°÷¤Î¾ì¹ç
+	// Àµ¾ï¤Ê¿ä°Ü¤Ç¤¢¤ë¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+	$objSiteSess->setRegistFlag();
+	header("Location: " . gfAddSessionId(URL_SHOP_TOP));
+	exit;
+	break;
+// »ÙÊ§¤¤ÊýË¡¤¬ÊÑ¹¹¤µ¤ì¤¿¾ì¹ç
+case 'payment':
+	// ¤³¤³¤Îbreak¤Ï¡¢°ÕÌ£¤¬¤¢¤ë¤Î¤Ç³°¤µ¤Ê¤¤¤Ç²¼¤µ¤¤¡£
+	break;
+default:
+	// ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤«¤é¤Î¾ðÊó¤ò³ÊÇ¼
+	lfSetOrderTempData($uniqid);
+	break;
+}
+
+// Å¹ÊÞ¾ðÊó¤Î¼èÆÀ
+$arrInfo = $objSiteInfo->data;
+// ¹ØÆþ¶â³Û¤Î¼èÆÀÆÀ
+$total_pretax = $objCartSess->getAllProductsTotal($arrInfo);
+// »ÙÊ§¤¤ÊýË¡¤Î¼èÆÀ
+$objPage->arrPayment = lfGetPayment($total_pretax);
+// ÇÛÁ÷»þ´Ö¤Î¼èÆÀ
+$arrRet = sfGetDelivTime($objFormParam->getValue('payment_id'));
+$objPage->arrDelivTime = sfArrKeyValue($arrRet, 'time_id', 'deliv_time');
+$objPage->objCustomer = $objCustomer;
+//¡¡ÇÛÁ÷Æü°ìÍ÷¤Î¼èÆÀ
+$objPage->arrDelivDate = lfGetDelivDate();
+
+$objPage->arrForm = $objFormParam->getFormParamList();
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+function lfInitParam() {
+	global $objFormParam;
+	$objFormParam->addParam("¤ª»ÙÊ§¤¤ÊýË¡", "payment_id", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("¥Ý¥¤¥ó¥È", "use_point", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK", "ZERO_START"));
+	$objFormParam->addParam("ÇÛÃ£»þ´Ö", "deliv_time_id", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
+	$objFormParam->addParam("¤´¼ÁÌä", "message", LTEXT_LEN, "KVa", array("SPTAB_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("¥Ý¥¤¥ó¥È¤ò»ÈÍÑ¤¹¤ë", "point_check", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), '2');
+	$objFormParam->addParam("ÇÛÃ£Æü", "deliv_date", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK"));
+}
+
+function lfGetPayment($total_pretax) {
+	$objQuery = new SC_Query();
+	$objQuery->setorder("rank DESC");
+	//ºï½ü¤µ¤ì¤Æ¤¤¤Ê¤¤»ÙÊ§ÊýË¡¤ò¼èÆÀ
+	$arrRet = $objQuery->select("payment_id, payment_method, rule, upper_rule, note, payment_image", "dtb_payment", "del_flg = 0 AND deliv_id IN (SELECT deliv_id FROM dtb_deliv WHERE del_flg = 0) ");
+	//ÍøÍÑ¾ò·ï¤«¤é»ÙÊ§²ÄÇ½ÊýË¡¤òÈ½Äê
+	foreach($arrRet as $data) {
+		//²¼¸Â¤È¾å¸Â¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë
+		if($data['rule'] > 0 && $data['upper_rule'] > 0) {
+			if($data['rule'] <= $total_pretax && $data['upper_rule'] >= $total_pretax) {
+				$arrPayment[] = $data;
+			}
+		//²¼¸Â¤Î¤ßÀßÄê¤µ¤ì¤Æ¤¤¤ë
+		} elseif($data['rule'] > 0) {	
+			if($data['rule'] <= $total_pretax) {
+				$arrPayment[] = $data;
+			}
+		//¾å¸Â¤Î¤ßÀßÄê¤µ¤ì¤Æ¤¤¤ë
+		} elseif($data['upper_rule'] > 0) {
+			if($data['upper_rule'] >= $total_pretax) {
+				$arrPayment[] = $data;
+			}
+		//ÀßÄê¤Ê¤·
+		} else {
+			$arrPayment[] = $data;
+		}	
+	}
+	return $arrPayment;	
+}
+
+/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+function lfCheckError($arrData) {
+	global $objFormParam;
+	global $objCustomer;
+	// ÆþÎÏ¥Ç¡¼¥¿¤òÅÏ¤¹¡£
+	$arrRet =  $objFormParam->getHashArray();
+	$objErr = new SC_CheckError($arrRet);
+	$objErr->arrErr = $objFormParam->checkError();
+	
+	if($_POST['point_check'] == '1') {
+		$objErr->doFunc(array("¥Ý¥¤¥ó¥È¤ò»ÈÍÑ¤¹¤ë", "point_check"), array("EXIST_CHECK"));
+		$objErr->doFunc(array("¥Ý¥¤¥ó¥È", "use_point"), array("EXIST_CHECK"));
+		$max_point = $objCustomer->getValue('point');
+		if($max_point == "") {
+			$max_point = 0;
+		}
+		if($arrRet['use_point'] > $max_point) {
+			$objErr->arrErr['use_point'] = "¢¨ ¤´ÍøÍÑ¥Ý¥¤¥ó¥È¤¬½ê»ý¥Ý¥¤¥ó¥È¤òÄ¶¤¨¤Æ¤¤¤Þ¤¹¡£<br>";
+		}
+		if(($arrRet['use_point'] * POINT_VALUE) > $arrData['subtotal']) {
+			$objErr->arrErr['use_point'] = "¢¨ ¤´ÍøÍÑ¥Ý¥¤¥ó¥È¤¬¤´¹ØÆþ¶â³Û¤òÄ¶¤¨¤Æ¤¤¤Þ¤¹¡£<br>";
+		}
+	}
+	return $objErr->arrErr;
+}
+
+/* »ÙÊ§¤¤ÊýË¡Ê¸»úÎó¤Î¼èÆÀ */
+function lfGetPaymentInfo($payment_id) {
+	$objQuery = new SC_Query();
+	$where = "payment_id = ?";
+	$arrRet = $objQuery->select("payment_method, charge", "dtb_payment", $where, array($payment_id));
+	return (array($arrRet[0]['payment_method'], $arrRet[0]['charge']));
+}
+
+/* ÇÛÁ÷»þ´ÖÊ¸»úÎó¤Î¼èÆÀ */
+function lfGetDelivTimeInfo($time_id) {
+	$objQuery = new SC_Query();
+	$where = "time_id = ?";
+	$arrRet = $objQuery->select("deliv_id, deliv_time", "dtb_delivtime", $where, array($time_id));
+	return (array($arrRet[0]['deliv_id'], $arrRet[0]['deliv_time']));
+}
+
+/* DB¤Ø¥Ç¡¼¥¿¤ÎÅÐÏ¿ */
+function lfRegistData($uniqid) {
+	global $objFormParam;
+	$arrRet = $objFormParam->getHashArray();
+	$sqlval = $objFormParam->getDbArray();
+	// ÅÐÏ¿¥Ç¡¼¥¿¤ÎºîÀ®
+	$sqlval['order_temp_id'] = $uniqid;
+	$sqlval['update_date'] = 'Now()';
+	
+	if($sqlval['payment_id'] != "") {
+		list($sqlval['payment_method'], $sqlval['charge']) = lfGetPaymentInfo($sqlval['payment_id']);
+	} else {
+		$sqlval['payment_id'] = '0';
+		$sqlval['payment_method'] = "";
+	}
+	
+	if($sqlval['deliv_time_id'] != "") {
+		list($sqlval['deliv_id'], $sqlval['deliv_time']) = lfGetDelivTimeInfo($sqlval['deliv_time_id']);
+	} else {
+		$sqlval['deliv_time_id'] = '0';
+		$sqlval['deliv_id'] = '0';
+		$sqlval['deliv_time'] = "";
+	}
+	
+	// »ÈÍÑ¥Ý¥¤¥ó¥È¤ÎÀßÄê
+	if($sqlval['point_check'] != '1') {
+		$sqlval['use_point'] = 0;
+	}
+	
+	sfRegistTempOrder($uniqid, $sqlval);
+}
+
+/* ÇÛÃ£Æü°ìÍ÷¤ò¼èÆÀ¤¹¤ë */
+function lfGetDelivDate() {
+	$objCartSess = new SC_CartSession();
+	$objQuery = new SC_Query();
+	// ¾¦ÉÊID¤Î¼èÆÀ
+	$max = $objCartSess->getMax();
+	for($i = 1; $i <= $max; $i++) {
+		if($_SESSION[$objCartSess->key][$i]['id'][0] != "") {
+			$arrID['product_id'][$i] = $_SESSION[$objCartSess->key][$i]['id'][0];
+		}
+	}
+	if(count($arrID['product_id']) > 0) {
+		$id = implode(",", $arrID['product_id']);
+		//¾¦ÉÊ¤«¤éÈ¯Á÷ÌÜ°Â¤Î¼èÆÀ
+		$deliv_date = $objQuery->get("dtb_products", "MAX(deliv_date_id)", "product_id IN (".$id.")");
+		//È¯Á÷ÌÜ°Â
+		switch($deliv_date) {
+		//Â¨ÆüÈ¯Á÷
+		case '1':
+			$start_day = 1;
+			break;
+		//1-2Æü¸å
+		case '2':
+			$start_day = 3;
+			break;
+		//3-4Æü¸å
+		case '3':
+			$start_day = 5;
+			break;
+		//1½µ´Ö°ÊÆâ
+		case '4':
+			$start_day = 8;
+			break;
+		//2½µ´Ö°ÊÆâ
+		case '5':
+			$start_day = 15;
+			break;
+		//3½µ´Ö°ÊÆâ
+		case '6':
+			$start_day = 22;
+			break;
+		//1¥ö·î°ÊÆâ
+		case '7':
+			$start_day = 32;
+			break;
+		//2¥ö·î°Ê¹ß
+		case '8':
+			$start_day = 62;			
+			break;
+		//¤ª¼è¤ê´ó¤»(¾¦ÉÊÆþ²Ù¸å)
+		case '9':
+			$start_day = "";
+			break;
+		default:
+			//¤ªÆÏ¤±Æü¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç
+			$start_day = "";
+			break;
+		}
+		//ÇÛÃ£²ÄÇ½Æü¤Î¥¹¥¿¡¼¥ÈÃÍ¤«¤é¡¢ÇÛÃ£Æü¤ÎÇÛÎó¤ò¼èÆÀ¤¹¤ë
+		$arrDelivDate = lfGetDateArray($start_day, DELIV_DATE_END_MAX);
+	}
+	return $arrDelivDate;
+}
+
+//ÇÛÃ£²ÄÇ½Æü¤Î¥¹¥¿¡¼¥ÈÃÍ¤«¤é¡¢ÇÛÃ£Æü¤ÎÇÛÎó¤ò¼èÆÀ¤¹¤ë
+function lfGetDateArray($start_day, $end_day) {
+	global $arrWDAY;
+	//ÇÛÃ£²ÄÇ½Æü¤Î¥¹¥¿¡¼¥ÈÃÍ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ì¤Ð
+	if($start_day >= 1) {
+		$now_time = time();
+		$max_day = $start_day + $end_day;
+		// ½¸·×
+		for ($i = $start_day; $i < $max_day; $i++) {
+			// ´ðËÜ»þ´Ö¤«¤éÆü¿ô¤òÄÉ²Ã¤·¤Æ¤¤¤¯
+			$tmp_time = $now_time + ($i * 24 * 3600);
+			list($y, $m, $d, $w) = split(" ", date("y m d w", $tmp_time));	
+			$val = sprintf("%02d/%02d/%02d(%s)", $y, $m, $d, $arrWDAY[$w]);
+			$arrDate[$val] = $val;
+		}
+	} else {
+		$arrDate = false;
+	}
+	return $arrDate;
+}
+
+//°ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤«¤é¤Î¾ðÊó¤ò³ÊÇ¼¤¹¤ë
+function lfSetOrderTempData($uniqid) {
+	global $objQuery;
+	global $objFormParam;
+	
+	$objQuery = new SC_Query();
+	$col = "payment_id, use_point, deliv_time_id, message, point_check, deliv_date";
+	$from = "dtb_order_temp";
+	$where = "order_temp_id = ?";
+	$arrRet = $objQuery->select($col, $from, $where, array($uniqid));
+	// DBÃÍ¤Î¼èÆÀ
+	$objFormParam->setParam($arrRet[0]);
+	return $objFormParam;
+}
+
+
+?>
Index: branches/dev/html/mobile/unsupported/index.php
===================================================================
--- branches/dev/html/mobile/unsupported/index.php	(revision 11460)
+++ branches/dev/html/mobile/unsupported/index.php	(revision 11460)
@@ -0,0 +1,24 @@
+<?php
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		$this->tpl_css = '';			// ¥á¥¤¥óCSS¥Ñ¥¹
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_mainpage = 'unsupported/index.tpl';
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/cart/index.php
===================================================================
--- branches/dev/html/mobile/cart/index.php	(revision 11460)
+++ branches/dev/html/mobile/cart/index.php	(revision 11460)
@@ -0,0 +1,115 @@
+<?php
+require_once("../require.php");
+
+class LC_Page {
+	var $arrSession;
+	var $arrProductsClass;
+	var $tpl_total_pretax;
+	var $tpl_total_tax;
+	var $tpl_total_point;
+	var $tpl_message;
+	function LC_Page() {
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		$this->tpl_css = '/css/layout/cartin/index.css';	// ¥á¥¤¥óCSS¥Ñ¥¹
+		/** É¬¤º»ØÄê¤¹¤ë **/
+		$this->tpl_mainpage = 'cart/index.tpl';		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = "¶ºÞ¤ÎÃæ¤ò¸«¤ë";
+	}
+}
+
+// Çã¤¤Êª¤òÂ³¤±¤ë¾ì¹ç
+if($_REQUEST['continue']) {
+	header("Location: " . gfAddSessionId(URL_SITE_TOP) );
+	exit;
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView(false);
+$objCartSess = new SC_CartSession("", false);
+$objSiteSess = new SC_SiteSession();
+$objSiteInfo = $objView->objSiteInfo;
+$objCustomer = new SC_Customer();
+// ´ðËÜ¾ðÊó¤Î¼èÆÀ
+$arrInfo = $objSiteInfo->data;
+
+// ¾¦ÉÊ¹ØÆþÃæ¤Ë¥«¡¼¥ÈÆâÍÆ¤¬ÊÑ¹¹¤µ¤ì¤¿¡£
+if($objCartSess->getCancelPurchase()) {
+	$objPage->tpl_message = "¾¦ÉÊ¹ØÆþÃæ¤Ë¶°ÄÆâÍÆ¤¬ÊÑ¹¹¤µ¤ì¤Þ¤·¤¿¤Î¤Ç¤¤ª¼ê¿ô¤Ç¤¹¤¬¹ØÆþ¼êÂ³¤­¤ò¤ä¤êÄ¾¤·¤Æ²¼¤µ¤¤¡";
+}
+
+switch($_POST['mode']) {
+case 'up':
+	$objCartSess->upQuantity($_POST['cart_no']);
+	sfReload();
+	break;
+case 'down':
+	$objCartSess->downQuantity($_POST['cart_no']);
+	sfReload();
+	break;
+case 'delete':
+	$objCartSess->delProduct($_POST['cart_no']);
+	sfReload();
+	break;
+case 'confirm':
+	// ¥«¡¼¥ÈÆâ¾ðÊó¤Î¼èÆÀ
+	$arrRet = $objCartSess->getCartList();
+	$max = count($arrRet);
+	$cnt = 0;
+	for ($i = 0; $i < $max; $i++) {
+		// ¾¦ÉÊµ¬³Ê¾ðÊó¤Î¼èÆÀ
+		$arrData = sfGetProductsClass($arrRet[$i]['id']);
+		// DB¤ËÂ¸ºß¤¹¤ë¾¦ÉÊ
+		if($arrData != "") {
+			$cnt++;
+		}
+	}
+	// ¥«¡¼¥È¾¦ÉÊ¤¬1·ï°Ê¾åÂ¸ºß¤¹¤ë¾ì¹ç
+	if($cnt > 0) {
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		$objSiteSess->setRegistFlag();
+		$pre_uniqid = $objSiteSess->getUniqId();
+		// ÃíÊ¸°ì»þID¤ÎÈ¯¹Ô
+		$objSiteSess->setUniqId();
+		$uniqid = $objSiteSess->getUniqId();
+		// ¥¨¥é¡¼¥ê¥È¥é¥¤¤Ê¤É¤Ç´û¤Ëuniqid¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢ÀßÄê¤ò°ú¤­·Ñ¤°
+		if($pre_uniqid != "") {
+			$sqlval['order_temp_id'] = $uniqid;
+			$where = "order_temp_id = ?";
+			$objQuery = new SC_Query();
+			$objQuery->update("dtb_order_temp", $sqlval, $where, array($pre_uniqid));
+		}
+		// ¥«¡¼¥È¤ò¹ØÆþ¥â¡¼¥É¤ËÀßÄê
+		$objCartSess->saveCurrentCart($uniqid);
+		// ¹ØÆþ¥Ú¡¼¥¸¤Ø
+		header("Location: " . gfAddSessionId(URL_SHOP_TOP));
+		exit;
+	}
+	break;
+default:
+	break;
+}
+
+// ¥«¡¼¥È½¸·×½èÍý
+$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo);
+$objPage->arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer);
+
+$objPage->arrInfo = $arrInfo;
+
+// ¥í¥°¥¤¥óÈ½Äê
+if($objCustomer->isLoginSuccess()) {
+	$objPage->tpl_login = true;
+	$objPage->tpl_user_point = $objCustomer->getValue('point');
+	$objPage->tpl_name = $objCustomer->getValue('name01');
+}
+
+// Á÷ÎÁÌµÎÁ¤Þ¤Ç¤Î¶â³Û¤ò·×»»
+$tpl_deliv_free = $objPage->arrInfo['free_rule'] - $objPage->tpl_total_pretax;
+$objPage->tpl_deliv_free = $tpl_deliv_free;
+
+// Á°ÊÇ¤ÎURL¤ò¼èÆÀ
+$objPage->tpl_prev_url = $objCartSess->getPrevURL();
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/contact/index.php
===================================================================
--- branches/dev/html/mobile/contact/index.php	(revision 11460)
+++ branches/dev/html/mobile/contact/index.php	(revision 11460)
@@ -0,0 +1,26 @@
+<?php
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_css = '/css/layout/contact/index.css';	// ¥á¥¤¥óCSS¥Ñ¥¹
+		$this->tpl_mainpage = 'contact/index.tpl';
+		$this->tpl_title = '¤ªÌä¤¤¹ç¤ï¤»(ÆþÎÏ¥Ú¡¼¥¸)';
+		$this->tpl_page_category = 'contact';
+		global $arrPref;
+		$this->arrPref = $arrPref;
+	}
+}
+
+$conn = new SC_DBConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$CONF = sf_getBasisData();			// Å¹ÊÞ´ðËÜ¾ðÊó
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->assignarray($CONF);
+$objView->display(SITE_FRAME);
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/magazine/confirm.php
===================================================================
--- branches/dev/html/mobile/magazine/confirm.php	(revision 11460)
+++ branches/dev/html/mobile/magazine/confirm.php	(revision 11460)
@@ -0,0 +1,186 @@
+<?php
+/**
+ * ¥á¥ë¥Þ¥¬³ÎÇ§
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'magazine/confirm.tpl';
+		$this->tpl_title .= '¥á¥ë¥Þ¥¬³ÎÇ§';
+	}
+}
+
+$objPage = new LC_Page();
+$objConn = new SC_DbConn();
+$objPage->arrForm = $_POST;
+
+// ÅÐÏ¿
+if (isset($_REQUEST['btnRegist'])) {
+	$objPage->arrErr = lfMailErrorCheck($objPage->arrForm, "regist");
+
+	// ¥¨¥é¡¼¤¬¤Ê¤±¤ì¤Ð
+	if (count($objPage->arrErr) == 0) {
+		// ³ÎÇ§
+		$objPage->arrForm['kind'] = '¥á¥ë¥Þ¥¬ÅÐÏ¿';
+		$objPage->arrForm['type'] = 'regist';
+		$objPage->arrForm['mail'] = $objPage->arrForm['regist'];
+	} else {
+		$objPage->tpl_mainpage = 'magazine/index.tpl';
+		$objPage->tpl_title = '¥á¥ë¥Þ¥¬ÅÐÏ¿¡¦²ò½ü';
+	}
+// ²ò½ü
+} elseif (isset($_REQUEST['btnCancel'])) {
+	$objPage->arrErr = lfMailErrorCheck($objPage->arrForm, "cancel");
+
+	// ¥¨¥é¡¼¤¬¤Ê¤±¤ì¤Ð
+	if (count($objPage->arrErr) == 0) {
+		// ³ÎÇ§
+		$objPage->arrForm['kind'] = '¥á¥ë¥Þ¥¬²ò½ü';
+		$objPage->arrForm['type'] = 'cancel';
+		$objPage->arrForm['mail'] = $objPage->arrForm['cancel'];
+	} else {
+		$objPage->tpl_mainpage = 'magazine/index.tpl';
+		$objPage->tpl_title = '¥á¥ë¥Þ¥¬ÅÐÏ¿¡¦²ò½ü';
+	}
+// ´°Î»
+} elseif ($_REQUEST['mode'] == 'regist' or $_REQUEST['mode'] == 'cancel') {
+
+	//¡¡ÅÐÏ¿
+	if ($_REQUEST['mode'] == 'regist') {
+		$uniqId = lfRegistData($_POST["email"]);
+		$subject = sfMakesubject('¥á¥ë¥Þ¥¬ÅÐÏ¿¤Î¤´³ÎÇ§');
+	//¡¡²ò½ü
+	} elseif ($_REQUEST['mode'] == 'cancel') {
+		$uniqId = lfGetSecretKey($_POST["email"]);
+		$subject = sfMakesubject('¥á¥ë¥Þ¥¬²ò½ü¤Î¤´³ÎÇ§');
+	}
+	$CONF = sf_getBasisData();
+	$objPage->CONF = $CONF;
+	$objPage->tpl_url = gfAddSessionId(SSL_URL . "magazine/" . $_REQUEST['mode'] . ".php?id=" . $uniqId);
+	
+	$objMailText = new SC_SiteView();
+	$objMailText->assignobj($objPage);
+	$toCustomerMail = $objMailText->fetch("mail_templates/mailmagazine_" . $_REQUEST['mode'] . ".tpl");
+	$objMail = new GC_SendMail();
+	$objMail->setItem(
+						''									//¡¡°¸Àè
+						, $subject							//¡¡¥µ¥Ö¥¸¥§¥¯¥È
+						, $toCustomerMail					//¡¡ËÜÊ¸
+						, $CONF["email03"]					//¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
+						, $CONF["shop_name"]				//¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
+						, $CONF["email03"]					//¡¡reply_to
+						, $CONF["email04"]					//¡¡return_path
+						, $CONF["email04"]					//  Errors_to
+						, $CONF["email01"]					//  Bcc
+														);
+	// °¸Àè¤ÎÀßÄê
+	$objMail->setTo($_POST["email"], $_POST["email"]);
+	$objMail->sendMail();
+
+	// ´°Î»¥Ú¡¼¥¸¤Ë°ÜÆ°¤µ¤»¤ë¡£
+	header("Location:" . gfAddSessionId("./complete.php"));
+	exit;
+} else {
+	sfDispSiteError(CUSTOMER_ERROR);
+}
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfMailErrorCheck($array, $dataName) {
+	$objErr = new SC_CheckError($array);
+	$objErr->doFunc(
+				array('¥á¡¼¥ë¥¢¥É¥ì¥¹', $dataName, MTEXT_LEN) ,
+				array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", 
+					"SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
+
+	// ÆþÎÏ¥¨¥é¡¼¤¬¤Ê¤±¤ì¤Ð
+	if (count($objErr->arrErr) == 0) {
+		// ¥á¥ë¥Þ¥¬¤ÎÅÐÏ¿Í­Ìµ
+		$flg = lfIsRegistData($array[$dataName]);
+
+		// ÅÐÏ¿¤Î»þ
+		if ($dataName == 'regist' and $flg == true) {
+			$objErr->arrErr[$dataName] = "´û¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£<br>";
+		// ²ò½ü¤Î»þ
+		} elseif ($dataName == 'cancel' and $flg == false) {
+			$objErr->arrErr[$dataName] = "¥á¥ë¥Þ¥¬ÅÐÏ¿¤¬¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£<br>";
+		}
+	}
+
+	return $objErr->arrErr;
+}
+
+
+//---- ¥á¥ë¥Þ¥¬ÅÐÏ¿
+function lfRegistData ($email) {
+	global $objConn;
+
+	$count = 1;
+	while ($count != 0) {
+		$uniqid = sfGetUniqRandomId("t");
+		$count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer_mail WHERE secret_key = ?", array($uniqid));
+	}
+	
+	$arrRegist["email"] = $email;			// ¥á¡¼¥ë¥¢¥É¥ì¥¹
+	$arrRegist["mail_flag"] = 5;			// ÅÐÏ¿¾õÂÖ
+	$arrRegist["secret_key"] = $uniqid;		// IDÈ¯¹Ô
+	$arrRegist["create_date"] = "now()"; 	// ºîÀ®Æü
+	$arrRegist["update_date"] = "now()"; 	// ¹¹¿·Æü
+
+	//-- ²¾ÅÐÏ¿¼Â¹Ô
+	$objConn->query("BEGIN");
+
+	$objQuery = new SC_Query();
+	$objQuery->insert("dtb_customer_mail", $arrRegist);
+
+	//--¡¡´û¤Ë¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎÈ½Äê
+	$sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?";
+	$mailResult = $objConn->getOne($sql, array($arrRegist["email"]));
+
+	if ($mailResult == 1) {		
+		$objQuery->update("dtb_customer_mail", $arrRegist, "email = '" .addslashes($arrRegist["email"]). "'");			
+	} else {
+		$objQuery->insert("dtb_customer_mail", $arrRegist);		
+	}
+	$objConn->query("COMMIT");
+
+	return $uniqid;
+}
+
+// ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥­¡¼¤Î¼èÆÀ
+function lfGetSecretKey ($email) {
+	global $objConn;
+
+	$sql = "SELECT secret_key FROM dtb_customer_mail WHERE email = ?";
+	return $objConn->getOne($sql, array($email));
+}
+
+// ´û¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«
+function lfIsRegistData ($email) {
+	global $objConn;
+
+	$sql = "SELECT email, mail_flag FROM dtb_customer_mail WHERE email = ?";
+	$mailResult = $objConn->getRow($sql, array($email));
+
+	// NULL¤â¹ØÆÉ¤È¤ß¤Ê¤¹
+	if (count($mailResult) == 0 or ($mailResult[1] != null and $mailResult[1] <= 2 )) {
+		return false;
+	} else {
+		return true;
+	}
+}
+
+
+?>
Index: branches/dev/html/mobile/magazine/regist.php
===================================================================
--- branches/dev/html/mobile/magazine/regist.php	(revision 11460)
+++ branches/dev/html/mobile/magazine/regist.php	(revision 11460)
@@ -0,0 +1,58 @@
+<?php
+/**
+ * ¥á¥ë¥Þ¥¬ÅÐÏ¿
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'magazine/regist.tpl';
+		$this->tpl_title .= '¥á¥ë¥Þ¥¬ÅÐÏ¿´°Î»';
+	}
+}
+
+$objPage = new LC_Page();
+$objQuery = new SC_Query();
+
+// secret_key¤Î¼èÆÀ
+$key = $_GET['id'];
+
+if (empty($key) or !lfExistKey($key))  {
+	sfDispSiteError(PAGE_ERROR);
+} else {
+	lfChangeData($key);
+}
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+// ¥á¥ë¥Þ¥¬¤ÎÅÐÏ¿¤ò´°Î»¤µ¤»¤ë
+function lfChangeData($key) {
+	global $objQuery;
+
+	$arrUpdate['mail_flag'] = 2;
+	$arrUpdate['secret_key'] = NULL;
+	$result = $objQuery->update("dtb_customer_mail", $arrUpdate, "secret_key = '" .addslashes($key). "'");
+}
+
+// ¥­¡¼¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«
+function lfExistKey($key) {
+	global $objQuery;
+
+	$sql = "SELECT count(*) FROM dtb_customer_mail WHERE secret_key = ?";
+	$result = $objQuery->getOne($sql, array($key));
+
+	if ($result == 1) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+
+?>
Index: branches/dev/html/mobile/magazine/cancel.php
===================================================================
--- branches/dev/html/mobile/magazine/cancel.php	(revision 11460)
+++ branches/dev/html/mobile/magazine/cancel.php	(revision 11460)
@@ -0,0 +1,58 @@
+<?php
+/**
+ * ¥á¥ë¥Þ¥¬²ò½ü
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'magazine/cancel.tpl';
+		$this->tpl_title .= '¥á¥ë¥Þ¥¬²ò½ü´°Î»';
+	}
+}
+
+$objPage = new LC_Page();
+$objQuery = new SC_Query();
+
+// secret_key¤Î¼èÆÀ
+$key = $_GET['id'];
+
+if (empty($key) or !lfExistKey($key))  {
+	sfDispSiteError(PAGE_ERROR);
+} else {
+	lfChangeData($key);
+}
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+// ¥á¥ë¥Þ¥¬¤Î²ò½ü¤ò´°Î»¤µ¤»¤ë
+function lfChangeData($key) {
+	global $objQuery;
+
+	$arrUpdate['mail_flag'] = 3;
+	$arrUpdate['secret_key'] = NULL;
+	$result = $objQuery->update("dtb_customer_mail", $arrUpdate, "secret_key = '" .addslashes($key). "'");
+}
+
+// ¥­¡¼¤¬Â¸ºß¤¹¤ë¤«¤É¤¦¤«
+function lfExistKey($key) {
+	global $objQuery;
+
+	$sql = "SELECT count(*) FROM dtb_customer_mail WHERE secret_key = ?";
+	$result = $objQuery->getOne($sql, array($key));
+
+	if ($result == 1) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+
+?>
Index: branches/dev/html/mobile/magazine/index.php
===================================================================
--- branches/dev/html/mobile/magazine/index.php	(revision 11460)
+++ branches/dev/html/mobile/magazine/index.php	(revision 11460)
@@ -0,0 +1,27 @@
+<?php
+/**
+ * ¥á¥ë¥Þ¥¬ÅÐÏ¿¡¦²ò½ü¡¡¥È¥Ã¥×¥Ú¡¼¥¸
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'magazine/index.tpl';
+		$this->tpl_title .= '¥á¥ë¥Þ¥¬ÅÐÏ¿¡¦²ò½ü';
+	}
+}
+
+$objPage = new LC_Page();
+$objPage->arrForm = $_POST;
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/magazine/complete.php
===================================================================
--- branches/dev/html/mobile/magazine/complete.php	(revision 11460)
+++ branches/dev/html/mobile/magazine/complete.php	(revision 11460)
@@ -0,0 +1,19 @@
+<?php
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'magazine/complete.tpl';		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title .= '¥á¥ë¥Þ¥¬ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';			//¡¡¥Ú¡¼¥¸¥¿¥¤¥È¥ë
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//----------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/guide/usage.php
===================================================================
--- branches/dev/html/mobile/guide/usage.php	(revision 11460)
+++ branches/dev/html/mobile/guide/usage.php	(revision 11460)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¤´ÍøÍÑÊýË¡
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/usage.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¤´ÍøÍÑÊýË¡';
+	}
+}
+
+$objPage = new LC_Page();
+
+switch (@$_GET['page']) {
+case '1':
+case '2':
+case '3':
+case '4':
+	$objPage->tpl_mainpage = 'guide/usage' . $_GET['page'] . '.tpl';
+	break;
+}
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/guide/index.php
===================================================================
--- branches/dev/html/mobile/guide/index.php	(revision 11460)
+++ branches/dev/html/mobile/guide/index.php	(revision 11460)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¤´ÍøÍÑ¥¬¥¤¥É
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/index.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¤´ÍøÍÑ¥¬¥¤¥É';
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/guide/charge.php
===================================================================
--- branches/dev/html/mobile/guide/charge.php	(revision 11460)
+++ branches/dev/html/mobile/guide/charge.php	(revision 11460)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/ÄÌ¿®ÎÁ¤Ë¤Ä¤¤¤Æ
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/charge.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = 'ÄÌ¿®ÎÁ¤Ë¤Ä¤¤¤Æ';
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/guide/about.php
===================================================================
--- branches/dev/html/mobile/guide/about.php	(revision 11460)
+++ branches/dev/html/mobile/guide/about.php	(revision 11460)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/±¿±Ä²ñ¼Ò¾Ò²ð
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/about.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¥×¥é¥¤¥Ð¥·¡¼¥Ý¥ê¥·¡¼';
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/guide/kiyaku.php
===================================================================
--- branches/dev/html/mobile/guide/kiyaku.php	(revision 11460)
+++ branches/dev/html/mobile/guide/kiyaku.php	(revision 11460)
@@ -0,0 +1,63 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¤´ÍøÍÑµ¬Ìó
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/kiyaku.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¤´ÍøÍÑµ¬Ìó';
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+// ÍøÍÑµ¬Ìó¤ò¼èÆÀ¤¹¤ë¡£
+lfGetKiyaku(intval(@$_GET['page']), $objPage);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+/**
+ * ÍøÍÑµ¬Ìó¤ò¼èÆÀ¤·¡¢¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤Ë³ÊÇ¼¤¹¤ë¡£
+ *
+ * @param integer $index µ¬Ìó¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹
+ * @param object &$objPage ¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È
+ * @return void
+ */
+function lfGetKiyaku($index, &$objPage)
+{
+	$objQuery = new SC_Query();
+	$objQuery->setorder('rank DESC');
+	$arrRet = $objQuery->select('kiyaku_title, kiyaku_text', 'dtb_kiyaku', 'del_flg <> 1');
+
+	$number = count($arrRet);
+	if ($number > 0) {
+		$last = $number - 1;
+	} else {
+		$last = 0;
+	}
+
+	if ($index < 0) {
+		$index = 0;
+	} elseif ($index > $last) {
+		$index = $last;
+	}
+
+	$objPage->tpl_kiyaku_title = @$arrRet[$index]['kiyaku_title'];
+	$objPage->tpl_kiyaku_text = @$arrRet[$index]['kiyaku_text'];
+	$objPage->tpl_kiyaku_index = $index;
+	$objPage->tpl_kiyaku_last_index = $last;
+	$objPage->tpl_kiyaku_is_first = $index <= 0;
+	$objPage->tpl_kiyaku_is_last = $index >= $last;
+}
+?>
Index: branches/dev/html/mobile/guide/privacy.php
===================================================================
--- branches/dev/html/mobile/guide/privacy.php	(revision 11460)
+++ branches/dev/html/mobile/guide/privacy.php	(revision 11460)
@@ -0,0 +1,26 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¥×¥é¥¤¥Ð¥·¡¼¥Ý¥ê¥·¡¼
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'guide/privacy.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title = '¥×¥é¥¤¥Ð¥·¡¼¥Ý¥ê¥·¡¼';
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/index.php
===================================================================
--- branches/dev/html/mobile/index.php	(revision 11460)
+++ branches/dev/html/mobile/index.php	(revision 11460)
@@ -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: branches/dev/html/mobile/regist/complete.php
===================================================================
--- branches/dev/html/mobile/regist/complete.php	(revision 11460)
+++ branches/dev/html/mobile/regist/complete.php	(revision 11460)
@@ -0,0 +1,31 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page{
+	function LC_Page(){
+		$this->tpl_mainpage = 'regist/complete.tpl';
+		$this->tpl_css = '/css/layout/regist/complete.css';
+		$this->tpl_title = '²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+
+// ¥«¡¼¥È¤¬¶õ¤«¤É¤¦¤«¤ò³ÎÇ§¤¹¤ë¡£
+$objCartSess = new SC_CartSession("", false);
+$objPage->tpl_cart_empty = count($objCartSess->getCartList()) < 1;
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+?>
Index: branches/dev/html/mobile/regist/index.php
===================================================================
--- branches/dev/html/mobile/regist/index.php	(revision 11460)
+++ branches/dev/html/mobile/regist/index.php	(revision 11460)
@@ -0,0 +1,196 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+//---- ¥Ú¡¼¥¸É½¼¨¥¯¥é¥¹
+class LC_Page {
+	
+	var $arrSession;
+	var $tpl_mainpage;
+	var $arrPref;
+
+	function LC_Page() {
+		$this->tpl_css = '/css/layout/regist/index.css';	// ¥á¥¤¥óCSS¥Ñ¥¹
+	}
+}
+
+$objConn = new SC_DBConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objSiteInfo = $objView->objSiteInfo;
+$objCustomer = new SC_Customer();
+$CONF = sf_getBasisData();
+$arrInfo = $objSiteInfo->data;
+
+//--¡¡ËÜÅÐÏ¿´°Î»¤Î¤¿¤á¤Ë¥á¡¼¥ë¤«¤éÀÜÂ³¤·¤¿¾ì¹ç
+if ($_GET["mode"] == "regist") {
+	
+	//-- ÆþÎÏ¥Á¥§¥Ã¥¯
+	$objPage->arrErr = lfErrorCheck($_GET);
+	if ($objPage->arrErr) {
+		$objPage->tpl_mainpage = 'regist/error.tpl';
+		$objPage->tpl_css = "/css/layout/regist/error.css";
+		$objPage->tpl_title = '¥¨¥é¡¼';
+
+	} else {
+		//$objPage->tpl_mainpage = 'regist/complete.tpl';
+		//$objPage->tpl_title = ' ²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';
+		$registSecretKey = lfRegistData($_GET);			//ËÜ²ñ°÷ÅÐÏ¿¡Ê¥Õ¥é¥°ÊÑ¹¹¡Ë
+		lfSendRegistMail($registSecretKey);				//ËÜ²ñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®
+
+		// ¥í¥°¥¤¥óºÑ¤ß¤Î¾õÂÖ¤Ë¤¹¤ë¡£
+		$objQuery = new SC_Query();
+		$email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey));
+		$objCustomer->setLogin($email);
+		header("Location: " . gfAddSessionId("./complete.php"));
+		exit;
+	}
+
+//--¡¡¤½¤ì°Ê³°¤Î¥¢¥¯¥»¥¹¤ÏÌµ¸ú¤È¤¹¤ë
+} else {
+	$objPage->arrErr["id"] = "Ìµ¸ú¤Ê¥¢¥¯¥»¥¹¤Ç¤¹¡£";
+	$objPage->tpl_mainpage = 'regist/error.tpl';
+	$objPage->tpl_css = "/css/layout/regist/error.css";
+	$objPage->tpl_title = '¥¨¥é¡¼';
+
+}
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//---- ÅÐÏ¿
+function lfRegistData($array) {
+	global $objConn;
+	global $arrInfo;
+	
+	do {
+		$secret = sfGetUniqRandomId("r");
+	} while( ($result = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($secret)) ) != 0);
+
+	$sql = "SELECT email FROM dtb_customer WHERE secret_key = ? AND status = 1";
+	$email = $objConn->getOne($sql, array($array["id"]));
+
+	$objConn->query("BEGIN");
+	$arrRegist["secret_key"] = $secret;	//¡¡ËÜÅÐÏ¿IDÈ¯¹Ô
+	$arrRegist["status"] = 2;
+	$arrRegist["update_date"] = "NOW()";
+	
+	$objQuery = new SC_Query();
+	$where = "secret_key = ? AND status = 1";
+	
+	$arrRet = $objQuery->select("point", "dtb_customer", $where, array($array["id"]));
+	// ²ñ°÷ÅÐÏ¿»þ¤Î²Ã»»¥Ý¥¤¥ó¥È(¹ØÆþ»þ²ñ°÷ÅÐÏ¿¤Î¾ì¹ç¤Ï¡¢¥Ý¥¤¥ó¥È²Ã»»¡Ë
+	$arrRegist['point'] = $arrRet[0]['point'] + addslashes($arrInfo['welcome_point']);
+	
+	$objQuery->update("dtb_customer", $arrRegist, $where, array($array["id"]));
+
+	/* ¹ØÆþ»þ¤Î¼«Æ°²ñ°÷ÅÐÏ¿¤Ï¹Ô¤ï¤Ê¤¤¤¿¤áDEL
+	// ¹ØÆþ»þÅÐÏ¿¤Î¾ì¹ç¡¢¤½¤Î²ó¤Î¹ØÆþ¤ò²ñ°÷¹ØÆþ¤È¤ß¤Ê¤¹¡£
+	// ²ñ°÷¾ðÊó¤ÎÆÉ¤ß¹þ¤ß
+	$where1 = "secret_key = ? AND status = 2";
+	$customer = $objQuery->select("*", "dtb_customer", $where1, array($secret));
+	// ½é²ó¹ØÆþ¾ðÊó¤ÎÆÉ¤ß¹þ¤ß
+	$order_temp_id = $objQuery->get("dtb_order_temp", "order_temp_id");
+	// ¹ØÆþ¾ðÊó¤Î¹¹¿·
+	if ($order_temp_id != null) {
+		$arrCustomer['customer_id'] = $customer[0]['customer_id'];
+		$where3 = "order_temp_id = ?";
+		$objQuery->update("dtb_order_temp", $arrCustomer, $where3, array($order_temp_id));
+		$objQuery->update("dtb_order", $arrCustomer, $where3, array($order_temp_id));
+	}
+	*/
+
+	$sql = "SELECT mail_flag FROM dtb_customer_mail WHERE email = ?";
+	$result = $objConn->getOne($sql, array($email));
+	
+	switch($result) {
+	// ²¾HTML
+	case '4':
+		$arrRegistMail["mail_flag"] = 1;
+		break;
+	// ²¾TEXT
+	case '5':
+		$arrRegistMail["mail_flag"] = 2;
+		break;
+	// ²¾¤Ê¤·
+	case '6':
+		$arrRegistMail["mail_flag"] = 3;
+		break;
+	default:
+		$arrRegistMail["mail_flag"] = $result;
+		break;
+	}
+
+	$objConn->autoExecute("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($email). "'");
+	$objConn->query("COMMIT");
+		
+	return $secret;		// ËÜÅÐÏ¿ID¤òÊÖ¤¹
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+
+	$objErr->doFunc(array("²¾ÅÐÏ¿ID", 'id'), array("EXIST_CHECK"));
+	if (! EregI("^[[:alnum:]]+$",$array["id"] )) {
+		$objErr->arrErr["id"] = "Ìµ¸ú¤ÊURL¤Ç¤¹¡£¥á¡¼¥ë¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ëËÜ²ñ°÷ÅÐÏ¿ÍÑURL¤òºÆÅÙ¤´³ÎÇ§¤¯¤À¤µ¤¤¡£";
+	}
+	if (! $objErr->arrErr["id"]) {
+
+		$sql = "SELECT customer_id FROM dtb_customer WHERE secret_key = ? AND status = 1 AND del_flg = 0";
+		$result = $objConn->getOne($sql, array($array["id"]));
+
+		if (! is_numeric($result)) {
+			$objErr->arrErr["id"] .= "¢¨ ´û¤Ë²ñ°÷ÅÐÏ¿¤¬´°Î»¤·¤Æ¤¤¤ë¤«¡¢Ìµ¸ú¤ÊURL¤Ç¤¹¡£<br>";
+			return $objErr->arrErr;
+
+		}
+	}
+
+	return $objErr->arrErr;
+}
+
+//---- Àµ²ñ°÷ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®
+function lfSendRegistMail($registSecretKey) {
+	global $objConn;
+	global $CONF;
+
+	//-- À«Ì¾¤ò¼èÆÀ
+	$sql = "SELECT email, name01, name02 FROM dtb_customer WHERE secret_key = ?";
+	$result = $objConn->getAll($sql, array($registSecretKey));
+	$data = $result[0];
+	
+	//--¡¡¥á¡¼¥ëÁ÷¿®
+	$objMailText = new SC_SiteView();
+	$objMailText->assign("CONF", $CONF);
+	$objMailText->assign("name01", $data["name01"]);
+	$objMailText->assign("name02", $data["name02"]);
+	$toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl");
+	$subject = sfMakeSubject('ËÜ²ñ°÷ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');
+	$objMail = new GC_SendMail();
+
+	$objMail->setItem(
+						  ''								//¡¡°¸Àè
+						, $subject//"¡Ú" .$CONF["shop_name"]. "¡Û".ENTRY_CUSTOMER_REGIST_SUBJECT 		//¡¡¥µ¥Ö¥¸¥§¥¯¥È
+						, $toCustomerMail					//¡¡ËÜÊ¸
+						, $CONF["email03"]					//¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
+						, $CONF["shop_name"]				//¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
+						, $CONF["email03"]					//¡¡reply_to
+						, $CONF["email04"]					//¡¡return_path
+						, $CONF["email04"]					//  Errors_to
+					);
+	// °¸Àè¤ÎÀßÄê
+	$name = $data["name01"] . $data["name02"] ." ÍÍ";
+	$objMail->setTo($data["email"], $name);
+	$objMail->sendMail();
+}
+
+?>
Index: branches/dev/html/mobile/forgot/index.php
===================================================================
--- branches/dev/html/mobile/forgot/index.php	(revision 11460)
+++ branches/dev/html/mobile/forgot/index.php	(revision 11460)
@@ -0,0 +1,160 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿Êý
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	var $errmsg;
+	var $arrReminder;
+	var $temp_password;
+
+	function LC_Page() {
+		$this->tpl_mainpage = 'forgot/index.tpl';
+		$this->tpl_title = '¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿Êý';
+		$this->tpl_mainno = '';
+	}
+}
+
+$conn = new SC_DBConn();
+$objPage = new LC_Page();
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+$objView = new SC_SiteView();
+$objSess = new SC_Session();
+$CONF = sf_getBasisData();					// Å¹ÊÞ´ðËÜ¾ðÊó
+// ¥¯¥Ã¥­¡¼´ÉÍý¥¯¥é¥¹
+$objCookie = new SC_Cookie(COOKIE_EXPIRE);
+
+if (isset($_SESSION['mobile']['kara_mail_from'])) {
+	if (!isset($_POST['mode'])) {
+		$_POST['mode'] = 'mail_check';
+	}
+	$_POST['email'] = $_SESSION['mobile']['kara_mail_from'];
+}
+
+if ( $_POST['mode'] == 'mail_check' ){
+	//¥á¥¢¥ÉÆþÎÏ»þ
+	$_POST['email'] = strtolower($_POST['email']);
+	$sql = "SELECT * FROM dtb_customer WHERE (email ILIKE ? OR email_mobile ILIKE ?) AND status = 2 AND del_flg = 0";
+	$result = $conn->getAll($sql, array($_POST['email'], $_POST['email']) );
+	
+	if ( $result[0]['reminder'] ){		// ËÜ²ñ°÷ÅÐÏ¿ºÑ¤ß¤Î¾ì¹ç
+		// ÆþÎÏemail¤¬Â¸ºß¤¹¤ë		
+		$_SESSION['forgot']['email'] = $_POST['email'];
+		$_SESSION['forgot']['reminder'] = $result[0]['reminder'];
+		// ¥Ò¥ß¥Ä¤ÎÅú¤¨ÆþÎÏ²èÌÌ
+		$objPage->Reminder = $arrReminder[$_SESSION['forgot']['reminder']];
+		$objPage->tpl_mainpage = 'forgot/secret.tpl';
+	} else {
+		$sql = "SELECT customer_id FROM dtb_customer WHERE email ILIKE ? AND status = 1 AND del_flg = 0";	//²¾ÅÐÏ¿Ãæ¤Î³ÎÇ§
+		$result = $conn->getAll($sql, array($_POST['email']) );
+		if ($result) {
+			$objPage->errmsg = "¤´ÆþÎÏ¤Îemail¥¢¥É¥ì¥¹¤Ï¸½ºß²¾ÅÐÏ¿Ãæ¤Ç¤¹¡£<br>ÅÐÏ¿¤ÎºÝ¤Ë¤ªÁ÷¤ê¤·¤¿¥á¡¼¥ë¤ÎURL¤Ë¥¢¥¯¥»¥¹¤·¡¢<br>ËÜ²ñ°÷ÅÐÏ¿¤ò¤ª´ê¤¤¤·¤Þ¤¹¡£";
+		} else {		//¡¡ÅÐÏ¿¤·¤Æ¤¤¤Ê¤¤¾ì¹ç
+			$objPage->errmsg = "¤´ÆþÎÏ¤Îemail¥¢¥É¥ì¥¹¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤»¤ó";
+		}
+	}
+	
+} elseif( $_POST['mode'] == 'secret_check' ){
+	//¥Ò¥ß¥Ä¤ÎÅú¤¨ÆþÎÏ»þ
+	
+	if ( $_SESSION['forgot']['email'] ) {
+		// ¥Ò¥ß¥Ä¤ÎÅú¤¨¤Î²óÅú¤¬Àµ¤·¤¤¤«¥Á¥§¥Ã¥¯
+		
+		$sql = "SELECT * FROM dtb_customer WHERE (email ILIKE ? OR email_mobile ILIKE ?) AND del_flg = 0";
+		$result = $conn->getAll($sql, array($_SESSION['forgot']['email'], $_SESSION['forgot']['email']) );
+		$data = $result[0];
+		
+		if ( $data['reminder_answer'] === $_POST['input_reminder'] ){
+			// ¥Ò¥ß¥Ä¤ÎÅú¤¨¤¬Àµ¤·¤¤
+						
+			// ¿·¤·¤¤¥Ñ¥¹¥ï¡¼¥É¤òÀßÄê¤¹¤ë
+			$objPage->temp_password = gfMakePassword(8);
+						
+			if(FORGOT_MAIL == 1) {
+				// ¥á¡¼¥ë¤ÇÊÑ¹¹ÄÌÃÎ¤ò¤¹¤ë
+				lfSendMail($CONF, $_SESSION['forgot']['email'], $data['name01'], $objPage->temp_password);
+			}
+			
+			// DB¤ò½ñ¤­´¹¤¨¤ë
+			$sql = "UPDATE dtb_customer SET password = ?, update_date = now() WHERE customer_id = ?";
+			$conn->query( $sql, array( sha1($objPage->temp_password . ":" . AUTH_MAGIC) ,$data['customer_id']) );
+			
+			// ´°Î»²èÌÌ¤ÎÉ½¼¨
+			$objPage->tpl_mainpage = 'forgot/complete.tpl';
+			
+			// ¥»¥Ã¥·¥ç¥óÊÑ¿ô¤Î²òÊü
+			$_SESSION['forgot'] = array();
+			unset($_SESSION['forgot']);
+			
+		} else {
+			// ¥Ò¥ß¥Ä¤ÎÅú¤¨¤¬Àµ¤·¤¯¤Ê¤¤
+			
+			$objPage->Reminder = $arrReminder[$_SESSION['forgot']['reminder']];
+			$objPage->errmsg = "¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¼ÁÌä¤ËÂÐ¤¹¤ë²óÅú¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó";
+			$objPage->tpl_mainpage = 'forgot/secret.tpl';
+
+		}
+	
+		
+	} else {
+		// ¥¢¥¯¥»¥¹¸µ¤¬ÉÔÀµ¤Þ¤¿¤Ï¡¢¥»¥Ã¥·¥ç¥óÊÝ»ý´ü´Ö¤¬ÀÚ¤ì¤Æ¤¤¤ë
+		$objPage->errmsg = "email¥¢¥É¥ì¥¹¤òºÆÅÙÅÐÏ¿¤·¤Æ¤¯¤À¤µ¤¤¡£<br />Á°²ó¤ÎÆþÎÏ¤«¤é»þ´Ö¤¬·Ð¤Ã¤Æ¤¤¤Þ¤¹¤È¡¢ËÜ¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤ë²ÄÇ½À­¤¬¤¢¤ê¤Þ¤¹¡£";
+	}
+}
+
+// ¥Ç¥Õ¥©¥ë¥ÈÆþÎÏ
+if($_POST['email'] != "") {
+	// POSTÃÍ¤òÆþÎÏ
+	$objPage->tpl_login_email = $_POST['email'];
+} else {
+	// ¥¯¥Ã¥­¡¼ÃÍ¤òÆþÎÏ
+	$objPage->tpl_login_email = $objCookie->getCookie('login_email');
+}
+
+// ¶õ¥á¡¼¥ëÍÑ¤Î¥È¡¼¥¯¥ó¤òºîÀ®¡£
+if (MOBILE_USE_KARA_MAIL) {
+	$token = gfPrepareKaraMail('forgot/index.php');
+	if ($token !== false) {
+		$objPage->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'forgot_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
+	}
+}
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+function lfSendMail($CONF, $email, $customer_name, $temp_password){
+	//¡¡¥Ñ¥¹¥ï¡¼¥ÉÊÑ¹¹¤ªÃÎ¤é¤»¥á¡¼¥ëÁ÷¿®
+	
+	$objPage = new LC_Page();
+	$objPage->customer_name = $customer_name;
+	$objPage->temp_password = $temp_password;
+	$objMailText = new SC_SiteView();
+	$objMailText->assignobj($objPage);
+	
+	$toCustomerMail = $objMailText->fetch("mail_templates/forgot_mail.tpl");
+	$objMail = new GC_SendMail();
+	
+	$objMail->setItem(
+						  ''								//¡¡°¸Àè
+						, "¥Ñ¥¹¥ï¡¼¥É¤¬ÊÑ¹¹¤µ¤ì¤Þ¤·¤¿" ."¡Ú" .$CONF["shop_name"]. "¡Û"		//¡¡¥µ¥Ö¥¸¥§¥¯¥È
+						, $toCustomerMail					//¡¡ËÜÊ¸
+						, $CONF["email03"]					//¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
+						, $CONF["shop_name"]				//¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
+						, $CONF["email03"]					//¡¡reply_to
+						, $CONF["email04"]					//¡¡return_path
+						, $CONF["email04"]					//  Errors_to
+
+														);
+	$objMail->setTo($email, $customer_name ." ÍÍ");
+	$objMail->sendMail();	
+	
+}
+
+
+?>
+
Index: branches/dev/html/mobile/entry/index.php
===================================================================
--- branches/dev/html/mobile/entry/index.php	(revision 11460)
+++ branches/dev/html/mobile/entry/index.php	(revision 11460)
@@ -0,0 +1,441 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'entry/index.tpl';		// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+		$this->tpl_title .= '²ñ°÷ÅÐÏ¿(1/3)';			//¡¡¥Ú¡¼¥¸¥¿¥¤¥È¥ë
+	}
+}
+
+//---- ¥Ú¡¼¥¸½é´üÀßÄê
+$CONF = sf_getBasisData();					// Å¹ÊÞ´ðËÜ¾ðÊó
+$objConn = new SC_DbConn();
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objDate = new SC_Date(START_BIRTH_YEAR, date("Y",strtotime("now")));
+$objPage->arrPref = $arrPref;
+$objPage->arrJob = $arrJob;
+$objPage->arrReminder = $arrReminder;
+$objPage->arrYear = $objDate->getYear('', 1950);	//¡¡ÆüÉÕ¥×¥ë¥À¥¦¥óÀßÄê
+$objPage->arrMonth = $objDate->getMonth();
+$objPage->arrDay = $objDate->getDay();
+
+// ¶õ¥á¡¼¥ë
+if (isset($_SESSION['mobile']['kara_mail_from'])) {
+	$objPage->tpl_kara_mail_from = $_POST['email'] = $_SESSION['mobile']['kara_mail_from'];
+} elseif (MOBILE_USE_KARA_MAIL) {
+	$token = gfPrepareKaraMail('entry/index.php');
+	if ($token !== false) {
+		$objPage->tpl_mainpage = 'entry/mail.tpl';
+		$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(¶õ¥á¡¼¥ë)';
+		$objPage->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'entry_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
+		$objPage->tpl_from_address = $CONF['email03'];
+	}
+}
+
+//SSLURLÈ½Äê
+if (SSLURL_CHECK == 1){
+	$ssl_url= sfRmDupSlash(SSL_URL.$_SERVER['REQUEST_URI']);
+	if (!ereg("^https://", $non_ssl_url)){
+		sfDispSiteError(URL_ERROR);
+	}
+}
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+//---- ÅÐÏ¿ÍÑ¥«¥é¥àÇÛÎó
+$arrRegistColumn = array(
+							 array(  "column" => "name01", "convert" => "aKV" ),
+							 array(  "column" => "name02", "convert" => "aKV" ),
+							 array(  "column" => "kana01", "convert" => "CKV" ),
+							 array(  "column" => "kana02", "convert" => "CKV" ),
+							 array(  "column" => "zip01", "convert" => "n" ),
+							 array(  "column" => "zip02", "convert" => "n" ),
+							 array(  "column" => "pref", "convert" => "n" ),
+							 array(  "column" => "addr01", "convert" => "aKV" ),
+							 array(  "column" => "addr02", "convert" => "aKV" ),
+							 array(  "column" => "email", "convert" => "a" ),
+							 array(  "column" => "email2", "convert" => "a" ),
+							 array(  "column" => "email_mobile", "convert" => "a" ),
+							 array(  "column" => "email_mobile2", "convert" => "a" ),
+							 array(  "column" => "tel01", "convert" => "n" ),
+							 array(  "column" => "tel02", "convert" => "n" ),
+							 array(  "column" => "tel03", "convert" => "n" ),
+							 array(  "column" => "fax01", "convert" => "n" ),
+							 array(  "column" => "fax02", "convert" => "n" ),
+							 array(  "column" => "fax03", "convert" => "n" ),
+							 array(  "column" => "sex", "convert" => "n" ),
+							 array(  "column" => "job", "convert" => "n" ),
+							 array(  "column" => "birth", "convert" => "n" ),
+							 array(  "column" => "reminder", "convert" => "n" ),
+							 array(  "column" => "reminder_answer", "convert" => "aKV"),
+							 array(  "column" => "password", "convert" => "a" ),
+							 array(  "column" => "password02", "convert" => "a" )
+						 );
+
+//---- ÅÐÏ¿½ü³°ÍÑ¥«¥é¥àÇÛÎó
+$arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
+
+if ($_SERVER["REQUEST_METHOD"] == "POST") {
+
+	//-- POST¥Ç¡¼¥¿¤Î°ú¤­·Ñ¤®
+	$objPage->arrForm = $_POST;
+	
+	if($objPage->arrForm['year'] == '----') {
+		$objPage->arrForm['year'] = '';
+	}
+	
+	$objPage->arrForm['email'] = strtolower($objPage->arrForm['email']);		// email¤Ï¤¹¤Ù¤Æ¾®Ê¸»ú¤Ç½èÍý
+	
+	//-- ÆþÎÏ¥Ç¡¼¥¿¤ÎÊÑ´¹
+	$objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn);
+
+	//--¡¡ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+	if ($_POST["mode"] == "set1") {
+		$objPage->arrErr = lfErrorCheck1($objPage->arrForm);
+		$objPage->tpl_mainpage = 'entry/index.tpl';
+		$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(1/3)';
+	} elseif ($_POST["mode"] == "set2") {
+		$objPage->arrErr = lfErrorCheck2($objPage->arrForm);
+		$objPage->tpl_mainpage = 'entry/set1.tpl';
+		$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(2/3)';
+	} else {
+		$objPage->arrErr = lfErrorCheck3($objPage->arrForm);
+		$objPage->tpl_mainpage = 'entry/set2.tpl';
+		$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(3/3)';
+	}
+
+	if ($objPage->arrErr || $_POST["mode"] == "return") {		// ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯
+		foreach($objPage->arrForm as $key => $val) {
+			$objPage->$key = $val;
+		}
+
+		//-- ¥Ç¡¼¥¿¤ÎÀßÄê
+		if ($_POST["mode"] == "set1") {
+			$checkVal = array("email", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+
+		} elseif ($_POST["mode"] == "set2") {
+			$checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+		} else {
+			$checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03");
+			foreach($objPage->arrForm as $key => $val) {
+				if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val;
+			}
+		}
+
+
+	} else {
+
+		//--¡¡¥Æ¥ó¥×¥ì¡¼¥ÈÀßÄê
+		if ($_POST["mode"] == "set1") {
+			$objPage->tpl_mainpage = 'entry/set1.tpl';
+			$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(2/3)';
+		} elseif ($_POST["mode"] == "set2") {
+			$objPage->tpl_mainpage = 'entry/set2.tpl';
+			$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(3/3)';
+
+			$address = lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']);
+			$objView->assign("pref", @$address[0]['state']);
+			$objView->assign("addr01", @$address[0]['city'] . @$address[0]['town']);
+		} elseif ($_POST["mode"] == "confirm") {
+			//¥Ñ¥¹¥ï¡¼¥ÉÉ½¼¨
+			$passlen = strlen($objPage->arrForm['password']);
+			$objPage->passlen = lfPassLen($passlen);
+			
+			//¥á¡¼¥ë¼õ¤±¼è¤ê
+			if ($objPage->arrForm['mail_flag'] = "ON") {
+				$objPage->arrForm['mail_flag']  = "2";
+			}
+
+			$objPage->tpl_mainpage = 'entry/confirm.tpl';
+			$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(³ÎÇ§¥Ú¡¼¥¸)';
+
+		}
+
+		//-- ¥Ç¡¼¥¿ÀßÄê
+		unset($objPage->list_data);
+		foreach($objPage->arrForm as $key => $val) {
+			if ($key != "mode" && $key != "subm") $objPage->list_data[ $key ] = $val;
+		}
+
+
+		//--¡¡²¾ÅÐÏ¿¤È´°Î»²èÌÌ
+		if ($_POST["mode"] == "complete") {
+			$objPage->uniqid = lfRegistData ($objPage->arrForm, $arrRegistColumn, $arrRejectRegistColumn);
+
+			// ¶õ¥á¡¼¥ë¤ò¼õ¿®ºÑ¤ß¤Î¾ì¹ç¤Ï¤¹¤°¤ËËÜÅÐÏ¿´°Î»¤Ë¤¹¤ë¡£
+			if (isset($_SESSION['mobile']['kara_mail_from'])) {
+				header("Location:" . gfAddSessionId(URL_DIR . "regist/index.php?mode=regist&id=" . $objPage->uniqid));
+				exit;
+			}
+
+			$objPage->tpl_mainpage = 'entry/complete.tpl';
+			$objPage->tpl_title = '²ñ°÷ÅÐÏ¿(´°Î»¥Ú¡¼¥¸)';
+
+			sfMobileSetExtSessionId('id', $objPage->uniqid, 'regist/index.php');
+
+			//¡¡²¾ÅÐÏ¿´°Î»¥á¡¼¥ëÁ÷¿®
+			$objPage->CONF = $CONF;
+			$objPage->to_name01 = $_POST['name01'];
+			$objPage->to_name02 = $_POST['name02'];
+			$objMailText = new SC_SiteView();
+			$objMailText->assignobj($objPage);
+			$subject = sfMakesubject('²ñ°÷ÅÐÏ¿¤Î¤´³ÎÇ§');
+			$toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
+			$objMail = new GC_SendMail();
+			$objMail->setItem(
+								''									//¡¡°¸Àè
+								, $subject							//¡¡¥µ¥Ö¥¸¥§¥¯¥È
+								, $toCustomerMail					//¡¡ËÜÊ¸
+								, $CONF["email03"]					//¡¡ÇÛÁ÷¸µ¥¢¥É¥ì¥¹
+								, $CONF["shop_name"]				//¡¡ÇÛÁ÷¸µ¡¡Ì¾Á°
+								, $CONF["email03"]					//¡¡reply_to
+								, $CONF["email04"]					//¡¡return_path
+								, $CONF["email04"]					//  Errors_to
+								, $CONF["email01"]					//  Bcc
+																);
+			// °¸Àè¤ÎÀßÄê
+			$name = $_POST["name01"] . $_POST["name02"] ." ÍÍ";
+			$objMail->setTo($_POST["email"], $name);
+			$objMail->sendMail();
+
+			// ´°Î»¥Ú¡¼¥¸¤Ë°ÜÆ°¤µ¤»¤ë¡£
+			header("Location:" . gfAddSessionId("./complete.php"));
+			exit;
+		}
+	}
+}
+
+if($objPage->year == '') {
+	$objPage->year = '----';
+}
+
+//----¡¡¥Ú¡¼¥¸É½¼¨
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//----------------------------------------------------------------------------------------------------------------------
+
+//---- function·²
+function lfRegistData ($array, $arrRegistColumn, $arrRejectRegistColumn) {
+	global $objConn;
+
+	// ²¾ÅÐÏ¿
+	foreach ($arrRegistColumn as $data) {
+		if (strlen($array[ $data["column"] ]) > 0 && ! in_array($data["column"], $arrRejectRegistColumn)) {
+			$arrRegist[ $data["column"] ] = $array[ $data["column"] ];
+		}
+	}
+		
+	// ÃÂÀ¸Æü¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if (strlen($array["year"]) > 0 ) {
+		$arrRegist["birth"] = $array["year"] ."/". $array["month"] ."/". $array["day"] ." 00:00:00";
+	}
+	
+	// ¥Ñ¥¹¥ï¡¼¥É¤Î°Å¹æ²½
+	$arrRegist["password"] = sha1($arrRegist["password"] . ":" . AUTH_MAGIC);
+	
+	$count = 1;
+	while ($count != 0) {
+		$uniqid = sfGetUniqRandomId("t");
+		$count = $objConn->getOne("SELECT COUNT(*) FROM dtb_customer WHERE secret_key = ?", array($uniqid));
+	}
+	
+	$arrRegist["secret_key"] = $uniqid;		// ²¾ÅÐÏ¿IDÈ¯¹Ô
+	$arrRegist["create_date"] = "now()"; 	// ºîÀ®Æü
+	$arrRegist["update_date"] = "now()"; 	// ¹¹¿·Æü
+	$arrRegist["first_buy_date"] = "";	 	// ºÇ½é¤Î¹ØÆþÆü
+	
+	// ·ÈÂÓ¥á¡¼¥ë¥¢¥É¥ì¥¹
+	$arrRegist['email_mobile'] = $arrRegist['email'];
+
+	//-- ²¾ÅÐÏ¿¼Â¹Ô
+	$objConn->query("BEGIN");
+
+	$objQuery = new SC_Query();
+	$objQuery->insert("dtb_customer", $arrRegist);
+
+	//--¡¡Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¤«¤ÎÈ½Äê
+	$sql = "SELECT count(*) FROM dtb_customer_mail WHERE email = ?";
+	$mailResult = $objConn->getOne($sql, array($arrRegist["email"]));
+
+	//--¡¡¥á¥ë¥Þ¥¬²¾ÅÐÏ¿¼Â¹Ô
+	$arrRegistMail["email"] = $arrRegist["email"];	
+	if ($array["mail_flag"] == 1) {
+		$arrRegistMail["mail_flag"] = 4; 
+	} elseif ($array["mail_flag"] == 2) {
+		$arrRegistMail["mail_flag"] = 5; 
+	} else {
+		$arrRegistMail["mail_flag"] = 6; 
+	}
+	$arrRegistMail["update_date"] = "now()";
+	
+	// Èó²ñ°÷¤Ç¥á¥ë¥Þ¥¬ÅÐÏ¿¤·¤Æ¤¤¤ë¾ì¹ç
+	if ($mailResult == 1) {		
+		$objQuery->update("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($arrRegistMail["email"]). "'");			
+	} else {				//¡¡¿·µ¬ÅÐÏ¿¤Î¾ì¹ç
+		$arrRegistMail["create_date"] = "now()";
+		$objQuery->insert("dtb_customer_mail", $arrRegistMail);		
+	}
+	$objConn->query("COMMIT");
+
+	return $uniqid;
+}
+
+//----¡¡¼èÆÀÊ¸»úÎó¤ÎÊÑ´¹
+function lfConvertParam($array, $arrRegistColumn) {
+	/*
+	 *	Ê¸»úÎó¤ÎÊÑ´¹
+	 *	K :  ¡ÖÈ¾³Ñ(ÊÝ¶¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹
+	 *	C :  ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹
+	 *	V :  ÂùÅÀÉÕ¤­¤ÎÊ¸»ú¤ò°ìÊ¸»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍÑ¤·¤Þ¤¹	
+	 *	n :  ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖÈ¾³Ñ(ÊÝ¶¸)¡×¤ËÊÑ´¹
+	 *  a :  Á´³Ñ±Ñ¿ô»ú¤òÈ¾³Ñ±Ñ¿ô»ú¤ËÊÑ´¹¤¹¤ë
+	 */
+	// ¥«¥é¥àÌ¾¤È¥³¥ó¥Ð¡¼¥È¾ðÊó
+	foreach ($arrRegistColumn as $data) {
+		$arrConvList[ $data["column"] ] = $data["convert"];
+	}
+	// Ê¸»úÊÑ´¹
+	foreach ($arrConvList as $key => $val) {
+		// POST¤µ¤ì¤Æ¤­¤¿ÃÍ¤Î¤ßÊÑ´¹¤¹¤ë¡£
+		if(strlen(($array[$key])) > 0) {
+			$array[$key] = mb_convert_kana($array[$key] ,$val);
+		}
+	}
+	return $array;
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck1($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÀ«¡Ë", 'name01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÌ¾Á°¡ÊÌ¾¡Ë", 'name02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥»¥¤¡Ë", 'kana01', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array("¥Õ¥ê¥¬¥Ê¡Ê¥á¥¤¡Ë", 'kana02', STEXT_LEN), array("EXIST_CHECK", "NO_SPTAB", "SPTAB_CHECK" ,"MAX_LENGTH_CHECK", "KANA_CHECK"));
+	$objErr->doFunc(array('¥á¡¼¥ë¥¢¥É¥ì¥¹', "email", MTEXT_LEN) ,array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK", "SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
+
+	//¸½²ñ°÷¤ÎÈ½Äê ¢ª¡¡¸½²ñ°÷¤â¤·¤¯¤Ï²¾ÅÐÏ¿Ãæ¤Ï¡¢¥á¥¢¥É°ì°Õ¤¬Á°Äó¤Ë¤Ê¤Ã¤Æ¤ë¤Î¤ÇÆ±¤¸¥á¥¢¥É¤ÇÅÐÏ¿ÉÔ²Ä
+	if (strlen($array["email"]) > 0) {
+		$objQuery = new SC_Query();
+		$arrRet = $objQuery->select("email, update_date, del_flg", "dtb_customer","email ILIKE ? OR email_mobile ILIKE ? ORDER BY del_flg", array($array["email"], $array["email"]));
+				
+		if(count($arrRet) > 0) {
+			if($arrRet[0]['del_flg'] != '1') {
+				// ²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+				$objErr->arrErr["email"] .= "¢¨ ¤¹¤Ç¤Ë²ñ°÷ÅÐÏ¿¤Ç»ÈÍÑ¤µ¤ì¤Æ¤¤¤ë¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤¹¡£<br />";
+			} else {
+				// Âà²ñ¤·¤¿²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+				$leave_time = sfDBDatetoTime($arrRet[0]['update_date']);
+				$now_time = time();
+				$pass_time = $now_time - $leave_time;
+				// Âà²ñ¤«¤é²¿»þ´Ö-·Ð²á¤·¤Æ¤¤¤ë¤«È½Äê¤¹¤ë¡£
+				$limit_time = ENTRY_LIMIT_HOUR * 3600;						
+				if($pass_time < $limit_time) {
+					$objErr->arrErr["email"] .= "¢¨ Âà²ñ¤«¤é°ìÄê´ü´Ö¤Î´Ö¤Ï¡¢Æ±¤¸¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò»ÈÍÑ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£<br />";
+				}
+			}
+		}
+	}
+
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É", 'password', PASSWORD_LEN1, PASSWORD_LEN2), array("EXIST_CHECK", "SPTAB_CHECK" ,"ALNUM_CHECK", "NUM_RANGE_CHECK"));
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È ¼ÁÌä", "reminder") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("¥Ñ¥¹¥ï¡¼¥É¤òËº¤ì¤¿¤È¤­¤Î¥Ò¥ó¥È Åú¤¨", "reminder_answer", STEXT_LEN) ,array("EXIST_CHECK","SPTAB_CHECK" , "MAX_LENGTH_CHECK"));
+	
+	return $objErr->arrErr;
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck2($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ1", "zip01", ZIP01_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK"));
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ2", "zip02", ZIP02_LEN ) ,array("EXIST_CHECK", "SPTAB_CHECK" ,"NUM_CHECK", "NUM_COUNT_CHECK")); 
+	$objErr->doFunc(array("Í¹ÊØÈÖ¹æ", "zip01", "zip02"), array("ALL_EXIST_CHECK"));
+
+	$objErr->doFunc(array("¤´À­ÊÌ", "sex") ,array("SELECT_CHECK", "NUM_CHECK")); 
+	$objErr->doFunc(array("À¸Ç¯·îÆü", "year", "month", "day"), array("SELECT_CHECK", "CHECK_DATE"));
+	
+	return $objErr->arrErr;
+}
+
+//---- ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯
+function lfErrorCheck3($array) {
+
+	global $objConn;
+	$objErr = new SC_CheckError($array);
+	
+	$objErr->doFunc(array("ÅÔÆ»ÉÜ¸©", 'pref'), array("SELECT_CHECK","NUM_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê1", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤´½»½ê2", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK" ,"MAX_LENGTH_CHECK"));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ1", 'tel01'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ2", 'tel02'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ3", 'tel03'), array("EXIST_CHECK","SPTAB_CHECK" ));
+	$objErr->doFunc(array("¤ªÅÅÏÃÈÖ¹æ", "tel01", "tel02", "tel03",TEL_ITEM_LEN) ,array("TEL_CHECK"));
+	
+	return $objErr->arrErr;
+}
+
+//³ÎÇ§¥Ú¡¼¥¸ÍÑ¥Ñ¥¹¥ï¡¼¥ÉÉ½¼¨ÍÑ
+
+function lfPassLen($passlen){
+	$ret = "";
+	for ($i=0;$i<$passlen;true){
+	$ret.="*";
+	$i++;
+	}
+	return $ret;
+}
+
+
+// Í¹ÊØÈÖ¹æ¤«¤é½»½ê¤Î¼èÆÀ
+function lfGetAddress($zipcode) {
+	global $arrPref;
+
+	$conn = new SC_DBconn(ZIP_DSN);
+
+	// Í¹ÊØÈÖ¹æ¸¡º÷Ê¸ºîÀ®
+	$zipcode = mb_convert_kana($zipcode ,"n");
+	$sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?";
+
+	$data_list = $conn->getAll($sqlse, array($zipcode));
+
+	// ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÈÃÍ¤òÈ¿Å¾¤µ¤»¤ë¡£
+	$arrREV_PREF = array_flip($arrPref);
+
+	/*
+		ÁíÌ³¾Ê¤«¤é¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Ç¡¼¥¿¤ò¤½¤Î¤Þ¤Þ¥¤¥ó¥Ý¡¼¥È¤¹¤ë¤È
+		°Ê²¼¤Î¤è¤¦¤ÊÊ¸»úÎó¤¬Æþ¤Ã¤Æ¤¤¤ë¤Î¤Ç	ÂÐºö¤¹¤ë¡£
+		¡¦¡Ê£±¡¦£±£¹ÃúÌÜ¡Ë
+		¡¦°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç
+	*/
+	$town =  $data_list[0]['town'];
+	$town = ereg_replace("¡Ê.*¡Ë$","",$town);
+	$town = ereg_replace("°Ê²¼¤Ë·ÇºÜ¤¬¤Ê¤¤¾ì¹ç","",$town);
+	$data_list[0]['town'] = $town;
+	$data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']];
+
+	return $data_list;
+}
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/entry/complete.php
===================================================================
--- branches/dev/html/mobile/entry/complete.php	(revision 11460)
+++ branches/dev/html/mobile/entry/complete.php	(revision 11460)
@@ -0,0 +1,29 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_css = '/css/layout/entry/complete.css';	// ¥á¥¤¥óCSS¥Ñ¥¹
+		$this->tpl_mainpage = 'entry/complete.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: branches/dev/html/mobile/entry/new.php
===================================================================
--- branches/dev/html/mobile/entry/new.php	(revision 11460)
+++ branches/dev/html/mobile/entry/new.php	(revision 11460)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * ¿·µ¬ÅÐÏ¿
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		/** É¬¤ºÊÑ¹¹¤¹¤ë **/
+		$this->tpl_mainpage = 'entry/new.tpl';	// ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
+	}
+}
+
+$objPage = new LC_Page();
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objView = new SC_SiteView();
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/entry/kiyaku.php
===================================================================
--- branches/dev/html/mobile/entry/kiyaku.php	(revision 11460)
+++ branches/dev/html/mobile/entry/kiyaku.php	(revision 11460)
@@ -0,0 +1,50 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+require_once("../require.php");
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'entry/kiyaku.tpl';
+		$this->tpl_title="¤´ÍøÍÑµ¬Ìó";
+	}
+}
+
+$objPage = new LC_Page();
+$objView = new SC_SiteView();
+$objCustomer = new SC_Customer();
+
+$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
+$next = $offset;
+
+// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
+$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
+
+// µ¬ÌóÆâÍÆ¤Î¼èÆÀ
+$objQuery = new SC_Query();
+$count = $objQuery->count("dtb_kiyaku", "del_flg <> 1");
+$objQuery->setorder("rank DESC");
+$objQuery->setlimitoffset(1, $offset);
+$arrRet = $objQuery->select("kiyaku_title, kiyaku_text", "dtb_kiyaku", "del_flg <> 1");
+
+if($count > $offset + 1){
+	$next++;
+} else {
+	$next = -1;
+}
+
+$max = count($arrRet);
+$objPage->tpl_kiyaku_text = "";
+for ($i = 0; $i < $max; $i++) {
+	$objPage->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_title'] . "\n\n"; 
+	$objPage->tpl_kiyaku_text.=$arrRet[$i]['kiyaku_text'] . "\n\n"; 
+}
+
+$objView->assign("offset", $next);
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+//--------------------------------------------------------------------------------------------------------------------------
+?>
Index: branches/dev/html/mobile/entry/email_mobile.php
===================================================================
--- branches/dev/html/mobile/entry/email_mobile.php	(revision 11460)
+++ branches/dev/html/mobile/entry/email_mobile.php	(revision 11460)
@@ -0,0 +1,110 @@
+<?php
+/**
+ * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/·ÈÂÓ¥á¡¼¥ëÅÐÏ¿
+ */
+
+require_once('../require.php');
+
+class LC_Page {
+	function LC_Page() {
+		$this->tpl_mainpage = 'entry/email_mobile.tpl';
+		$this->tpl_title = '·ÈÂÓ¥á¡¼¥ëÅÐÏ¿';
+		/*
+		 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;
+$objFormParam = new SC_FormParam;
+
+if (isset($_SESSION['mobile']['kara_mail_from'])) {
+	$_SERVER['REQUEST_METHOD'] = 'POST';
+	$_POST['email_mobile'] = $_SESSION['mobile']['kara_mail_from'];
+}
+
+lfInitParam($objFormParam);
+
+if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+	$objFormParam->setParam($_POST);
+	$objFormParam->convParam();
+	$objPage->arrErr = lfCheckError($objFormParam, $objCustomer);
+
+	if (empty($arrRet)) {
+		lfRegister($objFormParam, $objCustomer);
+		$objPage->tpl_mainpage = 'entry/email_mobile_complete.tpl';
+		$objPage->tpl_title = '·ÈÂÓ¥á¡¼¥ëÅÐÏ¿´°Î»';
+	}
+}
+
+// ¶õ¥á¡¼¥ëÍÑ¤Î¥È¡¼¥¯¥ó¤òºîÀ®¤¹¤ë¡£
+if (MOBILE_USE_KARA_MAIL) {
+	$token = gfPrepareKaraMail('entry/email_mobile.php');
+	if ($token !== false) {
+		$objPage->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'entry_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
+	}
+}
+
+$objPage->tpl_name = $objCustomer->getValue('name01');
+$objPage->arrForm = $objFormParam->getFormParamList();
+
+$objView->assignobj($objPage);
+$objView->display(SITE_FRAME);
+
+//-----------------------------------------------------------------------------------------------------------------------------------
+
+function lfInitParam(&$objFormParam) {
+	$objFormParam->addParam('¥á¡¼¥ë¥¢¥É¥ì¥¹', 'email_mobile', MTEXT_LEN, 'a',
+		array('NO_SPTAB', 'EXIST_CHECK', 'MAX_LENGTH_CHECK', 'CHANGE_LOWER', 'EMAIL_CHAR_CHECK', 'MOBILE_EMAIL_CHECK'));
+}
+
+function lfCheckError(&$objFormParam, &$objCustomer) {
+	$arrRet = $objFormParam->getHashArray();
+	$objErr = new SC_CheckError($arrRet);
+	$objErr->arrErr = $objFormParam->checkError();
+
+	if (count($objErr->arrErr) > 0) {
+		return $objErr->arrErr;
+	}
+
+	$email_mobile = $objFormParam->getValue('email_mobile');
+	$customer_id = $objCustomer->getValue('customer_id');
+	$objQuery = new SC_Query();
+	$arrRet = $objQuery->select('email, email_mobile, update_date, del_flg', 'dtb_customer', '(email ILIKE ? OR email_mobile ILIKE ?) AND customer_id <> ? ORDER BY del_flg', array($email_mobile, $email_mobile, $customer_id));
+
+	if (count($arrRet) > 0) {
+		if ($arrRet[0]['del_flg'] != '1') {
+			// ²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+			$objErr->arrErr['email_mobile'] .= '¢¨ ¤¹¤Ç¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤¹¡£<br>';
+		} else {
+			// Âà²ñ¤·¤¿²ñ°÷¤Ç¤¢¤ë¾ì¹ç
+			$leave_time = sfDBDatetoTime($arrRet[0]['update_date']);
+			$now_time = time();
+			$pass_time = $now_time - $leave_time;
+			// Âà²ñ¤«¤é²¿»þ´Ö-·Ð²á¤·¤Æ¤¤¤ë¤«È½Äê¤¹¤ë¡£
+			$limit_time = ENTRY_LIMIT_HOUR * 3600;
+			if ($pass_time < $limit_time) {
+				$objErr->arrErr['email_mobile'] .= '¢¨ Âà²ñ¤«¤é°ìÄê´ü´Ö¤Î´Ö¤Ï¡¢Æ±¤¸¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò»ÈÍÑ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£<br>';
+			}
+		}
+	}
+
+	return $objErr->arrErr;
+}
+
+function lfRegister(&$objFormParam, &$objCustomer)
+{
+	$customer_id = $objCustomer->getValue('customer_id');
+	$email_mobile = $objFormParam->getValue('email_mobile');
+
+	$objQuery = new SC_Query();
+	$objQuery->update('dtb_customer', array('email_mobile' => $email_mobile), 'customer_id = ?', array($customer_id));
+
+	$objCustomer->setValue('email_mobile', $email_mobile);
+}
+?>
Index: branches/dev/html/mobile/frontparts/bloc/news.php
===================================================================
--- branches/dev/html/mobile/frontparts/bloc/news.php	(revision 11460)
+++ branches/dev/html/mobile/frontparts/bloc/news.php	(revision 11460)
@@ -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: branches/dev/html/mobile/frontparts/bloc/category.php
===================================================================
--- branches/dev/html/mobile/frontparts/bloc/category.php	(revision 11460)
+++ branches/dev/html/mobile/frontparts/bloc/category.php	(revision 11460)
@@ -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: branches/dev/html/mobile/frontparts/bloc/best5.php
===================================================================
--- branches/dev/html/mobile/frontparts/bloc/best5.php	(revision 11460)
+++ branches/dev/html/mobile/frontparts/bloc/best5.php	(revision 11460)
@@ -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: branches/dev/html/mobile/require.php
===================================================================
--- branches/dev/html/mobile/require.php	(revision 11460)
+++ branches/dev/html/mobile/require.php	(revision 11460)
@@ -0,0 +1,39 @@
+<?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/class/GC_MobileImage.php");
+require_once($include_dir . "/../../data/include/page_layout.inc");
+
+// ¥¢¥Ã¥×¥Ç¡¼¥È¤Ç¼èÆÀ¤·¤¿PHP¤òÆÉ¤ß½Ð¤¹
+sfLoadUpdateModule();
+
+// ¥â¥Ð¥¤¥ë¥µ¥¤¥ÈÍÑ¤Î½é´ü½èÍý¤ò¼Â¹Ô¤¹¤ë¡£
+if (!defined('SKIP_MOBILE_INIT')) {
+	sfMobileInit();
+}
+?>
Index: branches/dev/html/mobile/products/list.php
===================================================================
--- branches/dev/html/mobile/products/list.php	(revision 11460)
+++ branches/dev/html/mobile/products/list.php	(revision 11460)
@@ -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: branches/dev/html/mobile/products/detail.php
===================================================================
--- branches/dev/html/mobile/products/detail.php	(revision 11460)
+++ branches/dev/html/mobile/products/detail.php	(revision 11460)
@@ -0,0 +1,482 @@
+<?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 = "products/select_find1.tpl";
+		break;
+	}
+
+case 'select2':
+	$objPage->arrErr = lfCheckError();
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find1 and $objPage->arrErr['classcategory_id1']) {
+		// template¤ÎÊÑ¹¹
+		$objPage->tpl_mainpage = "products/select_find1.tpl";
+		break;
+	}
+
+	// µ¬³Ê2¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find2) {
+		$objPage->arrErr = array();
+
+		$objPage->tpl_mainpage = "products/select_find2.tpl";
+		break;
+	}
+
+case 'selectItem':
+	$objPage->arrErr = lfCheckError();
+
+	// µ¬³Ê1¤¬ÀßÄê¤µ¤ì¤Æ¤¤¤ë¾ì¹ç
+	if($objPage->tpl_classcat_find2 and $objPage->arrErr['classcategory_id2']) {
+		// template¤ÎÊÑ¹¹
+		$objPage->tpl_mainpage = "products/select_find2.tpl";
+		break;
+	}
+	// ¾¦ÉÊ¿ô¤ÎÁªÂò¤ò¹Ô¤¦
+	$objPage->tpl_mainpage = "products/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: " . gfAddSessionId(URL_CART_TOP));
+
+		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[$classcat_id2] = $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: branches/dev/html/mobile/products/search.php
===================================================================
--- branches/dev/html/mobile/products/search.php	(revision 11460)
+++ branches/dev/html/mobile/products/search.php	(revision 11460)
@@ -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: branches/dev/html/mobile/products/category_list.php
===================================================================
--- branches/dev/html/mobile/products/category_list.php	(revision 11460)
+++ branches/dev/html/mobile/products/category_list.php	(revision 11460)
@@ -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: branches/dev/html/mobile/.htaccess
===================================================================
--- branches/dev/html/mobile/.htaccess	(revision 11460)
+++ branches/dev/html/mobile/.htaccess	(revision 11460)
@@ -0,0 +1,5 @@
+php_flag mbstring.encoding_translation 0
+php_value output_handler null
+php_value variables_order EGPS
+php_flag session.auto_start 0
+php_flag session.use_trans_sid 1
