Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function insertwblower()
- {
- $role_id = $this->session->userdata('role_id');
- $user_id = $this->session->userdata('user_id');
- $email = $this->session->userdata('email');
- // Dito ko nag-add
- $send_to = explode("|", $this->input->post('send_to'));
- $send_to_user_id = $send_to[0];
- $send_to_email_address = $sent_to[1];
- $send_to_fullname = $send_to[2];
- $report_num = $this->input->post('report_num');
- $incident_type = $this->input->post('incident_type');
- $incident_type2 = $this->input->post('incident_type2');
- $is_anonymous = $this->input->post('is_anonymous');
- $what = $this->input->post('what');
- $who = $this->input->post('who');
- $when = $this->input->post('when');
- $where = $this->input->post('where');
- $is_there = $this->input->post('is_there');
- $are_there = $this->input->post('are_there');
- //$attachment = $this->input->post('attachment');
- $comments = $this->input->post('comments');
- if($is_anonymous == 'Y')
- {
- $fullname = "ANONYMOUS";
- }
- else
- {
- $fullname = $this->session->userdata('fullname');
- }
- // $userIds = $this->input->post("user_id");
- // foreach ($userIds as $userId) {
- // $user = $this->db->from("users")->where("user_id", (int) $userId)->get()->row_array();
- // $email = $user["email_address"]; // Replace with email column "email_address"
- // }
- // echo '<pre>';print_r($role_id);
- // echo '<pre>';print_r($report_num);
- // echo '<pre>';print_r($send_to);exit;
- $message = "
- Hi $send_to_fullname,
- This is to notify you that an employee submitted a WhistleBlower report with the details below.
- Reported By: $fullname
- Report No.: $report_num
- Incident Type: $incident_type / $incident_type2
- What: $what
- Who: $who
- When: $when
- Where: $where
- Is there: $is_there
- Are there: $are_there
- Comments: $comments
- To Review, Please proceed to www.behnmeyer.com.ph
- This is a system-generated email. Please do not reply.
- Should you have other concerns or require further assistance, please feel free to let us know. rodrigon@behnmeyer.com.ph
- Thank you.";
- //echo '<pre>';print_r($message);exit;
- $this->load->library('email');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement