Index: temp/trunk/html/admin/design/template.php
===================================================================
--- temp/trunk/html/admin/design/template.php	(revision 3326)
+++ temp/trunk/html/admin/design/template.php	(revision 3327)
@@ -272,19 +272,5 @@
 		copy($taget_tpl_path . "/detail.tpl", $save_tpl_path . "detail.tpl");
 		
-		// MYPAGE¤Î¥Õ¥¡¥¤¥ë¤ò¼èÆÀ¤¹¤ë
-		$arrMypage=glob($taget_tpl_path."mypage/" . "*" );
-		
-		// ¥Õ¥©¥ë¥À¤¬¤Ê¤±¤ì¤ÐºîÀ®¤¹¤ë
-		if(!is_dir($save_tpl_path."mypage")){
-			mkdir($save_tpl_path."mypage");
-		}
-		
-		foreach($arrMypage as $key => $val){
-			$matches = array();
-			mb_ereg("^(.*[\/])(.*)",$val, $matches);
-			$data=$matches[2];
-			
-			copy($val, $save_tpl_path . "mypage/" . $data);
-		}
+		lfFolderCopy($taget_tpl_path."mypage/", $save_tpl_path."mypage/");
 
 		// ¥Ö¥í¥Ã¥¯¥Ç¡¼¥¿¤Î¥³¥Ô¡¼
@@ -294,2 +280,22 @@
 	}
 }
+
+// ¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤¹¤ë
+function lfFolderCopy($taget_path, $save_path){
+
+	// ¥Õ¥©¥ë¥ÀÆâ¤Î¥Õ¥¡¥¤¥ë¤ò¼èÆÀ¤¹¤ë
+	$arrMypage=glob($taget_path . "*" );
+	
+	// ¥Õ¥©¥ë¥À¤¬¤Ê¤±¤ì¤ÐºîÀ®¤¹¤ë
+	if(!is_dir($save_path)){
+		mkdir($save_path);
+	}
+
+	// ¥Õ¥©¥ë¥ÀÆâ¤òÁ´¤Æ¥³¥Ô¡¼
+	foreach($arrMypage as $key => $val){
+		$matches = array();
+		mb_ereg("^(.*[\/])(.*)",$val, $matches);
+		$data=$matches[2];
+		copy($val, $save_path . $data);
+	}
+}
