mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-14 00:40:45 +00:00
27 lines
1,021 B
PHP
27 lines
1,021 B
PHP
<?
|
|
need('date sql');
|
|
|
|
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
|
|
if ($conn) {
|
|
$query = 'SELECT p_date, p_user, p_plan FROM devel_plans' .
|
|
'WHERE p_plan != \'None\' ORDER BY p_date DESC, p_user';
|
|
$result = @mysql_db_query (sqlDB, $query, $conn);
|
|
newsItem ('now', 'theoddone33', "<p>result is $result");
|
|
if ($result) {
|
|
$numRows = @mysql_num_rows ($result);
|
|
if ($numRows) {
|
|
for ($i = 0 ; $i < $numRows ; $i++) {
|
|
list ($p_date, $p_user, $p_plan) = mysql_fetch_row ($result);
|
|
newsItem (dateFromSQLDateTime ($p_date), ucfirst($p_user), StripSlashes($p_plan));
|
|
}
|
|
} else {
|
|
newsItem ('now', 'Web Server', '<P>An error occoured, please contact the webmaster');
|
|
}
|
|
} else {
|
|
newsItem ('now', 'Web Server', '<P>Can\'t find any plans! Please contact the webmaster');
|
|
}
|
|
mysql_close ($conn);
|
|
} else {
|
|
newsItem ('Now', 'Web Server', '<P>Error: Could not connect to SQL server to fetch plans. Please notify the server administrator.');
|
|
}
|
|
?>
|