Clean up: unused files in /legal

Change-Id: I236129e18d25c4b98a24fa455401b5c09ab1e945
diff --git a/inc/country_and_codes.php b/inc/country_and_codes.php
deleted file mode 100644
index 7f12a5b..0000000
--- a/inc/country_and_codes.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-    /**********************
-   * 
-   * Name: Generate Country list
-   * function: Generates a drop down country listing in html
-   * I/O: None, just dumps out the listing
-   * 
-   *********************/
-   function GenCountryDrop( &$html ){
-  
-      $cc = array('ad' => 'Andorra', 'ae' => 'United Arab Emirates', 'af' => 'Afghanistan','ag' => 'Antigua and Barbuda', 'ai' => 'Anguilla', 'al' => 'Albania', 'am' => 'Armenia', 'an' => 'Netherlands Antilles',  'ao' => 'Angola', 'ar' => 'Argentina', 'as' => 'American Samoa', 'at' => 'Austria', 'au' => 'Australia', 'aw' => 'Aruba',  'az' => 'Azerbaijan', 'ba' => 'Bosnia and Herzegowina', 'bb' => 'Barbados', 'bd' => 'Bangladesh', 'be' => 'Belgium',  'bf' => 'Burkina Faso', 'bg' => 'Bulgaria', 'bh' => 'Bahrain', 'bi' => 'Burundi', 'bj' => 'Benin', 'bm' => 'Bermuda', 'bn' => 'Brunei Darussalam', 'bo' => 'Bolivia', 'br' => 'Brazil', 'bs' => 'Bahamas', 'bt' => 'Bhutan', 'bw' => 'Botswana',  'by' => 'Belarus', 'bz' => 'Belize', 'ca' => 'Canada', 'cf' => 'Central African Republic', 'cg' => 'Congo', 'ch' => 'Switzerland',  'ci' => 'Cote D\'Ivoire', 'ck' => 'Cook Islands', 'cl' => 'Chile', 'cm' => 'Cameroon', 'cn' => 'China', 'co' => 'Colombia',  'cr' => 'Costa Rica', 'cv' => 'Cape Verde', 'cx' => 'Christmas Island', 'cy' => 'Cyprus', 'cz' => 'Czech Republic',  'de' => 'Germany', 'dj' => 'Djibouti', 'dk' => 'Denmark', 'dm' => 'Dominica', 'do' => 'Dominican Republic', 'dz' => 'Algeria',  'ec' => 'Ecuador', 'ee' => 'Estonia', 'eg' => 'Egypt', 'eh' => 'Western Sahara', 'er' => 'Eritrea', 'es' => 'Spain', 'et' => 'Ethiopia',  'fi' => 'Finland', 'fj' => 'Fiji', 'fk' => 'Falkland Islands (Malvinas)', 'fm' => 'Micronesia, Federated States Of', 'fr' => 'France',  'ga' => 'Gabon', 'gb' => 'United Kingdom', 'gd' => 'Grenada', 'ge' => 'Georgia', 'gf' => 'French Guiana', 'gh' => 'Ghana',  'gi' => 'Gibraltar', 'gl' => 'Greenland', 'gm' => 'Gambia', 'gn' => 'Guinea', 'gp' => 'Guadeloupe', 'gq' => 'Equatorial Guinea', 'gr' => 'Greece', 'gt' => 'Guatemala', 'gu' => 'Guam', 'gw' => 'Guinea-Bissau', 'gy' => 'Guyana', 'hk' => 'Hong Kong',  'hn' => 'Honduras', 'hr' => 'Croatia (Hrvatska)', 'ht' => 'Haiti', 'hu' => 'Hungary', 'id' => 'Indonesia', 'ie' => 'Ireland', 'il' => 'Israel', 'in' => 'India', 'io' => 'British Indian Ocean Territory', 'is' => 'Iceland', 'it' => 'Italy', 'jm' => 'Jamaica',  'jo' => 'Jordan', 'jp' => 'Japan', 'ke' => 'Kenya', 'kg' => 'Kyrgyzstan', 'kh' => 'Cambodia', 'ki' => 'Kiribati', 'km' => 'Comoros',  'kn' => 'Saint Kitts and Nevis', 'kr' => 'Korea, Republic Of', 'kw' => 'Kuwait', 'ky' => 'Cayman Islands', 'kz' => 'Kazakhstan',  'la' => 'Lao People\'s Democratic Republic', 'lb' => 'Lebanon', 'lc' => 'Saint Lucia', 'li' => 'Liechtenstein', 'lk' => 'Sri Lanka',  'lr' => 'Liberia', 'ls' => 'Lesotho', 'lt' => 'Lithuania', 'lu' => 'Luxembourg', 'lv' => 'Latvia', 'ma' => 'Morocco', 'mc' => 'Monaco',  'md' => 'Moldova, Republic Of', 'mg' => 'Madagascar', 'mh' => 'Marshall Islands', 'mk' => 'Macedonia, The Former Yugoslav Republic Of',  'ml' => 'Mali', 'mm' => 'Myanmar', 'mn' => 'Mongolia', 'mo' => 'Macau', 'mp' => 'Northern Mariana Islands', 'mq' => 'Martinique',  'mr' => 'Mauritania', 'ms' => 'Montserrat', 'mt' => 'Malta', 'mu' => 'Mauritius', 'mv' => 'Maldives', 'mw' => 'Malawi',  'mx' => 'Mexico', 'my' => 'Malaysia', 'mz' => 'Mozambique', 'na' => 'Namibia', 'nc' => 'New Caledonia', 'ne' => 'Niger', 'nf' => 'Norfolk Island', 'ng' => 'Nigeria', 'ni' => 'Nicaragua', 'nl' => 'Netherlands', 'no' => 'Norway', 'np' => 'Nepal', 'nr' => 'Nauru', 'nu' => 'Niue', 'nz' => 'New Zealand', 'om' => 'Oman', 'pa' => 'Panama', 'pe' => 'Peru', 'pf' => 'French Polynesia', 'pg' => 'Papua New Guinea', 'ph' => 'Philippines', 'pk' => 'Pakistan', 'pl' => 'Poland', 'pn' => 'Pitcairn', 'pr' => 'Puerto Rico',  'pt' => 'Portugal', 'pw' => 'Palau', 'py' => 'Paraguay', 'qa' => 'Qatar', 'ro' => 'Romania', 'ru' => 'Russian Federation',  'rw' => 'Rwanda', 'sa' => 'Saudi Arabia', 'sb' => 'Solomon Islands', 'sc' => 'Seychelles', 'se' => 'Sweden', 'sg' => 'Singapore', 'si' => 'Slovenia', 'sk' => 'Slovakia (Slovak Republic)', 'sl' => 'Sierra Leone', 'sm' => 'San Marino', 'sn' => 'Senegal',  'so' => 'Somalia', 'sr' => 'Suriname', 'st' => 'Sao Tome and Principe', 'sv' => 'El Salvador', 'sz' => 'Swaziland',  'tc' => 'Turks and Caicos Islands', 'td' => 'Chad', 'tg' => 'Togo', 'th' => 'Thailand', 'tj' => 'Tajikistan',  'tk' => 'Tokelau', 'tm' => 'Turkmenistan', 'tn' => 'Tunisia', 'to' => 'Tonga', 'tr' => 'Turkey', 'tt' => 'Trinidad and Tobago',  'tv' => 'Tuvalu', 'tw' => 'Taiwan', 'tz' => 'Tanzania, United Republic Of', 'ua' => 'Ukraine', 'ug' => 'Uganda', 'uk' => 'United Kingdom', 'us' => 'United States', 'uy' => 'Uruguay', 'uz' => 'Uzbekistan', 'va' => 'Vatican City State (Holy Sea)', 'vc' => 'Saint Vincent and The Grenadines', 've' => 'Venezuela', 'vg' => 'Virgin Islands (British)', 'vi' => 'Virgin Islands (U.S.)', 'vn' => 'Viet Nam', 'vu' => 'Vanuatu', 'wf' => 'Wallis and Futuna Islands', 'ws' => 'Samoa', 'ye' => 'Yemen', 'yu' => 'Serbia & Montenegro', 'za' => 'South Africa', 'zm' => 'Zambia', 'zw' => 'Zimbabwe');
-   	  
-   	  //print the start of hte list
-   	  $html .= "<SELECT NAME=\"yourCountry\">";
-   	
-   	  //build list with a loop
-   	  foreach( $cc as $code => $name ){
-   	    $selhtml = "";
-   	    if( $_POST['yourCountry'] == $code ) $selhtml = "CHECKED";
-   	  	$html .="<OPTION $selhtml VALUE=\"" .$code . "\">" .$name;
-   	  }
-   	  
-   	  //end the list
-   	  $html .= ("</SELECT>");
-   }
-   
-?>
diff --git a/inc/form_security.php b/inc/form_security.php
deleted file mode 100644
index c9d8197..0000000
--- a/inc/form_security.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-/*
- * Name: form_security.php
- * Function: contains routines created to stop people from using 'bots' to auto complete the forms with spam info.
- * I/O: functions take various parmaters, Some return values.
- * By: M. Ward
- * 
- */
- 
-/**************************************
-* 
-* Name: SecureQuestion
-* Function: This function generates a relatively random mathematical question and prints it to the bottom 
-* of the calling page.
-* I/O: takes a param for where html output should go, and returns the 'result' of the question for comparison.
-* Date: Nov 21/05
-* By: M. Ward
-* 
-***************************************/
-function SecureQuestion( &$html ) {
-  //get the  3 values and 2 functions
-  $Security_Values = array(mt_rand(1,100), mt_rand(1,100), mt_rand(1,100), mt_rand(0,1),mt_rand(0,1) );
-  //sort out the operators
-  $Operators = array('+','-');
-          
-  //set the entry form and question into the html output
-  $html .= "<tr><td colspan=\"2\"><font face=\"Arial\" color=\"#FF0000\">*</font>Please enter the result of the following Mathematical question: ";
-  $html .= $Security_Values[0] . $Operators[$Security_Values[3]] . $Security_Values[1] . $Operators[$Security_Values[4]] . $Security_Values[2];
-  $html .= "<br /></td></tr> <tr><td colspan=\"2\"><input type=\"text\" size=\"6\" name=\"SkillAnswer\"></td></tr>";
-            
-  //compute the result the hard way.
-  if ( $Security_Values[3] == 0)
-    $Result = $Security_Values[0] + $Security_Values[1];
-  else
-    $Result = $Security_Values[0] - $Security_Values[1];
-  if ( $Security_Values[4] == 0)
-    $Result = $Result + $Security_Values[2];
-  else
-    $Result = $Result - $Security_Values[2];
-            
-            
-  return( CryptResult($Result) );
-	
-}
-
-/*********************************************
- *
- * Name: CryptResult
- * Function:  encrypts(cheaply I might add) the passed int and returns the 'encrypted' result
- * I/O: Takes the number to be encrypted and returns the encrypted data
- * Date: Nov 23/05
- * By: M. Ward
- * 
- * ********************************************/
-function CryptResult( $key ) {
-  
-  //first step
-  $crypt = $key - 83817;
-  //second step
-  $crypt = $crypt + 262237125;
-  
-  //now serialise the data
-  $crypt = serialize($crypt);
-  
-  //prep for storage
-  $crypt = base64_encode($crypt);
-  
-  //return value
-  return $crypt;
- 	
-}
-
-/*********************************************
- *
- * Name: DeCryptResult
- * Function:  Decrypts(cheaply I might add) the passed int and returns the 'clear' result
- * I/O: Takes the number to be decrypted and returns the clear data
- * Date: Nov 23/05
- * By: M. Ward
- * 
- * ********************************************/
-function DecryptResult( $key ) {
-  
-  //first step decode
-  $clear= base64_decode($key);
-  //second step unserialize
-  $clear = unserialize($clear);
-  
-  //now backout the math
-  $clear = $clear - 262237125;
-  
-  //last step
-  $clear = $clear + 83817;
-  
-  //return value
-  return $clear;
- 	
-}
- 
-
-?>
diff --git a/inc/person.class.php b/inc/person.class.php
deleted file mode 100644
index ffdc9d6..0000000
--- a/inc/person.class.php
+++ /dev/null
@@ -1,278 +0,0 @@
-<?php
-require_once("/home/data/httpd/eclipse-php-classes/system/dbconnection_foundation.class.php");
-class Person {
-
-	#*****************************************************************************
-	#
-	# person.class.php
-	#
-	# Author: 		Denis Roy
-	# Date:			2004-08-05
-	#
-	# Description: Functions and modules related to User objects
-	# Stolen on: Nov 25/05 for use with the new website. M. Ward
-	#
-	# HISTORY:
-	#
-	#*****************************************************************************	
-	
-	var $PersonID 			= "";
-	var $FName				= "";
-	var $LName				= "";
-	var $Type				= 0;
-	var $EMail				= "";
-	var $Phone				= "";
-	var $Fax				= "";
-	var $Mobile				= "";
-	var $Address1			= "";
-	var $Address2			= "";
-	var $Address3			= "";
-	var $City				= "";
-	var $Province			= "";
-	var $Country			= "";
-	var $Postal				= "";
-	
-	//define a constant value. the max number of time to try and create a userid
-	var $MAX_ATTEMPTS = 10;
-	
-	
-	function getPersonID() {
-		return $this->PersonID;
-	}
-	function getFName() {
-		return $this->FName;
-	}
-	function getLName() {
-		return $this->LName;
-	}
-	function getType() {
-		return $this->Type;
-	}
-	function getEMail() {
-		return $this->EMail;
-	}
-	function getPostal() {
-		return $this->Postal;
-	}
-	function getPhone() {
-		return $this->Phone;
-	}
-	function getFax() {
-		return $this->Fax;
-	}
-	function getMobile() {
-		return $this->Mobile;
-	}
-	function getAddress1() {
-		return $this->Address1;
-	}
-	function getAddress2() {
-		return $this->Address2;
-	}
-	function getAddress3() {
-		return $this->Address3;
-	}
-	function getCity() {
-		return $this->City;
-	}
-	function getProvince() {
-		return $this->Province;
-	}
-	function getCountry() {
-		return $this->Country;
-	}
-		
-	
-	function setPersonID($_PersonID) {
-		$this->PersonID = $_PersonID;
-	}
-	function setFName($_FName) {
-		$this->FName = $_FName;
-	}
-	function setLName($_LName) {
-		$this->LName = $_LName;
-	}
-	//reflects EMployee  or INdividual
-	function setType($_Type) {
-		$this->Type = $_Type;
-	}
-	function setEMail($_EMail) {
-		$this->EMail = $_EMail;
-	}
-	function setPhone($_Phone) {
-		$this->Phone = $_Phone;
-	}
-	function setFax($_Fax) {
-		$this->Fax = $_Fax;
-	}
-	function setMobile($_Mobile) {
-		$this->Mobile = $_Mobile;
-	}
-	function setAddress1($_Address1) {
-		$this->Address1 = $_Address1;
-	}
-	function setAddress2($_Address2) {
-		$this->Address2 = $_Address2;
-	}
-	function setAddress3($_Address3) {
-		$this->Address3 = $_Address3;
-	}
-	function setCity($_City) {
-		$this->City = $_City;
-	}
-	function setProvince($_Province) {
-		$this->Province = $_Province;
-	}
-	function setPostal($_Postal) {
-		$this->Postal = $_Postal;
-	}
-	function setCountry($_Country) {
-		$this->Country = $_Country;
-	}
-	
-	function CreatePersonID (){
-	  //set the max number of lastname chars
-	  $MAX_LAST = 8;
-	  //gen a username
-	  $username = strtolower(substr($this->FName,0,1) . preg_replace('/[ -\']/i','',substr($this->LName,0,$MAX_LAST) ) );
-	  $loops = 2;	
-      //check if the given user name is already in use, or if we have exceed the max # of loops.
-      while( ( $this->selectPersonIDExists($username) ) && ( loops <= $this->MAX_ATTEMPTS ) && ( (strlen($this->FName)-loops) >= 1 ) ) {
-      	//now if the username exsits then try and gen a new one.
-      	$username = strtolower(substr($this->FName,0,$loops) . preg_replace('/[ -\']/i','',substr($this->LName,0, ($MAX_LAST-$loops) ) ) );
-      	$loops+=1;
-      }
-      //ok did we go through the max number of loops(10)
-      if( $loops >= 10 )
-        return -1;
-      else {
-      	//set the username
-      	$this->PersonID = $username;
-        return 0;
-      }
-	}
-	
-	function insertPerson() {
-
-		$App = new App();
-			
-		$dbc = new DBConnectionRW();
-		$dbh = $dbc->connect();
-			
-		# insert
-		$sql = "INSERT INTO People (
-				PersonID,
-				FName,
-				LName,
-				Type,
-				EMail,
-				Phone,
-				Fax,
-				Mobile,
-				IsUnixAcctCreated
-				)
-				VALUES (
-				" . $App->returnQuotedString($this->getPersonID()) . ",
-				" . $App->returnQuotedString($this->getFName()) . ",
-				" . $App->returnQuotedString($this->getLName()) . ",
-				" . $App->returnQuotedString($this->getType()) . ",
-				" . $App->returnQuotedString($this->getEMail()) . ",
-				" . $App->returnQuotedString($this->getPhone()) . ",
-				" . $App->returnQuotedString($this->getFax()) . ",
-				" . $App->returnQuotedString($this->getMobile())  . ",\"0\");
-		";
-        
-    	mysql_query($sql, $dbh)or die (mysql_error()) ;
-    	$sql = "INSERT INTO PeopleAddresses (
-    			 PersonID,
-				 AddressID,
-				 Address1,
-				 Address2,
-			     Address3,
-				 City,
-				 ProvStateRegion,
-			     PostalCode,
-				 CCode
-				)
-				VALUES (
-				" . $App->returnQuotedString($this->getPersonID()) . ",1,
-				" . $App->returnQuotedString($this->getAddress1()) . ",
-				" . $App->returnQuotedString($this->getAddress2()) . ",
-				" . $App->returnQuotedString($this->getAddress3()) . ",
-				" . $App->returnQuotedString($this->getCity()) . ",
-		    	" . $App->returnQuotedString($this->getProvince()) . ",
-				" . $App->returnQuotedString($this->getPostal()) . ",
-				" . $App->returnQuotedString($this->getCountry())  . "); 
-				";
-						
-		mysql_query($sql, $dbh)or die (mysql_error()) ;
-		
-		$sql = "INSERT INTO SYS_ModLog ( LogTable, PK1, PK2, LogAction, PersonID ) VALUES (
-				\"People\",
-				" . $App->returnQuotedString($this->getPersonID()) . ",
-				\"Initial\",
-				\"INSERT\",
-				\"WebScript\" );
-				";
-				
-		mysql_query($sql, $dbh)or die (mysql_error()) ;	
-				
-    			
-    	$dbc->disconnect();
-	}
-
-
-	function selectPersonExists() {
-        $result = 0;
-		
-		if( ($this->FName != "") && ($this->LName != "") && ($this->EMail != "") ) {
-			$App = new App();
-			
-			$dbc = new DBConnectionRW();
-			$dbh = $dbc->connect();
-					
-			$sql = "SELECT COUNT(*) AS RecordCount
-					FROM People
-					WHERE FName = " . $App->returnQuotedString($this->getFName()) . " AND LName = " . $App->returnQuotedString($this->getLName()) . "
-					AND EMail = " . $App->returnQuotedString($this->getEMail())  . ";";
-			
-			$result = mysql_query($sql, $dbh) or die (mysql_error()) ;
-			$myrow = mysql_fetch_array($result);
-			
-			$result = $myrow['RecordCount'];
-			
-			$dbc->disconnect();
-		    return $result;	
-		}
-		return -1;
-	}
-
-
-
-	function selectPersonIDExists($_PersonID) {
-		$result = 0;
-		
-		if($_PersonID != "") {
-			$App = new App();
-			
-			$dbc = new DBConnectionRW();
-			$dbh = $dbc->connect();
-					
-			$sql = "SELECT COUNT(*) AS RecordCount
-					FROM People
-					WHERE PersonID = " . $App->returnQuotedString($_PersonID) .";";
-			
-			
-			$result = mysql_query($sql, $dbh)or die (mysql_error()) ;
-			$myrow = mysql_fetch_array($result);
-			
-			$result = $myrow['RecordCount'];
-			
-			$dbc->disconnect();
-			
-		}
-		return $result;
-	}
-	
-}
-?>
diff --git a/inc/portal_lib.php b/inc/portal_lib.php
deleted file mode 100644
index 6ef84ae..0000000
--- a/inc/portal_lib.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-require_once("/home/data/httpd/eclipse-php-classes/system/dbconnection_portal_rw.class.php");
-
-	#*****************************************************************************
-	#
-	# portal_lib.php
-	#
-	# Author: 		Karl Matthias
-	# Date:			2007-05-11
-	#
-	# Description: Functions and modules related to the myFoundation Portal
-	#
-	# HISTORY:
-	#
-	#*****************************************************************************
-
-
-	/*
-	 * Name: mysql_error_check
-	 * Function: Verify and report MySQL errors
-	 * Date: May 11, 2007
-	 * By: Karl Matthias
-	 */
-	 function mysql_error_check($msg) {
-	 	if(mysql_errno() != 0) {
-	 		echo "$msg";
-	 		return true;
-	 	}
-	 	return false;
-	 }
-
-	/*
-	 * Name: notify_portal
-	 * Function: Notify the myFoundation Portal that the ICQ/MCQ has been filled out and that the committer
-	 * is an individual or member.  This will later be reviewed by emolegal before provisioning.
-	 * Date: May 11, 2007
-	 * By: Karl Matthias
-	 */
-	 function notify_portal($email, $cq, $legalcategory) {
-	 	$dbconnect = new DBConnectionPortalRW();
-	 	$dbh = $dbconnect->connect();
-
-	 	$notify_msg = 'Please notify emo@eclipse.org';
-
-	 	if(!$dbh)  {
-	 		return "Error verifying information in portal database.  $notify_msg.";
-	 	}
-
-	 	$result = mysql_query("SELECT voteid FROM committer_votes WHERE candidateemail = '$email'", $dbh);
-	 	if(mysql_error_check("Error contacting the portal database.  $notify_msg.")) {
-	 		return false;
-	 	}
-
-		$row = mysql_fetch_assoc($result);
-
-		if(!isset($row['voteid'])) {
-			return true; // there wasn't any record in the portal but that's ok -- election conducted via email
-		}
-
-		$voteid = $row['voteid'];
-		$result = mysql_query("UPDATE committer_votes SET $cq = now(), legalcategory = '$legalcategory' WHERE voteid = $voteid");
-	 	if(mysql_error_check("Error updating the portal election record.  $notify_msg.")) {
-	 		return false;
-	 	}
-		return true;
-	 }
-
-?>