2000-03-20 05:30:19 +00:00
|
|
|
<?
|
2000-05-08 01:15:09 +00:00
|
|
|
$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 );
|
2000-05-08 19:48:40 +00:00
|
|
|
newsItem( dateFromSQLDateTime( $n_date ), $n_user, $n_news );
|
2000-05-08 01:15:09 +00:00
|
|
|
}
|
|
|
|
} 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.' );
|
|
|
|
}
|
2000-03-20 05:30:19 +00:00
|
|
|
?>
|