Ignore:
Timestamp:
2007/03/28 14:59:15 (19 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu/html/products/detail.php

    r11730 r11983  
    158158 
    159159// ¥µ¥Ö¥¿¥¤¥È¥ë¤ò¼èÆÀ 
    160 $arrFirstCat = GetFirstCat($arrRet[0]['category_id']); 
     160$arrFirstCat = sfGetFirstCat($arrRet[0]['category_id']); 
    161161$tpl_subtitle = $arrFirstCat['name']; 
    162162$objPage->tpl_subtitle = $tpl_subtitle; 
     
    172172//¥ì¥Ó¥å¡¼¾ðÊó¤Î¼èÆÀ 
    173173$objPage->arrReview = lfGetReviewData($tmp_id); 
     174// ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¾ðÊó¤Î¼èÆÀ 
     175 
     176// ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯µ¡Ç½¤Î²ÔƯ¾õ¶·¥Á¥§¥Ã¥¯ 
     177if (sfGetSiteControlFlg(SITE_CONTROL_TRACKBACK) != 1) { 
     178    $objPage->arrTrackbackView = "OFF"; 
     179} else { 
     180    $objPage->arrTrackbackView = "ON"; 
     181    $objPage->arrTrackback = lfGetTrackbackData($tmp_id); 
     182} 
     183$objPage->trackback_url = TRACKBACK_TO_URL . $tmp_id; 
    174184// ¥¿¥¤¥È¥ë¤Ë¾¦ÉÊ̾¤òÆþ¤ì¤ë 
    175185$objPage->tpl_title = "¾¦Éʾܺ٠". $objPage->arrProduct["name"]; 
     
    421431    $col = "create_date, reviewer_url, reviewer_name, recommend_level, title, comment"; 
    422432    $from = "dtb_review"; 
    423     $where = "del_flg = 0 AND status = 1 AND product_id = ? "; 
     433    $where = "del_flg = 0 AND status = 1 AND product_id = ? ORDER BY create_date DESC LIMIT " . REVIEW_REGIST_MAX; 
    424434    $arrval[] = $id; 
    425435    $arrReview = $objQuery->select($col, $from, $where, $arrval); 
    426436    return $arrReview;  
     437} 
     438 
     439/* 
     440 * ¾¦Éʤ´¤È¤Î¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¾ðÊó¤ò¼èÆÀ¤¹¤ë 
     441 *  
     442 * @param $product_id 
     443 * @return $arrTrackback 
     444 */ 
     445function lfGetTrackbackData($product_id) { 
     446 
     447    $arrTrackback = array(); 
     448 
     449    $objQuery = new SC_Query; 
     450    //¾¦Éʤ´¤È¤Î¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¾ðÊó¤ò¼èÆÀ¤¹¤ë 
     451    $col = "blog_name, url, title, excerpt, title, create_date"; 
     452    $from = "dtb_trackback"; 
     453    $where = "del_flg = 0 AND status = 1 AND product_id = ? ORDER BY create_date DESC LIMIT " . TRACKBACK_VIEW_MAX; 
     454    $arrval[] = $product_id; 
     455    $arrTrackback = $objQuery->select($col, $from, $where, $arrval); 
     456    return $arrTrackback;  
    427457} 
    428458 
Note: See TracChangeset for help on using the changeset viewer.