[Openfirst-cvscommit] downloads index.php,1.4,1.5
Brought to you by:
xtimg
From: <i-...@us...> - 2003-12-04 23:24:15
|
Update of /cvsroot/openfirst/downloads In directory sc8-pr-cvs1:/tmp/cvs-serv10996/downloads Modified Files: index.php Log Message: More bug fixes Index: index.php =================================================================== RCS file: /cvsroot/openfirst/downloads/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 4 Dec 2003 21:46:15 -0000 1.4 --- index.php 4 Dec 2003 23:24:12 -0000 1.5 *************** *** 35,39 **** define("cols",3); //rows per page ! define("rows",1); --- 35,39 ---- define("cols",3); //rows per page ! define("rows",2); *************** *** 82,94 **** } } else { $query = ofirst_dbquery("SELECT * FROM ofirst_downloadcat WHERE ID='".$category."'"); ! if(ofirst_dbnum_rows($query)==0){ ! echo("<div>The specified category does not exist</div>"); ! } else { $cat = ofirst_dbfetch_object($query); echo("<h1>$cat->Category</h1>"); echo("<div>$cat->Description<br><br></div>"); $category=$cat->Category; - $cattitle="Category: ".$category; } } --- 82,92 ---- } } else { + $cattitle="Category: ".$category; $query = ofirst_dbquery("SELECT * FROM ofirst_downloadcat WHERE ID='".$category."'"); ! if(ofirst_dbnum_rows($query)!=0){ $cat = ofirst_dbfetch_object($query); echo("<h1>$cat->Category</h1>"); echo("<div>$cat->Description<br><br></div>"); $category=$cat->Category; } } *************** *** 156,168 **** echo("<tr><td colspan=".cols." align=right>"); if($page>1){ ! echo('<a href="'.$_SERVER["PHP_SELF"].'?page='.($page-1).'"><< Prev</a> '); } echo("Page ".$page." of ".ceil($numfiles/(cols*rows))); if($page<ceil($numfiles/(cols*rows))){ ! echo(' <a href="'.$_SERVER["PHP_SELF"].'?page='.($page+1).'">Next >></a>'); } echo("</td></tr>"); } ! echo('<tr><td colspan='.cols.' align=right><br /><a href="'.$_SERVER["PHP_SELF"].'">Downloads Home</a></td></tr></table>'); } --- 154,166 ---- echo("<tr><td colspan=".cols." align=right>"); if($page>1){ ! echo('<a href="'.$_SERVER["PHP_SELF"].'?page='.($page-1).'&cat='.urlencode($category).'"><< Prev</a> '); } echo("Page ".$page." of ".ceil($numfiles/(cols*rows))); if($page<ceil($numfiles/(cols*rows))){ ! echo(' <a href="'.$_SERVER["PHP_SELF"].'?page='.($page+1).'&cat='.urlencode($category).'">Next >></a>'); } echo("</td></tr>"); } ! echo('<tr><td colspan='.cols.' align=right><br /><a href="$basepath/downloads">Downloads Home</a></td></tr></table>'); } |