shop-wiz logo
Follow Us on Facebook Follow Us on Google+ Follow Us on Twitter Follow Us on LinkedIn
제목 간단하게 게시판 공지 구현하기.
등록일 2007.12.08 HIT 16010 작성자 소다인
게시판 상단에 제로보드처럼 게시판 공지를 구현하는 초간단 팁입니다.

1. 아래 소스를 게시판 목록보기 소스에 끼워 넣습니다.
경로 : wizboard/skin/스킨이름/list.php
소스위치 : 제가 만든 소스에는 93번 라인 쯤이였습니다. 목록 제목(번호, 이름, 제목, 날짜, 조회수)을 출력하는 부분 바로 아래 입니다. 즉, 공지사항이 출력 될 위치.

2. 그리고 글쓰기 할 때 [글쓴이]에 [notice], [비밀번호]에 [슈퍼관리자 비밀번호]를 입력하시면 됩니다. 이런 조건으로 등록 된 글은 공지사항으로 간주되어 목록 상단에 항상 출력 됩니다.

-------------------------------------------------------------------------------
<?
//-- 공지사항 읽어오기
/*** ADMIN 패스워드 가져오기 ******/
if($GID) $ADMIN_STR="SELECT Pass FROM wizTable_Main WHERE BID='$BID' and GID='$GID'";
else $ADMIN_STR="SELECT Pass FROM wizTable_Main WHERE BID='$BID'";

$ADMIN_QRY=mysql_query($ADMIN_STR);
$ADMINPWD=mysql_fetch_array($ADMIN_QRY) or die(mysql_error());

$nQuery        = "select * from $BOARD_NAME where NAME = 'notice' and PASSWD = '$ADMINPWD[Pass]'";
$nResult    = mysql_query($nQuery);
while($rData = mysql_fetch_array($nResult)): ?>
    <tr height="1" bgcolor="#C3C3C3"><td colspan="9"></td></tr>
    <tr height="30" style="color:#616161; font-weight:bold;"> 
        <td width="49"    style="font-size:11px;" align="center"></td>
        <td></td>
        <td width="99"     style="font-size:11px;"align="center">공지</td>
        <td></td>
        <td style="font-size:11px;">&nbsp;<a href="<?=$PHP_SELF?>?BID=<?=$BID;?>&GID=<?=$GID;?>&mode=view&UID=<?=$rData[UID];?>&CURRENT_PAGE=<?=$CURRENT_PAGE;?>&BOARD_NO=<?=$BOARD_NO1;?>&SEARCHTITLE=<?=$SEARCHTITLE?>&searchkeyword=<?=$searchkeyword?>&category=<?=$category?>" style="TEXT-DECORATION: none; COLOR: #777777;" onClick="this.blur();"><?=$rData[SUBJECT]?></a></td>
        <td></td>
        <td width="109"    style="font-size:11px;" align="center"><?=date("Y/m/d", $rData[W_DATE])?></td>
        <td></td>
        <td width="70"    style="font-size:11px;" align="center"><?=$rData[COUNT]?></td>
    </tr>
<?endwhile;?>

-------------------------------------------------------------------------------

디비 필드를 추가하거나 조작 없이 간단하게 구현 할 수 있는거라 제가 여기저기서 많이 응용하는 방법입니다.
도움이 되었으면 하네요.
댓글보기
north face mens jackets <a href="http://www.northsaleuk.com/">http://www.northsaleuk.com/</a> <a href="http://www.saleoutlets.net/north-face-denali-jackets-women-c-6.html">http://www.saleoutlets.net/north-face-denali-jackets-women-c-6.html</a> Technology Definitions define the principles of management control strategies, <a href="http://www.saleoutlets.net/">http://www.saleoutlets.net/</a> measures a typical case of domestic rocky rocky Guangdong, <a href="http://www.northsaleuk.com/mens-north-face-jackets-c-65.html">http://www.northsaleuk.com/mens-north-face-jackets-c-65.html</a> Guizhou province more than 10 million people threatened by the rocky karst rocky desertification Technology Definitions Chinese name: <a href="http://www.northsaleuk.com/womens-north-face-jackets-c-66.html">http://www.northsaleuk.com/womens-north-face-jackets-c-66.html</a> English name rocky: <a href="http://www.northsaleuk.com/mens-north-face-down-jackets-c-68.html">http://www.northsaleuk.com/mens-north-face-down-jackets-c-68.html</a> stony desertification definition: <a href="http://www.northsaleuk.com/kids-north-face-jackets-c-67.html">http://www.northsaleuk.com/kids-north-face-jackets-c-67.html</a> <a href="http://www.saleoutlets.net/north-face-jackets-kids-c-12.html">http://www.saleoutlets.net/north-face-jackets-kids-c-12.html</a> the gradual process of the formation of stone desert landscape. <a href="http://www.northsaleuk.com/mens-moncler-jackets-c-73.html">http://www.northsaleuk.com/mens-moncler-jackets-c-73.html</a> Occurred in the shallow surface soil erosion area or, <a href="http://www.saleoutlets.net/north-face-denali-jackets-men-c-11.html">http://www.saleoutlets.net/north-face-denali-jackets-men-c-11.html</a> serious soil erosion of the mountain plateau.<a href="http://www.thenorthface-outlet.me.uk/">http://www.thenorthface-outlet.me.uk/</a> 9ff202609f51dd9c14c3108d2fd17c93 2011.10.27 X
cao The gold sovereign group through the firmness<a href=http://www.sell-brand-bag.com>Hermes Handbags</a> development for several years became three tonic card greatly and with each other:Gold the sovereign jewelry, Tao be sovereign, the Way intergalactic star jewelry of the La Milky.With"go to the United States to pursue, happiness own" for brand<a href=http://www.sell-brand-bag.com>Louis Vuitton Handbags</a> principle of the gold sovereign jewelry, main conduct pure gold decoration, jewelry diamond and business enterprise gift, have representative most among them of is the diamond series of"happy woman".This series releases Yi to start and brand spokesperson Ms. Chen2 Hui4 Lin2 was invite to take "happy woman" diamond series an<a href=http://www.sell-brand-bag.com>wholesale Handbags</a> advertisement.Beginning of year and movie in this year 《I know woman's heart 》of sit astride boundary a cooperation medium, for the country border star Gong Li the young lady measured a body to create related diamond series and the gold sovereign jewelry<a href=http://www.sell-brand-bag.com>Designer Handbags</a> will explain a woman to pursue a happy principle through a different material, different design in the future. 2011.11.15 X

Powered by shop-wiz since 2002, e-mail:wangta69@naver.com