그룹생성시 그룹제목과 그룹에 생성된 게시판만 보이게 하기.. > 그누3 팁자료실

그누3 팁자료실

그룹생성시 그룹제목과 그룹에 생성된 게시판만 보이게 하기.. 정보

일반 그룹생성시 그룹제목과 그룹에 생성된 게시판만 보이게 하기..

본문

그누보드를 이용해서 그룹을 여러개를 생성했습니다........ 그랬을 경우 원하는 그룹제목과 그 그룹의 게시판들만 보여주고 싶을 때 아래와 같이 적용하면됩니다....

                      <?
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$sqlgr = " select * from $cfg[table_group] where gr_id = '그룹아이디를 적으세요'";
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$resgr = sql_query_error($sqlgr);
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while ($rowgr = mysql_fetch_array($resgr)) {
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo " &nbsp; <b>$rowgr[gr_subject]</b><br>";
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$sqlbo = " select * from $cfg[table_board] where gr_id = '$rowgr[gr_id]' order by bo_table ";
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$resbo = sql_query_error($sqlbo);
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while ($rowbo = mysql_fetch_array($resbo)) {
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo " &nbsp;&nbsp;&nbsp; - <a href='./gnuboard.php?bo_table=$rowbo[bo_table]'>$rowbo[bo_subject]</a><br>";
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mysql_free_result($resbo);
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mysql_free_result($resgr);
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;?>
추천
4
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로