website/sotc/index.php

95 lines
2.7 KiB
PHP
Raw Normal View History

2000-05-08 02:39:55 +00:00
<? // Preamble
$pageName = "State of the Code";
$focused = "none"; // Dock icon name to gets a border
2001-10-17 05:46:43 +00:00
$currPage = "sotc"; // Name of the page, for the menu
require "../parts/preamble.php"; // Load most of document
2000-05-08 02:39:55 +00:00
?>
<!--SEARCHME-->
<P>The State of the Code address is a not-frequently-enough updated article
2002-02-18 07:25:03 +00:00
written by one of the QuakeForge developers, primarily for other QuakeForge
developers and other people who consider themselves to be knee-deep in the
code, whether they happen to be writing it or just testing it. What you won't
find here is a lot of the fluff news that tells the casual onlooker that the
project is actually doing stuff without really telling you what the state of
things are.
2000-05-08 02:39:55 +00:00
<P>No attempt will be made to soften technical issues so anyone can understand
them. If you want to really know what's going on, you probably don't want
details left out because they might not make a whole lot of sense to a
non-coder. Feedback is always welcome. So are corrections if they're
2002-02-18 07:25:03 +00:00
necessary.
2000-05-08 02:39:55 +00:00
<? // Display latest update
function sotcShowLatest ($year) {
2000-05-08 02:39:55 +00:00
$i = 0;
2000-04-18 16:25:45 +00:00
$dirHandle = @opendir ($year);
2000-05-08 02:39:55 +00:00
if ($dirHandle) {
while ($fileName = readdir ($dirHandle)) {
2000-05-08 02:39:55 +00:00
if ($fileName != '.' && $fileName != '..' && $fileName != 'CVS') {
$sotcList[$i++] = $fileName;
}
2000-04-19 00:24:29 +00:00
}
2000-05-08 02:39:55 +00:00
closedir ($dirHandle);
rsort ($sotcList);
include ($year . '/' . $sotcList[0]);
} else {
2001-01-14 01:55:42 +00:00
echo '<P>Sorry, there are no State of the Code announcements for this year yet.';
2000-05-08 02:39:55 +00:00
}
}
function sotcYears() {
$i = 0;
$dirHandle = opendir('./');
2000-05-08 02:39:55 +00:00
if ($dirHandle) {
while ($year = readdir($dirHandle)) {
if (is_dir ($year) && $year != '.' && $year != '..' && $year != 'CVS') {
2000-05-08 02:39:55 +00:00
$years[$i++] = $year;
2000-04-19 00:24:29 +00:00
}
}
2000-05-08 02:39:55 +00:00
closedir ($dirHandle);
rsort ($years);
return $years;
2000-04-19 00:24:29 +00:00
}
2000-05-08 02:39:55 +00:00
}
function sotcListFiles( $year ) {
$i = 0;
$dirHandle = opendir ($year);
2000-05-08 02:39:55 +00:00
if ($dirHandle) {
while ($fileName = readdir($dirHandle)) {
if ($fileName != '.' && $fileName != '..' && $fileName != 'CVS') {
$sotcList[$i++] = $fileName;
}
}
closedir ($dirHandle);
rsort ($sotcList);
2002-02-18 07:25:03 +00:00
if (count ($sotcList) > 0) {
2000-05-08 02:39:55 +00:00
tableBoxHeader('black', tableHeadColor);
tableTitle('SotC Archives for ' . $year, 3, tableHeadColor);
2002-02-18 07:25:03 +00:00
for ($i = 0; $i < count ($sotcList); $i++) {
$file = fopen ($year . '/' . $sotcList[$i], 'r');
$line = fgets ($file, 4096);
2000-05-08 02:39:55 +00:00
fclose($file);
$line = ereg_replace('<!--', '', ereg_replace('-->', '', $line));
echo '<TR><TD>' . $line . '</TD></TR>';
}
2002-02-18 07:25:03 +00:00
tableBoxFooter ();
2000-05-08 02:39:55 +00:00
}
}
}
if (!$year) {
2002-02-18 07:25:03 +00:00
$year = date('Y', time ());
2000-05-08 02:39:55 +00:00
}
2000-06-20 13:53:26 +00:00
sotcShowLatest ($year);
2002-02-18 07:25:03 +00:00
echo '<P>';
sotcListFiles ($year);
2000-05-08 02:39:55 +00:00
?>
<!--NOSEARCH-->
<?
2000-06-20 13:53:26 +00:00
require "../parts/postamble.php"; // Finish this sucker up
2000-05-08 02:39:55 +00:00
?>