예제 #1
0
	function update(Contact $contact) {
		$id = $contact->getId();
		if ($id == "" && $contact->getEmail() != "") {
			/* on va rechercher par rapport à l'adresse Email */
			$id = $this->recherche_email($contact->getEmail());
			if ($id === false) {
				
			} else {
				$contact->setId($id);
			}
			
		}	
        if ($contact->getId() == '') {
        	/* Il faut faire une création et pas un update */
        	
        } else {
			$elt = $contact->toAdd();
			$response = $this->mySforceConnection->update(array($elt), 'Contact');
			if ($response[0]->success) {
			} else {
				print_r($response);
			   $msg = implode(';', $response[0]->errors);
			   return $msg;	
			}

        }
        return true;
	}
예제 #2
0
 private function bindValueAndExecuteInsertOrUpdate(PDOStatement $stm, Contact $contact)
 {
     $stm->bindValue(':name', $contact->getName(), PDO::PARAM_STR);
     $stm->bindValue(':photo', $contact->getPhoto(), PDO::PARAM_STR);
     $stm->bindValue(':email', $contact->getEmail(), PDO::PARAM_STR);
     return $stm->execute();
 }
예제 #3
0
	public function displayForm($mysql, $cid = 0, $ownerid = 0) {
		$name = "";
		$email = "";
		$phone = "";
		
		if($cid != 0) {
			$con = new Contact();
			switch($con->select($cid, $ownerid, $mysql)) {
				case Contact::DATABASE_ERROR :
				{
					echo "<p>A Database error has occured.</p>";
					return;
				}
				case Contact::INVALID_DATA :
				{
					echo "<p>Invalid operation requested.</p>";
					return;
				}
				case Contact::SELECT_SUCCESS : 
				{
					$name = $con->getName();
					$email = $con->getEmail();
					$phone = $con->getPhone();
					break;
				}
				default :
					break;
			}
		}
		
		echo <<<FORM
		<div id="contact">
			<form action="" method="POST">
				<input type='hidden' name='cid' value='$cid'>
				<table>
					<tbody>
						<tr>
							<td>Name</td>
							<td><input type="text" name="cname" value="$name"/></td>
						</tr>
						<tr>
							<td>Email</td>
							<td><input type="text" name="email" value="$email"/></td>
						</tr>
						<tr>
							<td>Phone</td>
							<td><input type="text" name="phone" value="$phone"/></td>
						</tr>
						<tr>
							<td><input type="reset" value="Reset"/></td>
							<td><input type="submit"  name="action" value="Save"/></td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
FORM;

	}
예제 #4
0
 public function editContact(Contact $contact)
 {
     $obj = $this->db[$contact->getId()];
     $obj->setName($contact->getName());
     $obj->setPhoneContact($contact->getPhoneContact());
     $obj->setEmail($contact->getEmail());
     $this->db[$contact->getId()] = $obj;
 }
예제 #5
0
 /**
  * @param Contact $contact
  *
  * @return void
  */
 public function add($contact)
 {
     if (!$this->exists(function ($key, Contact $element) use($contact) {
         return $contact->getEmail() == $element->getEmail();
     })) {
         parent::add($contact);
     }
 }
예제 #6
0
 public function testContact()
 {
     $contact = new Contact('firstname', 'lastname', 'organisation', 'address1', 'address2', 'address3', 'suburb', 'state', new Country('AU'), 'postcode', new Phone('+61.111111111'), new Email('*****@*****.**'), new Phone('+61.222222222'));
     $this->assertEquals('firstname', $contact->getFirstname());
     $this->assertEquals('lastname', $contact->getLastname());
     $this->assertEquals('organisation', $contact->getOrganisation());
     $this->assertEquals('address1', $contact->getAddress1());
     $this->assertEquals('address2', $contact->getAddress2());
     $this->assertEquals('address3', $contact->getAddress3());
     $this->assertEquals('suburb', $contact->getSuburb());
     $this->assertEquals('state', $contact->getState());
     $this->assertInstanceOf('SynergyWholesale\\Types\\Country', $contact->getCountry());
     $this->assertEquals('AU', $contact->getCountry()->getCountryCode());
     $this->assertEquals('postcode', $contact->getPostcode());
     $this->assertInstanceOf('SynergyWholesale\\Types\\Phone', $contact->getPhone());
     $this->assertEquals('+61.111111111', $contact->getPhone()->getPhone());
     $this->assertInstanceOf('SynergyWholesale\\Types\\Email', $contact->getEmail());
     $this->assertEquals('*****@*****.**', $contact->getEmail()->getEmail());
     $this->assertInstanceOf('SynergyWholesale\\Types\\Phone', $contact->getFax());
     $this->assertEquals('+61.222222222', $contact->getFax()->getPhone());
 }
