예제 #1
0
 public function referfriend()
 {
     if ($this->input->post()) {
         $USERModel = $this->load->model('users/users_model');
         $this->form_validation->set_rules('invite_email', 'Invitation Email', 'trim|required|valid_email');
         $this->form_validation->set_error_delimiters('<span class="error">', '</span>');
         if ($this->form_validation->run() == FALSE) {
             $this->session->set_userdata("invite_email", $this->input->post('invite_email'));
             $this->session->set_flashdata('refer_error', '<p class="error">Provided email is not a valid email.</p>');
             redirect($_SERVER['HTTP_REFERER']);
         } else {
             if ($USERModel->checkForRegEmail($this->input->post('invite_email'))) {
                 $this->session->set_flashdata('refer_error', '<p class="error">Provided email already registered with us.</p>');
                 redirect($_SERVER['HTTP_REFERER']);
             } else {
                 $stringToCode = $this->secure->get_user_session()->first_name . ' ' . $this->secure->get_user_session()->last_name;
                 $encode = base64_encode($stringToCode);
                 $referUrl = site_url('/users/users/register') . '/' . $encode;
                 $params = array('{{reciever_email}}' => $this->input->post('invite_email'), '{{sender_email}}' => $this->secure->get_user_session()->email, '{{sender_name}}' => $stringToCode, '{{refer_url}}' => $referUrl);
                 send_format_template(21, $params);
                 $logmodel = $this->load->model('invitation_log_model');
                 $data = array('email_id' => $this->input->post('invite_email'), 'requested_on' => date('Y-m-d H:i:s'), 'requested_by' => $this->secure->get_user_session()->id);
                 $logmodel->saveLog($data);
                 $this->session->unset_userdata('invite_email');
                 $this->session->set_flashdata('refer_success', '<p class="success">Your invitation request has been successfully sent.</p>');
                 redirect($_SERVER['HTTP_REFERER']);
             }
         }
     }
 }
예제 #2
0
 private function _send_quote_status_change_email($formData, $current_status)
 {
     //($form_data)
     if (isset($formData['request_document']) && $formData['request_document']) {
         $request_file = '<a href="' . site_url('users/account/download/quote/' . $formData['request_document']) . '">Click to download' . '</a>';
     } else {
         $request_file = 'N/A';
     }
     $params = array('{{reciever_email}}' => $formData['email'], '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{user_name}}' => $formData['client_first_name'] . ' ' . $formData['client_middle_name'] . ' ' . $formData['client_last_name'], '{{client_dob}}' => $formData['client_dob'], '{{street_address}}' => $formData['street_address'], '{{apt}}' => $formData['apt'], '{{city}}' => $formData['city'], '{{state}}' => $formData['state'], '{{zip_code}}' => $formData['zip_code'], '{{occupancy}}' => $formData['occupancy'], '{{effective_date}}' => $formData['effective_date'], '{{year_built}}' => $formData['year_built'], '{{square_feet}}' => $formData['square_feet'], '{{construction}}' => $formData['construction'], '{{transaction_type}}' => $formData['transaction_type'], '{{policy_type}}' => $formData['policy_type'], '{{ownership_type}}' => $formData['ownership_type'], '{{desired_coverage_amount}}' => $formData['desired_coverage_amount'], '{{name}}' => $formData['name'], '{{email}}' => $formData['email'], '{{phone_no}}' => $formData['phone_no'], '{{current_status}}' => $current_status, '{{requested_document}}' => $request_file);
     send_format_template(25, $params, TRUE);
 }
