blob: f960c593b82dd3f5d5b7ea03909391d591d22034 [file] [log] [blame]
<?php 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("_projectCommon.php"); # All on the same line to unclutter the user's desktop'
error_reporting(E_ALL); ini_set("display_errors", true);
#*****************************************************************************
#
# template.php
#
# Author: Denis Roy
# Date: 2005-06-16
#
# Description: Type your page comments here - these are not sent to the browser
#
#
#****************************************************************************
#
# Begin: page-specific settings. Change these.
$pageTitle = "Eclipse Membership";
$pageKeywords = "Type, page, keywords, here";
$pageAuthor = "Type your name here";
# Add page-specific Nav bars here
# Format is Link text, link URL (can be http://www.someothersite.com/), target (_self, _blank)
# $Nav->addCustomNav("My Link", "mypage.php", "_self");
# $Nav->addCustomNav("Google", "http://www.google.com/", "_blank");
# End: page-specific settings
#
# Paste your HTML content between the EOHTML markers!
require_once($_SERVER['DOCUMENT_ROOT'] . "/membership/scripts/db_access.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/smartconnection.class.php");
$dbc = new DBConnection();
$dbc->connect();
$industry_tag_sql = 'select * from TagNames where is_industry_tag=1 order by tag_name;';
$project_tag_sql = 'select * from TagNames where is_project_tag=1 order by tag_name;';
$latlongSQL = "SELECT ORG.name1, ORG.LAT_LONG from organizations as ORG
WHERE ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP')";
$latlongs = mysql_evaluate_rows($latlongSQL);
$industry = mysql_evaluate_rows($industry_tag_sql);
$project = mysql_evaluate_rows($project_tag_sql);
$numIndCols = 5;
$indColPercent = "20%";
$numrows = ceil(sizeof($industry)/$numIndCols);
$indModulo = ($numrows * $numIndCols) - sizeof($industry);
$industry_html = '<div class="homeitem3col"><h3>By Industry...</h3><a style="float:right;" href="/membership/suggestTags.php">suggest more industry tags</a><table width="100%">';
$rowcount = 0;
for($row=0;$row<$numrows;$row++) {
if($rowcount++ % 2 == 0) {$industry_html .= "<tr>";} else {$industry_html .= "<tr bgcolor=\"whitesmoke\">";}
for($col=0;$col<$numIndCols;$col++) {
if ($col >= ($numIndCols - $indModulo)) {
if ( ($row == $numrows-1)) {
$adder = 99999; //basically, blank the last row
} else {
$adder = ($numIndCols - $indModulo) - $col;
}
} else { $adder=0; }
if ($adder<99999) {
$tagID = $industry[$numrows*$col+$row + $adder][0];
$tag_name = $industry[$numrows*$col+$row + $adder][1];
} else {
$tagID = "";
$tag_name = "";
}
if ($tag_name != "")
# debug $industry_html .= '<td width="' . $indColPercent . '"><small><a href="./showMembersWithTag.php?TagID=' . $tagID . '"> ' . ($numrows*$col+$row + $adder) . ',' . $row . ','. $col . ','. $adder . '</a></small></td>';
$industry_html .= '<td width="' . $indColPercent . '"><small><a href="./showMembersWithTag.php?TagID=' . $tagID . '"> ' . $tag_name . '</a></small></td>';
else
$industry_html .= '<td width="' . $indColPercent . '"></td>';
}
$industry_html .= "</tr>";
}
$industry_html .= '</table></div>';
$numProjCols = 5;
$projColPercent = "20%";
$numrows = ceil(sizeof($project)/$numProjCols);
$projModulo = ($numrows * $numProjCols) - sizeof($project);
$project_html = '<div class="homeitem3col">
<h3>By Eclipse Project Relevance...</h3>
<a style="float:right;" href="/projects/#Projects">explain project acronyms</a>
<table width="100%">';
$rowcount = 0;
for($row=0;$row<$numrows;$row++) {
if($rowcount++ % 2 == 0) {$project_html .= "<tr>";} else {$project_html .= "<tr bgcolor=\"whitesmoke\">";}
for($col=0;$col<$numProjCols;$col++) {
if ($col >= ($numProjCols - $projModulo)) {
if ( ($row == $numrows-1)) {
$adder = 99999; //basically, blank the last row
} else {
$adder = ($numProjCols - $projModulo) - $col;
}
} else { $adder=0; }
if ($adder<99999) {
$tagID = $project[$numrows*$col+$row + $adder][0];
$tag_name = $project[$numrows*$col+$row + $adder][1];
} else {
$tagID = "";
$tag_name = "";
}
if ($tag_name != "")
$project_html .= '<td width="' . $projColPercent . '"><small><a href="./showMembersWithTag.php?TagID=' . $tagID . '"> ' . $tag_name . '</a></small></td>';
else
$project_html .= '<td width="' . $projColPercent . '"></td>';
}
$project_html .= "</tr>";
}
$project_html .= '</table></div>';
$membership_html = '<div class="homeitem3col"><h3>By Membership Type...</h3><a style="float:right;" href="/membership/become_a_member/membershipTypes.php">explain membership types</a>';
$membership_html .= '
<table width="100%">
<tr>
<td width="25%" align="center"><a href="/membership/showMembersWithTag.php?TagID=strategic"><img src="membership-strategic.jpg" alt="Strategic" border="1"/></a></td>
<td width="25%" align="center"><a href="/membership/showMembersWithTag.php?TagID=enterprise"><img src="membership-enterprise.jpg" alt="Enterprise" border="1"/></a></td>
<td width="25%" align="center"><a href="/membership/showMembersWithTag.php?TagID=addin"><img src="membership-solutions.jpg" alt="Solutions" border="1"/></a></td>
<td width="25" align="center"><a href="/membership/showMembersWithTag.php?TagID=associate"><img src="membership-associate.jpg" alt="Associate" border="1"/></a></td>
</tr>
</table>
';
$membership_html .= '</div>';
$alphabet_html = '<div class="homeitem3col"><h3>Alphabetically...</h3>';
$alphabet_html .= "<div id=\"alphatable\"><table width=\"100%\" style=\"font-size: 13px;\"><tr>";
$alphabet_html .= '<li><a href="./showMembersWithTag.php?TagID=NUM">#</a></li> ';
foreach (preg_split('//', "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, PREG_SPLIT_NO_EMPTY) as $char)
$alphabet_html .= '<td id=taw'. $char .' width="4%" align="center" onMouseOver="cellChange(this,1)" onMouseOut="cellChange(this,2)" onClick="ga(this,event)" ><a id=aw' . $char . ' href="./showMembersWithTag.php?TagID=' . $char . '">' . $char . '</a></td> ';
$alphabet_html .= '</tr></table></div></div>';
foreach($latlongs as $ll){
if($ll[1] != null)
$lls .=
'var latlng = new GLatLng(' .$ll[1] . ');
map.addOverlay(createMarker(latlng, "' . $ll[0] .'"));
';
}
$google_html =
'
<div class="homeitem3col"><h3>v5 Geographically...</h3>
<div id="map_canvas" style="width: 640px; height: 480px"></div>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAcudFUkR7BQrahJwD-e3_ExSNv7EAemCq15cxjsoFVp0hEHqQIxSLqaQniDEpdz4F4B8ZV41Au_IdLg" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(33, -40), 2);
map.setUIToDefault();
// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.
var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
// Creates a marker whose info window displays the letter corresponding
// to the given index.
function createMarker(point, index) {
// Create a lettered icon for this point using our icon class
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Member <b>" + index + "</b>");
});
return marker;
}
// GLatLng.fromUrlValue(latlng:String) can be used
// var latlng = new GLatLng(33, -40);
// map.addOverlay(createMarker(latlng, "TEST"));
'. $lls .
'
}
}
initialize();
</script>
';
$html = <<<EOHTML
<script language="javascript">
function cellChange(cell,value)
{
if (value==1)
{
cell.style.cssText = 'background-color: plum; color: #FFFFFF';
}
if (value==2)
{
cell.style.cssText = 'background-color: white; color: #000000';
}
}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g) { t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;location.href=document.getElementById(a).href}}
</script>
<div id="maincontent">
<div id="fullcolumn">
<div id="midcolumn">
<h1>Explore The Eclipse Membership</h1>
<h2><a href="showAllMembers.php">Show all Members</a> or view...</h2>
<div style="padding-right:10px;float:right;">Learn about our many <a href="/corporate_sponsors/">corporate sponsors.</a></div><br/>
$membership_html
<hr class="clearer" />
$alphabet_html
$google_html
$project_html
$industry_html
</div>
</div>
</div>
EOHTML;
# Generate the web page
$App->generatePage("solstice", $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>