예제 #7
0
<?php

require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../src/JobOpening.php";
require_once __DIR__ . "/../src/Contact.php";
$app = new Silex\Application();
// Home Page
$app->get("/", function () {
    return "\n        <!DOCTYPE html>\n        <html>\n        <head>\n            <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n            <title>Post a Job</title>\n        </head>\n\n        <body>\n            <div class='container'>\n                <div class='row'>\n                  <div class='col-sm-6'>\n                    <h1>Post a Job</h1>\n                    <form action='/results'>\n                        <div class='form-group'>\n                            <label for='title'>Enter the job title:</label>\n                            <input id='title' name='title' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='description'>Enter the job description:</label>\n                            <input id='description' name='description' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='name'>Enter your name:</label>\n                            <input id='name' name='name' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='phone'>Enter your phone number:</label>\n                            <input id='phone' name='phone' class='form-control' type='number'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='email'>Enter your email:</label>\n                            <input id='email' name='email' class='form-control' type='text'>\n                        </div>\n                        <button type='submit' class='btn-success'>Submit</button>\n                    </form>\n                  </div>\n                </div>\n            </div>\n        </body>\n        </html>";
});
// Results Page
$app->get("/results", function () {
    $contact = new Contact($_GET['name'], $_GET['phone'], $_GET['email']);
    $newJob = new JobOpening($_GET['title'], $_GET['description'], $contact);
    $output = "<h3>Job: " . $newJob->getTitle() . "</h3>\n        <h4>Description: " . $newJob->getDescription() . "</h4>\n        <p>Name: " . $contact->getName() . "</p>\n        <p>Phone: " . $contact->getPhone() . "</p>\n        <p>email: " . $contact->getEmail() . "</p><hr>";
    return "\n        <!DOCTYPE html>\n        <html>\n        <head>\n            <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n            <title>Posted Job</title>\n        </head>\n\n        <body>\n            <div class='container'>\n                <div class='row'>\n                  <div class='col-sm-8'>" . $output . "</div>\n                </div>\n            </div>\n        </body>\n        </html>";
});
return $app;
예제 #8
0
      <li><label for="last_name" class="required">Last Name</label><br />
        <input type="text" name="last_name" id="last_name" class="required" 
        value="<?php 
echo $item->getLast_name();
?>
" /></li>
      <li><label for="position">Position</label><br />
        <input type="text" name="position" id="position" class="required" 
        value="<?php 
echo $item->getPosition();
?>
" /></li>
      <li><label for="email" >Email</label><br />
        <input type="text" name="email" id="email" 
        value="<?php 
echo $item->getEmail();
?>
" /></li>
      <li><label for="phone" >Phone</label><br />
        <input type="text" name="phone" id="phone" 
        value="<?php 
echo $item->getPhone();
?>
" /></li>
    </ul>

    <?php 
