| <?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' |
| |
| #***************************************************************************** |
| # |
| # Author: Donald Smith |
| # Date: 2005-11-11 |
| #**************************************************************************** |
| |
| # |
| # 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 |
| //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"); |
| function tagType ($_industryTag, $_projectTag) |
| { |
| if ($_industryTag == 1) |
| $retVal = "Industry"; |
| if ($_projectTag == 1) |
| $retVal = "Project"; |
| return $retVal; |
| } |
| |
| |
| $dbc = new DBConnection(); |
| $dbc->connect(); |
| |
| $_TAG_ID = $_POST['TagID'] ? $_POST['TagID'] : $_GET['TagID']; |
| $_TAG_ID = preg_replace('/[^\da-zA-Z0-9]/i', '', $_TAG_ID); |
| |
| switch (TRUE) { |
| |
| case ( strlen($_TAG_ID)==1 && strrpos("AABCDEFGHIJKLMNOPQRSTUVWXYZ", strtoupper($_TAG_ID)) ): #The two AA are important, don't delete one |
| $tag_sql = "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 UPPER(LEFT(ORG.name1, 1)) = '" . strtoupper($_TAG_ID) . "' and ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = "Members starting with letter " . strtoupper($_TAG_ID); |
| $tagType = "Alphabetical"; |
| $tagTypeList .="<a href=\"/membership/showMembersWithTag.php?TagID=NUM\"># </a>"; |
| foreach (preg_split('//', "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, PREG_SPLIT_NO_EMPTY) as $char) |
| $tagTypeList .="<a href=\"/membership/showMembersWithTag.php?TagID=$char\">$char </a>"; |
| break; |
| |
| case ($_TAG_ID == 'NUM'): |
| $tag_sql = "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 UPPER(LEFT(ORG.name1, 1)) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') and ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = "Members starting with numbers"; |
| $tagType = "Alphabetical"; |
| $tagTypeList .="<a href=\"/membership/showMembersWithTag.php?TagID=NUM\"># </a>"; |
| foreach (preg_split('//', "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, PREG_SPLIT_NO_EMPTY) as $char) |
| $tagTypeList .="<a href=\"/membership/showMembersWithTag.php?TagID=$char\">$char </a>"; |
| break; |
| |
| |
| case ($_TAG_ID == "strategic"): |
| $tag_sql = "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') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = $_TAG_NAME = "Strategic Members"; |
| $tagType = "Membership Level"; |
| $tagTypeList ="<li><a href=\"/membership/showMembersWithTag.php?TagID=enterprise\">Enterprise</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=addin\">Solutions</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=associate\">Associate</a></li>"; |
| break; |
| case ($_TAG_ID == "enterprise"): |
| $tag_sql = "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 ('ENTRP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = $_TAG_NAME = "Enterprise Members"; |
| $tagType = "Membership Level"; |
| $tagTypeList ="<li><a href=\"/membership/showMembersWithTag.php?TagID=strategic\">Strategic</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=addin\">Solutions</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=associate\">Associate</a></li>"; |
| break; |
| |
| case ($_TAG_ID == "addin"): |
| $tag_sql = "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 ('AP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = $_TAG_NAME = "Solutions Members"; |
| $tagType = "Membership Level"; |
| $tagTypeList ="<li><a href=\"/membership/showMembersWithTag.php?TagID=strategic\">Strategic</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=enterprise\">Enterprise</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=associate\">Associate</a></li>"; |
| break; |
| |
| case ($_TAG_ID == "associate"): |
| $tag_sql = "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 ('AS') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| $TAG_TITLE = $_TAG_NAME = "Associate Members"; |
| $tagType = "Membership Level"; |
| $tagTypeList ="<li><a href=\"/membership/showMembersWithTag.php?TagID=strategic\">Strategic</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=enterprise\">Enterprise</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=addin\">Solutions</a></li>"; |
| break; |
| default: #Must be a number or unrecognized tag |
| |
| if (ctype_digit($_TAG_ID) ) { |
| $whereClause = "TagID = $_TAG_ID"; |
| $tag_sql = "SELECT ORGTAG.OrganizationID, ORG.name1, ORGINFO.short_description |
| FROM OrganizationTags as ORGTAG |
| INNER JOIN organizations as ORG on ORGTAG.OrganizationID = ORG.organization_id |
| INNER JOIN OrganizationInformation as ORGINFO on ORGTAG.OrganizationID = ORGINFO.OrganizationID |
| WHERE ORGTAG.TagID = $_TAG_ID and ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| } else { |
| $whereClause = "tag_name = '$_TAG_ID'"; |
| $tag_sql = "SELECT ORGTAG.OrganizationID, ORG.name1, ORGINFO.short_description |
| FROM OrganizationTags as ORGTAG |
| INNER JOIN organizations as ORG on ORGTAG.OrganizationID = ORG.organization_id |
| INNER JOIN OrganizationInformation as ORGINFO on ORGTAG.OrganizationID = ORGINFO.OrganizationID |
| JOIN TagNames as TNME on TNME.TagID = ORGTAG.TagID |
| WHERE TNME.tag_name = '$_TAG_ID' and ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') |
| AND ORG.organization_id not in ( " . ignoreMembers() . ") |
| ORDER BY ORG.name1"; |
| # echo $tag_sql; |
| |
| } |
| |
| $tagNameSql = "Select tag_name, is_industry_tag, is_project_tag from TagNames where " . $whereClause; |
| $tagNameResult = mysql_query($tagNameSql); |
| $tagNameIterator = mysql_fetch_array($tagNameResult); |
| $_TAG_NAME = $tagNameIterator['tag_name']; |
| $industryTag = $tagNameIterator['is_industry_tag']; |
| $projectTag = $tagNameIterator['is_project_tag']; |
| # echo $tagNameSql . " - " . $_TAG_NAME . " - " . $industryTag . " - " . $projectTag; |
| |
| if ($projectTag == 1) { |
| $tagType = "Other Project Tags"; |
| $whereSQL = "is_project_tag=1"; |
| $TAG_TITLE = "Members contributing to, or shipping products based on " . $_TAG_NAME; |
| $suggest = "<li><a href=\"/projects/\" target=\"_projects\"><img src=\"external.gif\">Explore Projects and Acronyms</a></li> |
| <li><a href=\"/membership/suggestMembers.php?id=$_TAG_ID\">Suggest more Members for the $_TAG_NAME tag</a></li>"; |
| $moreTagsTitle = "Show All..."; |
| } else { |
| $tagType = "Other Industry Tags"; |
| $whereSQL = "is_industry_tag=1"; |
| $TAG_TITLE = $_TAG_NAME; |
| $suggest = "<li><a href=\"/membership/suggestMembers.php?id=$_TAG_ID\">Suggest more Members for the $_TAG_NAME tag</a></li>"; |
| $moreTagsTitle = "Show All..."; |
| } |
| |
| $tagTypeSql = "SELECT tag_name, TagID from TagNames where " . $whereSQL . " order by tag_name"; |
| |
| $tagTypeResult = mysql_query($tagTypeSql); |
| $tagTypeList = ""; |
| $initialList = 8; |
| $counter = 0; |
| while ($tagTypeIterator = mysql_fetch_array($tagTypeResult)) |
| { |
| $tagTypeName = $tagTypeIterator['tag_name']; |
| $tagTypeID = $tagTypeIterator['TagID']; |
| if ($counter++ < $initialList) { |
| $tagTypeList .= "<li><a href=\"/membership/showMembersWithTag.php?TagID=". $tagTypeID . "\">". $tagTypeName ."</a></li>"; |
| } else { |
| # double escape quotes cause this goes in Java Script as a string. |
| $restOfList .= '<li><a href=\"/membership/showMembersWithTag.php?TagID='. $tagTypeID . '\">' . $tagTypeName . '</a></li>'; |
| } |
| } |
| $tagTypeList .= '<span id="Rest"><br><small><a href="javascript:showRest();">' . $moreTagsTitle . '</a></small></span>'; |
| } |
| |
| $MATCHES = mysql_evaluate_rows($tag_sql); |
| |
| if (count($MATCHES) == 0) { |
| $LIST = "No members match the criteria. Please try something different. If this appears to be a bug, please <a href=\"https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Phoenix&version=unspecified&component=Content&rep_platform=PC&op_sys=Windows%20XP&priority=P3&bug_severity=normal&bug_status=NEW&bug_file_loc=http%3A%2F%2Fwww.eclipse.org%2Fmembership&short_desc=Problem%20with%20Membership%20Tags&comment=&commentprivacy=0&keywords=&dependson=&blocked=&maketemplate=Remember%20values%20as%20bookmarkable%20template&form_name=enter_bug&assigned_to=phoenix.ui-inbox%40eclipse.org&qa_contact=\">log it.</a>"; |
| $tagType = "Membership Level"; |
| $tagTypeList ="<li><a href=\"/membership/showMembersWithTag.php?TagID=strategic\">Strategic</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=enterprise\">Enterprise</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=addin\">Solutions</a></li><li><a href=\"/membership/showMembersWithTag.php?TagID=associate\">Associate</a></li>"; |
| } else { |
| $LIST = '<div class="homeitem3col"><h3>'. $TAG_TITLE . '</h3><ul>'; |
| foreach ($MATCHES as $a) { |
| $org_id = $a[0]; |
| $org_name = $a[1]; |
| $org_short_desc = $a[2]; |
| if ($org_short_desc =="") { |
| $org_short_desc = $org_name; // "This member has not yet set up their foundation membership page."; |
| $LIST .= '<li><table 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 . '" title="'. $org_name . '"></small></td><td>' . $org_short_desc . '</td></tr></table></li>'; |
| } else { |
| $LIST .= '<li><table class="table"><tr><td><small><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></small></td><td>' . $org_short_desc . '</td></tr></table></li>'; |
| } |
| } |
| $LIST .= '</ul></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>$tagType</h6> |
| <ul> |
| $tagTypeList |
| </ul> |
| |
| </div> |
| <div class="sideitem"> |
| <h6>Explore</h6> |
| <ul> |
| <li><a href="/membership/exploreMembership.php">Explore All Members</a></li> |
| $suggest |
| </ul> |
| </div> |
| </div> |
| </div> |
| |
| <script language="javascript"> |
| |
| function showRest() { |
| document.getElementById('Rest').innerHTML = "$restOfList"; |
| |
| } |
| </script> |
| |
| EOHTML; |
| |
| $html = mb_convert_encoding($html, "HTML-ENTITIES", "auto"); |
| # Generate the web page |
| $App->generatePage("solstice", $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |