Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
session->userdata('school_reg_number') || $this->session->userdata('reg_number')) { $this->session->set_flashdata('flash_data', 'You don\'t have access!'); redirect('Private_area'); } } /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/ * @see https://codeigniter.com/user_guide/general/urls.html */ public function index() { $this->load->view('welcome/welcome_header'); $this->load->view('welcome/welcome'); $this->load->view('welcome/welcome_footer'); } public function login() { $this->load->view('welcome/welcome_header'); $this->load->view('welcome/login'); $this->load->view('welcome/welcome_footer'); } public function about() { // $this->load->view('welcome/welcome_header'); $this->load->view('welcome/about'); //$this->load->view('welcome/welcome_footer'); } public function register() { $this->load->view('welcome/welcome_header'); $this->load->view('welcome/register'); $this->load->view('welcome/welcome_footer'); } public function confirm() { $this->load->view('welcome/welcome_header'); $this->load->view('welcome/confirm'); $this->load->view('welcome/welcome_footer'); } public function terms_and_conditions() { $this->load->view('welcome/welcome_header'); $this->load->view('welcome/terms_and_conditions'); $this->load->view('welcome/welcome_footer'); } public function contact_us(){ //function to send email $to = 'info@afel.co.tz'; $subject = "Afelschool Mail"; $from=$this->security->xss_clean($this->input->post('email')); $name = $this->security->xss_clean($this->input->post('name')); $messages = $this->security->xss_clean($this->input->post('message')); $message=''.$name.'
'.$messages; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From:'.$from.' \r\n'; //$headers .= 'Cc: peacejuma91@gmail.com' . "\r\n"; mail($to,$subject,$message,$headers); redirect('?Sent_mail'); } public function insert_registration(){ if($_POST){ $days=0; $gtd=$this->db->get('trial_setting'); foreach($gtd->result() as $rt){ $days=$rt->days; } $today = date("d-M-Y",time()); $trialPeriod = $days; $startDate = date("d-M-Y", time()); $getExpiryDate = strtotime('+'.$trialPeriod."days", strtotime($startDate)); $expiryDate = date("d-M-Y", $getExpiryDate); $email=$this->security->xss_clean($this->input->post('school_email')); $this->db->where('school_reg_number',$this->security->xss_clean($this->input->post('school_reg_number'))); $countt= $this->db->count_all_results('schools'); if($countt>0){ redirect('Welcome/register/?Error'); }else{ $chool_type=$this->security->xss_clean($this->input->post('school_type')); $istrue = true; while($istrue){ $school_id= $chool_type.uniqid(); $this->db->where('school_id',$school_id); $count= $this->db->count_all_results('schools'); if($count == 0){ $istrue = false; } } $data = array( 'school_id' => $school_id, 'school_name' => $this->security->xss_clean($this->input->post('school_name')), 'school_type' => $this->security->xss_clean($this->input->post('school_type')), 'school_email' => $this->security->xss_clean($this->input->post('school_email')), 'school_mobile' => $this->security->xss_clean($this->input->post('school_mobile')), 'school_address' => $this->security->xss_clean($this->input->post('school_address')), 'school_location' => $this->security->xss_clean($this->input->post('school_location')), 'country' => $this->security->xss_clean($this->input->post('country')), 'school_website' =>$this->security->xss_clean($this->input->post('school_website')), 'school_reg_number'=>$this->security->xss_clean($this->input->post('school_reg_number')), 'full_name'=>$this->security->xss_clean($this->input->post('full_name')), 'school_ownership'=>$this->security->xss_clean($this->input->post('school_ownership')), 'url'=>$this->security->xss_clean($this->input->post('url')), 'login_header'=>$this->security->xss_clean($this->input->post('login_header')), 'school_logo'=>'Not set', 'school_moto'=>'Not set', 'school_header'=>'Not set', 'password'=>MD5('123'), 'password_recover'=>'123', 'type'=>'Admin', 'year_registered'=>date('Y') ); $data1 = array( 'school_id' => $school_id, 'year' => date('Y'), 'students' => 0, 'amount' => 0, 'month_started' =>date('m') ); $data3 = array( 'school_id' => $school_id, 'year' => date('Y'), 'start_date' => $startDate, 'expiry_date' =>$expiryDate, 'month_started' =>date('m'), 'days'=>$days ); $count_customers=$this->db->count_all_results('billing_update'); $customer_id=$count_customers+1; $data2= array( "customer_id"=>$customer_id, "source"=>'afelschool', "mobile"=>$this->security->xss_clean($this->input->post('school_mobile')), "reg_number"=>$school_id, "email"=>$this->security->xss_clean($this->input->post('school_email')), "registered_year"=>date('Y'), "customer_name"=>trim($this->security->xss_clean($this->input->post('school_name'))), "amount"=>0, "last_update"=> date('D d, M/Y ')." ".date('H:i:s') ); $this->db->insert('schools', $data); $this->db->insert('school_pyaments_required', $data1); $this->db->insert('trial', $data3); $this->db->insert('billing_update',$data2); //sending email to customer //set POST variables $url = 'http://www.afel.co.tz/Register_sms_customers'; $fields = array( 'key= '=>"179103@afel_1990/2017", 'source= '=>"afelschool", 'registered_year= '=>date('Y'), 'customer_name= '=>$this->security->xss_clean($this->input->post('school_name')), 'reg_number= '=>$school_id, 'mobile= '=>$this->security->xss_clean($this->input->post('school_mobile')), 'email= '=>$this->security->xss_clean($this->input->post('school_email')), 'amount= '=> 0, ); $fields_string = ''; //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch); if($result == 1){ //function to send email $to = $this->security->xss_clean($this->input->post('school_email')); $subject = "afelschool login details"; $username=$this->security->xss_clean($this->input->post('school_reg_number')); $password=$school_id; $message = "Your username is:".$username. "
Your Password is:".$password.', Please go to login page to Login, you may change your password after log in to the system
Thanks(afelschool team) '; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: ' . "\r\n"; //$headers .= 'Cc: peacejuma91@gmail.com' . "\r\n"; mail($to,$subject,$message,$headers); redirect('Welcome/confirm?user_email='.base64_encode($email)); } } } } }