[Openfirst-cvscommit] news index.php,1.1,1.2
Brought to you by:
xtimg
From: <dav...@us...> - 2003-06-08 02:51:08
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv23145 Modified Files: index.php Log Message: Edit to news.php Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 8 Jun 2003 02:35:12 -0000 1.1 --- index.php 8 Jun 2003 02:51:05 -0000 1.2 *************** *** 1,5 **** <?php /* ! * openFIRST.news - viewnews.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openFIRST.news - news.php * * Copyright (C) 2003, *************** *** 26,53 **** * */ ! mysql_select_db($sqldatabase,$sqlconnection); ! ! function shownews($limit = 5) { ! ! // Get a list of the users able to ! // be contacted via the feedback form. ! $query = mysql_query("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;"); ! ! if (mysql_num_rows($query) != 0){ ! ! while($news = mysql_fetch_object($query)){ ! echo(" ! <p><strong>$news->title</strong> ! <br />Posted on $news->date by $news->poster ! <br />$news->news ! </p>"); ! } ! } else { ! echo("There is not yet any ! news."); ! } ! return(0); ! } ?> --- 26,35 ---- * */ + include("../config/globals.php"); + include($header); + include("./viewnews.php"); ! shownews(5); // Shows 5 pieces of news. ! include($footer); ?> |