게시판 목록보기에서 가로로 4행렬을 3행렬로 하고 싶습니다. 정보
게시판 목록보기에서 가로로 4행렬을 3행렬로 하고 싶습니다.관련링크
http://r-ja.com
153회 연결
본문
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$img_max = 130;
$quality = 60;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/bstyle.css'>
<!----------- { 레이아웃 테이블 시작 } --------------------------------------//-->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<? //---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환
$day_chk = "7"; // 체크 기간 날짜
$cnd_chk = " wr_1 <> '3' "; // 쿼리 추가 조건 설정
$sql_chk = " update $write_table set wr_1='3' where $cnd_chk and date_add(wr_datetime, INTERVAL '$day_chk' DAY) < now() ";
sql_query($sql_chk);
if ($board['bo_notice']) {
$bo_notice = '';
$notice_array = explode("\n", trim($board['bo_notice'])); // 공지사항의 wr_id를 배열로 저장합니다.
for ($i = 0; $i < count($notice_array); $i++) {
$wr_qry = "select count(wr_id) as cnt from $write_table where wr_id = $notice_array[$i] and wr_1 = '3'";
$rs = mysql_query($wr_qry);
if ($rs) {
$rs_cnt = mysql_fetch_array($rs);
if ($rs_cnt[0] == 1) {
} else {
$bo_notice .= $notice_array[$i] . '\n';
}
}
}
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}'");
}
//---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환 끝
?>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr height="30" valign="middle">
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <img src="<?=$board_skin_path?>/img/mk.gif" align="absmiddle">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bo_table?>'><strong><?=$board[bo_subject]?></strong></a> <b><span class="v3">전체구인정보 <?=$board[bo_count_write]?>건</span></b>
</td>
</tr>
</table></td>
<td align="right"> <img src="<?=$board_skin_path?>/img/icon_sort.gif" align='absmiddle'> <?=subject_sort_link('wr_hit', $qstr2, 1)?>조회순</a>
<img src="<?=$board_skin_path?>/img/icon_sort.gif" align='absmiddle'> <?=subject_sort_link('wr_datetime', $qstr2, 1)?>최근등록순</a>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" border="0" align="absmiddle"></a><?}?></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td >
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<!-- 카테고리 한줄로 표시 --//-->
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=5></td></tr>
<tr>
<td><IMG height=1 src="<?=$board_skin_path?>/img/blank.gif" width=5 align='absmiddle'></td>
<td align="center" width="100%"><? include "{$board_skin_path}/config.list_select1.php"?></td>
<td><IMG height=1 src="<?=$board_skin_path?>/img/blank.gif" width=5 align='absmiddle'></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height=10></td></tr>
</table>
<!-- 제목 테이블 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<form name="fboardlist" method="post">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
// 주소입력값을 다시 쪼개어, '지역구'까지만 출력토록 함.
$ex3_filed = explode("|", $list[$i][wr_3]);
$ext3_02 = explode(" ", $ex3_filed[2]);
//echo $ext3_02[0] . "-" . $ext3_02[1]; {아래 주소표시부분에 위치)
//--보증금/월세/권리금
$ex7_filed = explode("|",$list[$i][wr_7]);
$ext7_00 = $ex7_filed[0];
$ext7_01 = $ex7_filed[1];
$ext7_02 = $ex7_filed[2];
//-- 학원분류
$ex5_filed = explode("|",$list[$i][wr_5]);
$ext5_00 = $ex5_filed[0];
$ext5_01 = $ex5_filed[1];
$ext5_02 = $ex5_filed[2];
$ext5_03 = $ex5_filed[3];
$ext5_04 = $ex5_filed[4];
$ext5_05 = $ex5_filed[5];
$ext5_06 = $ex5_filed[6];
$ext5_07 = $ex5_filed[7];
//-- 학원분류
$ex6_filed = explode("|",$list[$i][wr_6]);
$ext6_00 = $ex6_filed[0];
$ext6_01 = $ex6_filed[1];
$ex8_filed = explode("|",$list[$i][wr_8]);
$ext8_00 = $ex8_filed[0];
$ext8_01 = $ex8_filed[1];
$ext8_02 = $ex8_filed[2];
$ext8_06 = $ex8_filed[6];
$ext8_08 = $ex8_filed[9];
$ext8_09 = explode(" ", $ex8_filed[9]);
$ex9_filed = explode("|",$list[$i][wr_9]);
$ext9_00 = $ex9_filed[0];
$ext9_01 = $ex9_filed[1];
$ext9_02 = $ex9_filed[2];
$ext9_03 = $ex9_filed[3];
$ext9_04 = $ex9_filed[4];
$ext9_05 = $ex9_filed[5];
$ext9_06 = $ex9_filed[6];
$ext9_07 = $ex9_filed[7];
$ext9_08 = $ex9_filed[8];
$ext9_09 = $ex9_filed[9];
// $title = "클릭하시면 해당 사이트로 이동합니다.";
// $content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img ="$board_skin_path/img/no_banner.gif";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
$view_href = "";
if ($is_admin)
$view_href = "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";
$checkbox = "";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
if ($list[$i][wr_4] == "on")
$list[$i][wr_4] = "<img src='{$board_skin_path}/img/icon_on.gif' border='0' width='35' height='14' align='absmiddle'>";
if ($list[$i][wr_4] == "off")
$list[$i][wr_4] = "<img src='{$board_skin_path}/img/icon_off.gif' border='0' width='45' height='14' align='absmiddle'>";
$ext5_06_c = cut_str(get_text($ext5_06), 20);
$ext8_06_c = cut_str(get_text($ext8_06), 16);
$subject2 = cut_str(get_text($list[$i][subject]), 23);
$subject = "";
$nobr_begin;
if ($list[$i][is_notice]) // 급매물(공지)
$subject = "<a class='notice' href='{$list[$i][href]}'><img src=\"$board_skin_path/img/icon_level01.gif\" width=15 height=15 align='absmiddle'> {$subject2}</a>";
else if ($list[$i][wr_1] == "1") // 추천매물
$subject = "<a class='notice2' href='{$list[$i][href]}'><img src=\"$board_skin_path/img/icon_level02.gif\" width=15 height=15 align='absmiddle'> {$subject2}</a>";
else if ($list[$i][wr_1] == "2") // 굵게
$subject = "<a class='notice3' href='{$list[$i][href]}'>{$subject2}</a>";
else // 일반 게시물
$subject = "<a class='b1' href='{$list[$i][href]}'>{$subject2}</a>";
$nobr_end;
// 수정, 삭제 링크
$update_href = $delete_href = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member[mb_level] == 10) || $is_admin) {
$update_href = "<a href=\"{$write_href}&w=u&wr_id={$list[$i][wr_id]}\">+</a>";
$delete_href = "<a href=\"javascript:del('./delete.php?w=d&bo_table={$bo_table}&wr_id={$list[$i][wr_id]}');\">-</a>";
}
$link_hit = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member[mb_level] == 10) || $is_admin)
$link_hit = "({$list[$i][wr_link1_hit]})";
$tr = "";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr><td height=10></td></tr><tr>";
echo "$tr";
echo <<<HEREDOC
<td width="{$td_width}%" height="64" valign="top" align="center">
<table width=174 cellpadding=0 cellspacing=0 border=0 >
<tr><td><img src="$board_skin_path/img/box_grand_1.gif"></td></tr>
<tr>
<td background='$board_skin_path/img/box_grand_bg_1.gif' height=41>
<table width=100% cellpadding=0 cellspacing=0 border=0 align="center">
<tr>
<td width=100% align="center"><a href="{$list[$i][href]}"><img src="{$img}" onmouseover="this.style.filter='gray alpha(opacity=60)'" width=160 height="41" onmouseout="this.style.filter=''" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr><td background=$board_skin_path/img/box_grand_bg_1.gif height=2></td></tr>
<tr><td height=10 background=$board_skin_path/img/box_grand_bg_2.gif></td></tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center"><? if($list[link][1]) {?><a href="$href" target="_blank"><? } ?><B><FONT color=#0066cc>{$ext5_06_c}</font></B><? if($list[link][1]) {?></A><? } ?> {$list[$i][wr_4]} {$checkbox}</td>
</tr>
<tr><td align=center background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">{$ext8_06_c}-{$ext6_00}</td></tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">{$subject}</td>
</tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">[{$ext8_09[0]}-{$ext8_09[1]}] <? if($ext8_02) {?>{$ext8_02}<? } ?> {$link_hit} {$update_href} {$delete_href}</td>
</tr>
<tr><td><img src=$board_skin_path/img/box_grand_2.gif></td></tr>
</table>
</td>
<td width=5>
</td>
HEREDOC;
}
// 나머지 td 를 채운다.
if (($cnt = $i%$list_mod) != 0)
for ($k=$cnt; $k<$list_mod; $k++)
echo "<td> </td>\n";
if ($i == 0)
echo "<td colspan='$board[bo_gallery_cols]' height=50 align=center>게시물이 없습니다.</td>";
?>
<tr><td height=10></td></tr>
</form>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=15 align='center' valign="middle">
<? if ($admin_href) { ?>
<a href='<?=$admin_href?>' target='_blank'><span class="verda_7b">Total <?=number_format($total_count)?> Article , <?=number_format($page)?> / <?=number_format($total_page)?> Page</span></a>
<?}else{?>
<span class="verda_7b">Total <?=number_format($total_count)?> Article , <?=number_format($page)?> / <?=number_format($total_page)?> Page</span>
<? } ?>
<tr><td height=10></td></tr>
</td>
</tr>
</table>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" background="<?=$board_skin_path?>/img/number_line.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=54 height=18 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=54 height=18 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40" valign="middle" align="left">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0" align=absmiddle></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align=absmiddle></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0" align=absmiddle></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0" align=absmiddle></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0" align=absmiddle></a>
<? } ?>
<? if ($is_checkbox) { ?><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox>전체선택<? } ?>
</td>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn2.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
<!----------- { 레이아웃 테이블 아래. 끝 } --------------------------------------//-->
<!----------- { 레이아웃 테이블 아래. 끝 } --------------------------------------//-->
</td></tr></table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$img_max = 130;
$quality = 60;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/bstyle.css'>
<!----------- { 레이아웃 테이블 시작 } --------------------------------------//-->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<? //---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환
$day_chk = "7"; // 체크 기간 날짜
$cnd_chk = " wr_1 <> '3' "; // 쿼리 추가 조건 설정
$sql_chk = " update $write_table set wr_1='3' where $cnd_chk and date_add(wr_datetime, INTERVAL '$day_chk' DAY) < now() ";
sql_query($sql_chk);
if ($board['bo_notice']) {
$bo_notice = '';
$notice_array = explode("\n", trim($board['bo_notice'])); // 공지사항의 wr_id를 배열로 저장합니다.
for ($i = 0; $i < count($notice_array); $i++) {
$wr_qry = "select count(wr_id) as cnt from $write_table where wr_id = $notice_array[$i] and wr_1 = '3'";
$rs = mysql_query($wr_qry);
if ($rs) {
$rs_cnt = mysql_fetch_array($rs);
if ($rs_cnt[0] == 1) {
} else {
$bo_notice .= $notice_array[$i] . '\n';
}
}
}
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}'");
}
//---------- 일정기간이 지나면 '급매물,추천/굵게표시' 게시물 모두 '일반게시물'로 전환 끝
?>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr height="30" valign="middle">
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <img src="<?=$board_skin_path?>/img/mk.gif" align="absmiddle">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bo_table?>'><strong><?=$board[bo_subject]?></strong></a> <b><span class="v3">전체구인정보 <?=$board[bo_count_write]?>건</span></b>
</td>
</tr>
</table></td>
<td align="right"> <img src="<?=$board_skin_path?>/img/icon_sort.gif" align='absmiddle'> <?=subject_sort_link('wr_hit', $qstr2, 1)?>조회순</a>
<img src="<?=$board_skin_path?>/img/icon_sort.gif" align='absmiddle'> <?=subject_sort_link('wr_datetime', $qstr2, 1)?>최근등록순</a>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/admin_button.gif" title="관리자" border="0" align="absmiddle"></a><?}?></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td >
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<!-- 카테고리 한줄로 표시 --//-->
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=5></td></tr>
<tr>
<td><IMG height=1 src="<?=$board_skin_path?>/img/blank.gif" width=5 align='absmiddle'></td>
<td align="center" width="100%"><? include "{$board_skin_path}/config.list_select1.php"?></td>
<td><IMG height=1 src="<?=$board_skin_path?>/img/blank.gif" width=5 align='absmiddle'></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height=10></td></tr>
</table>
<!-- 제목 테이블 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<form name="fboardlist" method="post">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
// 주소입력값을 다시 쪼개어, '지역구'까지만 출력토록 함.
$ex3_filed = explode("|", $list[$i][wr_3]);
$ext3_02 = explode(" ", $ex3_filed[2]);
//echo $ext3_02[0] . "-" . $ext3_02[1]; {아래 주소표시부분에 위치)
//--보증금/월세/권리금
$ex7_filed = explode("|",$list[$i][wr_7]);
$ext7_00 = $ex7_filed[0];
$ext7_01 = $ex7_filed[1];
$ext7_02 = $ex7_filed[2];
//-- 학원분류
$ex5_filed = explode("|",$list[$i][wr_5]);
$ext5_00 = $ex5_filed[0];
$ext5_01 = $ex5_filed[1];
$ext5_02 = $ex5_filed[2];
$ext5_03 = $ex5_filed[3];
$ext5_04 = $ex5_filed[4];
$ext5_05 = $ex5_filed[5];
$ext5_06 = $ex5_filed[6];
$ext5_07 = $ex5_filed[7];
//-- 학원분류
$ex6_filed = explode("|",$list[$i][wr_6]);
$ext6_00 = $ex6_filed[0];
$ext6_01 = $ex6_filed[1];
$ex8_filed = explode("|",$list[$i][wr_8]);
$ext8_00 = $ex8_filed[0];
$ext8_01 = $ex8_filed[1];
$ext8_02 = $ex8_filed[2];
$ext8_06 = $ex8_filed[6];
$ext8_08 = $ex8_filed[9];
$ext8_09 = explode(" ", $ex8_filed[9]);
$ex9_filed = explode("|",$list[$i][wr_9]);
$ext9_00 = $ex9_filed[0];
$ext9_01 = $ex9_filed[1];
$ext9_02 = $ex9_filed[2];
$ext9_03 = $ex9_filed[3];
$ext9_04 = $ex9_filed[4];
$ext9_05 = $ex9_filed[5];
$ext9_06 = $ex9_filed[6];
$ext9_07 = $ex9_filed[7];
$ext9_08 = $ex9_filed[8];
$ext9_09 = $ex9_filed[9];
// $title = "클릭하시면 해당 사이트로 이동합니다.";
// $content = cut_str(get_text($list[$i][wr_content]), 80);
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img ="$board_skin_path/img/no_banner.gif";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
$view_href = "";
if ($is_admin)
$view_href = "<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>";
$checkbox = "";
if ($is_checkbox)
$checkbox = "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'>";
if ($list[$i][wr_4] == "on")
$list[$i][wr_4] = "<img src='{$board_skin_path}/img/icon_on.gif' border='0' width='35' height='14' align='absmiddle'>";
if ($list[$i][wr_4] == "off")
$list[$i][wr_4] = "<img src='{$board_skin_path}/img/icon_off.gif' border='0' width='45' height='14' align='absmiddle'>";
$ext5_06_c = cut_str(get_text($ext5_06), 20);
$ext8_06_c = cut_str(get_text($ext8_06), 16);
$subject2 = cut_str(get_text($list[$i][subject]), 23);
$subject = "";
$nobr_begin;
if ($list[$i][is_notice]) // 급매물(공지)
$subject = "<a class='notice' href='{$list[$i][href]}'><img src=\"$board_skin_path/img/icon_level01.gif\" width=15 height=15 align='absmiddle'> {$subject2}</a>";
else if ($list[$i][wr_1] == "1") // 추천매물
$subject = "<a class='notice2' href='{$list[$i][href]}'><img src=\"$board_skin_path/img/icon_level02.gif\" width=15 height=15 align='absmiddle'> {$subject2}</a>";
else if ($list[$i][wr_1] == "2") // 굵게
$subject = "<a class='notice3' href='{$list[$i][href]}'>{$subject2}</a>";
else // 일반 게시물
$subject = "<a class='b1' href='{$list[$i][href]}'>{$subject2}</a>";
$nobr_end;
// 수정, 삭제 링크
$update_href = $delete_href = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member[mb_level] == 10) || $is_admin) {
$update_href = "<a href=\"{$write_href}&w=u&wr_id={$list[$i][wr_id]}\">+</a>";
$delete_href = "<a href=\"javascript:del('./delete.php?w=d&bo_table={$bo_table}&wr_id={$list[$i][wr_id]}');\">-</a>";
}
$link_hit = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member[mb_level] == 10) || $is_admin)
$link_hit = "({$list[$i][wr_link1_hit]})";
$tr = "";
if ($i && $i%$board[bo_gallery_cols]==0)
$tr = "</tr><tr><td height=10></td></tr><tr>";
echo "$tr";
echo <<<HEREDOC
<td width="{$td_width}%" height="64" valign="top" align="center">
<table width=174 cellpadding=0 cellspacing=0 border=0 >
<tr><td><img src="$board_skin_path/img/box_grand_1.gif"></td></tr>
<tr>
<td background='$board_skin_path/img/box_grand_bg_1.gif' height=41>
<table width=100% cellpadding=0 cellspacing=0 border=0 align="center">
<tr>
<td width=100% align="center"><a href="{$list[$i][href]}"><img src="{$img}" onmouseover="this.style.filter='gray alpha(opacity=60)'" width=160 height="41" onmouseout="this.style.filter=''" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr><td background=$board_skin_path/img/box_grand_bg_1.gif height=2></td></tr>
<tr><td height=10 background=$board_skin_path/img/box_grand_bg_2.gif></td></tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center"><? if($list[link][1]) {?><a href="$href" target="_blank"><? } ?><B><FONT color=#0066cc>{$ext5_06_c}</font></B><? if($list[link][1]) {?></A><? } ?> {$list[$i][wr_4]} {$checkbox}</td>
</tr>
<tr><td align=center background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">{$ext8_06_c}-{$ext6_00}</td></tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">{$subject}</td>
</tr>
<tr>
<td background=$board_skin_path/img/box_grand_bg_2.gif style='padding-left:6px; padding-right:6px;' height=20 align="center">[{$ext8_09[0]}-{$ext8_09[1]}] <? if($ext8_02) {?>{$ext8_02}<? } ?> {$link_hit} {$update_href} {$delete_href}</td>
</tr>
<tr><td><img src=$board_skin_path/img/box_grand_2.gif></td></tr>
</table>
</td>
<td width=5>
</td>
HEREDOC;
}
// 나머지 td 를 채운다.
if (($cnt = $i%$list_mod) != 0)
for ($k=$cnt; $k<$list_mod; $k++)
echo "<td> </td>\n";
if ($i == 0)
echo "<td colspan='$board[bo_gallery_cols]' height=50 align=center>게시물이 없습니다.</td>";
?>
<tr><td height=10></td></tr>
</form>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td height=15 align='center' valign="middle">
<? if ($admin_href) { ?>
<a href='<?=$admin_href?>' target='_blank'><span class="verda_7b">Total <?=number_format($total_count)?> Article , <?=number_format($page)?> / <?=number_format($total_page)?> Page</span></a>
<?}else{?>
<span class="verda_7b">Total <?=number_format($total_count)?> Article , <?=number_format($page)?> / <?=number_format($total_page)?> Page</span>
<? } ?>
<tr><td height=10></td></tr>
</td>
</tr>
</table>
<!-- 페이지 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="37" align="center" background="<?=$board_skin_path?>/img/number_line.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' width=54 height=18 border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:#797979\">$1</font>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<font style=\"font-family:Tahoma, Seoul,굴림; font-size:10pt; color:orange;\">$1</font>", $write_pages);
?>
<strong><?=$write_pages?></strong>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' width=54 height=18 border=0 align=absmiddle title='다음검색'></a>"; } ?>
</td>
</tr>
</table></td>
</tr>
</table>
<!-- 버튼 링크 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width="50%" height="40" valign="middle" align="left">
<? if ($list_href) { ?><a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0" align=absmiddle></a><? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0" align=absmiddle></a><? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0" align=absmiddle></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0" align=absmiddle></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0" align=absmiddle></a>
<? } ?>
<? if ($is_checkbox) { ?><INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox>전체선택<? } ?>
</td>
<td width="50%" align="right">
<select name=sfl>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>회원아이디</option>
<option value='wr_name'>이름</option>
</select><input name=stx maxlength=15 size=10 itemname="검색어" required value="<?=$stx?>"><select name=sop>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn2.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
<!----------- { 레이아웃 테이블 아래. 끝 } --------------------------------------//-->
<!----------- { 레이아웃 테이블 아래. 끝 } --------------------------------------//-->
</td></tr></table>
<script language="JavaScript">
if ("<?=$sca?>") document.fcategory.sca.value = "<?=$sca?>";
if ("<?=$stx?>") {
document.fsearch.sfl.value = "<?=$sfl?>";
document.fsearch.sop.value = "<?=$sop?>";
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw)
{
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str)
{
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete()
{
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw)
{
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
고수분들 헬프미....
댓글 전체
게시판 설정 > 가로이미지 수 3
그렇게 하면 안되서 올린건데요.. php 함수에서 고쳐야 할듯..
와~~~~~~~~~~~~~~~~~~~~~~~~
정말 정말 고맙습니다. ^^
불친절한 이원씨가 해결했음 ㅋㅋㅋ
정말 정말 고맙습니다. ^^
불친절한 이원씨가 해결했음 ㅋㅋㅋ