| <?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 |
| # |
| # |
| #**************************************************************************** |
| |
| exit; |
| # This needs SQL injection cleanup. |
| |
| # |
| # 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'] . "/membership/scripts/common.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/membership/scripts/tabs.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/smartconnection.class.php"); |
| |
| $dbc = new DBConnection(); |
| $dbc->connect(); |
| ob_start(); |
| ?> |
| <script language="javascript" type="text/javascript" src="scripts/functions.js"></script> |
| <link rel="stylesheet" type="text/css" href="tabs.css" media="screen" /> |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <? |
| $_tag_id = ""; |
| if ($_POST['submit'] == "Suggest Members") |
| { |
| $_tag_id = $_POST['tagID']; |
| $_tag_name = $_POST['tagName']; |
| $_orgID_Array = $_POST['orgIDs']; |
| $_email_address = $_POST['email']; |
| |
| # Sanitize input |
| if(!preg_match('/^[0-9]+$/', $_tag_id)) { |
| $_tag_id = 0; |
| } |
| |
| if(!preg_match('/^[a-zA-Z0-9]+$/', $_tag_name)) { |
| $_tag_name = ""; |
| } |
| |
| if ($_email_address == "" || sizeof($_orgID_Array)== 0) { |
| echo '<h1>ERROR</h1> <p><font color="red">You either did not select any organizations or forgot to enter an email address.</font></p>'; |
| } else { |
| $content = "<html><table>"; |
| $subject = $_tag_name; |
| foreach ($_orgID_Array as &$value) |
| { |
| $query = "SELECT name1 from organizations where organization_id = $value"; |
| $tagName = mysql_fetch_array(mysql_query($query)); |
| $content .="<tr><td>Add ". $tagName[0] ." to ". $_tag_name ."? <a href=\"https://dev.eclipse.org/committers/membership/processTag.php?type=AddMember&tagID=". $_tag_id ."&orgID=".$value."\">Process</a>.</td></tr>"; |
| } |
| $content .= "</table></html>"; |
| processMail($subject, $content, $_email_address); |
| echo '<h1>Suggestion(s) received!</h1> <p><font color="green">Your member suggestion(s) will appear as soon as it is reviewed for applicability, thanks for your suggestion!</font></p>'; |
| echo 'You can now either make more suggestions for this tag, or <a href="/membership/exploreMembership.php">explore the membership</a>.'; |
| |
| } |
| } |
| if ($_tag_id != "") |
| $_input_id = $_POST['tagID']; |
| else |
| $_input_id = $_GET['id']; |
| |
| # Sanitize input |
| if(!preg_match('/^[0-9]+$/', $_input_id)) { |
| $_input_id = 0; |
| } |
| |
| $query = "SELECT tag_name from TagNames where TagID = $_input_id"; |
| $result = mysql_query($query); |
| $tagName = mysql_fetch_array($result); |
| if ($tagName[0] == "") $tagName[0] = "INVALID TAG"; |
| |
| $existingMemberArray = existingMemberPopulate($_input_id); |
| |
| $memberQuery = "SELECT ORG.name1, ORGINFO.OrganizationID FROM OrganizationInformation AS ORGINFO INNER JOIN organizations as ORG on ORGINFO.OrganizationID = ORG.organization_id where ORG.member_type in ('SD', 'SC', 'AP', 'AS', 'ENTRP') ORDER BY ORG.name1"; |
| $memberResult = mysql_query($memberQuery); |
| while($memberIterator = mysql_fetch_array($memberResult)) |
| { |
| $orgName = $memberIterator['name1']; |
| $orgID = $memberIterator['OrganizationID']; |
| if (checkExistingMembers($orgID, $existingMemberArray) != "checked") { |
| $memberList .= "<input name=\"orgIDs[]\" type=\"checkbox\" value=\"$orgID\"/>". $orgName ."<br/><br/>"; |
| } else { |
| if ($existingMemberList == "") |
| $existingMemberList .= "Existing Members for $tagName[0]: " . $orgName; |
| else |
| $existingMemberList .= ", " . $orgName; |
| } |
| } |
| ?> |
| |
| <h2>Tag Members with "<?=$tagName[0];?>"</h2> |
| <p>Please select members that you feel should be associated with the <?=$tagName[0];?> tag. If this is a project tag, |
| please only select members you know that contribute to, ship products, or perform services based on the project. If this is |
| a general technology or category tag, then select members you know that have products or services or do |
| research based on the technology. Only Members who have activated their membership pages are listed here.</p> |
| <p><?=$existingMemberList;?></p> |
| <table style="border: 1px solid #595791;" width="600"> |
| <tr> |
| <td> |
| <div> |
| <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> |
| <input type="hidden" name="tagID" value="<?=$_input_id;?>"/> |
| <input type="hidden" name="tagName" value="<?=$tagName[0];?>"/> |
| <?=$memberList;?> |
| <input type="text" name="email"/> Email Address*<br/><br/> |
| <input type="submit" name="submit" value="Suggest Members"/><br/><br/> |
| </form> |
| </div> |
| </td> |
| </tr> |
| </table> |
| <p style="font-size:8pt">*Your Email Address is only used to process the suggestions and are subject to the terms listed in our <a href="/legal/privacy.php">Privacy Policy</a>.</p> |
| </div> |
| </div> |
| |
| <? |
| |
| $html = ob_get_clean(); |
| |
| |
| # Generate the web page |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |