| <?php | |
| function tagType ($_membershipTag, $_alphaTag, $_industryTag, $_projectTag) | |
| { | |
| if ($_membershipTag == 1) | |
| $retVal = "Membership Level"; | |
| if ($_alphaTag == 1) | |
| $retVal = "Alphabetical"; | |
| if ($_industryTag == 1) | |
| $retVal = "Industry"; | |
| if ($_projectTag == 1) | |
| $retVal = "Project"; | |
| return $retVal; | |
| } | |
| function existingMemberPopulate($_tag_id) | |
| { | |
| $existingOrgArray = array(); | |
| $existingOrgQuery = "SELECT OrganizationID FROM OrganizationTags WHERE TagID = $_tag_id"; | |
| $existingOrgResult = mysql_query($existingOrgQuery); | |
| while ($existingOrgIterator = mysql_fetch_array($existingOrgResult)) | |
| { | |
| $tagID = $existingOrgIterator['OrganizationID']; | |
| $existingOrgArray[$tagID] = 1; | |
| } | |
| return $existingOrgArray; | |
| } | |
| function existingTagPopulate($_org_id) | |
| { | |
| $existingTagArray = array(); | |
| $existingTagQuery = "SELECT TagID FROM OrganizationTags WHERE OrganizationID = $_org_id"; | |
| $existingTagResult = mysql_query($existingTagQuery); | |
| while ($existingTagIterator = mysql_fetch_array($existingTagResult)) | |
| { | |
| $tagID = $existingTagIterator['TagID']; | |
| $existingTagArray[$tagID] = 1; | |
| } | |
| return $existingTagArray; | |
| } | |
| function checkExistingMembers($_org_id, $_existingOrgArray) | |
| { | |
| $retVal = ""; | |
| $testVal = $_existingOrgArray[$_org_id]; | |
| if ($testVal) | |
| { | |
| $retVal = "checked"; | |
| } | |
| return $retVal; | |
| } | |
| function checkExistingTags($_tag_id, $_existingTagArray) | |
| { | |
| $retVal = ""; | |
| $testVal = $_existingTagArray[$_tag_id]; | |
| if ($testVal) | |
| { | |
| $retVal = "checked"; | |
| } | |
| return $retVal; | |
| } | |
| function debugEcho ($_echo) | |
| { | |
| echo "<!-- " . $_echo . " -->"; | |
| } | |
| function processMail ($_subject, $_content, $_from) | |
| { | |
| $header = "Return-Path: ".$_from."\n"; | |
| $header .= "X-Sender: ".$_from."\n"; | |
| $header .= "From: ".$_from."\n"; | |
| $header .= "X-Mailer:PHP 4.3.4\n"; | |
| $header .= 'MIME-Version: 1.0' . "\n"; | |
| $header .= 'Content-type: text/html; charset=iso-8859-1' . "\n"; | |
| $to = "tags.suggest@eclipse.org"; | |
| ini_set("sendmail_from", $_from); | |
| ini_set("SMTP", "foundationhq.eclipse.org"); | |
| $_subject = "MEMBERSHIP TAG - " . $_subject; | |
| mail($to, $_subject,$_content, $header); | |
| ini_restore("sendmail_from"); | |
| } | |
| ?> |