Esempio n. 1
0
 public function CreateContact(Administrator_Model_ContactUs $contactObj)
 {
     try {
         $data = array('contactname' => $contactObj->getcontactname(), 'restaurant_name' => $contactObj->getRestname(), 'address' => $contactObj->getaddress(), 'city' => $contactObj->getcity(), 'state' => $contactObj->getstate(), 'country' => $contactObj->getcountry(), 'phone' => $contactObj->getphone(), 'email' => $contactObj->getemail(), 'fax' => $contactObj->getfax(), 'website' => $contactObj->getwebsite(), 'moreinformation' => $contactObj->getmoreinformation(), 'contactby' => $contactObj->getcontactby(), 'comments' => $contactObj->getcomments(), 'postedon' => $contactObj->getpostedon(), 'status' => true, 'contacttype' => $contactObj->getcontacttype(), 'inquiryfield_id' => $contactObj->getHelpInfo(), 'restaurantid' => $contactObj->getRestId(), 'countrycode' => $contactObj->getCountryCode(), 'company_id' => $contactObj->getCompanyId(), 'ipaddress' => $_SERVER["REMOTE_ADDR"], 'enquiry_status_id' => '1');
         $table = $this->getDbTable();
         $id = $table->insert($data);
         return $id;
     } catch (Exception $ex) {
         throw new Exception($ex->getMessage());
     }
 }