A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

CI =& get_instance(); $this->dbprimer = $this->CI->load->database('default',TRUE); } function acceptData($value) { $this->CI->load->helper(array('security','string')); foreach($value as $key => $val) { $data[$val] = $this->CI->input->post($val,TRUE); if(!is_array($data[$val])) { $data[$val] = strip_image_tags($data[$val]); $data[$val] = quotes_to_entities($data[$val]); $data[$val] = encode_php_tags($data[$val]); $data[$val] = trim($data[$val]); } } return $data; } function simpleAccept($value) { $this->CI->load->helper(array('security','string')); foreach($value as $key => $val) { $data[$val] = $this->CI->input->post($val); } return $data; } private function update_useronline() { $data = array( 'timestamp' => time(), 'ipaddress' => $this->getip(), 'file' => uri_string(), 'user' => (from_session('username')==''?"Tamu":from_session('username')), 'hit_id' => $this->get_uniq_id() ); $this->dbprimer->insert('tw_useronline', $data); } private function get_uniq_id() { $id = uniqid($this->CI->config->item('sess_cookie_name')); if(from_session('uniqid')=='') { $this->CI->session->set_userdata(array('uniqid'=>$id)); #$this->dbprimer->query("UPDATE ppg_v1_tw_hit_counter SET count=(count+1) WHERE id='1'"); $this->dbprimer->set('count','count+1',FALSE); $this->dbprimer->where('id',1); $this->dbprimer->update('tw_hit_counter'); return $id; } else { return from_session('uniqid'); } } private function flush_useronline() { $timeoutsecond=$this->CI->config->item('sess_expiration'); $timestamp=time(); $timeout=$timestamp-$timeoutsecond; $this->dbprimer->where("timestamp < $timeout"); $this->dbprimer->delete('tw_useronline'); } private function useronline_login() { $this->dbprimer->where('user','Tamu'); $this->dbprimer->where('hit_id',from_session('uniqid')); $this->dbprimer->delete('tw_useronline'); } private function useronline_logout() { $this->dbprimer->where('user',from_session('username')); $this->dbprimer->where('hit_id',from_session('uniqid')); $this->dbprimer->delete('tw_useronline'); } function getip() { if(getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) { $ip_lok = getenv("HTTP_CLIENT_IP"); } elseif(getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) { $ip_lok = getenv("HTTP_X_FORWARDED_FOR"); } elseif(getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) { $ip_lok = getenv("REMOTE_ADDR"); } elseif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) { $ip_lok = $_SERVER['REMOTE_ADDR']; } else { $ip_lok = "unknown"; } return($ip_lok); } function log_input($ket, $tambahan=FALSE, $id_lain=NULL) { if($tambahan!==FALSE && is_array($tambahan)) { $keys = array_keys($tambahan); $keg = array(); for($n=0; $n dengan value '.$val.''; } $str = $ket.''; } else { $str = $ket; } $ip = $this->getip(); $ip_name=''; $waktu=date('Y-m-d H:i:s'); $creator=from_session('username'); if($creator == ''){ $creator = 'Tamu';} $data = array( 'ip_addres' => $ip, 'waktu' => date('Y-m-d H:i:s'), 'user' => $creator, 'ket' => $str, 'id_lain' => $id_lain ); $this->dbprimer->insert('tw_log',$data); $this->update_useronline(); $this->flush_useronline(); } function count_hit() { $this->dbprimer->select('`count` AS jml'); $this->dbprimer->from('tw_hit_counter'); $this->dbprimer->where('id','1'); $res = $this->dbprimer->get(); $get = $res->row_array(); return $get['jml']; } function count_useronline() { $out = array(); $this->dbprimer->from('tw_useronline'); $this->dbprimer->group_by(array('user','hit_id')); $res = $this->dbprimer->get(); $get = $res->row_array(); $out['all'] = $res->num_rows(); $this->dbprimer->from('tw_useronline'); $this->dbprimer->where('user','Tamu'); $this->dbprimer->group_by(array('user','hit_id')); $res = $this->dbprimer->get(); $get = $res->row_array(); $out['tamu'] = $res->num_rows(); $out['pengguna'] = $out['all']-$out['tamu']; return $out; } function gen_sec_code() { $this->CI->load->library('war_random','','random'); $key = $this->CI->random->ngrandom_string(); set_sesi(array('sec_code'=>$key)); $img = "\"security"; return $img; } function buat_gambar($push=FALSE) { header ("Content-type: image/png"); $fontType=6; if(from_session('sec_code')!='') { $str=from_session('sec_code'); } else { if($push===FALSE) { $str ="XXXXXX"; } else { $str = $push; } } $str=str_split($str); $str=implode(' ',$str); $im = imagecreatefromjpeg(base_url().'resources/images/bgsecode.jpg'); $textColour = imagecolorallocate ($im, 255, 255, 255); imagesetthickness($im,10); imagestring ($im, $fontType, 7, 7, $str, $textColour); imagepng ($im); imagedestroy($im); } function cek_secode($code=FALSE,$is_bol=TRUE) { $err = FALSE; $ket = array(); if(cekPereg('captcha',$code)===TRUE) {} else { $err = TRUE; $ket[] = "Security code tidak valid, isikan 6 karakter Security code!"; } if($code==from_session('sec_code')) {} else { $err = TRUE; $ket[] = "Security code salah!"; } if($err===TRUE) { if($is_bol===FALSE) { return array(FALSE,$ket); } else { return FALSE; } } else { if($is_bol===FALSE) { return array(TRUE,FALSE); } else { return TRUE; } } } function login($dt, $ignore_captcha=FALSE) { $this->CI->load->library('war_encrypt'); $err = FALSE; $ket = array(); if($ignore_captcha===FALSE) { if(is_array($dt) && array_key_exists('username',$dt) && array_key_exists('password',$dt) && array_key_exists('sec_code',$dt)) {} else { $err = TRUE; $ket[] = "Ada kesalahan dalam pengiriman data!"; } } else { if(is_array($dt) && array_key_exists('username',$dt) && array_key_exists('password',$dt)) {} else { $err = TRUE; $ket[] = "Ada kesalahan dalam pengiriman data!"; } } if(cekPereg('username',$dt['username'])==TRUE) {} else { $err = TRUE; $ket[] = "Username tidak valid, isikan 6-25 karakter username anda!"; } if(cekPereg('password',$dt['password'])==TRUE) {} else { $err = TRUE; $ket[] = "Password tidak valid, isikan 6-30 karakter password anda!"; } if($ignore_captcha===FALSE) { $cek_secode = $this->cek_secode($dt['sec_code'], FALSE); if($cek_secode[0]===FALSE) { $err = TRUE; for($n=0; $n< count($cek_secode[1]); $n++) { $ket[] = $cek_secode[1][$n]; } } else {} } else {} #cek_db $this->dbprimer->from('tw_user'); $this->dbprimer->where('status_aktif','1'); $this->dbprimer->where('username',$dt['username']); $res = $this->dbprimer->get(); if($res->num_rows()==1) { $get = $res->row_array(); $pass = $this->CI->war_encrypt->enc_pass($dt['password']); if($pass==$get['pass']) { $arr_sesi = array( 'is_login' => 'TRUE', 'username' => $get['username'], 'nama' => $get['nama'], 'id_lain' => $get['id_lain'], 'mode' => $get['mode'], 'var_lain' => $get['var_lain'] ); } else { $err = TRUE; $ket[] = "Password tidak sama dengan password di database!";#
".$pass.'-'.$get['pass']; } } else { $err = TRUE; $ket[] = "Username tidak terdaftar di database!"; } if($err===FALSE) { $this->useronline_login(); set_sesi($arr_sesi); if(from_session('mode')==6 || from_session('mode')==1) { alert_jalert(("Selamat datang ".$arr_sesi['nama'].", anda berhasil login di ".$this->CI->config->item('akronim').""),"window.location = '".akses_url('tracer')."'"); } else { alert_jalert(("Selamat datang ".$arr_sesi['nama'].", anda berhasil login di ".$this->CI->config->item('akronim').""),"window.location = '".akses_url('primer/admin')."'"); } $this->log_input("Berhasil login"); } else { alert_jalert("Ada kesalahan:
".implode('
',$ket),"window.location = '".akses_url('tracerstudy')."'"); $this->log_input("Gagal login dikarenakan:",$ket); die(); } } function extend_level($mode,$id_lain='',$var_lain = NULL) { set_sesi(array('mode'=>$mode,'id_lain'=>$id_lain, 'var_lain'=> $var_lain)); alert_jalert("Berhasil ganti level","window.location = '".akses_url('primer/admin')."';"); $this->log_input("Berhasil ubah mode menjadi: ".$mode." dengan id_lain: ".$id_lain." dan variabel lain: ".$var_lain.""); } function logout() { $this->log_input("Berhasil logout sistem"); $this->useronline_logout(); alert_jalert("Sampai jumpa ".from_session('nama').", anda berhasil logout dari ".$this->CI->config->item('akronim')."","window.location = '".akses_url('tracerstudy')."'"); @unset_sesi(array('is_login','username','nama','id_lain','mode','var_lain')); } function is_login() { if(from_session('is_login')=='TRUE' && preg_match('/^[0-9]$/',from_session('mode'))) { return TRUE; } else { return FALSE; } } function restrict() { if($this->is_login()) {} else { show_404(); die(); } } function privileges($menu_id) { $this->dbprimer->select('priv,is_login'); $this->dbprimer->from('tw_menu'); $this->dbprimer->where('id',$menu_id); $res = $this->dbprimer->get(); $get = $res->row_array(); $priv = explode('+',$get['priv']); if($get['is_login']=='1') { if($this->is_login()===TRUE && in_array(from_session('mode'),$priv)) {} else { alert_jalert("Anda tidak diberi hak untuk mengakses fitur ini!","window.location='".akses_url('tracerstudy')."'"); #die(); show_404(); } } else {} } function get_forget_pass($dt) { $cek = $this->cek_secode($dt['captcha']); if($cek===TRUE) { $this->dbprimer->select("a.username,a.pass AS password"); $this->dbprimer->from("tw_user AS a"); $this->dbprimer->join("tmp_master_guru AS b","a.id_lain=b.nuptk"); $this->dbprimer->where('a.mode','3'); $this->dbprimer->where('b.tgl_lhr',$dt['tanggal_lahir']); $this->dbprimer->where("a.id_lain",$dt['nuptk']); $res = $this->dbprimer->get(); if($res->num_rows() == 1) { return array(TRUE,$res->row_array()); } else { return array(FALSE,"Anda belum terdaftar di situs ini!"); } } else { return array(FALSE,"Kode pengaman salah!"); } } function is_me() { if(from_session('username')=='soul_ilham') {} else { die("NO ACCESS FOR YOU!"); show_404(); } } } /* End of file war_loging.php */ /* Location: ./system/application/libraries/war_loging.php */

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/kerjasamaftp/public_html/survai/application/libraries/war_loging.php:467)

Filename: core/Common.php

Line Number: 442

Error

An Error Was Encountered

Non-existent class: war_loging