Index: temp/trunk/html/admin/design/template.php
===================================================================
--- temp/trunk/html/admin/design/template.php	(revision 3253)
+++ temp/trunk/html/admin/design/template.php	(revision 3259)
@@ -26,14 +26,8 @@
 $objView = new SC_AdminView();
 $objSess = new SC_Session();
-$arrTemplate = array();
 
 // Ç§¾Ú²ÄÈÝ¤ÎÈ½Äê
 $objSess = new SC_Session();
 sfIsSuccess($objSess);
-
-// ¥Æ¥ó¥×¥ì¡¼¥È¥Ç¡¼¥¿¤ò¼èÆÀ¤¹¤ë
-$objQuery = new SC_Query();
-$sql = "SELECT template_code,template_name,file_path FROM dtb_template ORDER BY create_date DESC";
-$arrTemplate = $objQuery->getall($sql);
 
 // GET¤ÎÃÍ¤ò¼õ¤±¼è¤ë
@@ -96,5 +90,4 @@
 function lfgetTemplate(){
 	global $objPage;
-	global $arrTemplate;
 	$filepath = "/test/kakinaka/";
 	
@@ -106,4 +99,9 @@
 	// DB¤«¤é¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¥Ç¡¼¥¿¼èÆÀ
 	$arrDefcheck = lfgetTemplaeBaseData();
+	
+	// ¥Æ¥ó¥×¥ì¡¼¥È¥Ç¡¼¥¿¤ò¼èÆÀ¤¹¤ë
+	$objQuery = new SC_Query();
+	$sql = "SELECT template_code,template_name,file_path FROM dtb_template ORDER BY create_date DESC";
+	$arrTemplate = $objQuery->getall($sql);
 	
 	switch($objPage->tpl_subno_template) {
@@ -223,5 +221,4 @@
 function lfChangeTemplate(){
 	global $objPage;
-	global $arrTemplate;
 	$tpl_path = "test/kakinaka/";
 	
@@ -230,4 +227,9 @@
 	
 	$chk_tpl = $_POST['check_template'];
+	
+	// ¥Æ¥ó¥×¥ì¡¼¥È¥Ç¡¼¥¿¤ò¼èÆÀ¤¹¤ë
+	$objQuery = new SC_Query();
+	$sql = "SELECT template_code,template_name,file_path FROM dtb_template WHERE template_code = ?";
+	$arrTemplate = $objQuery->getall($sql, array($chk_tpl));	
 	
 	switch($objPage->tpl_subno_template) {
@@ -260,5 +262,5 @@
 	}
 	
-	sfprintr($arrTemplate);
+	sfprintr($chk_tpl);
 	
 /*	
