Ignore:
Timestamp:
2008/03/04 14:30:57 (16 years ago)
Author:
pineray
Message:

拡大画像もリストアップされてしまっていたので、通常の画像のみを表示するように

Location:
branches/comu-ver2/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/Smarty/templates/default/mobile/products/detail.tpl

    r17101 r17103  
    3636<!--{/if}--> 
    3737<img src="<!--{$arrFile[$key].filepath}-->"> 
    38 <!--{if count($arrFile) > 1}--> 
     38<!--{if $subImageFlag == true}--> 
    3939<br>画像 
    40   <!--{foreach from=$arrFile item=i key=k name=image}--> 
    41     <!--{if $k == $smarty.get.image || ($smarty.get.image == "" && $k == "main_image")}--> 
    42 [<!--{$smarty.foreach.image.index+1}-->] 
     40  <!--{if ($smarty.get.image == "" || $smarty.get.image == "main_image")}--> 
     41[1] 
     42  <!--{else}--> 
     43[<a href="<!--{$smarty.server.PHP_SELF|escape}-->?product_id=<!--{$smarty.get.product_id}-->&image=main_image">1</a>] 
     44  <!--{/if}--> 
     45   
     46  <!--{assign var=num value="2"}--> 
     47  <!--{section name=cnt loop=$smarty.const.PRODUCTSUB_MAX}--> 
     48  <!--{assign var=key value="sub_image`$smarty.section.cnt.iteration`"}--> 
     49  <!--{if $arrFile[$key].filepath != ""}--> 
     50    <!--{if $key == $smarty.get.image}--> 
     51[<!--{$num}-->] 
    4352    <!--{else}--> 
    44 [<a href="<!--{$smarty.server.PHP_SELF|escape}-->?product_id=<!--{$smarty.get.product_id}-->&image=<!--{$k}-->"><!--{$smarty.foreach.image.index+1}--></a>] 
     53[<a href="<!--{$smarty.server.PHP_SELF|escape}-->?product_id=<!--{$smarty.get.product_id}-->&image=<!--{$key}-->"><!--{$num}--></a>] 
    4554    <!--{/if}--> 
    46   <!--{/foreach}--> 
     55    <!--{assign var=num value="`$num+1`"}--> 
     56  <!--{/if}--> 
     57  <!--{/section}--> 
    4758<!--{/if}--> 
    4859<br> 
  • branches/comu-ver2/data/class/pages/products/LC_Page_Products_Detail.php

    r17071 r17103  
    213213        $this->arrRelativeCat = $objDb->sfGetMultiCatTree($tmp_id); 
    214214 
    215         // DBからのデータを引き継ぐ 
    216         $this->objUpFile->setDBFileList($this->arrProduct); 
    217         // ファイル表示用配列を渡す 
    218         $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true); 
     215        $this->lfSetFile(); 
    219216        // 支払方法の取得 
    220217        $this->arrPayment = $this->lfGetPayment(); 
     
    440437        $this->tpl_subtitle = $tpl_subtitle; 
    441438 
    442         // DBからのデータを引き継ぐ 
    443         $this->objUpFile->setDBFileList($this->arrProduct); 
    444         // ファイル表示用配列を渡す 
    445         $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true); 
     439        // ファイル情報のセット 
     440        $this->lfSetFile(); 
    446441        // 支払方法の取得 
    447442        $this->arrPayment = $this->lfGetPayment(); 
     
    824819        $this->arrForm['quantity']['value'] = htmlspecialchars($value, ENT_QUOTES, CHAR_CODE); 
    825820    } 
     821 
     822    /* 
     823     * ファイルの情報をセットする 
     824     * 
     825     */ 
     826    function lfSetFile() { 
     827        // DBからのデータを引き継ぐ 
     828        $this->objUpFile->setDBFileList($this->arrProduct); 
     829        // ファイル表示用配列を渡す 
     830        $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true); 
     831 
     832        // サブ画像の有無を判定 
     833        $this->subImageFlag = false; 
     834        for ($i = 1; $i <= PRODUCTSUB_MAX; $i++) { 
     835            if ($this->arrFile["sub_image" . $i]["filepath"] != "") { 
     836                $this->subImageFlag = true; 
     837            } 
     838        } 
     839    } 
    826840} 
    827841?> 
Note: See TracChangeset for help on using the changeset viewer.