Changeset 15646


Ignore:
Timestamp:
2007/09/07 16:25:31 (13 years ago)
Author:
nanasess
Message:

クラス化に伴う修正

Location:
branches/feature-module-update
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/html/admin/mail/template.php

    r15532 r15646  
    55 * http://www.lockon.co.jp/ 
    66 */ 
    7 require_once("../require.php"); 
    87 
    9 class LC_Page { 
    10     var $arrSession; 
    11     var $list_data; 
    12     var $arrMagazineType; 
    13      
    14     function LC_Page() { 
    15         $this->tpl_mainpage = 'mail/template.tpl'; 
    16         $this->tpl_mainno = 'mail'; 
    17         $this->tpl_subnavi = 'mail/subnavi.tpl'; 
    18         $this->tpl_subno = "template"; 
    19         $this->tpl_subtitle = 'テンプレート設定'; 
    20     } 
    21 } 
     8// {{{ requires 
     9require_once("../../require.php"); 
     10require_once(CLASS_PATH . "page_extends/admin/mail/LC_Page_Admin_Mail_Template_Ex.php"); 
    2211 
    23 $conn = new SC_DBConn(); 
    24 $objPage = new LC_Page(); 
    25 $objView = new SC_AdminView(); 
    26 $objSess = new SC_Session(); 
     12// }}} 
     13// {{{ generate page 
    2714 
    28 // 認証可否の判定 
    29 sfIsSuccess($objSess); 
    30  
    31 if ( $_GET['mode'] == "delete" && sfCheckNumLength($_GET['id'])===true ){ 
    32  
    33     // メール担当の画像があれば削除しておく 
    34     $sql = "SELECT charge_image FROM dtb_mailmaga_template WHERE template_id = ?"; 
    35     $result = $conn->getOne($sql, array($_GET["id"])); 
    36     if (strlen($result) > 0) { 
    37         @unlink(IMAGE_SAVE_DIR. $result); 
    38     } 
    39      
    40     // 登録削除 
    41     $sql = "UPDATE dtb_mailmaga_template SET del_flg = 1 WHERE template_id = ?"; 
    42     $conn->query($sql, array($_GET['id'])); 
    43     sfReload(); 
    44 } 
    45  
    46  
    47 $sql = "SELECT *, (substring(create_date, 1, 19)) as disp_date FROM dtb_mailmaga_template WHERE del_flg = 0 ORDER BY create_date DESC"; 
    48 $objPage->list_data = $list_data = $conn->getAll($sql); 
    49 $objPage->arrMagazineType = $arrMagazineTypeAll; 
    50  
    51  
    52 $objView->assignobj($objPage); 
    53 $objView->display(MAIN_FRAME); 
     15$objPage = new LC_Page_Admin_Mail_Template_Ex(); 
     16$objPage->init(); 
     17$objPage->process(); 
     18register_shutdown_function(array($objPage, "destroy")); 
    5419?> 
Note: See TracChangeset for help on using the changeset viewer.