Changeset 10422 for temp/trunk
- Timestamp:
- 2006/12/07 18:15:07 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/admin/design/template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/admin/design/template.php
r10252 r10422 68 68 69 69 // ÅÐÏ¿¤ò²¡¤µ¤ì¤¿¤Ð¤¢¤Ë¤ÏDB¤Ø¥Ç¡¼¥¿¤ò¹¹¿·¤Ë¹Ô¤¯ 70 if ($_POST['mode'] == "confirm"){ 70 switch($_POST['mode']) { 71 case 'confirm': 71 72 // DB¤Ø¥Ç¡¼¥¿¹¹¿· 72 73 lfUpdData(); … … 77 78 // ´°Î»¥á¥Ã¥»¡¼¥¸ 78 79 $objPage->tpl_onload="alert('ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');"; 79 80 break; 81 case 'download': 82 lfDownloadTemplate($_POST['check_template']); 83 break; 84 default: 85 break; 80 86 } 81 87 … … 311 317 } 312 318 313 // ¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤¹¤ë 319 /************************************************************************************************************** 320 * ´Ø¿ô̾ ¡§lfDownloadTemplate 321 * ½èÍýÆâÍÆ ¡§¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë°µ½Ì¤·¤Æ¥À¥¦¥ó¥í¡¼¥É¤¹¤ë 322 * °ú¿ô1 ¡§¥Æ¥ó¥×¥ì¡¼¥È¥³¡¼¥É 323 * Ìá¤êÃÍ ¡§¤Ê¤· 324 **************************************************************************************************************/ 325 function lfDownloadTemplate($template_code){ 326 $filename = $template_code. ".tar.gz"; 327 $dl_file = USER_TEMPLATE_PATH.$filename; 328 329 // ¥Õ¥¡¥¤¥ë¤Î°µ½Ì 330 $tar = new Archive_Tar($dl_file.".tar.gz", TRUE); 331 //bkup¥Õ¥©¥ë¥À¤Ë°Üư¤¹¤ë 332 chdir(USER_TEMPLATE_PATH); 333 //°µ½Ì¤ò¤ª¤³¤Ê¤¦ 334 $zip = $tar->create("./" . $template_code . "/"); 335 336 // ¥À¥¦¥ó¥í¡¼¥É³«»Ï 337 Header("Content-disposition: attachment; filename=${dl_file}"); 338 Header("Content-type: application/octet-stream; name=${dl_file}"); 339 header("Content-Length: " .filesize($dl_file)); 340 readfile ($dl_file); 341 // °µ½Ì¥Õ¥¡¥¤¥ëºï½ü 342 unlink($dl_file); 343 exit(); 344 } 345 346 /************************************************************************************************************** 347 * ´Ø¿ô̾ ¡§lfFolderCopy 348 * ½èÍýÆâÍÆ ¡§¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤¹¤ë 349 * °ú¿ô1 ¡§¥³¥Ô¡¼¸µ¥Ñ¥¹ 350 * °ú¿ô2¡¡¡¡¡§¥³¥Ô¡¼Àè¥Ñ¥¹ 351 * Ìá¤êÃÍ ¡§¤Ê¤· 352 **************************************************************************************************************/ 314 353 function lfFolderCopy($taget_path, $save_path){ 315 354
Note: See TracChangeset
for help on using the changeset viewer.
