투사님 자동메뉴 전체글 수 추력 질문드려요 정보
투사님 자동메뉴 전체글 수 추력 질문드려요본문
<table width='154' cellpadding=0 cellspacing=0 border=0>
<?
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '04'";//해당그룹 $gr_id를 해당그룹명으로 대체가능
$result = sql_query($sql);
while ($row=mysql_fetch_array($result)) {
$sql2 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
$result2 = sql_query($sql2);
while ($row2=mysql_fetch_array($result2)) {
$new_time = date("Y-m-d H:i:s", time()-3600*$row2[bo_new]);
$sql3 = " select count(*) as cnt from $g4[write_prefix]$row2[bo_table] where wr_datetime >= '$new_time' ";
$row3 = sql_fetch($sql3);
if ($row2[bo_table] == $bo_table)
echo "<tr><td background=$g4[path]/images/rightmenu_off_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'><font color=#616B71><b>$row2[bo_subject]<b></font></a></td></tr>";
else
echo "<tr><td background=$g4[path]/images/rightmenu_on_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'>$row2[bo_subject]</a></td></tr>"; //네모 뷸릿 + 테이블명 + new 아이콘
}
}
?>
</table>
===============================
여기 어디에다가 넣어야 전체 글 수를 출력 할 수 있나요?^^;
아래 것을 빈페이지에서는 출력되는데, 위에것의 안에다 넣으니 에러가 나서요.
아니면 다른 것을 넣어야 되는건지..궁금해요
<?
function t_count($bo_table){
global $g4;
$row = sql_fetch("select bo_count_write from $g4[board_table] where bo_table='{$bo_table}'");
$total_count = $row[bo_count_write];
return $total_count;
}
?>
자유게시판(<?=t_count("c1")?>)
질문게시판(<?=t_count("c2")?>)
<?
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '04'";//해당그룹 $gr_id를 해당그룹명으로 대체가능
$result = sql_query($sql);
while ($row=mysql_fetch_array($result)) {
$sql2 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
$result2 = sql_query($sql2);
while ($row2=mysql_fetch_array($result2)) {
$new_time = date("Y-m-d H:i:s", time()-3600*$row2[bo_new]);
$sql3 = " select count(*) as cnt from $g4[write_prefix]$row2[bo_table] where wr_datetime >= '$new_time' ";
$row3 = sql_fetch($sql3);
if ($row2[bo_table] == $bo_table)
echo "<tr><td background=$g4[path]/images/rightmenu_off_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'><font color=#616B71><b>$row2[bo_subject]<b></font></a></td></tr>";
else
echo "<tr><td background=$g4[path]/images/rightmenu_on_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'>$row2[bo_subject]</a></td></tr>"; //네모 뷸릿 + 테이블명 + new 아이콘
}
}
?>
</table>
===============================
여기 어디에다가 넣어야 전체 글 수를 출력 할 수 있나요?^^;
아래 것을 빈페이지에서는 출력되는데, 위에것의 안에다 넣으니 에러가 나서요.
아니면 다른 것을 넣어야 되는건지..궁금해요
<?
function t_count($bo_table){
global $g4;
$row = sql_fetch("select bo_count_write from $g4[board_table] where bo_table='{$bo_table}'");
$total_count = $row[bo_count_write];
return $total_count;
}
?>
자유게시판(<?=t_count("c1")?>)
질문게시판(<?=t_count("c2")?>)
댓글 전체
<?
function t_count($bo_table){
global $g4;
$row = sql_fetch("select bo_count_write from $g4[board_table] where bo_table='{$bo_table}'");
$total_count = $row[bo_count_write];
return $total_count;
}
$totalC1 = t_count("c1");
$totalC1 = t_count("c2");
?>
<table width='154' cellpadding=0 cellspacing=0 border=0>
<tr>
<td> 자유게시판(<span=style="color:red"><?=$totalC1?></span>) 질문게시판(<span=style="color:red"><?=$totalC2?></span>) </td>
</tr>
<?
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '04'";//해당그룹 $gr_id를 해당그룹명으로 대체가능
$result = sql_query($sql);
while ($row=mysql_fetch_array($result)) {
$sql2 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
$result2 = sql_query($sql2);
while ($row2=mysql_fetch_array($result2)) {
$new_time = date("Y-m-d H:i:s", time()-3600*$row2[bo_new]);
$sql3 = " select count(*) as cnt from $g4[write_prefix]$row2[bo_table] where wr_datetime >= '$new_time' ";
$row3 = sql_fetch($sql3);
if ($row2[bo_table] == $bo_table)
{
echo "<tr><td background=$g4[path]/images/rightmenu_off_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'><font color=#616B71><b>$row2[bo_subject]<b></font></a></td></tr>";
}
else
{
echo "<tr><td background=$g4[path]/images/rightmenu_on_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'>$row2[bo_subject]</a></td></tr>"; //네모 뷸릿 + 테이블명 + new 아이콘
}
}
}
?>
</table>
// 이렇게 하면 될려나... 한번 해보세요.
function t_count($bo_table){
global $g4;
$row = sql_fetch("select bo_count_write from $g4[board_table] where bo_table='{$bo_table}'");
$total_count = $row[bo_count_write];
return $total_count;
}
$totalC1 = t_count("c1");
$totalC1 = t_count("c2");
?>
<table width='154' cellpadding=0 cellspacing=0 border=0>
<tr>
<td> 자유게시판(<span=style="color:red"><?=$totalC1?></span>) 질문게시판(<span=style="color:red"><?=$totalC2?></span>) </td>
</tr>
<?
$sql = " select gr_id, gr_subject from $g4[group_table] where gr_id = '04'";//해당그룹 $gr_id를 해당그룹명으로 대체가능
$result = sql_query($sql);
while ($row=mysql_fetch_array($result)) {
$sql2 = " select bo_subject, bo_table from $g4[board_table] where (bo_list_level <= $member[mb_level]) and (gr_id = '$row[gr_id]') and bo_use_search = '1' order by bo_order_search";
$result2 = sql_query($sql2);
while ($row2=mysql_fetch_array($result2)) {
$new_time = date("Y-m-d H:i:s", time()-3600*$row2[bo_new]);
$sql3 = " select count(*) as cnt from $g4[write_prefix]$row2[bo_table] where wr_datetime >= '$new_time' ";
$row3 = sql_fetch($sql3);
if ($row2[bo_table] == $bo_table)
{
echo "<tr><td background=$g4[path]/images/rightmenu_off_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'><font color=#616B71><b>$row2[bo_subject]<b></font></a></td></tr>";
}
else
{
echo "<tr><td background=$g4[path]/images/rightmenu_on_bg.gif width=154 height=25 style=padding-left:29;padding-top:3><a href='$g4[bbs_path]/board.php?bo_table=$row2[bo_table]' onfocus='this.blur()'>$row2[bo_subject]</a></td></tr>"; //네모 뷸릿 + 테이블명 + new 아이콘
}
}
}
?>
</table>
// 이렇게 하면 될려나... 한번 해보세요.
안되네요 ㅎ