Advertisement
Guest User

dsadasd

a guest
Jan 28th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.61 KB | None | 0 0
  1. public function insertwblower()
  2.    {
  3.  
  4.  
  5.         $role_id        = $this->session->userdata('role_id');
  6.        $user_id        = $this->session->userdata('user_id');
  7.        $email        = $this->session->userdata('email');
  8.        // Dito ko nag-add
  9.        $send_to             = explode("|", $this->input->post('send_to'));
  10.        $send_to_user_id = $send_to[0];
  11.        $send_to_email_address = $sent_to[1];
  12.        $send_to_fullname = $send_to[2];
  13.        
  14.        $report_num          = $this->input->post('report_num');
  15.        $incident_type         = $this->input->post('incident_type');
  16.        $incident_type2         = $this->input->post('incident_type2');
  17.        $is_anonymous         = $this->input->post('is_anonymous');
  18.        $what         = $this->input->post('what');
  19.        $who         = $this->input->post('who');
  20.        $when         = $this->input->post('when');
  21.        $where         = $this->input->post('where');
  22.        $is_there         = $this->input->post('is_there');
  23.        $are_there         = $this->input->post('are_there');
  24.        //$attachment         = $this->input->post('attachment');
  25.        $comments         = $this->input->post('comments');
  26.        
  27.        if($is_anonymous == 'Y')
  28.        {
  29.            $fullname = "ANONYMOUS";
  30.        }
  31.        else
  32.        {
  33.            $fullname        = $this->session->userdata('fullname');
  34.        }
  35.  
  36.        // $userIds = $this->input->post("user_id");
  37.  
  38.        // foreach ($userIds as $userId) {
  39.        // $user = $this->db->from("users")->where("user_id", (int) $userId)->get()->row_array();
  40.        // $email = $user["email_address"]; // Replace with email column "email_address"
  41.        // }
  42.  
  43.          // echo '<pre>';print_r($role_id);
  44.          // echo '<pre>';print_r($report_num);
  45.          // echo '<pre>';print_r($send_to);exit;
  46.  
  47.        $message = "
  48.       Hi  $send_to_fullname,
  49.  
  50.       This is to notify you that an employee submitted a WhistleBlower report with the details below.
  51.  
  52.       Reported By: $fullname
  53.       Report No.: $report_num
  54.       Incident Type: $incident_type / $incident_type2
  55.       What: $what
  56.       Who: $who
  57.       When: $when
  58.       Where: $where
  59.       Is there: $is_there
  60.       Are there: $are_there
  61.       Comments: $comments
  62.      
  63.  
  64.  
  65.       To Review, Please proceed to www.behnmeyer.com.ph
  66.  
  67.       This is a system-generated email. Please do not reply.
  68.       Should you have other concerns or require further assistance, please feel free to let us know. rodrigon@behnmeyer.com.ph
  69.  
  70.       Thank you.";
  71.  
  72.                    //echo '<pre>';print_r($message);exit;
  73.  
  74.                    $this->load->library('email');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement