[Openfirst-cvscommit] news/admin editnews.php,1.2,1.3
Brought to you by:
xtimg
From: <i-...@us...> - 2003-10-23 11:42:38
|
Update of /cvsroot/openfirst/news/admin In directory sc8-pr-cvs1:/tmp/cvs-serv10399/news/admin Modified Files: editnews.php Log Message: Improved efficiency Index: editnews.php =================================================================== RCS file: /cvsroot/openfirst/news/admin/editnews.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editnews.php 13 Oct 2003 17:59:50 -0000 1.2 --- editnews.php 23 Oct 2003 00:55:49 -0000 1.3 *************** *** 41,56 **** if(! isset($_POST["news"])) { // Display a form for news. ! $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC"); ! $title=""; ! $found=false; if (ofirst_dbnum_rows($query) != 0){ ! while($news = ofirst_dbfetch_object($query)){ ! if($news->ID==$articleid){ ! $found=true; ! break; ! } ! } ! } ! if($found){ ?> <form name="NewsForm" id="NewsForm" method="post" action="<?php echo($_SERVER["PHP_SELF"]); ?>"> --- 41,47 ---- if(! isset($_POST["news"])) { // Display a form for news. ! $query = ofirst_dbquery("SELECT * FROM ofirst_news WHERE ID='$articleid'"); if (ofirst_dbnum_rows($query) != 0){ ! $news = ofirst_dbfetch_object($query); ?> <form name="NewsForm" id="NewsForm" method="post" action="<?php echo($_SERVER["PHP_SELF"]); ?>"> |