// create token
$salt = 'SomeSalt';
$token = sha1(mt_rand(1, 1000000) . $salt);
$_SESSION['token'] = $token;
예제 #9
0
 public function update(Contact $contact)
 {
     try {
         return $this->contactsManagerCollection->update(array('email' => $contact->getEmail()), array('name' => $contact->getName(), 'email' => $contact->getEmail(), 'photo' => $contact->getPhoto()), array('safe' => true));
     } catch (MongoCursorException $e) {
         //log
     }
     return false;
 }
 function Add_Company_With_Building_With_Specialization($Company_Name, $Company_Name_Amharic, $Category_ID, $Company_Type_ID, $Branch, $Branch_Amharic, $Working_Hours, $Working_Hours_Amharic, $Product_Service, $Product_Service_Amharic, $Registration_Expiration_Date, $Registration_Type, $Building_ID, $Building_Floor, Contact $Contact, $specialization)
 {
     $query = "START TRANSACTION";
     mysqli_query($this->getDbc(), $query);
     //First add the company
     $query = "INSERT INTO Company (Name,Name_Amharic,Registration_Date) VALUES ('{$Company_Name}','{$Company_Name_Amharic}', Now())";
     $result1 = mysqli_query($this->getDbc(), $query);
     //get the company id
     $added_company_id = $this->getDb()->get_last_id();
     //add company category relation
     $query = "INSERT INTO Company_Category (Company_ID,Category_ID) VALUES('{$added_company_id}','{$Category_ID}')";
     $result2 = mysqli_query($this->getDbc(), $query);
     //add company ownership
     $query = "INSERT INTO Company_Ownership(Company_ID,Ownership_ID)VALUES('{$added_company_id}','{$Company_Type_ID}')";
     $result3 = mysqli_query($this->getDbc(), $query);
     //add about company
     $query = "INSERT INTO About_Company(Company_ID,Branch,Branch_Amharic,Working_Hours,Working_Hours_Amharic) VALUES('{$added_company_id}','{$Branch}','{$Branch_Amharic}','{$Working_Hours}',\n'{$Working_Hours_Amharic}')";
     $result4 = mysqli_query($this->getDbc(), $query);
     //add company service
     $query = "INSERT INTO company_product_service(Company_ID,Product_Service,Product_Service_Amharic) VALUES('{$added_company_id}','{$Product_Service}','{$Product_Service_Amharic}')";
     $result5 = mysqli_query($this->getDbc(), $query);
     //add payment status
     $query = "INSERT INTO Payment_Status(Company_ID,Expiration_Date,Registration_Type) VALUES ('{$added_company_id}','{$Registration_Expiration_Date}','{$Registration_Type}')";
     $result6 = mysqli_query($this->getDbc(), $query);
     //increment address
     $this->Increment_Address(Belong::COMPANY_WITH_BUILDING);
     //get the address id
     $added_address_id = $this->getDb()->get_last_id();
     //add company address relationship
     $query = "INSERT INTO Company_Address (Company_ID,Address_ID) VALUES('{$added_company_id}','{$added_address_id}')";
     $result7 = mysqli_query($this->getDbc(), $query);
     //add address building floor
     $query = "INSERT INTO Address_Building_Floor(Address_ID,Building_ID,Floor) VALUES('{$added_address_id}','{$Building_ID}','{$Building_Floor}')";
     $result8 = mysqli_query($this->getDbc(), $query);
     //add contact
     $Email = $Contact->getEmail();
     $House_No = $Contact->getHouseNo();
     $FAX = $Contact->getFAX();
     $POBOX = $Contact->getPOBOX();
     $Telephone = $Contact->getTelephone();
     $query = "INSERT INTO Contact (Email,House_No,FAX,POBOX,Telephone) VALUES('{$Email}','{$House_No}','{$FAX}','{$POBOX}','{$Telephone}')";
     $result9 = mysqli_query($this->getDbc(), $query);
     //get the contact id
     $added_contact_id = $this->getDb()->get_last_id();
     //add address contact relation
     $query = "INSERT INTO Address_Contact (Address_ID,Contact_ID) VALUES('{$added_address_id}','{$added_contact_id}')";
     $result10 = mysqli_query($this->getDbc(), $query);
     $query = "insert into  company_specialization(Company_ID,Spec_1,Spec_2,Spec_3,Spec_4,Spec_5) values('{$added_company_id}',{$specialization['0']},{$specialization['1']},{$specialization['2']},{$specialization['3']},\n{$specialization['4']})";
     $result_spec = mysqli_query($this->getDbc(), $query);
     if ($result_spec) {
         echo "The specilization is added";
     } else {
         echo "The specliation is not added";
         echo $specialization[0];
         echo "-> ";
         echo $specialization[1];
         echo "-> ";
         echo $specialization[2];
         echo "-> ";
         echo $specialization[3];
     }
     if ($result1 and $result2 and $result3 and $result4 and $result5 and $result6 and $result7 and $result8 and $result9 and $result10 and $result_spec) {
         $query = "COMMIT";
         mysqli_query($this->getDbc(), $query);
         return TRUE;
     } else {
         $query = "ROLLBACK";
         mysqli_query($this->getDbc(), $query);
         echo "Rolled back";
         //			return FALSE;
         exit;
     }
 }
