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
load->database(); } public function send($txt,$to,$p){ #Get header and balance... foreach($this->db->get('sms_header')->result() as $getHead){ $header = $getHead->header; $balance = $getHead->balance; $price = $getHead->sms_price; } if($balance >= $price){ //update balance $new_balance = $balance - $price; $update = array( 'balance'=>$new_balance ); $this->db->where('account_id',$this->session->userdata('account_id')); $this->db->update('sms_header',$update); //format number $p=trim(str_replace(' ' ,"", $to)); $s=str_replace('-' ,"", $p); $t=substr($s, -9); $to='255'.$t; $messages_array=array(); $messages_array[] = array( 'text' => $txt, 'msisdn' => $to, 'source' => $header, ); $postData = array( 'channel' => array( 'channel' => 118994, 'password' => "NDgzYjBhODdlOGMzZmU3ZWJhNzc4ODRlZWYzZTNhZGUxMWRiMjdiZGQwOTI3Y2VlZTU0MmEyYjhiZWRiOWRhNQ==" ), 'messages' => $messages_array ); $curl = curl_init('https://secure-gw.fasthub.co.tz/fasthub/messaging/json/api'); curl_setopt_array($curl, array( CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_POSTFIELDS => json_encode($postData) )); $response = curl_exec($curl); $err = curl_error($curl); $data = json_decode($response); curl_close($curl); $status = 'sent'; }else{ $status = 'no'; } //insert sms sent $sent = array( 'header'=>$header, 'phone'=>$to, 'sms'=>$txt, 'type'=>$p, 'date'=>date('Y-m-d H:i:s'), 'status'=>$status, ); $this->db->insert('sent_sms',$sent); return $status; } }