게시판 수정좀 도와주세요 ㅠㅠ 정보
게시판 수정좀 도와주세요 ㅠㅠ본문
게시판 상단에 지금은 카타고리가 출력되어 나오는데 wr_5 값이 나오게 해야 합니다...
소스 봐도 모르겠네요.....초보라 포인트 다 겁니다.
-------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
include_once("$g4[path]/lib/latest_wr.lib.php");
?>
<?
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 125 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
$str = 15 ; //[필수](글자수) 썸네일 밑의 제목의 글자수.
function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;
if ( $W > $H ) {
//가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) {
//세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) {
//정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
function maker( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;
//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
return $thum ;
}
?>
<table width="<?=$width?>" align="center">
<tr>
<td>
<table width="100%" cellpadding="3">
<tr>
<td>
<table width="100%">
<tr bgcolor=white>
<?
$total_cnt_sql = "select count(ca_name) as cnt from g4_write_".$bo_table;
$total_result = mysql_fetch_array(mysql_query($total_cnt_sql));
$totalcnt = $total_result[0];
?>
<td align='center'>
<!-- <form name="selFrm">
<select name="ca_name" onChange="selProduct(this.form.ca_name.selectedIndex-1);">
<option>분류1</option>
</select>
<select name="wr_5">
<option>분류2</option>
</select>
</form>
-->
<img src='../img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca='>
<?
if($sca=="")
echo "<b>전체보기(".$totalcnt.")</b>";
else
echo "전체보기(".$totalcnt.")";
?>
</a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate">
<tr>
<?
$cnt_sql = "select ca_name,count(ca_name) as cnt from g4_write_".$bo_table." group by ca_name";
$result = mysql_query($cnt_sql);
$ct=1;
while($tmp = mysql_fetch_array($result))
{
?>
<td>
<img src='../img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$tmp[0]?>'><?
if($sca==$tmp[0])
echo "<b>".$tmp[0]."(".$tmp[1].")</b>";
else
echo $tmp[0]."(".$tmp[1].")";
?></a>
</td>
<?
if($ct%4==0)
echo "</tr><tr>";
$ct++;
}
?>
</span>
</table>
</td>
</tr>
</table>
</td>
<td align="right">
게시물
<?=number_format($total_count)?>
건
<? if ($admin_href) { ?>
<a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/icon_admin.gif" border="0" align="absmiddle"></a>
<? } ?>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="15%" height="1" bgcolor="D63369"></td>
<td width="85%" bgcolor="E7E7E7"></td>
</tr>
<tr>
<td width="15%" height="3" bgcolor="FB974A"></td>
<td width="85%" bgcolor="F7F3F7"></td>
</tr>
</table>
<table width="100%" cellpadding="0" style="border-top:2px solid F7F3F7;border-bottom:6px solid F7F3F7;height:50px;background:#FAFCE5;">
<tr>
<!--<td height="50">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$board_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$board_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$board_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$board_skin_path?>/img/line_mid_p8.gif"></td>
<td><table width="100%" cellpadding="5">
<tr>
-->
<td width='10' style='text-align:center;'><b><font color="#336699">no</font></b></td>
<td width='100' style='text-align:center;'><b><font color="#336699">사진</font></b></td>
<td width="200" style='text-align:center;'><b><font color="#336699">제목</font></b></td>
<td width='85' style='text-align:center;'><b><font color="#336699">평형</font></b></td>
<td width='85' style='text-align:center;'><b><font color="#336699">방/욕실</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">매매가</font></b></td>
<!--<td width="85" style='text-align:center;'><b><font color="#336699">융자</font></b></td>-->
<td width="85" style='text-align:center;'><b><font color="#336699">실입주금</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">소재지</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">분양상태</font></b></td>
<!-- </tr>
</table></td>
<td background="<?=$board_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$board_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$board_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$board_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>-->
</td>
<td width="35" style="text-align:center;">
<p><b><font color="#336699">조회</font></b></p>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="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>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<?
for ($i=0; $i<count($list); $i++) {
// Thumbnail
$image = urlencode($list[$i][file][0][file]);
$ori="$g4[path]/data/file/$bo_table/" . $image;
$ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff") $ori_info=@getimagesize($ori);
else $ori_info="";
if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) {
//원파일이 [ 2jpg, 2Jjpg, 3jpg ] 경우.
$thum = $ori.".Thum" ;
if ( file_exists($thum) ) {
// Thumbnail [O] 경우
$thum_info = getimagesize ($thum);
$thum_W = $thum_info[0] ;
$thum_H = $thum_info[1] ;
}
else {
// Thumbnail [X] 경우
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
}
}
}
else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) {
//원파일이 [ 1GIF,6BMP,7TIF ] 경우.
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
$thum = $ori ;
}
}
else {
//원파일이 [ 1,2,3,6,7 ] 아닐 경우.
$thum = $noIMG ;
}
?>
<tr <? if ($list[$i][is_notice]) { ?>bgcolor="#F9F9FF"<? } else if ($wr_id == $list[$i][wr_id]) { ?>bgcolor="#ffeaea"<? }
if ($list[$i][wr_trackback]=='1') { ?>bgcolor="#F9F9FF"<? } else if ($wr_id == $list[$i][wr_id]) { ?>bgcolor="#ffeaea"<? }
?>>
<td onMouseOver=this.style.backgroundColor='#e5f5ff' onMouseOut=this.style.backgroundColor=''>
<table width="100%" cellpadding="3">
<tr align="center">
<td width="10" align="center">
<?
$p_four = explode("|",$list[$i][wr_4]);
$four01 = $p_four[0];
$four02 = $p_four[1];
$four03 = $p_four[2];
$four04 = $p_four[3];
$four05 = $p_four[4];
?>
<?
$p_nine = explode("|",$list[$i][wr_9]);
$nine01 = $p_nine[0];
$nine02 = $p_nine[1];
$nine03 = $p_nine[2];
$nine04 = $p_nine[3];
$nine05 = $p_nine[4];
$nine06 = $p_nine[5];
$nine07 = $p_nine[6];
$nine08 = $p_nine[7];
$nine09 = $p_nine[8];
$nine10 = $p_nine[9];
$nine11 = $p_nine[10];
$nine12 = $p_nine[11];
$nine13 = $p_nine[12];
$nine14 = $p_nine[13];
$nine15 = $p_nine[14];
$nine16 = $p_nine[15];
?> <?
if ($list[$i][is_notice] || $list[$i][wr_trackback]=='1')
echo "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id])
echo "<img src=\"$board_skin_path/img/icon_arrow.gif\">";
else
echo "{$list[$i][num]}";
?>
</td>
<td width="70" align="center">
<table cellpadding="2" cellspacing="1" bgcolor="eeeeee">
<tr>
<td bgcolor="ffffff"><a href='<?=$list[$i][href]?>'><img src='<?=$thum?>' alt='<?=$list[$i][wr_subject]?>' width="85" height="64" border=0></a></td>
</tr>
</table>
</td>
<td align="left" width="200">
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><? if ($is_checkbox) { ?>
<input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>">
<? } ?>
<?=$list[$i][reply]?>
<?=$list[$i][icon_reply]?>
<? if ($list[$i][is_notice]) {?>
<a href='<?=$list[$i][href]?>'><span class=black><b>
<?=$list[$i][subject]?> </b>
<!--이미지 표현-->
<!-- 이미지 표현 끝 -->
</span></a>
<? } else {?> <a href='<?=$list[$i][href]?>'>
<? if ($four02) echo '<b>';?><? if ($four03) echo '<span class="blue">';?>
<!--이미지 표현-->
<?
$ex_img = explode("|",$list[$i][wr_2]);
?>
<? if($ex_img[0]=='1') echo "<img src='$board_skin_path/img/icon_level01.gif' align='absmiddle'>"; ?>
<? if($ex_img[1]=='1') echo "<img src='$board_skin_path/img/icon_level02.gif' align='absmiddle'>"; ?>
<? if($ex_img[2]=='1') echo "<img src='$board_skin_path/img/icon_level03.gif' align='absmiddle'>"; ?>
<? if($ex_img[3]=='1') echo "<img src='$board_skin_path/img/icon_level04.gif' align='absmiddle'>"; ?>
<? if($ex_img[4]=='1') echo "<img src='$board_skin_path/img/icon_level05.gif' align='absmiddle'>"; ?>
<!-- 이미지 표현 끝 -->
<?=$list[$i][subject]?>
<? if ($four03) echo '</span>';?>
<? if ($four02) echo '</b>';?>
</a>
<? }?><? if ($list[$i][comment_cnt]) {?>
<a href="<?=$list[$i][comment_href]?>">
<?=$list[$i][comment_cnt]?> </a>
<? }?><?=$list[$i][icon_new]?>
<?=$list[$i][icon_hot]?>
<?
if ($four01)
echo "<img src='$board_skin_path/img/car_icon_1.gif' border='0' align='absmiddle'>";
?>
<?
if ($four04)
echo "<img src='$board_skin_path/img/car_icon_2.gif' border='0' align='absmiddle'>";
?>
<?
if ($four05)
echo "<img src='$board_skin_path/img/car_icon_3.gif' border='0' align='absmiddle'>";
?>
</p>
</td>
<td width="85"><font color="#666666"><?=str_replace("평","",$nine03)?>평</font></td>
<td width="65" align="center">
<p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<?
if($nine07!="")
echo $nine07;
else
echo " ";
?></span><span style="font-size:8pt;"></span></p>
</td>
<td width="85" align="center">
<p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<b><font color="#666666"> <?=$nine12?></font></b></span><span style="font-size:8pt;"><b><font color="#666666">만원</font></b></span></p>
</td>
<!--
<td width="85" align="center"> <p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<font color="#666666"> <?=$nine05?></font></span><span style="font-size:8pt;"><font color="#666666">만원</font></span></p>
</td>
-->
<td width="85" align="center">
<p><SPAN style="FONT-SIZE: 8pt; LETTER-SPACING: 0px"><span style="font-size:8pt;"><b><font color="#FF3300"><?=$nine06?>만원</font></b></span><b>
</b> </p>
</td>
<td width="85" align="center">
<font color="#FF6600"><b><?=$list[$i][wr_5]?>
</b></font>
</td>
<td width="85" align="center">
<p><span style="font-size:8pt;">
<?
if($list[$i][wr_1] == '' || $list[$i][wr_1] =='1'){
echo "<img src='$board_skin_path/img/on.gif'>";
}
else{
echo "<img src='$board_skin_path/img/off.gif'>";
}
?>
</span></p>
</td>
<td width="35" align="center">
<p><font color="#666666"><span style="font-size:8pt;"><?=$list[$i][wr_hit]?></span></font></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" bgcolor="eeeeee"></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center> 게시물이 없습니다.</td></tr>"; } ?>
</table>
</td>
</tr>
</form>
</table>
<table width="100%" cellpadding="3">
<tr>
<td align="center">
<?
if ($prev_part_href) {
echo "<a href='$prev_part_href'>
<img src='$board_skin_path/img/search_prev.gif' border=0 align=absmiddle></a>";
}
?>
<?
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_first.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = preg_replace("/([0-9]*)/", "$1", $write_pages);
$write_pages = preg_replace("/([0-9]*)/", "$1", $write_pages);
?>
<?=$write_pages?>
<?
if ($next_part_href) {
echo "<a href='$next_part_href'>
<img src='$board_skin_path/img/search_next.gif' border=0 align=absmiddle></a>";
}
?>
</td>
</tr>
</table>
<table width="100%" cellpadding="3">
<tr>
<td>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0" align="absmiddle"></a>
<? } ?>
<? if ($write_href) { ?>
<a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0" align="absmiddle"></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/select_delete.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/select_copy.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/select_move.gif" border="0" align="absmiddle"></a>
<? } ?>
<script language="JavaScript">
<!--
function OpenWin(url,intWidth,intHeight){
window.open(url, "ReadSlideShow", "scrollbars=no, resizable=no, width="+intWidth+",height="+intHeight+" ");
return;
}
//-->
</script>
<img src="<?=$board_skin_path?>/s_img/bSlideShow.gif" border=0 style="vertical-align: middle;cursor:pointer;" onClick="OpenWin('<?=$board_skin_path?>/slideshow.php?bo_table=<?=$bo_table?>',550,650); return false;" alt="상단 이미지 슬라이드 쇼 보기" title="상단 이미지 슬라이드 쇼 보기">
</td>
<form name=fsearch method=get>
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type=hidden name=sop value="And">
<td align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>아이디</option>
<option value='wr_name'>이름</option>
<option value='wr_5'>지역</option>
</select>
<INPUT maxLength=15 size=15 name=stx itemname="검색어" required value="<?=$stx?>" class="input">
<INPUT type=image src="<?=$board_skin_path?>/img/search.gif" border="0" align="absmiddle">
</td>
</form>
</tr>
</table>
</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; // 개별 페이지 접근 불가
?>
<?
include_once("$g4[path]/lib/latest_wr.lib.php");
?>
<?
$noIMG = $board_skin_path."/img/noimg.gif"; //[필수](URL)
$max = 125 ; //[필수](픽셀) 썸네일 이미지의 가로세로(긴쪽)의 최대치.
$resol = 90 ; //[필수](퍼센트%) 생성되는 썸네일의 JPG압축률.
$str = 15 ; //[필수](글자수) 썸네일 밑의 제목의 글자수.
function smaller( $W, $H ) {
global $max, $thum_W, $thum_H ;
if ( $W > $H ) {
//가로형일 경우.
$thum_W = $max ;
$thum_H = ceil( $H * ( $max / $W ) );
}
if ( $W < $H ) {
//세로형일 경우.
$thum_H = $max ;
$thum_W = ceil( $W * ( $max / $H ) );
}
if ( $W == $H ) {
//정사각형일 경우.
$thum_W = ceil( $max * 0.8 );
$thum_H = ceil( $max * 0.8 );
}
return $thum_W ;
return $thum_H ;
}
function maker( $thum_W, $thum_H ) {
global $thum, $resol, $ori, $ori_info ;
//$newImg = ImageCreate($thum_W,$thum_H); // GD라이브러리 2.0 (이하일 경우)
$newImg = ImageCreateTrueColor($thum_W,$thum_H); // GD라이브러리 2.0 전용함수
if($ori_info[2]=="2") $origImg=ImageCreateFromjpeg($ori);
if($ori_info[2]=="3") $origImg=ImageCreateFrompng($ori);
//ImageCopyResized($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
imageCopyResampled($newImg,$origImg,0,0,0,0,$thum_W,$thum_H,ImageSX($origImg),ImageSY($origImg));
Imagejpeg($newImg, $thum, $resol );
chmod($thum,0707);
ImageDestroy($newImg);
ImageDestroy($origImg);
return $thum ;
}
?>
<table width="<?=$width?>" align="center">
<tr>
<td>
<table width="100%" cellpadding="3">
<tr>
<td>
<table width="100%">
<tr bgcolor=white>
<?
$total_cnt_sql = "select count(ca_name) as cnt from g4_write_".$bo_table;
$total_result = mysql_fetch_array(mysql_query($total_cnt_sql));
$totalcnt = $total_result[0];
?>
<td align='center'>
<!-- <form name="selFrm">
<select name="ca_name" onChange="selProduct(this.form.ca_name.selectedIndex-1);">
<option>분류1</option>
</select>
<select name="wr_5">
<option>분류2</option>
</select>
</form>
-->
<img src='../img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca='>
<?
if($sca=="")
echo "<b>전체보기(".$totalcnt.")</b>";
else
echo "전체보기(".$totalcnt.")";
?>
</a>
</td>
<td nowrap> </td>
<td width='' style='word-break:break-all;'>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<span class="cate">
<tr>
<?
$cnt_sql = "select ca_name,count(ca_name) as cnt from g4_write_".$bo_table." group by ca_name";
$result = mysql_query($cnt_sql);
$ct=1;
while($tmp = mysql_fetch_array($result))
{
?>
<td>
<img src='../img/ico_folder.gif' width='13' height='11'> <a class='cate' href='./board.php?bo_table=<?=$bo_table?>&sca=<?=$tmp[0]?>'><?
if($sca==$tmp[0])
echo "<b>".$tmp[0]."(".$tmp[1].")</b>";
else
echo $tmp[0]."(".$tmp[1].")";
?></a>
</td>
<?
if($ct%4==0)
echo "</tr><tr>";
$ct++;
}
?>
</span>
</table>
</td>
</tr>
</table>
</td>
<td align="right">
게시물
<?=number_format($total_count)?>
건
<? if ($admin_href) { ?>
<a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/icon_admin.gif" border="0" align="absmiddle"></a>
<? } ?>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="15%" height="1" bgcolor="D63369"></td>
<td width="85%" bgcolor="E7E7E7"></td>
</tr>
<tr>
<td width="15%" height="3" bgcolor="FB974A"></td>
<td width="85%" bgcolor="F7F3F7"></td>
</tr>
</table>
<table width="100%" cellpadding="0" style="border-top:2px solid F7F3F7;border-bottom:6px solid F7F3F7;height:50px;background:#FAFCE5;">
<tr>
<!--<td height="50">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7" height="7"><img src="<?=$board_skin_path?>/img/line_mid_p1.gif"></td>
<td background="<?=$board_skin_path?>/img/line_mid_p5.gif"></td>
<td width="7"><img src="<?=$board_skin_path?>/img/line_mid_p2.gif"></td>
</tr>
<tr>
<td background="<?=$board_skin_path?>/img/line_mid_p8.gif"></td>
<td><table width="100%" cellpadding="5">
<tr>
-->
<td width='10' style='text-align:center;'><b><font color="#336699">no</font></b></td>
<td width='100' style='text-align:center;'><b><font color="#336699">사진</font></b></td>
<td width="200" style='text-align:center;'><b><font color="#336699">제목</font></b></td>
<td width='85' style='text-align:center;'><b><font color="#336699">평형</font></b></td>
<td width='85' style='text-align:center;'><b><font color="#336699">방/욕실</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">매매가</font></b></td>
<!--<td width="85" style='text-align:center;'><b><font color="#336699">융자</font></b></td>-->
<td width="85" style='text-align:center;'><b><font color="#336699">실입주금</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">소재지</font></b></td>
<td width="85" style='text-align:center;'><b><font color="#336699">분양상태</font></b></td>
<!-- </tr>
</table></td>
<td background="<?=$board_skin_path?>/img/line_mid_p6.gif"></td>
</tr>
<tr>
<td height="7"><img src="<?=$board_skin_path?>/img/line_mid_p4.gif"></td>
<td background="<?=$board_skin_path?>/img/line_mid_p7.gif"></td>
<td><img src="<?=$board_skin_path?>/img/line_mid_p3.gif"></td>
</tr>
</table>-->
</td>
<td width="35" style="text-align:center;">
<p><b><font color="#336699">조회</font></b></p>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="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>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<?
for ($i=0; $i<count($list); $i++) {
// Thumbnail
$image = urlencode($list[$i][file][0][file]);
$ori="$g4[path]/data/file/$bo_table/" . $image;
$ext = strtolower(substr(strrchr($ori,"."), 1)); //확장자
if ( $ext=="gif"||$ext=="jpg"||$ext=="jpeg"||$ext=="png"||$ext=="bmp"||$ext=="tif"||$ext=="tiff") $ori_info=@getimagesize($ori);
else $ori_info="";
if ( $ori_info[2]=="2" || $ori_info[2]=="3" ) {
//원파일이 [ 2jpg, 2Jjpg, 3jpg ] 경우.
$thum = $ori.".Thum" ;
if ( file_exists($thum) ) {
// Thumbnail [O] 경우
$thum_info = getimagesize ($thum);
$thum_W = $thum_info[0] ;
$thum_H = $thum_info[1] ;
}
else {
// Thumbnail [X] 경우
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
maker( $thum_W, $thum_H );
}
}
}
else if ( $ori_info[2]=="1" || $ori_info[2]=="6" || $ori_info[2]=="7" ) {
//원파일이 [ 1GIF,6BMP,7TIF ] 경우.
if ( smaller( $ori_info[0], $ori_info[1] ) ) {
$thum = $ori ;
}
}
else {
//원파일이 [ 1,2,3,6,7 ] 아닐 경우.
$thum = $noIMG ;
}
?>
<tr <? if ($list[$i][is_notice]) { ?>bgcolor="#F9F9FF"<? } else if ($wr_id == $list[$i][wr_id]) { ?>bgcolor="#ffeaea"<? }
if ($list[$i][wr_trackback]=='1') { ?>bgcolor="#F9F9FF"<? } else if ($wr_id == $list[$i][wr_id]) { ?>bgcolor="#ffeaea"<? }
?>>
<td onMouseOver=this.style.backgroundColor='#e5f5ff' onMouseOut=this.style.backgroundColor=''>
<table width="100%" cellpadding="3">
<tr align="center">
<td width="10" align="center">
<?
$p_four = explode("|",$list[$i][wr_4]);
$four01 = $p_four[0];
$four02 = $p_four[1];
$four03 = $p_four[2];
$four04 = $p_four[3];
$four05 = $p_four[4];
?>
<?
$p_nine = explode("|",$list[$i][wr_9]);
$nine01 = $p_nine[0];
$nine02 = $p_nine[1];
$nine03 = $p_nine[2];
$nine04 = $p_nine[3];
$nine05 = $p_nine[4];
$nine06 = $p_nine[5];
$nine07 = $p_nine[6];
$nine08 = $p_nine[7];
$nine09 = $p_nine[8];
$nine10 = $p_nine[9];
$nine11 = $p_nine[10];
$nine12 = $p_nine[11];
$nine13 = $p_nine[12];
$nine14 = $p_nine[13];
$nine15 = $p_nine[14];
$nine16 = $p_nine[15];
?> <?
if ($list[$i][is_notice] || $list[$i][wr_trackback]=='1')
echo "<img src=\"$board_skin_path/img/icon_notice.gif\">";
else if ($wr_id == $list[$i][wr_id])
echo "<img src=\"$board_skin_path/img/icon_arrow.gif\">";
else
echo "{$list[$i][num]}";
?>
</td>
<td width="70" align="center">
<table cellpadding="2" cellspacing="1" bgcolor="eeeeee">
<tr>
<td bgcolor="ffffff"><a href='<?=$list[$i][href]?>'><img src='<?=$thum?>' alt='<?=$list[$i][wr_subject]?>' width="85" height="64" border=0></a></td>
</tr>
</table>
</td>
<td align="left" width="200">
<p style="line-height:100%; margin-top:0; margin-bottom:0;"><? if ($is_checkbox) { ?>
<input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>">
<? } ?>
<?=$list[$i][reply]?>
<?=$list[$i][icon_reply]?>
<? if ($list[$i][is_notice]) {?>
<a href='<?=$list[$i][href]?>'><span class=black><b>
<?=$list[$i][subject]?> </b>
<!--이미지 표현-->
<!-- 이미지 표현 끝 -->
</span></a>
<? } else {?> <a href='<?=$list[$i][href]?>'>
<? if ($four02) echo '<b>';?><? if ($four03) echo '<span class="blue">';?>
<!--이미지 표현-->
<?
$ex_img = explode("|",$list[$i][wr_2]);
?>
<? if($ex_img[0]=='1') echo "<img src='$board_skin_path/img/icon_level01.gif' align='absmiddle'>"; ?>
<? if($ex_img[1]=='1') echo "<img src='$board_skin_path/img/icon_level02.gif' align='absmiddle'>"; ?>
<? if($ex_img[2]=='1') echo "<img src='$board_skin_path/img/icon_level03.gif' align='absmiddle'>"; ?>
<? if($ex_img[3]=='1') echo "<img src='$board_skin_path/img/icon_level04.gif' align='absmiddle'>"; ?>
<? if($ex_img[4]=='1') echo "<img src='$board_skin_path/img/icon_level05.gif' align='absmiddle'>"; ?>
<!-- 이미지 표현 끝 -->
<?=$list[$i][subject]?>
<? if ($four03) echo '</span>';?>
<? if ($four02) echo '</b>';?>
</a>
<? }?><? if ($list[$i][comment_cnt]) {?>
<a href="<?=$list[$i][comment_href]?>">
<?=$list[$i][comment_cnt]?> </a>
<? }?><?=$list[$i][icon_new]?>
<?=$list[$i][icon_hot]?>
<?
if ($four01)
echo "<img src='$board_skin_path/img/car_icon_1.gif' border='0' align='absmiddle'>";
?>
<?
if ($four04)
echo "<img src='$board_skin_path/img/car_icon_2.gif' border='0' align='absmiddle'>";
?>
<?
if ($four05)
echo "<img src='$board_skin_path/img/car_icon_3.gif' border='0' align='absmiddle'>";
?>
</p>
</td>
<td width="85"><font color="#666666"><?=str_replace("평","",$nine03)?>평</font></td>
<td width="65" align="center">
<p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<?
if($nine07!="")
echo $nine07;
else
echo " ";
?></span><span style="font-size:8pt;"></span></p>
</td>
<td width="85" align="center">
<p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<b><font color="#666666"> <?=$nine12?></font></b></span><span style="font-size:8pt;"><b><font color="#666666">만원</font></b></span></p>
</td>
<!--
<td width="85" align="center"> <p><span class="red"><span style="font-size:8pt; letter-spacing:0px;">
<font color="#666666"> <?=$nine05?></font></span><span style="font-size:8pt;"><font color="#666666">만원</font></span></p>
</td>
-->
<td width="85" align="center">
<p><SPAN style="FONT-SIZE: 8pt; LETTER-SPACING: 0px"><span style="font-size:8pt;"><b><font color="#FF3300"><?=$nine06?>만원</font></b></span><b>
</b> </p>
</td>
<td width="85" align="center">
<font color="#FF6600"><b><?=$list[$i][wr_5]?>
</b></font>
</td>
<td width="85" align="center">
<p><span style="font-size:8pt;">
<?
if($list[$i][wr_1] == '' || $list[$i][wr_1] =='1'){
echo "<img src='$board_skin_path/img/on.gif'>";
}
else{
echo "<img src='$board_skin_path/img/off.gif'>";
}
?>
</span></p>
</td>
<td width="35" align="center">
<p><font color="#666666"><span style="font-size:8pt;"><?=$list[$i][wr_hit]?></span></font></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" bgcolor="eeeeee"></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td height=100 align=center> 게시물이 없습니다.</td></tr>"; } ?>
</table>
</td>
</tr>
</form>
</table>
<table width="100%" cellpadding="3">
<tr>
<td align="center">
<?
if ($prev_part_href) {
echo "<a href='$prev_part_href'>
<img src='$board_skin_path/img/search_prev.gif' border=0 align=absmiddle></a>";
}
?>
<?
//echo $write_pages;
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/page_first.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/page_prev.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/page_next.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/page_end.gif' border='0' align='absmiddle'>", $write_pages);
$write_pages = preg_replace("/([0-9]*)/", "$1", $write_pages);
$write_pages = preg_replace("/([0-9]*)/", "$1", $write_pages);
?>
<?=$write_pages?>
<?
if ($next_part_href) {
echo "<a href='$next_part_href'>
<img src='$board_skin_path/img/search_next.gif' border=0 align=absmiddle></a>";
}
?>
</td>
</tr>
</table>
<table width="100%" cellpadding="3">
<tr>
<td>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/list.gif" border="0" align="absmiddle"></a>
<? } ?>
<? if ($write_href) { ?>
<a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/write.gif" border="0" align="absmiddle"></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/select_delete.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/select_copy.gif" border="0" align="absmiddle"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/select_move.gif" border="0" align="absmiddle"></a>
<? } ?>
<script language="JavaScript">
<!--
function OpenWin(url,intWidth,intHeight){
window.open(url, "ReadSlideShow", "scrollbars=no, resizable=no, width="+intWidth+",height="+intHeight+" ");
return;
}
//-->
</script>
<img src="<?=$board_skin_path?>/s_img/bSlideShow.gif" border=0 style="vertical-align: middle;cursor:pointer;" onClick="OpenWin('<?=$board_skin_path?>/slideshow.php?bo_table=<?=$bo_table?>',550,650); return false;" alt="상단 이미지 슬라이드 쇼 보기" title="상단 이미지 슬라이드 쇼 보기">
</td>
<form name=fsearch method=get>
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type=hidden name=sop value="And">
<td align="right">
<select name=sfl>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='mb_id'>아이디</option>
<option value='wr_name'>이름</option>
<option value='wr_5'>지역</option>
</select>
<INPUT maxLength=15 size=15 name=stx itemname="검색어" required value="<?=$stx?>" class="input">
<INPUT type=image src="<?=$board_skin_path?>/img/search.gif" border="0" align="absmiddle">
</td>
</form>
</tr>
</table>
</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>
<? } ?>
댓글 전체
게시판 상단에 지금은 카타고리가 출력되어 나오는데 wr_5 값이 나오게 해야 합니다...
소스 봐도 모르겠네요.....초보라 포인트 다 겁니다.
이 질문이 어떤 질문이죠?
이햐가 가지 않습니다.
분명 여분필드를 활용하려는듯 한데요.
님의 질문이 분류를 뜻하는것인가요?
분류 대신에 wr_5 필드를 사용 하겠다는 것인지...
소스 봐도 모르겠네요.....초보라 포인트 다 겁니다.
이 질문이 어떤 질문이죠?
이햐가 가지 않습니다.
분명 여분필드를 활용하려는듯 한데요.
님의 질문이 분류를 뜻하는것인가요?
분류 대신에 wr_5 필드를 사용 하겠다는 것인지...
골든님 게시판이 아니구 리스트였네요 죄송합니다.
분류대신 wr_5에 값이 나오면 됩니다.
게시판에서 여분 필드인데 그걸 불러 오면 됩니다.
도와주세요~~
분류대신 wr_5에 값이 나오면 됩니다.
게시판에서 여분 필드인데 그걸 불러 오면 됩니다.
도와주세요~~
wr_5가 어떤 역활을 하는것인가요?
게시판설정에서 분류를 사용하지 않았다면 그것을 활용을 하면 되고 만약 분류도 사용하고 wr_5도 같이 불러와야 한다면 그냥 <?=list[$wr_5]?> 이렇게 하면 되지 않나요?
님의 질문이 wr_5의 역활이 무엇인지를 이야기를 하지 않으니 어떻게 답을 드릴수 없네요.
wr_5에 어떤식으로 값을 넣었는지 그리고 어떤 방식으로 출력이 되어져야 하는지를 기술하셔야 합니다.
그래야 빠른 답변을 받을수 있습니다.
게시판설정에서 분류를 사용하지 않았다면 그것을 활용을 하면 되고 만약 분류도 사용하고 wr_5도 같이 불러와야 한다면 그냥 <?=list[$wr_5]?> 이렇게 하면 되지 않나요?
님의 질문이 wr_5의 역활이 무엇인지를 이야기를 하지 않으니 어떻게 답을 드릴수 없네요.
wr_5에 어떤식으로 값을 넣었는지 그리고 어떤 방식으로 출력이 되어져야 하는지를 기술하셔야 합니다.
그래야 빠른 답변을 받을수 있습니다.
만약에 2차 분류를 하신다면 그렇게 단순하게 처리할 사항이 아닙니다.
스킨게시판이나 아니면 팁에 다중셀렉트로 검색을 해 보세요
만만한 작업이 아님
스킨게시판이나 아니면 팁에 다중셀렉트로 검색을 해 보세요
만만한 작업이 아님
3차까게 게시판에 분류가 되어 있습니다.
1분류 카타고리 2분류 wr_5 필드 3분류까지..
관리자에서 따로 지역분류칸을 만들어 사용중입니다.
관리자페이지에서 1,2,3분류를 써넣으면 해당 게시판에서 그값을 불러와서 글쓰기할때나 보여질때
관리자페이지에서 저장한 값이 불러와 집니다.
1분류 카타고리 2분류 wr_5 필드 3분류까지..
관리자에서 따로 지역분류칸을 만들어 사용중입니다.
관리자페이지에서 1,2,3분류를 써넣으면 해당 게시판에서 그값을 불러와서 글쓰기할때나 보여질때
관리자페이지에서 저장한 값이 불러와 집니다.
검색앤진 말씀하시는건가
암튼 wr_5에 값을 넣었는데 엉뚱한게 출력된단 말씀이시죠?

