mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-27 22:42:57 +00:00
add a notify at the bottom if the news is cached
This commit is contained in:
parent
231eb79fc2
commit
683674bfcc
2 changed files with 36 additions and 32 deletions
66
index.php
66
index.php
|
@ -1,32 +1,34 @@
|
|||
<? // Preamble
|
||||
$pageName = "News";
|
||||
$focused = "home"; // Dock icon name to get a border
|
||||
require "parts/preamble.php"; // Load most of document
|
||||
?>
|
||||
<!--SEARCHME-->
|
||||
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD colSpan="2"><? // News display
|
||||
tableBoxHeader (featureBgColor, featureHeadColor);
|
||||
tableTitle ('Latest News', 1, featureHeadColor);
|
||||
require "news_funcs.php";
|
||||
latestNews ('1 month');
|
||||
tableBoxFooter ();
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<? tableSpacer (9, 9, 1, "black"); ?>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<TD align="center">
|
||||
<? include "sponsor_incl.html"; ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<? tableSpacer (9, 9, 1, "black"); ?>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--NOSEARCH-->
|
||||
<?
|
||||
require "parts/postamble.php"; // Finish this sucker up
|
||||
?>
|
||||
<? // Preamble
|
||||
$pageName = "News";
|
||||
$focused = "home"; // Dock icon name to get a border
|
||||
require "parts/preamble.php"; // Load most of document
|
||||
?>
|
||||
<!--SEARCHME-->
|
||||
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD colSpan="2"><? // News display
|
||||
tableBoxHeader (featureBgColor, featureHeadColor);
|
||||
tableTitle ('Latest News', 1, featureHeadColor);
|
||||
require "news_funcs.php";
|
||||
$cached = latestNews ('1 month');
|
||||
tableBoxFooter ();
|
||||
if ($cached)
|
||||
echo '<P>A MySQL error occoured. This news is cached and may not be current';
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<? tableSpacer (9, 9, 1, "black"); ?>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<TD align="center">
|
||||
<? include "sponsor_incl.html"; ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign=top>
|
||||
<? tableSpacer (9, 9, 1, "black"); ?>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!--NOSEARCH-->
|
||||
<?
|
||||
require "parts/postamble.php"; // Finish this sucker up
|
||||
?>
|
||||
|
|
|
@ -127,8 +127,10 @@
|
|||
mysql_close ($conn);
|
||||
} else {
|
||||
include ('cache.php');
|
||||
return (1);
|
||||
// newsItem ('Now', 'Web Server', '<P>Error: Could not connect to SQL server to fetch news. Please notify the server administrator.');
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
function fetchNewsEntry ($number)
|
||||
|
|
Loading…
Reference in a new issue