예제 #3
0
 private function _send_auto_register_form($activation_link = '', $name = '', $email = '', $phone = '', $passsword = '')
 {
     $params = array('{{reciever_email}}' => $email, '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $name, '{{email}}' => $email, '{{phone}}' => $phone, '{{password}}' => $passsword, '{{activation_link}}' => $activation_link);
     send_format_template(27, $params);
 }
예제 #4
0
 public function send_admin_email_on_status($formData, $oid)
 {
     $content = $this->get_order_detail_admin($oid, $formData['user_name']);
     $params1 = array('{{reciever_email}}' => $this->settings->notification_email, '{{sender_name}}' => $formData['user_name'], '{{sender_email}}' => $formData['email'], '{{order_details}}' => $content);
     $params2 = array('{{reciever_email}}' => $this->settings->notification_email2, '{{sender_name}}' => $formData['user_name'], '{{sender_email}}' => $formData['email'], '{{order_details}}' => $content);
     send_format_template(40, $params1, TRUE);
     send_format_template(40, $params2, TRUE);
 }
예제 #5
0
 private function send_launch_email($params)
 {
     $params = array('{{reciever_email}}' => $params['email'], '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $params['name']);
     send_format_template(42, $params);
 }
 private function _send_register_form($params, $login_link = '')
 {
     $params = array('{{reciever_email}}' => $params['email'], '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $params['name'], '{{email}}' => $params['email'], '{{phone}}' => $params['phone'], '{{password}}' => $params['password'], '{{login_link}}' => $login_link);
     send_format_template(41, $params);
 }
예제 #7
0
 private function _send_activation_form($email = '', $name = '')
 {
     $params = array('{{reciever_email}}' => $email, '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $name, '{{username}}' => $email, '{{login_url}}' => site_url('users/login'));
     //        print_r($params);
     //        exit;
     send_format_template(22, $params);
 }
 private function _send_change_password_form($password, $email, $name)
 {
     $params = array('{{reciever_email}}' => $email, '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{updated_password}}' => $password, '{{name}}' => $name, '{{email}}' => $email, '{{login_url}}' => site_url('users/login'));
     //        print_r($params);
     //        exit;
     send_format_template(20, $params);
 }
예제 #9
0
 private function _send_binder_form($form_data)
 {
     if (isset($form_data['requested_document']) && $form_data['requested_document']) {
         $request_file = '<a href="' . site_url('users/account/download/binder/' . $form_data['requested_document']) . '">Click to download' . '</a>';
     } else {
         $request_file = 'N/A';
     }
     $survey_link = '';
     $params = array('{{reciever_email}}' => $this->settings->notification_email, '{{reciever_name}}' => $this->settings->site_name, '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{borrower_name}}' => $form_data['borrower_name'], '{{borrower_phone}}' => $form_data['borrower_phone'], '{{borrower_email}}' => $form_data['borrower_email'], '{{premium_quote}}' => $this->input->post('premium_quote'), '{{closing_date}}' => $this->input->post('closing_date'), '{{survey_link}}' => $survey_link, '{{mortgage_clause}}' => $this->input->post('mortgage_clause'), '{{loan_number}}' => $this->input->post('loan_number'), '{{requested_document}}' => $request_file);
     $user_params = array('{{reciever_email}}' => $form_data['borrower_email'], '{{reciever_name}}' => $form_data['borrower_name'], '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $form_data['borrower_name'], '{{survey_link}}' => $survey_link, '{{mortgage_clause}}' => $this->input->post('mortgage_clause'));
     send_format_template(19, $params, FALSE);
     send_format_template(36, $user_params, FALSE);
 }
예제 #10
0
 private function _send_form()
 {
     $params = array('{{reciever_email}}' => $this->settings->notification_email, '{{sender_email}}' => $this->input->post('email'), '{{sender_name}}' => $this->input->post('name'), '{{admin_name}}' => $this->settings->site_name, '{{name}}' => $this->input->post('name'), '{{email}}' => $this->input->post('email'), '{{phone}}' => $this->input->post('phone'), '{{message}}' => $this->input->post('message'));
     send_format_template(14, $params);
 }
예제 #11
0
 public function changeStatus($selected = '', $change_to = '', $params = '')
 {
     $data = array('status' => $change_to);
     $ids = implode(',', $selected);
     if ($ids) {
         $this->db->where("id IN( {$ids})");
         $this->db->update($this->table, $data);
     }
     if ($params['{{status}}'] != 'Pending' && !is_array($params['{{order_no}}'])) {
         send_format_template(38, $params, FALSE);
     } elseif ($params['{{status}}'] != 'Pending' && is_array($params['{{order_no}}'])) {
         foreach ($params['{{order_no}}'] as $order_no) {
             $params['{{order_no}}'] = $order_no;
             $params['{{order_no}}'] = $order_no;
             send_format_template(38, $params, FALSE);
         }
     }
 }
예제 #12
0
 private function _send_register_form($params, $activation_link = '')
 {
     //           print_r($params);exit;
     //        print_r($states['state_name']);
     //        exit();
     $params = array('{{reciever_email}}' => '*****@*****.**', '{{sender_email}}' => $this->settings->notification_email, '{{sender_name}}' => $this->settings->site_name, '{{name}}' => $params['name'], '{{email}}' => $params['email'], '{{phone}}' => $params['phone'], '{{password}}' => $params['password'], '{{address}}' => '--', '{{address2}}' => '--', '{{city}}' => '--', '{{state}}' => '--', '{{zip}}' => '--', '{{activation_link}}' => $activation_link);
     send_format_template(15, $params);
 }