solution

  • 카멜레온솔루션 소개
  • 카멜레온솔루션 특징
  • 카멜레온솔루션 제품
  • 자료실
  • 온라인문의

빠른상담문의

성명
연락처
- -
상담유형

빠른상담신청

고객센터

자료실

  • tip&tech
  • patch
 
작성일 : 12-05-16 16:42
[템플릿플러그인] 회원 오늘본 상품 노출
 글쓴이 : 관리자
조회 : 16,216  
   function.GetTodayView.php (500byte) [12] DATE : 2012-05-16 16:42:17


Template_/tpl_plugin/function.GetTodayView.php
<?
function GetTodayView($rows, $width=120, $height=120) {
global $cm, $member, $g4;
$list = array();
$rs=sql_query(" SELECT b.*  FROM cm_shop_member_view a left join cm_shop_item b on(a.it_id=b.it_id) WHERE a.mb_id = '$member[mb_id]' and a.v_date='$g4[time_ymd]' order by id desc limit 0, $rows ");
while($it=sql_fetch_array($rs)) {
$it['img'] = $cm->GetItemImg($it,'l', $width, $height);
$it['href'] = $cm->path.'/shop/item.php?it_id='.$it['it_id'];
$list[]=$it;
}
return $list;
}
?>

출력 할 htm파일 위치에 아래와 같이 선언
<!--{ = this->assign('list', GetTodayView(4)) }-->
<!--{ = include_file('include/today_view.htm') }-->

today_view.htm
<!--{@ list }-->
<a href="{.href}">{.img}</a>
<!--{/}-->