blob: d2b10e0368046b5d48d89ebf999314f0dac29026 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
include "constants.php";
include "classes.php";
include "parse_dom.php";
$debug = $_GET[debug]; // are we in debug mode?
$file_names = array();
$handle = opendir(".");
while (false !== ($file = readdir($handle))) {
if (is_file($file) && ereg("\.ip_log",$file)) {
array_push($file_names, $file);
}
}
closedir($handle);
debug("IP Files: ".count($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>";
/*
* Print out the given project as an element in the enclosing 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%\">";
echo "<strong><a href=\"".$project->info->reference."\">".$project->info->name."</a> version ".$project->version." ";
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->id.")</a> ";
$colour;
switch ($project->status) {
case STATUS_DONE :
$colour=green;
break;
default :
$colour=red;
break;
}
echo " <font color=".$colour.">status:".$colour."</font></strong><br>";
if (isSet($project->legal)) {
foreach ($project->legal as $legal) {
echo tab()."<strong>License:</strong> ";
if (isSet($legal->package)) {
echo "(".$legal->package.")";
}
echo " <a href=\"".$legal->license->reference."\">".$legal->license->name."</a>";
echo " (<a href=\"https://dev.eclipse.org/ipzilla/show_bug.cgi?id=".$legal->ipzilla."\">IPZilla</a>)<br>\n";
}
}
echo tab()."<strong>Contact:</strong> <a href=\"mailto:".$project->contact->email."\">".$project->contact->name."</a> (".$project->contact->company.")<br>\n";
foreach ($project->notes as $note) {
echo tab()."<strong>Note:</strong> ".$note."<p>\n";
}
echo "\n</td>\n";
echo "</tr>\n";
}
/*
* Helper method to return a bunch of spaces.
*/
function tab() {
return "&nbsp;&nbsp;&nbsp;&nbsp;";
}
/*
* Print out the given message if we are in debug mode.
* You can get into debug mode by setting ?debug=true in the URL.
*/
function debug($str) {
global $debug;
if (isset($debug)) echo $str."<br>\n";
}
?>