Ignore:
Timestamp:
2008/06/18 21:35:45 (16 years ago)
Author:
Seasoft
Message:

小さい拡大画像で乱れるのを回避。id属性の決定方法を変更。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/products/LC_Page_Products_DetailImage.php

    r16582 r17360  
    5858 
    5959        // 管理ページからの確認の場合は、非公開の商品も表示する。 
    60         if(isset($_GET['admim']) && $_GET['admin'] == 'on') { 
     60        if (isset($_GET['admim']) && $_GET['admin'] == 'on') { 
    6161            $where = "del_flg = 0"; 
    6262        } else { 
     
    6565 
    6666        // 値の正当性チェック 
    67         if(!SC_Utils_Ex::sfIsInt($_GET['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_GET['product_id'], $where)) { 
     67        if (!SC_Utils_Ex::sfIsInt($_GET['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_GET['product_id'], $where)) { 
    6868            SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); 
    6969        } 
     
    7575        $col = "name, $image_key"; 
    7676        $arrRet = $objQuery->select($col, "dtb_products", "product_id = ?", array($_GET['product_id'])); 
    77         $image_path = IMAGE_SAVE_DIR . $arrRet[0][$image_key]; 
    78          
    79         if(file_exists($image_path)) { 
    80             list($width, $height) = getimagesize($image_path); 
    81         } else { 
    82             $width = 0; 
    83             $height = 0; 
    84         } 
    85          
    86         $this->tpl_width = $width; 
    87         $this->tpl_height = $height; 
     77        $image_path = IMAGE_SAVE_DIR . $arrRet[0][$image_key]; 
     78         
     79        if (file_exists($image_path)) { 
     80            list($width, $height) = getimagesize($image_path); 
     81        } else { 
     82            $width = 0; 
     83            $height = 0; 
     84        } 
     85         
     86        $this->tpl_width = $width; 
     87        $this->tpl_height = $height; 
    8888        $this->tpl_table_width = $this->tpl_width + 20; 
    8989        $this->tpl_table_height = $this->tpl_height + 20; 
     
    9191        $this->tpl_image = $arrRet[0][$image_key]; 
    9292        $this->tpl_name = $arrRet[0]['name']; 
     93        $this->tpl_image_key = $image_key; 
    9394 
    9495        $objView->assignobj($this); 
Note: See TracChangeset for help on using the changeset viewer.