관리자 페이제에서 저장한 값
$board['bo_1'] ~ $board['bo_10']
글쓰기 화면에서 여분필드 wr_5에 저장한 값
$list[$i]['wr_5']
분류1에 따라 분류2가 달라질 경우에는 추가 작업이 좀 있습니다.
위 소스를 대강보아하니 자바스크립트도 손봐야되고
등등
관리자 페이지에서 저장한 값을 사용하는 방법을 간단히 소개해드리자면
예) 관리자1번 여분에 등록 : 가나다|마바사|아자차|카타파하
사용할때
$두번째분류 = explode("|", $board['bo_1']);
이렇게 하면
$두번째분류[0]에는 가나다
$두번째분류[1]에는 마바사
.
.
.
배열로 저장이 됩니다.
배열을 루프문 돌려서 셀렉트문에 뽑아오시거나 기타작업등을 하면 됩니다.
php를 조금 더 공부하세요~!
$board['bo_1'] ~ $board['bo_10']
글쓰기 화면에서 여분필드 wr_5에 저장한 값
$list[$i]['wr_5']
분류1에 따라 분류2가 달라질 경우에는 추가 작업이 좀 있습니다.
위 소스를 대강보아하니 자바스크립트도 손봐야되고
등등
관리자 페이지에서 저장한 값을 사용하는 방법을 간단히 소개해드리자면
예) 관리자1번 여분에 등록 : 가나다|마바사|아자차|카타파하
사용할때
$두번째분류 = explode("|", $board['bo_1']);
이렇게 하면
$두번째분류[0]에는 가나다
$두번째분류[1]에는 마바사
.
.
.
배열로 저장이 됩니다.
배열을 루프문 돌려서 셀렉트문에 뽑아오시거나 기타작업등을 하면 됩니다.
php를 조금 더 공부하세요~!