Ignore:
Timestamp:
2007/09/20 19:57:01 (15 years ago)
Author:
adachi
Message:

削除機能追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-templates/html/admin/design/template.php

    r15775 r15793  
    99require_once DATA_PATH . "module/SearchReplace.php"; 
    1010require_once DATA_PATH . "include/file_manager.inc"; 
    11 sfPrintR($_POST); 
    1211 
    1312// ǧ¾Ú²ÄÈݤÎȽÄê 
     
    7473 
    7574    $template_code = $objForm->getValue('template_code_delete'); 
     75    if ($template_code == lfGetNowTemplate()) { 
     76        $objPage->tpl_onload = "alert('ÁªÂòÃæ¤Î¥Æ¥ó¥×¥ì¡¼¥È¤Ïºï½ü½ÐÍè¤Þ¤»¤ó');"; 
     77        break; 
     78    } 
    7679 
    77     //TODO¡¡dtb_baseinfo¤Îtoptpl¤ò¥¯¥ê¥¢ 
    78     //TODO¡¡dtb_templates¤«¤éºï½ü 
    79     //TODO¡¡use_data/packageÆâ¤Î³ºÅö¥Õ¥¡¥¤¥ë¤òºï½ü 
     80    lfDeleteTemplate($template_code); 
    8081    break; 
    8182 
     
    127128    return $objForm; 
    128129} 
     130 
    129131/** 
    130132 * ¸½ºßŬÍѤ·¤Æ¤¤¤ë¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò¼èÆÀ¤¹¤ë. 
     
    175177    return $arrRet; 
    176178} 
     179 
     180function lfDeleteTemplate($template_code) { 
     181    $objQuery = new SC_Query(); 
     182    $objQuery->delete('dtb_templates', 'template_code = ?', array($template_code)); 
     183 
     184    sfDelFile(TPL_PKG_PATH . $template_code); 
     185} 
    177186?> 
Note: See TracChangeset for help on using the changeset viewer.