<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
echo "<link rel='stylesheet' href='{$latest_skin_url}/style.css'>";
$list_count = (is_array($list) && $list) ? count($list) : 0;
//-------------------------------------------------------------------------------------------------
?>
<section class="AliceCard">
<?
// 관련 조건 추철 : 배열
// for : Number
$arrnum = sql_query("select wr_num from g5_write_{$bo_table} where wr_id is not null order by wr_datetime desc limit 1");
$alicenum = sql_fetch_array($arrnum);
$alice_num = $alicenum['wr_num']*-1; // Total Number
for ($i=0; $i<$alice_num; $i++) {
$bestarr = sql_fetch(" select * from g5_write_{$bo_table} where wr_id = '$i' ");
if ($bestarr['bj_sugges'] == 1) { // 조건
$besttxt .= $i."|";
}
}
//echo $besttxt;
$best = explode("|", $besttxt);
//---------------------------------------------------------------------------------------------
// $count = count($best)-1;
$count = 1; // 개별 출력 수량
for ($i=0; $i<$count; $i++) {
$gallery_width = "230";
$gallery_height = "400";
$filename = $list[$best[$i]]['file'][0]['file']; // 서버 저장 파일명
$filepath = G5_DATA_PATH.'/file/'.$bo_table; // 데이터 디렉토리 경로
$filesrc = G5_DATA_URL.'/file/'.$bo_table.'/'.$filename; // 이미지 주소
$thumb = thumbnail($filename, $filepath , $filepath , $gallery_width, $gallery_height, false, true); // 섬네일 이미지 파일명
$thumbsrc = G5_DATA_URL.'/file/'.$bo_table.'/'.$thumb; // 섬네일 주소
?>
<ul class="Card" onclick="location.href='<?=$list[$i]['href'] ;?>'">
<li>
<p class="SS" style="width:<?=$gallery_width;?>px;"><label><?=$list[$i]['wr_subject'];?></label><label><?=$list[$i]['ca_name'];?></label></p>
<?
$list[$i]['bj_Price'] = $list[$i]['bj_Price']/10; //BGC
$list[$i]['bj_Price'] = $list[$i]['bj_Price']/10 //GBJC
?>
</li>
<img src="<?=$thumbsrc;?>">
</ul>
<?
}
if ($list_count == 0) { echo "<li class='CoinNo'>게시물이 없습니다</li>"; }
?>
</section>