그룹전체를 제외하는방법 좀알려주십시요... 정보
그룹전체를 제외하는방법 좀알려주십시요...본문
아래문구처럼 게시판 테이블 명을 적기엔 너무많은 게시판이 있어서..
그룹전체를 제외시키는방법없을까요??
고수님들 답변부탁드립니다..
감사합니다..
http://www.sir.co.kr/bbs/tb.php/g4_tiptech/768/8dd9d769b11ec3635e3e663d5170cd93
//제외게시판 ||(or) 로 구분합다
if($row[bo_table]==aaa||$row[bo_table]==bbb||$row[bo_table]==ccct||$row[bo_table]==ddd){}
else{
=========== archives.php ==================
<?
$g4_path = "..";
include_once ("$g4_path/common.php");
include_once("$g4[path]/head.php");
if ($hours < 1 || $hours > 24) {
$hours = 2888; //288시간내에.. 올라온 새글...
}
$li = 10; //몇개뽑을건가..
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width='100%' valign=top align=center>
<?
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * $hours));
$sql = " select bo_subject, bo_table
from $g4[board_table]
where bo_use_search = '1'
order by bo_order_search ";
$result = sql_query($sql);
while ($row = mysql_fetch_array($result)) {
//제외게시판 ||(or) 로 구분합다
if($row[bo_table]==aaa||$row[bo_table]==bbb||$row[bo_table]==ccct||$row[bo_table]==ddd){}
else{
$tbl = "{$g4[write_prefix]}{$row[bo_table]}";
$sql2 = " select wr_id,
wr_parent,
mb_id,
wr_name,
wr_email,
wr_homepage,
wr_num,
wr_subject,
wr_is_comment,
wr_comment,
wr_datetime,
wr_hit
from $tbl
where wr_datetime >= '$intime'
and wr_is_comment = '0'
order by wr_datetime desc ";
$result2 = sql_query($sql2);
for ($i = 0; $row2 = mysql_fetch_array($result2); $i++) {
$wr_subject = get_text($row2[wr_subject]);
$key = $row2[wr_datetime] . $row[bo_table] . $row2[wr_id];
$list[$key]->bo_subject = $row[bo_subject];
$list[$key]->bo_table = $row[bo_table];
$list[$key]->mb_id = $row2[mb_id];
$list[$key]->mb_open = $row2[mb_open];
$list[$key]->wr_id = $row2[wr_id];
$list[$key]->wr_parent = $row2[wr_parent];
$list[$key]->wr_email = $row2[wr_email];
$list[$key]->wr_homepage = $row2[wr_homepage];
$list[$key]->wr_name = get_text(cut_str($row2[wr_name],12));
$list[$key]->wr_subject = get_text(cut_str($wr_subject,70,'…'));
$list[$key]->wr_is_comment = $row2[wr_is_comment];
$list[$key]->wr_comment = $row2[wr_comment];
$list[$key]->wr_datetime = $row2[wr_datetime];
$list[$key]->wr_hit = $row2[wr_hit];
}
mysql_free_result($result2);
}
}
mysql_free_result($result);
?>
<table width='100%' cellpadding=0 cellspacing=0 align=center valign=top style='padding:0 0 0 0'>
<tr>
<td width=100% height=23 valign=top style='padding:5px;border-top:0px solid #c1c1c1;border-bottom:0px solid #c1c1c1'><img src='<?=$g4[path]?>/image/sale_i2.gif' border='0' align='absmiddle'>
<b>최근등록글</b>
</td>
</tr>
</table>
<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td colspan=4 height=1 bgcolor=#efefef></td></tr>
<?
if (count($list) > 0) {
$p=-1;
krsort($list);
foreach ($list as $key=>$value) {
if(time()-(60*60*24) <= strtotime($list[$i][wr_datetime])) $list[$i][date] = date('H:i',strtotime($list[$i][wr_datetime]));
else $list[$i][date] = date('Y.m.d',strtotime($list[$i][wr_datetime]));
$p++;
if ($p >= $li) break;
$wr_commentcnt = "";
if ($value->wr_comment > 0) {
$wr_commentcnt = "<font size=-2>({$value->wr_comment})</font>";
}
$name = get_sideview($value->mb_id, cut_str($value->wr_name,12), $value->wr_email, $value->wr_homepage);
$value->bo_subject = cut_str($value->bo_subject, 20);
echo "<tr>";
echo "<td width=100%>";
echo "<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>";
echo "<tr><td width=10> </td>";
// echo "<td width=125 align=left class=cOrange>{$value->wr_datetime}</td>";
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,5,6)."</td>"; //12-05 (월-일)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,5)."</td>"; //04-12 (년-월)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,8)."</td>"; //04-12-07 (년-월-일)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,14)."</td>"; //04-12-07 17:25 (년-월-일 시:분)
echo "<td width=80 align=left class=cOrange><font class=cYellowGreen bold>*</font> ".substr($value->wr_datetime,0,10)."</td>"; // 2004-12-07 (년-월-일)
echo "<td width='' height=23 align=left> ";
echo "<a href='$g4[path]/bbs/board.php?bo_table=".$value->bo_table."&wr_id=".$value->wr_parent."$atag_comment'>$comment{$value->wr_subject}</a> <font class=cpt7>{$wr_commentcnt}</font></td>";
echo "<td width=80 align=right style='font-weight:normal;font-size:12px;color:#335495'> {$value->wr_name} </td></tr>";
echo "</table></td>";
echo "</tr>";
echo "<tr><td colspan='10' height='1' bgcolor='#efefef'></td></tr>";
}
} else
echo "<td height=100 align=center colspan=4>등록된 글이 없습니다.</td>";
?>
</table>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.php");
?>
===========================================
그룹전체를 제외시키는방법없을까요??
고수님들 답변부탁드립니다..
감사합니다..
http://www.sir.co.kr/bbs/tb.php/g4_tiptech/768/8dd9d769b11ec3635e3e663d5170cd93
//제외게시판 ||(or) 로 구분합다
if($row[bo_table]==aaa||$row[bo_table]==bbb||$row[bo_table]==ccct||$row[bo_table]==ddd){}
else{
=========== archives.php ==================
<?
$g4_path = "..";
include_once ("$g4_path/common.php");
include_once("$g4[path]/head.php");
if ($hours < 1 || $hours > 24) {
$hours = 2888; //288시간내에.. 올라온 새글...
}
$li = 10; //몇개뽑을건가..
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width='100%' valign=top align=center>
<?
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * $hours));
$sql = " select bo_subject, bo_table
from $g4[board_table]
where bo_use_search = '1'
order by bo_order_search ";
$result = sql_query($sql);
while ($row = mysql_fetch_array($result)) {
//제외게시판 ||(or) 로 구분합다
if($row[bo_table]==aaa||$row[bo_table]==bbb||$row[bo_table]==ccct||$row[bo_table]==ddd){}
else{
$tbl = "{$g4[write_prefix]}{$row[bo_table]}";
$sql2 = " select wr_id,
wr_parent,
mb_id,
wr_name,
wr_email,
wr_homepage,
wr_num,
wr_subject,
wr_is_comment,
wr_comment,
wr_datetime,
wr_hit
from $tbl
where wr_datetime >= '$intime'
and wr_is_comment = '0'
order by wr_datetime desc ";
$result2 = sql_query($sql2);
for ($i = 0; $row2 = mysql_fetch_array($result2); $i++) {
$wr_subject = get_text($row2[wr_subject]);
$key = $row2[wr_datetime] . $row[bo_table] . $row2[wr_id];
$list[$key]->bo_subject = $row[bo_subject];
$list[$key]->bo_table = $row[bo_table];
$list[$key]->mb_id = $row2[mb_id];
$list[$key]->mb_open = $row2[mb_open];
$list[$key]->wr_id = $row2[wr_id];
$list[$key]->wr_parent = $row2[wr_parent];
$list[$key]->wr_email = $row2[wr_email];
$list[$key]->wr_homepage = $row2[wr_homepage];
$list[$key]->wr_name = get_text(cut_str($row2[wr_name],12));
$list[$key]->wr_subject = get_text(cut_str($wr_subject,70,'…'));
$list[$key]->wr_is_comment = $row2[wr_is_comment];
$list[$key]->wr_comment = $row2[wr_comment];
$list[$key]->wr_datetime = $row2[wr_datetime];
$list[$key]->wr_hit = $row2[wr_hit];
}
mysql_free_result($result2);
}
}
mysql_free_result($result);
?>
<table width='100%' cellpadding=0 cellspacing=0 align=center valign=top style='padding:0 0 0 0'>
<tr>
<td width=100% height=23 valign=top style='padding:5px;border-top:0px solid #c1c1c1;border-bottom:0px solid #c1c1c1'><img src='<?=$g4[path]?>/image/sale_i2.gif' border='0' align='absmiddle'>
<b>최근등록글</b>
</td>
</tr>
</table>
<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>
<tr><td colspan=4 height=1 bgcolor=#efefef></td></tr>
<?
if (count($list) > 0) {
$p=-1;
krsort($list);
foreach ($list as $key=>$value) {
if(time()-(60*60*24) <= strtotime($list[$i][wr_datetime])) $list[$i][date] = date('H:i',strtotime($list[$i][wr_datetime]));
else $list[$i][date] = date('Y.m.d',strtotime($list[$i][wr_datetime]));
$p++;
if ($p >= $li) break;
$wr_commentcnt = "";
if ($value->wr_comment > 0) {
$wr_commentcnt = "<font size=-2>({$value->wr_comment})</font>";
}
$name = get_sideview($value->mb_id, cut_str($value->wr_name,12), $value->wr_email, $value->wr_homepage);
$value->bo_subject = cut_str($value->bo_subject, 20);
echo "<tr>";
echo "<td width=100%>";
echo "<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>";
echo "<tr><td width=10> </td>";
// echo "<td width=125 align=left class=cOrange>{$value->wr_datetime}</td>";
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,5,6)."</td>"; //12-05 (월-일)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,5)."</td>"; //04-12 (년-월)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,8)."</td>"; //04-12-07 (년-월-일)
// echo "<td width=125 align=left class=cOrange>".substr($value->wr_datetime,2,14)."</td>"; //04-12-07 17:25 (년-월-일 시:분)
echo "<td width=80 align=left class=cOrange><font class=cYellowGreen bold>*</font> ".substr($value->wr_datetime,0,10)."</td>"; // 2004-12-07 (년-월-일)
echo "<td width='' height=23 align=left> ";
echo "<a href='$g4[path]/bbs/board.php?bo_table=".$value->bo_table."&wr_id=".$value->wr_parent."$atag_comment'>$comment{$value->wr_subject}</a> <font class=cpt7>{$wr_commentcnt}</font></td>";
echo "<td width=80 align=right style='font-weight:normal;font-size:12px;color:#335495'> {$value->wr_name} </td></tr>";
echo "</table></td>";
echo "</tr>";
echo "<tr><td colspan='10' height='1' bgcolor='#efefef'></td></tr>";
}
} else
echo "<td height=100 align=center colspan=4>등록된 글이 없습니다.</td>";
?>
</table>
</td>
</tr>
</table>
<?
include_once("$g4[path]/tail.php");
?>
===========================================
댓글 전체
if(그룹명){}
else{ }
else{ }