blob: 72424f74144073a1272b7961db96607e391445f9 [file] [log] [blame]
<?php
include "constants.php";
include "classes.php";
include "parse_dom.php";
$debug = $_GET[debug]; // are we in debug mode?
//Table of contents
$toc_url = "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/ip_logs/toc.txt?root=Tools_Project&view=co";
//$toc_url = "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/ip_logs/toc.txt?revision=1.1.2.3&root=Tools_Project&pathrev=set1";
//$toc_url = "toc.txt";
//$toc_url=eregi_replace('{KU}','&',$toc_url);
debug("Processing: ".$toc_url);
//Get the filenames
$file_names = file(urlencode($toc_url), FILE_IGNORE_NEW_LINES);
//$handle = fopen (urlencode($toc_url), "r");
//while (!feof ($handle)) {
// $buffer = fgets($handle, 4096);
// echo $buffer;
// $file_names[] = $buffer;
//}
//fclose ($handle);
if (!$file_names) {
debug("Error processing toc.");
} else {
debug("Files in toc: ".count($file_names));
var_dump($file_names);
}
echo "<table BORDER=0 CELLSPACING=5 CELLPADDING=2 WIDTH=\"100%\" >\n";
foreach ($file_names as $file) {
$file = trim($file);
debug("Processing file: ".$file);
$project_versions = parse($file);
foreach ($project_versions as $project) {
printProject($project);
}
}
echo "</table>";
function printProject($project) {
echo "<tr>\n";
echo "<td width=\"2%\" align=RIGHT valign=TOP><img src=\"http://eclipse.org/images/Adarrow.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n";
echo "<td width=\"98%\"><b>".$project->info->name."</b> ";
echo "<a href=\"http://dev.eclipse.org/viewcvs/index.cgi/".$project->info->location."/?root=Tools_Project&pathrev=".$project->info->tag."\" style=\"text-decoration: none\">".$project->version."</a> ";
switch ($project->status) {
case "done" :
echo "<font color=green>status:green</font>";
break;
default :
echo "<font color=red>status:red</font>";
break;
}
foreach ($project->notes as $note) {
echo "<p>".$note."\n";
}
echo "\n</td>\n";
echo "</tr>\n";
}
// print out the given message if we are in debug mode
function debug($str) {
global $debug;
if (isset($debug))
echo $str."<br>\n";
}
?>