| <?php | 
 | /** | 
 |  * Copyright (c) 2005, 2017, 2018 Eclipse Foundation and others. | 
 |  * | 
 |  * This program and the accompanying materials are made | 
 |  * available under the terms of the Eclipse Public License 2.0 | 
 |  * which is available at https://www.eclipse.org/legal/epl-2.0/ | 
 |  * | 
 |  * SPDX-License-Identifier: EPL-2.0 | 
 |  */ | 
 | require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | 
 | $App = new App(); | 
 |  | 
 | $_ORDER = $App->getHTTPParameter('order'); | 
 | $types = $App->getHTTPParameter('type'); | 
 |  | 
 | $valid = array( | 
 |   "SD", | 
 |   "SC", | 
 |   "AP", | 
 |   "AS", | 
 |   "ENTRP" | 
 | ); | 
 | $_TYPE = array(); | 
 | foreach (explode(',', $types) as $type) { | 
 |   if (in_array($type, $valid)) { | 
 |     $_TYPE[] = "'$type'"; | 
 |   } | 
 | } | 
 |  | 
 | $_NUMCOLS = 8; | 
 | if (isset($_GET['numcols'])) { | 
 |   $count = (int) $_GET['numcols']; | 
 |   $_NUMCOLS = max(4, min(64, $count)); | 
 | } | 
 |  | 
 | 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"; | 
 | } | 
 |  | 
 | if ($_TYPE) | 
 |   $where_clause = "WHERE ORG.member_type in (" . implode(',', $_TYPE) . ")"; | 
 | else | 
 |   $where_clause = "WHERE ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP')"; | 
 |  | 
 | // WTB: Modified to exclude organizations that have not provided a small logo. | 
 | $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_clause . " and ORGI.small_logo is not null
 | 
 | 	ORDER BY
 | 
 | 	" . $order_by; | 
 |  | 
 | // echo "SQL: " . $selectall; | 
 | $result = $App->eclipse_sql($selectall); | 
 | $LIST = '<table><tr>'; | 
 | $count = 1; | 
 | while ($a = mysql_fetch_array($result)) { | 
 |   $org_id = $a[0]; | 
 |   $org_name = $a[1]; | 
 |   $org_short_desc = $a[2]; | 
 |   $org_type = $a[3]; | 
 |  | 
 |   $LIST .= '<td><img src="./scripts/get_image.php?id=' . $org_id . '&size=small" style="padding:1px;" alt="' . $org_name . '"></td>'; | 
 |   if (($count++ % $_NUMCOLS) == 0) { | 
 |     $LIST .= '</tr><tr>'; | 
 |   } | 
 | } | 
 |  | 
 | $LIST .= '</tr></table>'; | 
 | ?>
 | 
 | <html>
 | 
 | <head>
 | 
 | <title>Eclipse Member Company Logos</title>
 | 
 | <style>
 | 
 | img {
 | 
 | 	max-width: 120px;
 | 
 | 	max-height: 120px
 | 
 | }
 | 
 | 
 | 
 | td {
 | 
 | 	text-align: center;
 | 
 | 	vertical-align: middle;
 | 
 | }
 | 
 | </style>
 | 
 | </head>
 | 
 | <body>
 | 
 | <?php echo $LIST; ?>
 | 
 | </body>
 | 
 | </html>
 |