예제 #11
0
<?php 
    return "";
});
$app->get("/posting", function () {
    $job_opening = new JobOpening($_GET["title"], $_GET["des"]);
    $contact = new Contact($_GET["phone"], $_GET["email"], $_GET["address"]);
    ?>
        <p><?php 
    echo $job_opening->getTitle();
    ?>
</p>
        <p><?php 
    echo $job_opening->getDes();
    ?>
</p>
        <p><?php 
    echo $contact->getPhone();
    ?>
</p>
        <p><?php 
    echo $contact->getEmail();
    ?>
</p>
        <p><?php 
    echo $contact->getAddress();
    ?>
</p>
<?php 
    return "";
});
return $app;
예제 #12
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../src/JobOpening.php';
require_once __DIR__ . '/../src/Contact.php';
$app = new Silex\Application();
$app->get("/", function () {
    return "\n            <!DOCTYPE html>\n            <html>\n            <head>\n              <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n              <link rel='stylesheet' href='css/styles.css'>\n              <title>Job Board</title>\n            </head>\n            <body>\n                <div class='container'>\n                    <h1>Job Board</h1>\n                    <form action='/job'>\n                        <div class='form-group'>\n                            <label for='title'>Enter job title:</label>\n                            <input id='title' name='title' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='description'>Enter job description:</label>\n                            <input id='description' name='description' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='name'>Enter your name:</label>\n                            <input id='name' name='name' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='phone_number'>Enter phone number: </label>\n                            <input id='phone_number' name='phone_number' class='form-control' type='text'>\n                        </div>\n                        <div class='form-group'>\n                            <label for='email'>Enter your email:</label>\n                            <input id='email' name='email' class='form-control' type='text'>\n                        </div>\n                        <button type='submit' class='btn-primary'>Submit</button>\n                    </form>\n                </div>\n            </body>\n            </html>\n            ";
});
$app->get("/job", function () {
    $new_job = new JobOpening($_GET["title"], $_GET["description"]);
    $new_contact = new Contact($_GET["name"], $_GET["phone_number"], $_GET["email"]);
    $output = "";
    $output = $output . "<div class='box'><p>Title: " . $new_job->getTitle() . "</p>\n            <p> Description: " . $new_job->getDescription() . "</p>\n            <p> Name: " . $new_contact->getName() . "</p>\n            <p> Phone Number: " . $new_contact->getPhoneNumber() . "</p>\n            <p> Email: " . $new_contact->getEmail() . "</div></p>";
    return "\n            <!DOCTYPE html>\n            <html>\n            <head>\n                <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>\n                <link rel='stylesheet' href='css/styles.css'>\n                <title>Job Posted!</title>\n            </head>\n            <body>\n                <div class='container'>\n                    <h1>Your job has been posted!</h1>\n                    <h3>The job details are:</h3>\n                    <p>{$output}</p>\n                </div>\n            </body>\n            </html>\n        ";
});
return $app;
 private function getRequestDataForUpdate(Contact $contact)
 {
     $data = array('chg' => array('voice' => $contact->getPhoneNumber(), 'fax' => $contact->getFaxNumber(), 'email' => $contact->getEmail(), 'postalInfo' => array(Contact::POSTALINFO_INT => $contact->getPostalInfo(Contact::POSTALINFO_INT))));
     if (!empty($contact->getPostalInfo(Contact::POSTALINFO_LOCAL)['name'])) {
         $data['chg']['postalInfo'][Contact::POSTALINFO_LOCAL] = $contact->getPostalInfo(Contact::POSTALINFO_LOCAL);
     }
     return $data;
 }
