<?php | |
/******************************************************************************* | |
* Copyright (c) 2014 Eclipse Foundation 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://eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Christopher Guindon (Eclipse Foundation) - Initial implementation | |
*******************************************************************************/ | |
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()); | |
# Begin: page-specific settings. Change these. | |
$pageTitle = "Eclipse Membership"; | |
$pageKeywords = "eclipse membership"; | |
$pageAuthor = "Christopher Guindon"; | |
//require_once("./scripts/dondebug.php"); | |
require_once("./scripts/db_access.php"); | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/smartconnection.class.php"); | |
include("lookup_exceptions.php"); | |
$dbc = new DBConnection(); | |
$dbc->connect(); | |
$_ORDER = $_POST['order'] ? $_POST['order'] : $_GET['order']; | |
switch ($_ORDER) { | |
case "type": $order_by = "ORG.member_type desc, ORG.name1"; break; | |
case "complete": $order_by = "COMPLETE, ORG.name1"; break; | |
default: $order_by = "ORG.name1"; | |
} | |
$selectall = "SELECT ORGI.OrganizationID, ORG.name1, ORGI.short_description, ORG.member_type, ORGI.company_url IS NULL AS COMPLETE | |
from OrganizationInformation as ORGI | |
RIGHT JOIN organizations as ORG on ORGI.OrganizationID = ORG.organization_id | |
WHERE ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') | |
AND ORG.organization_id not in ( " . ignoreMembers() . ") | |
ORDER BY " . $order_by; | |
$MATCHES = mysql_evaluate_rows($selectall); | |
$LIST = '<div class="homeitem3col"><h3>All Eclipse Foundation Members</h3>'; | |
#$NOT_SET_LIST = '<div class="homeitem3col"><h3>All Eclipse Foundation Members</h3><ul>'; | |
foreach ($MATCHES as $a) { | |
$org_id = $a[0]; | |
$org_name = $a[1]; | |
$org_short_desc = $a[2]; | |
$org_type = $a[3]; | |
switch ($org_type) | |
{ | |
case "SD" : $org_type="Strategic Developer"; break; | |
case "SC" : $org_type="Strategic Consumer"; break; | |
case "AS" : $org_type="Associate"; break; | |
case "ENTRP" : $org_type="Enterprise"; break; | |
case "AP" : $org_type="Solutions Member"; | |
} | |
if ($org_short_desc != "") { | |
$LIST .= '<table class="table" width="100%"><tr><td><a href="./showMember.php?member_id=' . $org_id . '"><img align="left" width="120" src="./scripts/get_image.php?id=' . $org_id. '&size=small" style="padding:5px;" alt="'. $org_name . '"></a></td> | |
<td>' . $org_short_desc . '</td> | |
<td width="100">' . $org_type . '</td> | |
</tr></table>'; | |
} else { | |
$LIST .= '<table width="100%" class="table"><tr><td width="130"><small> <img align="left" width="120" src="./scripts/get_image.php?id=' . $org_id. '&size=small" style="padding:5px;" alt="'. $org_name . '"></small></td> | |
<td>' . $org_name . '<br />This member has not yet set up their foundation membership page.</td> | |
<td width="100">' . $org_type . '</td> | |
</tr></table>'; | |
} | |
} | |
$LIST .= '</div>'; | |
# Paste your HTML content between the EOHTML markers! | |
$html = <<<EOHTML | |
<style> | |
.homeitem3col ul li { list-style-image:none !important; list-style-type:none;} | |
</style> | |
<div id="maincontent"> | |
<div id="midcolumn"> | |
$LIST | |
</div> | |
<div id="rightcolumn"> | |
<div class="sideitem"> | |
<h6>Grouping</h6> | |
<ul> | |
<li><a href="showAllMembers.php?order=type">Membership Type</a></li> | |
<li><a href="showAllMembers.php">Alphabetically</a></li> | |
<li><a href="showAllMembers.php?order=complete">Separate the Incomplete Pages</a></li> | |
</ul> | |
</div> | |
<div class="sideitem"> | |
<h6>Explore</h6> | |
<ul> | |
<li><a href="/membership/exploreMembership.php">Explore The Membership</a></li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
EOHTML; | |
# Generate the web page | |
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); | |
?> |