include("template");
?>
while($line = next($content))
echo $line;
?>
|
echo gradient($mediumlightcolor, $semilightcolor, 4, 1, 0); ?>
 |
if($showstuff)
{
?>
 |
if(file_exists($rootpath."/data/news/index"))
{
$announcements=0;
$fcontents=file($rootpath."/data/news/index");
$now=time();
while (list ($line_num, $line)=each($fcontents))
{
$posted=rtrim(strtok($line, "\t"));
$stuff=rtrim(strtok("\t"));
$name=rtrim(strtok("\t"));
$expiration=rtrim(strtok("\t"));
$new=rtrim(strtok("\t"));
if($expiration!=''&&$now-86400>=$expiration)
{
$resave=1;
$fcontents[$line_num]="~";
}
else if($expiration!='')
{
if($announcements==0)
{
echo "\n";
echo " | \n";
echo "| \n";
$announcements=1;
}
echo $stuff." ".$new." ".date("l, F j g:i a", $posted)." by ".$name."
\n";
}
}
if($announcements==1)
{
echo " |
| \n";
?> echo gradient($mediumlightcolor, $semilightcolor, 5, 1, 0); ?> |
}
if($resave)
{
reset($fcontents);
$handle=fopen($rootpath."/data/news/index", "w");
while(list($line_num, $line)=each($fcontents))
if(rtrim($line)!="~")
fwrite($handle, rtrim($line)."\t\n");
fclose($handle);
}
getCalendar(7);
}
?>
|
}
echo $footer;
?>
|