[Openfirst-cvscommit] news index.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-06-08 02:35:15
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv20014 Added Files: index.php Log Message: initial upload --- NEW FILE: index.php --- <?php /* * openFIRST.news - viewnews.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@sy...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ 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); } ?> |