Ignore:
Timestamp:
2007/05/30 10:22:15 (19 years ago)
Author:
nakanishi
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/admin/basis/preview.php

    r13726 r13752  
    1313 
    1414    function LC_Page() { 
    15         $this->tpl_mainpage = 'mail/preview.tpl'; 
     15        $this->tpl_mainpage = 'basis/preview.tpl'; 
    1616    } 
    1717} 
     
    2828 
    2929 
    30 if ( $_POST['body'] ){ 
     30if ( $_POST['preview'] ){ 
    3131    $objPage->body = $_POST['body']; 
    32  
    33 // HTML¥á¡¼¥ë¥Æ¥ó¥×¥ì¡¼¥È¤Î¥×¥ì¥Ó¥å¡¼ 
    34 } elseif ($_REQUEST["method"] == "template" && sfCheckNumLength($_REQUEST['id'])) { 
    35  
    36     $sql = "SELECT * FROM dtb_mailmaga_template WHERE template_id = ?"; 
    37     $result = $conn->getAll($sql, array($_REQUEST["id"])); 
    38     $objPage->list_data = $result[0]; 
    39      
    40     //¥á¡¼¥ëôÅö¼Ì¿¿¤Îɽ¼¨ 
    41     $objUpFile = new SC_UploadFile(IMAGE_TEMP_URL, IMAGE_SAVE_URL); 
    42     $objUpFile->addFile("¥á¡¼¥ëôÅö¼Ì¿¿", 'charge_image', array('jpg'), IMAGE_SIZE, true, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); 
    43     $objUpFile->setDBFileList($objPage->list_data); 
    44     // FormÍÑÇÛÎó¤òÅϤ¹¡£ 
    45     $objPage->arrFile = $objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL); 
    46      
    47     // ¥á¥¤¥ó¾¦ÉʤξðÊó¼èÆÀ 
    48     $sql = "SELECT name, main_image, point_rate, deliv_fee, price01_min, price01_max, price02_min, price02_max FROM vw_products_allclass AS allcls WHERE product_id = ?"; 
    49     $main = $conn->getAll($sql, array($objPage->list_data["main_product_id"])); 
    50     $objPage->list_data["main"] = $main[0]; 
    51  
    52     // ¥µ¥Ö¾¦ÉʤξðÊó¼èÆÀ 
    53     $sql = "SELECT product_id, name, main_list_image, price01_min, price01_max, price02_min, price02_max FROM vw_products_allclass WHERE product_id = ?"; 
    54     $k = 0; 
    55     $l = 0; 
    56     for ($i = 1; $i <= 12; $i ++) { 
    57         if ($l == 4) { 
    58             $l = 0; 
    59             $k ++; 
    60         } 
    61         $result = ""; 
    62         $j = sprintf("%02d", $i); 
    63         if ($i > 0 && $i < 5 ) $k = 0; 
    64         if ($i > 4 && $i < 9 ) $k = 1; 
    65         if ($i > 8 && $i < 13 ) $k = 2;  
    66          
    67         if (is_numeric($objPage->list_data["sub_product_id" .$j])) { 
    68             $result = $conn->getAll($sql, array($objPage->list_data["sub_product_id" .$j])); 
    69             $objPage->list_data["sub"][$k][$l] = $result[0]; 
    70             $objPage->list_data["sub"][$k]["data_exists"] = "OK";   //Åö³ºÃʤ˥ǡ¼¥¿¤¬£±¤Ä°Ê¾å¸ºß¤¹¤ë¥Õ¥é¥° 
    71         } 
    72         $l ++; 
    73     } 
    74     $objPage->tpl_mainpage = 'mail/html_template.tpl'; 
    75  
    76 } elseif ( sfCheckNumLength($_GET['send_id']) || sfCheckNumLength($_GET['id'])){ 
    77     if (is_numeric($_GET["send_id"])) { 
    78         $id = $_GET["send_id"]; 
    79         $sql = "SELECT body, mail_method FROM dtb_send_history WHERE send_id = ?"; 
    80     } else { 
    81         $sql = "SELECT body, mail_method FROM dtb_mailmaga_template WHERE template_id = ?"; 
     32        $sql = "SELECT header, footer,send_type FROM dtb_mailtemplate WHERE template_id = ?"; 
    8233        $id = $_GET['id']; 
    8334    } 
Note: See TracChangeset for help on using the changeset viewer.