This commit is contained in:
Nelson Rush 2000-05-08 00:30:27 +00:00
parent 7915df0394
commit 448296927c
2 changed files with 3 additions and 24 deletions

View file

@ -1,25 +1,4 @@
<?
$conn = mysql_pconnect( "moby", "quakeforge", "6ef/HNvv" );
if ( $conn ) {
$query = 'SELECT n_date, n_user, n_news FROM news_main ' .
'WHERE n_date > DATE_SUB(NOW(), INTERVAL 1 MONTH) ' .
'ORDER BY n_date DESC';
$result = mysql_db_query( "quakeforge", $query, $conn );
if ( $result > 0 ) {
$numRows = mysql_num_rows( $result );
if ( $numRows > 0 ) {
for ( $i = 0 ; $i < $numRows ; $i++ ) {
list( $n_date, $n_user, $n_news ) = mysql_fetch_row( $result );
newsItem( $n_date, $n_user, $n_news );
}
} else {
newsItem( 'now', 'Web Server', '<P>No current news!' );
}
} else {
newsItem( 'now', 'Web Server', '<P>No news in database!' );
}
$result = mysql_close( $conn );
} else {
newsItem( 'Now', 'Web Server', '<P>Error: Could not connect to SQL server to fetch news. Please notify the server administrator.' );
}
Do not screw with other memeber's news entries, it is not appreciated.
?>

View file

@ -10,7 +10,7 @@
tableBoxHeader( 'black', $tableHeadColor );
tableTitle( 'Latest News', 1, $tableHeadColor );
include("news_funcs.php");
include("cur_news.php");
<br>Do not screw with other member's news entries, it is not appreciated.<br>
tableBoxFooter();
?></TD>
</TR>