blob: 6fd0692ed099c280bc5f64fac89f59e1d195cd53 [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'
#*****************************************************************************
#
# 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;';
$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 .= '<td id=tawNUM width="4%" align="center" onMouseOver="cellChange(this,1)" onMouseOut="cellChange(this,2)" onClick="ga(this,event)" ><a id=awNUM href="./showMembersWithTag.php?TagID=NUM">#</a></td> ';
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>';
$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
$project_html
$industry_html
</div>
</div>
</div>
EOHTML;
# Generate the web page
$App->generatePage("solstice", $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>