blob: 0741b5c7cc78533963314b36b104e72af96fcb45 [file] [log] [blame]
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
$pageTitle = "Technology Project PMC Minutes";
$pageKeywords = "technology";
$pageAuthor = "Bjorn Freeman-Benson Nov 20/05";
ob_start();
if( $_GET['key'] ) {
?>
<div id="maincontent">
<div id="midcolumn">
<?php
if( preg_match( "/^(\d\d\d\d\.\d\d\.\d\d)$/", $_GET['key'], $matches ) > 0 ) {
$key = $matches[1];
$contents = file_get_contents( "minutes/" . $key . ".html" );
echo $contents ;
} else {
?>
<font color="red">
Sorry, <?= $_GET['key'] ?> is not a valid PMC meeting minutes file.
</font>
<?php
}
?>
</div>
</div>
<?php
} else {
?>
<div id="maincontent">
<div id="midcolumn">
<h1><?= $pageTitle ?></h1>
<ul>
<?php
$dir = "minutes/";
$months = Array(
"" => "",
"01" => "Jan",
"02" => "Feb",
"03" => "Mar",
"04" => "Apr",
"05" => "May",
"06" => "Jun",
"07" => "Jul",
"08" => "Aug",
"09" => "Sep",
"10" => "Oct",
"11" => "Nov",
"12" => "Dec"
);
if ($dh = opendir($dir)) {
$keys = Array();
while (($file = readdir($dh)) !== false) {
if( preg_match( "/(\d\d\d\d)\.(\d\d)\.(\d\d)\.html/", $file, $matches ) > 0 ) {
$y = $matches[1];
$m = $matches[2];
$d = $matches[3];
$key = $y . "." . $m . "." . $d;
$keys[] = $key;
}
}
closedir($dh);
sort( $keys );
$keys = array_reverse( $keys );
foreach( $keys as $key ) {
preg_match( "/(\d+)\.(\d+)\.(\d+)/", $key, $matches );
$y = $matches[1];
$m = $matches[2];
$d = $matches[3];
$m = $months[$m];
$contents = file_get_contents( "minutes/" . $key . ".html" );
preg_match( "/<h1>(.*)<\/h1>/", $contents, $matches );
$subject = $matches[1];
echo "<li><a href=\"pmc-minutes.php?key=$key\">$m, $d $y - $subject</a></li>\n";
}
} else {
echo "<li>" . $dir . " does not exist\n";
}
?>
</ul>
</div>
</div>
<?php
}
$html = ob_get_contents();
ob_end_clean();
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>