Пример #1
0
 public function get_contact_info_by_email($email)
 {
     $ObjContactsTemp = new contactsTempModel();
     $where_params = array('`email_address`=' => $email);
     $contcol = $ObjContactsTemp->get_record($where_params);
     if ($contcol == FALSE) {
         $where_params = array('`email_address`=' => $email);
         $contcol = $this->get_record($where_params);
     }
     return $contcol;
 }
Пример #2
0
 public function update_company()
 {
     $ObjContactsTemp = new contactsTempModel();
     $ObjCompanies = new companiesModel();
     $contact_id = Input::get('contact_id');
     $company_id = Input::get('company_id');
     $company_name = Input::get('company_name');
     $address1 = Input::get('address1');
     $address2 = Input::get('address2');
     $city = Input::get('city');
     $state = Input::get('state');
     $zipcode = Input::get('zipcode');
     $data = array('company_name' => $company_name, 'address1' => $address1, 'address2' => $address2, 'city' => $city, 'state_code' => $state, 'zipcode' => $zipcode);
     if ($company_id) {
         $result = $ObjCompanies->update_data($data, $company_id);
         if ($result) {
             $message = 'Update Company profile successful.';
         } else {
             $message = 'Update Company profile not successful.';
         }
     } else {
         $company_id = $ObjCompanies->save_company_if_company_dont_exist($company_name, $address1, $city, $state, $zipcode, $address2);
         if ($company_id) {
             $data = array('company_id' => $company_id);
             $result = $ObjContactsTemp->update_data($data, $contact_id);
             if ($result) {
                 $message = 'Update Company profile company id successful.';
             } else {
                 $message = 'Update Company profile company id not successful.';
             }
         } else {
             $message = 'Add new Company not successful.';
         }
     }
     return Redirect::to('profile')->with('message', $message);
 }
Пример #3
0
 public function register_confirm_resend()
 {
     $ObjContactsTemp = new contactsTempModel();
     $email = Input::get('email');
     $where_params = array('`email_address`=' => $email);
     $contcol = $ObjContactsTemp->get_record($where_params);
     if ($contcol) {
         if ($contcol->cont_confirmation == 'yes') {
             $message = 'Email/Account ' . $email . ' already confirmed.';
         } else {
             $body_message = '<a href="' . URL::to('register_confirm/' . $contcol->cont_confirmation) . '" target="_blank">Click here to Confirm your Registration</a>';
             $data = array('email' => $email, 'first_name' => $contcol->first_name, 'last_name' => $contcol->last_name, 'subject' => 'Re-send registration confirmation at Paskr Account.', 'body_message' => $body_message);
             Mail::send('emails.basic_format', $data, function ($mail) use($data) {
                 $mail->to($data['email'], $data['first_name'] . ' ' . $data['last_name'])->subject($data['subject']);
             });
             $message = 'Re-send of registration confirmation successful, please check your email.';
         }
     } else {
         $message = 'Email do not exist.';
     }
     return Redirect::to('forgot_password')->with('message', $message);
 }