실력있는분의 답변좀... 부탁해요... 정보
실력있는분의 답변좀... 부탁해요...본문
우선 제가 갖고있는포인트는 올인햇어요..
하단 소스는 제가쓰는부동산매물의 리스트스킨.php 파일입니다...
관리자가 로긴하면 매물등록기간이 지난매물이 보이고 배경색이 나와 관리자가 알아볼수있게된
소스인데요.. 배경색도 없애고 지난매물도 안보였으면 좋겟는데 도저히 해봐도 안되네요..
부탁좀드릴게요 알려주세요...
참고로 지난매물이 보인다는거는 회원이 매물을 30일간 등록하면 30일이후에는 없어지는데 관리자가 로긴하면 관리자한테만 보여집니다.. 이걸 관리자도 아예안보이게 하고싶어요...
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$board_skin_path/control.php");
if (!$member[mb_id]) {
$write_href = "javascript:alert('로그인 하셔야 합니다');";
}else{
$write_href = "write.php?bo_table=$bo_table&intro=control";
}
$colspan = 6;
$colors = "darksalmon";
$category_option = explode("|", $board[bo_category_list]);
$bo_1 = explode("|", $board[bo_1]);
$bo_2 = explode("|", $board[bo_2]);
$bo_3 = explode("|", $board[bo_3]);
$bo_4 = explode("|", $board[bo_4]);
$bo_5 = explode("|", $board[bo_5]);
$bo_6 = explode("|", $board[bo_6]);
$bo_7 = explode("|", $board[bo_7]);
$bo_8 = explode("|", $board[bo_8]);
$etc = "";
if ($cat) $etc .= "and ca_name like '%$cat%'";
if ($regs) $etc .= "and wr_10 like '%$regs%'";
if ($dong) $etc .= "and wr_6 like '%$dong%' ";
if ($sc) $etc .= "and wr_subject like '%$sc%' ";
$be = "";
if ($is_admin != "super") $be = "and wr_8 > $g4[server_time]";
$sql = mysql_query(" select * from $write_table where wr_1 = '0' $be and wr_is_comment = '0' $etc order by wr_id desc ");
for ($i=0; $row=mysql_fetch_array($sql); $i++) {
$listp[$i] = $row;
$listp[$i][href] = "./board.php?bo_table=$bo_table&wr_id={$listp[$i][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listp[$i][wr_id]}' and bf_type >= 1 ");
for ($a=0; $row1=mysql_fetch_array($sql1); $a++) {
$filep[$i][$a] = $row1;
}
}
$sql = mysql_query(" select * from $write_table where wr_1 = '1' $be and wr_is_comment = '0' $etc order by wr_id desc ");
for ($y=0; $row=mysql_fetch_array($sql); $y++) {
$listw[$y] = $row;
$listw[$y][href] = "./board.php?bo_table=$bo_table&wr_id={$listw[$y][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listw[$y][wr_id]}' and bf_type = '2' ");
for ($b=0; $row1=mysql_fetch_array($sql1); $b++) {
$filew[$y][$b] = $row1;
}
}
$t_sql = mysql_query(" select * from $write_table where wr_is_comment = '0' $etc ");
//전체게시물 수
$total_tag = mysql_num_rows($t_sql);
if (!$pagey) $pagey = 0; //현제 페이지
$page_page = 15; //한화면에 표시할 페이지 수
$page_list = 35; //한화면에 표시할 게시물 수
$pages = $page_list * $pagey; // 한화면에 출력 되어지는 개시물
$total_page = ceil($total_tag / $page_list); //총페이지 수
$total_pp = ceil($total_page / $page_page); //총 다중 페이지 수
for ($now_pp=0; $now_pp<$total_pp; $now_pp++) {
if ($now_pp * $page_page <= $pagey and ($now_pp+1) * $page_page > $pagey ) {
break;
}
}
$first_page = ($now_pp * $page_page); //처음 다중 페이지
$first_page_next = $first_page + $page_page; //한 화면에 출력한 다중 페이지의 갯수
if ($first_page_next >= $total_page) $first_page_next = $total_page;
$sql = mysql_query(" select * from $write_table where wr_is_comment = '0' $etc order by wr_datetime desc limit $pages , $page_list ");
for ($g=0; $row=mysql_fetch_array($sql); $g++) {
$listn[$g] = $row;
$listn[$g][href] = "./board.php?bo_table=$bo_table&wr_id={$listn[$g][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listn[$g][wr_id]}' and bf_type = '2' ");
for ($a=0; $row1=mysql_fetch_array($sql1); $a++) {
$filen[$g][$a] = $row1;
}
}
?>
<table width='97%' cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<!-- 게시판 목록 시작 -->
<table width="100%" align=center cellpadding=0 cellspacing=0>
<tr><td>
<table height=40 width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table border=0 align=center cellspacing="0" cellpadding="0">
<form method=get name=searchs action="<?=$g4[path]?>/bbs/board.php">
<input type='hidden' name='bo_table' value="<?=$bo_table?>">
<tr height="25">
<td>
<a href="<?=$write_href?>">매물등록하기</a> <select name=cat>
<option value=''>:: 분류를 선택하세요 ::
<? for ($i=0; $i<count($category_option); $i++) { ?>
<option value='<?=$category_option[$i]?>' <?if($cat==$category_option[$i])echo"selected";?>><?=$category_option[$i]?>
<? } ?>
</select>
<select name=regs onchange="Dong(this.form,this.value)">
<option value=''>:: 지역선택 ::
<? for ($i=0; $i<count($bo_1); $i++) { ?>
<option value='<?=$i+1?>' <?if($regs==$i+1)echo"selected";?>><?=$bo_1[$i]?>
<? } ?>
</select>
<select name=dong>
<option value=''>:: 동 선택 ::
</select>
<input type="submit" value=" 검색 ">
<input type="button" value="전체" onclick="location.href('./board.php?bo_table=<?=$bo_table?>');">
</td>
</tr>
</form>
</table>
<?
$cats = explode("|", $board[bo_1]);
for ($i=0; $i<count($cats); $i++) {
$cats1 = explode("|", $board[bo_2]);
$arr[$i] = "arr[".($i+1)."] = new Array(); ";
$cats2[$i] = explode("^", $cats1[$i]);
for ($a=0; $a<count($cats2[$i]); $a++) {
$arr[$i] .= "arr[".($i+1)."][".($a+1)."] = \"".$cats2[$i][$a]."\"; ";
}
}
?>
<script language="javascript">
<!--
var arr = new Array();
<?
for ($i=0; $i<count($cats); $i++) {
echo $arr[$i];
}
?>
if (searchs.regs.value) {
for(var i = 1; i <arr[searchs.regs.value].length; i++){
searchs.dong.options[i] = new Option(arr[searchs.regs.value][i],arr[searchs.regs.value][i]);
}
for(var i = 1; i <arr[searchs.regs.value].length; i++){
if (searchs.dong.options[i].value=="<?=$dong?>") {
searchs.dong.options[i].selected="<?=$dong?>";
}
}
}
function Dong(fwrite,sel)
{
if(sel > 0){
for(var i = fwrite.dong.length; i > -1; i--){
fwrite.dong.options[i] = null;
}
fwrite.dong.options[0] = new Option(":: 동 선택 ::","");
for(var i = 1; i < arr[sel].length; i++){
fwrite.dong.options[i] = new Option(arr[sel][i],arr[sel][i]);
}
}
else{
for(var i = fwrite.dong.length; i > -1; i--){
fwrite.dong.options[i] = null;
}
fwrite.dong.options[0] = new Option(":: 동 선택 ::","");
}
}
-->
</script>
</td>
</tr>
</table>
<div style="height:10px; line-height:10px"> </div>
</td></tr>
</table>
<table style="border:2px solid #CEE5DD;" bgcolor="E6F3EE" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<table align=left width="136" height="188" cellpadding='0' cellspacing='0' border='0'>
<br><tr>
<? for ($i=0; $i<count($listp); $i++) {
$lis6 = explode("|", $listp[$i][wr_6]);
$pic_sieze = "115";
if ($i%6==0) echo "</tr><tr>";
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listp[$i][wr_5]) {
if ($listp[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listp[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listp[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listp[$i][wr_8] < $g4[server_time]) {
$sty = "style='padding:0 7 0 7; background:$colors;'";
} else {
$sty = "style='padding:0 7 0 7;'";
}
}else{
$sty = "style='padding:0 7 0 7;'";
}
?>
<td <?=$sty?>>
<table width=<?=$pic_sieze?> cellpadding='0' cellspacing='0' border='0'>
<tr><td align=center width=<?=$pic_sieze?>>
<? if ( $filep[$i][0][bf_file]) { ?>
<a href='<?=$listp[$i][href]?>'><img style="border:1px solid cccccc;" src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$filep[$i][0][bf_file]?>' width=<?=$pic_sieze?> height=<?=$pic_sieze-20?>></a>
<? } ?>
</td></tr>
<tr><td width=<?=$pic_sieze?> align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?><br>
</td></tr>
<tr>
<td width=<?=$pic_sieze?> align=center>
<?=$marquee_f?>
<table align=center width=<?=$pic_sieze-10?> cellpadding='0' cellspacing='0' border='0'>
<tr>
<td align=center>
<a href='<?=$listp[$i][href]?>' <?=$span_f?>><?=cut_str($listp[$i][wr_subject],26,"")?></a>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>"; ?>
</td>
</tr>
</table>
<?=$marquee_e?>
</td>
</tr>
<tr><td align=center width=<?=$pic_sieze?>>
<?=$listp[$i][ca_name]?>
<?
//if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
//if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
//if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td></tr>
</table>
</td>
<? } ?>
</tr>
</table>
</td></tr>
</table>
<div style="height:10px; line-height:10px"> </div>
<IMG SRC="images/woo1.gif">
<?$colspan=8;?>
<table style="border:2px solid #D2DFE4;" bgcolor="E5EDF0" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td colspan=<?=$colspan?>></td></tr>
<? for ($i=0; $i<count($listw); $i++) {
$lis6 = explode("|", $listw[$i][wr_6]);
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listw[$i][wr_5]) {
if ($listw[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listw[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listw[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listw[$i][wr_8] < $g4[server_time]) {
$sty = "style='background:$colors;'";
} else {
$sty = "";
}
}else{
$sty = "";
}
?>
<tr height=30 <?=$sty?>>
<!--<td width=60 align=center>
<? if ($listw[$i][wr_3] > 0) {?>
<img src="<?=$board_skin_path?>/imgs/<?=$listw[$i][wr_3]?>.jpg">
<? }else{ ?>
<img src="http://my365.kr/skin/board/ground/imgs/505.gif">
<?}?>
</td> -->
<td style="line-height:150%;">
<?=$marquee_f?><a href='<?=$listw[$i][href]?>' <?=$span_f?>>
<img src="http://www.my365.kr/skin/board/gooin1/imgs/latest11.gif"> <?=cut_str($listw[$i][wr_subject],50,"")?></a><?=$marquee_e?>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>"; ?>
</td>
<td width=100 align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?>
</td>
<td width=80 align=center><font color= #3366CC ><?=$listw[$i][ca_name]?></font></td>
<td align=center width=60>
<?
if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td>
<td align=center width=70><?=substr($listw[$i][wr_datetime],2,8)?></td>
<td align=center width=40><?=number_format($listw[$i][wr_hit])?></td>
</tr>
<tr><td colspan=<?=$colspan?> height="1" bgcolor="#dddddd"></td></tr>
<? } ?>
</table>
<style type="text/css">
/*
img_list의 폭을 조정해주면 자동으로 아래로 떨어지거나 옆으로 올라옵니다
*/
.img_list {width:750px; overflow:hidden; padding:0 0 10px 10px; border:0px solid #C2C2C2; }
.img_list li {display:inline; font:12px 돋움, Dotum; text-align:center; list-style:none; float:left; width:100px; margin:10px 10px 0 0; padding:0 0 3px 0; }
.img_list li a {color:#333; text-decoration:none;}
.img_list li a:hover {text-decoration:none; color:#03F}
.img_list li img {display:block; margin-bottom:5px; border:none; border:1px solid #C2C2C2;}
</style>
<body>
<!-- 목록시작 --->
<ul class="img_list">
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
</ul>
<!-- 목록끝 --->
</body>
<IMG SRC="images/woo.gif">
<?$colspan=8;?>
<table style="border:2px solid #EBEEEF;" bgcolor="FAFBFC" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td colspan=<?=$colspan?>></td></tr>
<? for ($i=0; $i<count($listn); $i++) {
$lis6 = explode("|", $listn[$i][wr_6]);
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listn[$i][wr_5]) {
if ($listn[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listn[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listn[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listn[$i][wr_8] < $g4[server_time]) {
$sty = "style='background:$colors;'";
} else {
$sty = "";
}
}else{
$sty = "";
}
?>
<tr height=30 <?=$sty?>>
<!--<td width=50 align=center>
<? if ($listn[$i][wr_3] > 0) {?>
<img src="<?=$board_skin_path?>/imgs/<?=$listn[$i][wr_3]?>.jpg">
<? }else{ ?>
<img src="http://my365.kr/skin/board/ground/imgs/505.gif">
<?}?>
</td> -->
<td>
<?=$marquee_f?><a href='<?=$listn[$i][href]?>' <?=$span_f?>><img src="http://www.my365.kr/skin/board/gooin1/imgs/latest11.gif"> <?=cut_str($listn[$i][wr_subject],60,"")?></a><?=$marquee_e?>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";
?>
</td>
</td>
<td width=80 align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?>
</td>
<td width=70 align=center>
<font color= #3366CC ><?=$listn[$i][ca_name]?></font>
</td>
<td align=center width=70>
<?
if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td>
<td align=center width=60><?=substr($listn[$i][wr_datetime],2,8)?></td>
<td align=center width=30><?=number_format($listn[$i][wr_hit])?></td>
</tr>
<tr><td colspan=<?=$colspan?> height="1" bgcolor="#dddddd"></td></tr>
<? } ?>
</table>
<div style="height:20px; line-height:20px"> </div>
<table align=center cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<?
if (count($listn) > 0) {
$first = 0;
//처음 버튼
if ($now_pp != 0) {
echo "<td width=30><a href='./board.php?bo_table=$bo_table&pagey=$first$etc'><b><<</b></a></td>";
}
$prev = ($now_pp-1)*$page_page;
//이전 버튼
if ($now_pp != 0) {
echo "<td align=center width=50><a href='./board.php?bo_table=$bo_table&pagey=$prev$etc'><B><</B></a></td>";
}
for ($i=$first_page; $i<$first_page_next; $i++) {
if ($i==$pagey) {
echo "<td align=center width=30><span style='text-decoration:underline;font:bold;font-size:12pt;'>".($i+1)."</span></td>";
}else{
echo "<td align=center width=30><a href='./board.php?bo_table=$bo_table&pagey=$i$etc'><span style='color:#999999;font:bold;font-size:11pt;'>".($i+1)."</span></a></td>";
}
}
$next = ($now_pp+1)*$page_page;
//다음 버튼
if ($now_pp!=$total_pp-1) {
echo "<td align=center width=50><a href='./board.php?bo_table=$bo_table&pagey=$next$etc'><B>></B></a></td>";
}
$end = $total_page-1;
//마지막 버튼
if ($now_pp!=$total_pp-1) {
echo "<td width=30><a href='./board.php?bo_table=$bo_table&pagey=$end$etc'><B>>></B></a></td>";
}
}
?>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table><br><br><br><br>
하단 소스는 제가쓰는부동산매물의 리스트스킨.php 파일입니다...
관리자가 로긴하면 매물등록기간이 지난매물이 보이고 배경색이 나와 관리자가 알아볼수있게된
소스인데요.. 배경색도 없애고 지난매물도 안보였으면 좋겟는데 도저히 해봐도 안되네요..
부탁좀드릴게요 알려주세요...
참고로 지난매물이 보인다는거는 회원이 매물을 30일간 등록하면 30일이후에는 없어지는데 관리자가 로긴하면 관리자한테만 보여집니다.. 이걸 관리자도 아예안보이게 하고싶어요...
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$board_skin_path/control.php");
if (!$member[mb_id]) {
$write_href = "javascript:alert('로그인 하셔야 합니다');";
}else{
$write_href = "write.php?bo_table=$bo_table&intro=control";
}
$colspan = 6;
$colors = "darksalmon";
$category_option = explode("|", $board[bo_category_list]);
$bo_1 = explode("|", $board[bo_1]);
$bo_2 = explode("|", $board[bo_2]);
$bo_3 = explode("|", $board[bo_3]);
$bo_4 = explode("|", $board[bo_4]);
$bo_5 = explode("|", $board[bo_5]);
$bo_6 = explode("|", $board[bo_6]);
$bo_7 = explode("|", $board[bo_7]);
$bo_8 = explode("|", $board[bo_8]);
$etc = "";
if ($cat) $etc .= "and ca_name like '%$cat%'";
if ($regs) $etc .= "and wr_10 like '%$regs%'";
if ($dong) $etc .= "and wr_6 like '%$dong%' ";
if ($sc) $etc .= "and wr_subject like '%$sc%' ";
$be = "";
if ($is_admin != "super") $be = "and wr_8 > $g4[server_time]";
$sql = mysql_query(" select * from $write_table where wr_1 = '0' $be and wr_is_comment = '0' $etc order by wr_id desc ");
for ($i=0; $row=mysql_fetch_array($sql); $i++) {
$listp[$i] = $row;
$listp[$i][href] = "./board.php?bo_table=$bo_table&wr_id={$listp[$i][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listp[$i][wr_id]}' and bf_type >= 1 ");
for ($a=0; $row1=mysql_fetch_array($sql1); $a++) {
$filep[$i][$a] = $row1;
}
}
$sql = mysql_query(" select * from $write_table where wr_1 = '1' $be and wr_is_comment = '0' $etc order by wr_id desc ");
for ($y=0; $row=mysql_fetch_array($sql); $y++) {
$listw[$y] = $row;
$listw[$y][href] = "./board.php?bo_table=$bo_table&wr_id={$listw[$y][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listw[$y][wr_id]}' and bf_type = '2' ");
for ($b=0; $row1=mysql_fetch_array($sql1); $b++) {
$filew[$y][$b] = $row1;
}
}
$t_sql = mysql_query(" select * from $write_table where wr_is_comment = '0' $etc ");
//전체게시물 수
$total_tag = mysql_num_rows($t_sql);
if (!$pagey) $pagey = 0; //현제 페이지
$page_page = 15; //한화면에 표시할 페이지 수
$page_list = 35; //한화면에 표시할 게시물 수
$pages = $page_list * $pagey; // 한화면에 출력 되어지는 개시물
$total_page = ceil($total_tag / $page_list); //총페이지 수
$total_pp = ceil($total_page / $page_page); //총 다중 페이지 수
for ($now_pp=0; $now_pp<$total_pp; $now_pp++) {
if ($now_pp * $page_page <= $pagey and ($now_pp+1) * $page_page > $pagey ) {
break;
}
}
$first_page = ($now_pp * $page_page); //처음 다중 페이지
$first_page_next = $first_page + $page_page; //한 화면에 출력한 다중 페이지의 갯수
if ($first_page_next >= $total_page) $first_page_next = $total_page;
$sql = mysql_query(" select * from $write_table where wr_is_comment = '0' $etc order by wr_datetime desc limit $pages , $page_list ");
for ($g=0; $row=mysql_fetch_array($sql); $g++) {
$listn[$g] = $row;
$listn[$g][href] = "./board.php?bo_table=$bo_table&wr_id={$listn[$g][wr_id]}";
$sql1 = mysql_query(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '{$listn[$g][wr_id]}' and bf_type = '2' ");
for ($a=0; $row1=mysql_fetch_array($sql1); $a++) {
$filen[$g][$a] = $row1;
}
}
?>
<table width='97%' cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<!-- 게시판 목록 시작 -->
<table width="100%" align=center cellpadding=0 cellspacing=0>
<tr><td>
<table height=40 width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table border=0 align=center cellspacing="0" cellpadding="0">
<form method=get name=searchs action="<?=$g4[path]?>/bbs/board.php">
<input type='hidden' name='bo_table' value="<?=$bo_table?>">
<tr height="25">
<td>
<a href="<?=$write_href?>">매물등록하기</a> <select name=cat>
<option value=''>:: 분류를 선택하세요 ::
<? for ($i=0; $i<count($category_option); $i++) { ?>
<option value='<?=$category_option[$i]?>' <?if($cat==$category_option[$i])echo"selected";?>><?=$category_option[$i]?>
<? } ?>
</select>
<select name=regs onchange="Dong(this.form,this.value)">
<option value=''>:: 지역선택 ::
<? for ($i=0; $i<count($bo_1); $i++) { ?>
<option value='<?=$i+1?>' <?if($regs==$i+1)echo"selected";?>><?=$bo_1[$i]?>
<? } ?>
</select>
<select name=dong>
<option value=''>:: 동 선택 ::
</select>
<input type="submit" value=" 검색 ">
<input type="button" value="전체" onclick="location.href('./board.php?bo_table=<?=$bo_table?>');">
</td>
</tr>
</form>
</table>
<?
$cats = explode("|", $board[bo_1]);
for ($i=0; $i<count($cats); $i++) {
$cats1 = explode("|", $board[bo_2]);
$arr[$i] = "arr[".($i+1)."] = new Array(); ";
$cats2[$i] = explode("^", $cats1[$i]);
for ($a=0; $a<count($cats2[$i]); $a++) {
$arr[$i] .= "arr[".($i+1)."][".($a+1)."] = \"".$cats2[$i][$a]."\"; ";
}
}
?>
<script language="javascript">
<!--
var arr = new Array();
<?
for ($i=0; $i<count($cats); $i++) {
echo $arr[$i];
}
?>
if (searchs.regs.value) {
for(var i = 1; i <arr[searchs.regs.value].length; i++){
searchs.dong.options[i] = new Option(arr[searchs.regs.value][i],arr[searchs.regs.value][i]);
}
for(var i = 1; i <arr[searchs.regs.value].length; i++){
if (searchs.dong.options[i].value=="<?=$dong?>") {
searchs.dong.options[i].selected="<?=$dong?>";
}
}
}
function Dong(fwrite,sel)
{
if(sel > 0){
for(var i = fwrite.dong.length; i > -1; i--){
fwrite.dong.options[i] = null;
}
fwrite.dong.options[0] = new Option(":: 동 선택 ::","");
for(var i = 1; i < arr[sel].length; i++){
fwrite.dong.options[i] = new Option(arr[sel][i],arr[sel][i]);
}
}
else{
for(var i = fwrite.dong.length; i > -1; i--){
fwrite.dong.options[i] = null;
}
fwrite.dong.options[0] = new Option(":: 동 선택 ::","");
}
}
-->
</script>
</td>
</tr>
</table>
<div style="height:10px; line-height:10px"> </div>
</td></tr>
</table>
<table style="border:2px solid #CEE5DD;" bgcolor="E6F3EE" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<table align=left width="136" height="188" cellpadding='0' cellspacing='0' border='0'>
<br><tr>
<? for ($i=0; $i<count($listp); $i++) {
$lis6 = explode("|", $listp[$i][wr_6]);
$pic_sieze = "115";
if ($i%6==0) echo "</tr><tr>";
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listp[$i][wr_5]) {
if ($listp[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listp[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listp[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listp[$i][wr_8] < $g4[server_time]) {
$sty = "style='padding:0 7 0 7; background:$colors;'";
} else {
$sty = "style='padding:0 7 0 7;'";
}
}else{
$sty = "style='padding:0 7 0 7;'";
}
?>
<td <?=$sty?>>
<table width=<?=$pic_sieze?> cellpadding='0' cellspacing='0' border='0'>
<tr><td align=center width=<?=$pic_sieze?>>
<? if ( $filep[$i][0][bf_file]) { ?>
<a href='<?=$listp[$i][href]?>'><img style="border:1px solid cccccc;" src='<?=$g4[path]?>/data/file/<?=$bo_table?>/<?=$filep[$i][0][bf_file]?>' width=<?=$pic_sieze?> height=<?=$pic_sieze-20?>></a>
<? } ?>
</td></tr>
<tr><td width=<?=$pic_sieze?> align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?><br>
</td></tr>
<tr>
<td width=<?=$pic_sieze?> align=center>
<?=$marquee_f?>
<table align=center width=<?=$pic_sieze-10?> cellpadding='0' cellspacing='0' border='0'>
<tr>
<td align=center>
<a href='<?=$listp[$i][href]?>' <?=$span_f?>><?=cut_str($listp[$i][wr_subject],26,"")?></a>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>"; ?>
</td>
</tr>
</table>
<?=$marquee_e?>
</td>
</tr>
<tr><td align=center width=<?=$pic_sieze?>>
<?=$listp[$i][ca_name]?>
<?
//if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
//if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
//if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td></tr>
</table>
</td>
<? } ?>
</tr>
</table>
</td></tr>
</table>
<div style="height:10px; line-height:10px"> </div>
<IMG SRC="images/woo1.gif">
<?$colspan=8;?>
<table style="border:2px solid #D2DFE4;" bgcolor="E5EDF0" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td colspan=<?=$colspan?>></td></tr>
<? for ($i=0; $i<count($listw); $i++) {
$lis6 = explode("|", $listw[$i][wr_6]);
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listw[$i][wr_5]) {
if ($listw[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listw[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listw[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listw[$i][wr_8] < $g4[server_time]) {
$sty = "style='background:$colors;'";
} else {
$sty = "";
}
}else{
$sty = "";
}
?>
<tr height=30 <?=$sty?>>
<!--<td width=60 align=center>
<? if ($listw[$i][wr_3] > 0) {?>
<img src="<?=$board_skin_path?>/imgs/<?=$listw[$i][wr_3]?>.jpg">
<? }else{ ?>
<img src="http://my365.kr/skin/board/ground/imgs/505.gif">
<?}?>
</td> -->
<td style="line-height:150%;">
<?=$marquee_f?><a href='<?=$listw[$i][href]?>' <?=$span_f?>>
<img src="http://www.my365.kr/skin/board/gooin1/imgs/latest11.gif"> <?=cut_str($listw[$i][wr_subject],50,"")?></a><?=$marquee_e?>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>"; ?>
</td>
<td width=100 align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?>
</td>
<td width=80 align=center><font color= #3366CC ><?=$listw[$i][ca_name]?></font></td>
<td align=center width=60>
<?
if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td>
<td align=center width=70><?=substr($listw[$i][wr_datetime],2,8)?></td>
<td align=center width=40><?=number_format($listw[$i][wr_hit])?></td>
</tr>
<tr><td colspan=<?=$colspan?> height="1" bgcolor="#dddddd"></td></tr>
<? } ?>
</table>
<style type="text/css">
/*
img_list의 폭을 조정해주면 자동으로 아래로 떨어지거나 옆으로 올라옵니다
*/
.img_list {width:750px; overflow:hidden; padding:0 0 10px 10px; border:0px solid #C2C2C2; }
.img_list li {display:inline; font:12px 돋움, Dotum; text-align:center; list-style:none; float:left; width:100px; margin:10px 10px 0 0; padding:0 0 3px 0; }
.img_list li a {color:#333; text-decoration:none;}
.img_list li a:hover {text-decoration:none; color:#03F}
.img_list li img {display:block; margin-bottom:5px; border:none; border:1px solid #C2C2C2;}
</style>
<body>
<!-- 목록시작 --->
<ul class="img_list">
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
<li><a href="#"><img src="http://youngku.net/img/no_images.gif" width="110" height="80" alt="" /></a><a href="#">배너문의</a></li>
</ul>
<!-- 목록끝 --->
</body>
<IMG SRC="images/woo.gif">
<?$colspan=8;?>
<table style="border:2px solid #EBEEEF;" bgcolor="FAFBFC" width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td colspan=<?=$colspan?>></td></tr>
<? for ($i=0; $i<count($listn); $i++) {
$lis6 = explode("|", $listn[$i][wr_6]);
if ($listn[$i][wr_4]) {
if ($listn[$i][wr_4] == 1) {
$span_f = "style='color:#3D715E; font:bold;'";
}elseif ($listn[$i][wr_4] == 2) {
$span_f = "style='color:#254E8A'";
}elseif ($listn[$i][wr_4] == 3) {
$span_f = "style='color:#62547E; font:bold;'";
}
}else{
$span_f = "style='color:#222222;'";
}
$marquee_f = "";
$marquee_e = "";
if ($listn[$i][wr_5]) {
if ($listn[$i][wr_5] == 1) {
$marquee_f .= "<marquee behavior=alternate>";
$marquee_e .= "</marquee>";
}elseif ($listn[$i][wr_5] == 2) {
$marquee_f .= "<marquee direction=left>";
$marquee_e .= "</marquee>";
}elseif ($listn[$i][wr_5] == 3) {
$marquee_f .= "<marquee direction=right>";
$marquee_e .= "</marquee>";
}
}
if ($is_admin == "super") {
if ($listn[$i][wr_8] < $g4[server_time]) {
$sty = "style='background:$colors;'";
} else {
$sty = "";
}
}else{
$sty = "";
}
?>
<tr height=30 <?=$sty?>>
<!--<td width=50 align=center>
<? if ($listn[$i][wr_3] > 0) {?>
<img src="<?=$board_skin_path?>/imgs/<?=$listn[$i][wr_3]?>.jpg">
<? }else{ ?>
<img src="http://my365.kr/skin/board/ground/imgs/505.gif">
<?}?>
</td> -->
<td>
<?=$marquee_f?><a href='<?=$listn[$i][href]?>' <?=$span_f?>><img src="http://www.my365.kr/skin/board/gooin1/imgs/latest11.gif"> <?=cut_str($listn[$i][wr_subject],60,"")?></a><?=$marquee_e?>
<? if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span class='comment'>{$list[$i][comment_cnt]}</span></a>";
?>
</td>
</td>
<td width=80 align=center>
<?if ($lis6[0]==1)echo"천안"; else echo"아산";?> <?=$lis6[1]?>
</td>
<td width=70 align=center>
<font color= #3366CC ><?=$listn[$i][ca_name]?></font>
</td>
<td align=center width=70>
<?
if ($lis6[2]) echo "<img src='$board_skin_path/imgs/3.gif' align=absmiddle>";
if ($lis6[3]) echo " <img src='$board_skin_path/imgs/1.gif' align=absmiddle>";
if ($lis6[4]) echo " <img src='$board_skin_path/imgs/2.gif' align=absmiddle>";
?>
</td>
<td align=center width=60><?=substr($listn[$i][wr_datetime],2,8)?></td>
<td align=center width=30><?=number_format($listn[$i][wr_hit])?></td>
</tr>
<tr><td colspan=<?=$colspan?> height="1" bgcolor="#dddddd"></td></tr>
<? } ?>
</table>
<div style="height:20px; line-height:20px"> </div>
<table align=center cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<?
if (count($listn) > 0) {
$first = 0;
//처음 버튼
if ($now_pp != 0) {
echo "<td width=30><a href='./board.php?bo_table=$bo_table&pagey=$first$etc'><b><<</b></a></td>";
}
$prev = ($now_pp-1)*$page_page;
//이전 버튼
if ($now_pp != 0) {
echo "<td align=center width=50><a href='./board.php?bo_table=$bo_table&pagey=$prev$etc'><B><</B></a></td>";
}
for ($i=$first_page; $i<$first_page_next; $i++) {
if ($i==$pagey) {
echo "<td align=center width=30><span style='text-decoration:underline;font:bold;font-size:12pt;'>".($i+1)."</span></td>";
}else{
echo "<td align=center width=30><a href='./board.php?bo_table=$bo_table&pagey=$i$etc'><span style='color:#999999;font:bold;font-size:11pt;'>".($i+1)."</span></a></td>";
}
}
$next = ($now_pp+1)*$page_page;
//다음 버튼
if ($now_pp!=$total_pp-1) {
echo "<td align=center width=50><a href='./board.php?bo_table=$bo_table&pagey=$next$etc'><B>></B></a></td>";
}
$end = $total_page-1;
//마지막 버튼
if ($now_pp!=$total_pp-1) {
echo "<td width=30><a href='./board.php?bo_table=$bo_table&pagey=$end$etc'><B>>></B></a></td>";
}
}
?>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table><br><br><br><br>
댓글 전체
관리자도 볼 필요가 없다면 30일 지난 게시물은 아예 삭제해버리는 코드를 넣으면 되지
안보이게 할 필요가 있나요?
if ($is_admin != "super") $be = "and wr_8 > $g4[server_time]";
이부분 같네요. 아래처럼 수정해보세요
$be = "and wr_8 > $g4[server_time]";
안보이게 할 필요가 있나요?
if ($is_admin != "super") $be = "and wr_8 > $g4[server_time]";
이부분 같네요. 아래처럼 수정해보세요
$be = "and wr_8 > $g4[server_time]";
정말감사드립니다...