예제 #14
0
      <li><label for="last_name" class="required">Last Name</label><br />
        <input type="text" name="last_name" id="last_name" class="required" 
        value="<?php 
echo htmlspecialchars($item->getLast_name());
?>
" /></li>
      <li><label for="position">Position</label><br />
        <input type="text" name="position" id="position" class="required" 
        value="<?php 
echo htmlspecialchars($item->getPosition());
?>
" /></li>
      <li><label for="email" >Email</label><br />
        <input type="text" name="email" id="email" 
        value="<?php 
echo htmlspecialchars($item->getEmail());
?>
" /></li>
      <li><label for="phone" >Phone</label><br />
        <input type="text" name="phone" id="phone" 
        value="<?php 
echo htmlspecialchars($item->getPhone());
?>
" /></li>
    </ul>

    <?php 
// create token
$salt = 'SomeSalt';
$token = sha1(mt_rand(1, 1000000) . $salt);
$_SESSION['token'] = $token;
 function Edit_Company_With_Out_Building($Company_Name, $Company_Name_Amharic, $Category_ID, $Company_Type_ID, $Branch, $Branch_Amharic, $Working_Hours, $Working_Hours_Amharic, $Product_Service, $Product_Service_Amharic, $Registration_Expiration_Date, $Registration_Type, Contact $Contact, Place $place, $Direction, $Direction_Amharic, $Company_ID, $About_Company_ID, $Payment_Status_ID, $Company_Service_ID, $Company_Ownership_ID, $Company_Category_ID, $Contact_ID, $Direction_ID, $Place_ID)
 {
     //contacts
     $Email = $Contact->getEmail();
     $House_No = $Contact->getHouseNo();
     $FAX = $Contact->getFAX();
     $POBOX = $Contact->getPOBOX();
     $Telephone = $Contact->getTelephone();
     //places
     $Region = $place->getRegionID();
     $City = $place->getCityID();
     $Sub_City = $place->getSubCityID();
     $Wereda = $place->getWeredaID();
     $Sefer = $place->getSeferID();
     $Street = $place->getStreetID();
     //start transaction
     $query = "START TRANSACTION";
     mysqli_query($this->getDbc(), $query);
     //1 update the company
     $query1 = "update company\n\t\t\t\t\tset name='{$Company_Name}',name_amharic='{$Company_Name_Amharic}'\n\t\t\t\t\twhere ID='{$Company_ID}'";
     $result1 = mysqli_query($this->getDbc(), $query1);
     //2 udate the about company
     $query2 = "update about_company\n\t\t\t\t\tset branch='{$Branch}',branch_amharic='{$Branch_Amharic}',\n\t\t\t\t\tworking_hours='{$Working_Hours}',working_hours_amharic='{$Working_Hours_Amharic}'\n\t\t\t\t\twhere ID='{$About_Company_ID}'";
     $result2 = mysqli_query($this->getDbc(), $query2);
     //3 update the payment status
     $query3 = "update payment_status\n\t\t\t\t\tset Expiration_Date='{$Registration_Expiration_Date}',Registration_Type='{$Registration_Type}'\n\t\t\t\t\twhere ID='{$Payment_Status_ID}'";
     $result3 = mysqli_query($this->getDbc(), $query3);
     //4 update the company service
     $query4 = "update company_product_service\n\t\t\t\tset Product_Service='{$Product_Service}',Product_Service_Amharic='{$Product_Service_Amharic}'\n\t\t\t\twhere ID='{$Company_Service_ID}'";
     $result4 = mysqli_query($this->getDbc(), $query4);
     //5 update company ownership
     $query5 = "update company_ownership\n\t\t\t\t\tset Ownership_ID='{$Company_Type_ID}'\n\t\t\t\t\twhere ID='{$Company_Ownership_ID}'";
     $result5 = mysqli_query($this->getDbc(), $query5);
     //update company category
     $query6 = "update company_category\n\t\t\t\t\tset Category_ID='{$Category_ID}'\n\t\t\t\t\twhere ID='{$Company_Category_ID}'";
     $result6 = mysqli_query($this->getDbc(), $query6);
     //update the contact
     $query7 = "update contact\n\t\t\t\t\tset Email='{$Email}',House_No='{$House_No}',FAX='{$FAX}',\n\t\t\t\t\tPOBOX='{$POBOX}',Telephone='{$Telephone}'\n\t\t\t\t\twhere ID='{$Contact_ID}'";
     $result3 = mysqli_query($this->getDbc(), $query7);
     //update the direction
     $query8 = "update Direction\n\t\t\t\t\tset Direction='{$Direction}',Direction_Amharic='{$Direction_Amharic}'\n\t\t\t\t\twhere ID='{$Direction_ID}'";
     $result8 = mysqli_query($this->getDbc(), $query8);
     //update the place
     $query9 = "update Place\n\t\t\t\t\tset Region='{$Region}',City='{$City}',Sub_City='{$Sub_City}',\n\t\t\t\t\t\tWereda='{$Wereda}',Sefer='{$Sefer}',Street='{$Street}'\n\t\t\t\t\twhere ID='{$Place_ID}'";
     $result9 = mysqli_query($this->getDbc(), $query9);
     //commit the transaction
     $query_last = "COMMIT";
     mysqli_query($this->getDbc(), $query_last);
     return TRUE;
     echo $Registration_Type;
     exit;
 }
 function build_csv_from_contact(Contact $contact, $checked)
 {
     $str = '';
     if (isset($checked['firstname']) && $checked['firstname'] == 'checked') {
         $str .= self::build_csv_field($contact->getFirstname());
     }
     if (isset($checked['lastname']) && $checked['lastname'] == 'checked') {
         $str .= self::build_csv_field($contact->getLastname());
     }
     if (isset($checked['email']) && $checked['email'] == 'checked') {
         $str .= self::build_csv_field($contact->getEmail());
     }
     if (isset($checked['company_id']) && $checked['company_id'] == 'checked') {
         $str .= self::build_csv_field($contact->getCompany() ? $contact->getCompany()->getName() : "");
     }
     if (isset($checked['w_web_page']) && $checked['w_web_page'] == 'checked') {
         $str .= self::build_csv_field($contact->getWWebPage());
     }
     if (isset($checked['w_address']) && $checked['w_address'] == 'checked') {
         $str .= self::build_csv_field($contact->getWAddress());
     }
     if (isset($checked['w_city']) && $checked['w_city'] == 'checked') {
         $str .= self::build_csv_field($contact->getWCity());
     }
     if (isset($checked['w_state']) && $checked['w_state'] == 'checked') {
         $str .= self::build_csv_field($contact->getWState());
     }
     if (isset($checked['w_zipcode']) && $checked['w_zipcode'] == 'checked') {
         $str .= self::build_csv_field($contact->getWZipcode());
     }
     if (isset($checked['w_country']) && $checked['w_country'] == 'checked') {
         $str .= self::build_csv_field($contact->getWCountryName());
     }
     if (isset($checked['w_phone_number']) && $checked['w_phone_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getWPhoneNumber());
     }
     if (isset($checked['w_phone_number2']) && $checked['w_phone_number2'] == 'checked') {
         $str .= self::build_csv_field($contact->getWPhoneNumber2());
     }
     if (isset($checked['w_fax_number']) && $checked['w_fax_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getWFaxNumber());
     }
     if (isset($checked['w_assistant_number']) && $checked['w_assistant_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getWAssistantNumber());
     }
     if (isset($checked['w_callback_number']) && $checked['w_callback_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getWCallbackNumber());
     }
     if (isset($checked['h_web_page']) && $checked['h_web_page'] == 'checked') {
         $str .= self::build_csv_field($contact->getHWebPage());
     }
     if (isset($checked['h_address']) && $checked['h_address'] == 'checked') {
         $str .= self::build_csv_field($contact->getHAddress());
     }
     if (isset($checked['h_city']) && $checked['h_city'] == 'checked') {
         $str .= self::build_csv_field($contact->getHCity());
     }
     if (isset($checked['h_state']) && $checked['h_state'] == 'checked') {
         $str .= self::build_csv_field($contact->getHState());
     }
     if (isset($checked['h_zipcode']) && $checked['h_zipcode'] == 'checked') {
         $str .= self::build_csv_field($contact->getHZipcode());
     }
     if (isset($checked['h_country']) && $checked['h_country'] == 'checked') {
         $str .= self::build_csv_field($contact->getHCountryName());
     }
     if (isset($checked['h_phone_number']) && $checked['h_phone_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getHPhoneNumber());
     }
     if (isset($checked['h_phone_number2']) && $checked['h_phone_number2'] == 'checked') {
         $str .= self::build_csv_field($contact->getHPhoneNumber2());
     }
     if (isset($checked['h_fax_number']) && $checked['h_fax_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getHFaxNumber());
     }
     if (isset($checked['h_mobile_number']) && $checked['h_mobile_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getHMobileNumber());
     }
     if (isset($checked['h_pager_number']) && $checked['h_pager_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getHPagerNumber());
     }
     if (isset($checked['o_web_page']) && $checked['o_web_page'] == 'checked') {
         $str .= self::build_csv_field($contact->getOWebPage());
     }
     if (isset($checked['o_address']) && $checked['o_address'] == 'checked') {
         $str .= self::build_csv_field($contact->getOAddress());
     }
     if (isset($checked['o_city']) && $checked['o_city'] == 'checked') {
         $str .= self::build_csv_field($contact->getOCity());
     }
     if (isset($checked['o_state']) && $checked['o_state'] == 'checked') {
         $str .= self::build_csv_field($contact->getOState());
     }
     if (isset($checked['o_zipcode']) && $checked['o_zipcode'] == 'checked') {
         $str .= self::build_csv_field($contact->getOZipcode());
     }
     if (isset($checked['o_country']) && $checked['o_country'] == 'checked') {
         $str .= self::build_csv_field($contact->getOCountryName());
     }
     if (isset($checked['o_phone_number']) && $checked['o_phone_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getOPhoneNumber());
     }
     if (isset($checked['o_phone_number2']) && $checked['o_phone_number2'] == 'checked') {
         $str .= self::build_csv_field($contact->getOPhoneNumber2());
     }
     if (isset($checked['o_fax_number']) && $checked['o_fax_number'] == 'checked') {
         $str .= self::build_csv_field($contact->getOFaxNumber());
     }
     if (isset($checked['o_birthday']) && $checked['o_birthday'] == 'checked') {
         $str .= self::build_csv_field($contact->getOBirthday());
     }
     if (isset($checked['email2']) && $checked['email2'] == 'checked') {
         $str .= self::build_csv_field($contact->getEmail2());
     }
     if (isset($checked['email3']) && $checked['email3'] == 'checked') {
         $str .= self::build_csv_field($contact->getEmail3());
     }
     if (isset($checked['job_title']) && $checked['job_title'] == 'checked') {
         $str .= self::build_csv_field($contact->getJobTitle());
     }
     if (isset($checked['department']) && $checked['department'] == 'checked') {
         $str .= self::build_csv_field($contact->getDepartment());
     }
     if (isset($checked['middlename']) && $checked['middlename'] == 'checked') {
         $str .= self::build_csv_field($contact->getMiddlename());
     }
     if (isset($checked['notes']) && $checked['notes'] == 'checked') {
         $str .= self::build_csv_field($contact->getNotes(), true);
     }
     $str = str_replace(array(chr(13) . chr(10), chr(13), chr(10)), ' ', $str);
     //remove line breaks
     return $str;
 }