blob: 04464f40d45786fae370cd94ab62f373659a231d [file] [log] [blame]
<?
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectInfoList.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectInfoData.class.php"); // use the project info system
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectList.class.php");
require_once('projectFunctions.php');
$filter = $_GET['filter'];
function retrieveDescription($path)
{
$path = $_SERVER['DOCUMENT_ROOT'] . $path;
$handle = @fopen($path, 'r');
$contents = @fread($handle, filesize($path));
@fclose($handle);
$contents = strip_tags($contents, "<b>");
$order = array("\r\n", "\n", "\r");
$contents = str_replace($order, ' ', trim($contents));
$contents = str_replace("</b>", "</b><br/>", $contents);
$contents = mb_convert_encoding($contents, "HTML-ENTITIES");
return $contents;
}
?>
<table width="100%" class="contentTable projectsTable" id="projectsTable" cellspacing=0 style="font-size:95%;">
<?
if ($filter == "" || $filter == "ALL") {
$projectList = new projectList();
$projectList->selectProjectList(NULL, NULL, 1, NULL, NULL, "PRJ.project_id");
$projectIterator = new Project();
for ($i=0; $i < $projectList->getCount(); $i++)
{
$projectIterator = $projectList->getItemAt($i);
$projectInfoData = new ProjectInfoData($projectIterator->project_id);
$description = retrieveDescription($projectInfoData->paragraphurl);
if ($projectInfoData->projectname == "")
{
$projectName = $projectIterator->name;
}
else
{
$projectName = $projectInfoData->projectname;
}
if ($projectIterator->name == "Internal Foundation Projects") continue;
?>
<tr class="tableData topLevel">
<td>
<a id="<?=$projectInfoData->projectname;?>" <? if ($description != "") { echo "title=\"$description\""; } ?> class="packageTitle" href="<?=$projectInfoData->downloadsurl;?>"><?=$projectInfoData->projectname;?></a>
<a href="<?=$projectInfoData->projecturl;?>" title="Homepage"><img align="top" src="http://www.eclipse.org/home/categories/images/homepage.gif"></a>
</td>
</tr>
<? echo returnSubProjects($projectIterator->project_id);
}
}
else {
$projectInfoList = new ProjectInfoList();
if ($filter == "GAN")
{
$projectInfoList->selectProjectInfoList(NULL, 'simultaneousrelease', 'ganymede');
$projectInfoList->alphaSortList();
}
else {
$projectInfoList->selectProjectInfoList(NULL, "categories", NULL, $filter, NULL, NULL);
$projectInfoList->alphaSortList();
}
for ($i=0; $i < $projectInfoList->getCount(); $i++)
{
$projectInfoIterator = $projectInfoList->getItemAt($i);
$description = retrieveDescription($projectInfoIterator->paragraphurl);
?>
<tr class="tableData topLevel">
<td id="<?=$projectInfoIterator->projectID;?>">
<a class="packageTitle" <? if ($description != "") { echo "title=\"$description\""; } ?> href="<?=$projectInfoIterator->downloadsurl;?>"><?=$projectInfoIterator->projectname;?></a>
<a href="<?=$projectInfoIterator->projecturl;?>" title="Homepage"><img align="top" src="http://www.eclipse.org/home/categories/images/homepage.gif"></a>
</td>
</tr><?
if ($filter != "RT" && $filter != "MDL"){
echo returnSubProjects($projectInfoIterator->projectid);
}
}
}
?>
</table>