<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

//CSS 출력
include_once ($latest_list_path.'/load.style.php');

$list_num = count($list);

//리스트 출력
echo '<div class="data-role">';
echo '<ul data-role="listview" class="latest-basic-jqm">';

for($i=0; $i < $list_num; $i++){
	$image = $icon_secret = $list_selected = $nbsp = $wr_comment='';
	$list[$i]['subject'] = amina_cut($list[$i]['wr_subject'], 100);
	$wr_comment = $list[$i]['wr_comment'];
	$contents = $list[$i]['subject'];
	if($list[$i]['icon_secret']){
		$icon_secret = '<img src="'.$latest_list_url.'/img/icon_secret.gif" alt="" /> ';
		$contents = '비밀글입니다.';
		if($opt['type'] == "cmt" || $opt['type'] == "newcmt") $image = mb_photo($member['mb_id'], $list[$i]['mb_id'], 80, 80);
	} else {
		if($opt['type'] == "cmt" || $opt['type'] == "newcmt") {
			$image = mb_photo($member['mb_id'], $list[$i]['mb_id'], 80, 80);
		} else {
			list($list[$i]['img']) = amina_thumb_img($list[$i]['file'], $list[$i]['wr_6'], $list[$i]['wr_content'], 1, $list[$i]['wr_4'], $list[$i]['wr_8']);
			$thumb = amina_make_thumb($list[$i]['img'], 120, 120, 90);
			if($thumb) $list[$i]['img'] = $thumb;
			if($list[$i]['img']) $image = "<img src=\"".$list[$i]['img']."\" width='80' height='80'/>";
		}
	}

	//아이콘 출력
	$icon = amina_array_icon($list[$i]['wr_5']);
	$icon_mobile = $icon['mobile'] ? '<img src="'.$latest_list_url.'/img/icon_mobile.gif" alt="" /> ' : '';
	$icon_new = $list[$i]['icon_new'] ? '<img src="'.$latest_list_url.'/img/icon_new.gif" alt="" /> ' : '';

	echo '<li><a href="'.G4_BBS_URL.'/board.php?bo_table='.$list[$i]['bo_table'].'&wr_id='.$list[$i]['wr_id'].'">';
	echo $image.'<h3>'.$icon_new.$icon_secret.$icon_mobile.$contents;
	if($wr_comment) echo '<span class="ui-li-count">'.$wr_comment.'</span>';
	echo '</h3><p>';
	if($list[$i]['ca_name']) echo $list[$i]['ca_name'].' ★ ';
	echo $list[$i]['wr_name'].' / '.amina_date($list[$i]['wr_datetime']);
	echo '</p></a></li>'."\n";
}

if($list_num == 0) echo '<li><a><h3>게시물이 없습니다.</h3></a></li>';

echo '</ul></div><div class="clear"></div>';

?>