/* Decoded by unphp.net */ function hakakses($kdemnu) { $qry=$GLOBALS['IIIIIIIII1l1']("select adm_akskry.* from adm_akskry where adm_akskry.userid='".$_SESSION['userid']."' and adm_akskry.kdemnu='".$GLOBALS['IIIIIIIII1ll']($kdemnu)."'"); $dta=mysql_num_rows($qry); return $dta; } function hakaksesmodul() { require 'sysconfig.php'; $qry=$GLOBALS['IIIIIIIII1l1']("select adm_akskry.* from adm_akskry where adm_akskry.userid='".$_SESSION['userid']."' and adm_akskry.kdemnu like'%".$kode_modul."%'"); $dta=mysql_num_rows($qry); return $dta; } function logout_otomatis($v=0) { require 'sysconfig.php'; if($v==0) $timeout=dapatkan_data('adm_set','isi','kde',$kode_batas_waktu_logout_0); else $timeout=dapatkan_data('adm_set','isi','kde',$kode_batas_waktu_logout_1); $timeout=$timeout * 60; return $timeout; } function login_validate($v=0) { require 'sysconfig.php'; if($v==0) $timeout=dapatkan_data('adm_set','isi','kde',$kode_batas_waktu_logout_0); else $timeout=dapatkan_data('adm_set','isi','kde',$kode_batas_waktu_logout_1); $timeout=$timeout * 60; $_SESSION["expires_by"]= $GLOBALS['IIIIIIIl11l1']() +$timeout; } function login_check($v=0) { require 'sysconfig.php'; $exp_time=$_SESSION["expires_by"]; $userid=$_SESSION["userid"]; $auto_logout=dapatkan_data('adm_set','isi','kde',$kode_auto_logout_0); $set="set adm_chkaks.timeout='".$GLOBALS['IIIIIIIII1ll']($exp_time)."'"; $GLOBALS['IIIIIIIII1l1']("update adm_chkaks ".$set." where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"); if($GLOBALS['IIIIIIIl11l1']()<$exp_time or $auto_logout==$tanda_tidak) { login_validate($v); return true; } else { unset($_SESSION["expires_by"]); return false; } } function awal_akses() { require 'sysconfig.php'; $userid =$_SESSION["userid"]; $cek_pln=dapatkan_data('pnj_usrpln','usrpln','usrpln',$userid); if(!empty($cek_pln)) $str=$kode_str_pelanggan; $qry=$GLOBALS['IIIIIIIII1l1']("select adm_chkaks.* from adm_chkaks where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"); $ktm=mysql_num_rows($qry); $dta=$GLOBALS['IIIIIIIII111']($qry); if($ktm==0) { $set=" set adm_chkaks.str='".$GLOBALS['IIIIIIIII1ll']($str)."', adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"; $GLOBALS['IIIIIIIII1l1']("insert into adm_chkaks ".$set); return true; } else { if($str!=$kode_str_pelanggan) $auto_logout=dapatkan_data('adm_set','isi','kde',$kode_auto_logout_0); else $auto_logout=dapatkan_data('adm_set','isi','kde',$kode_auto_logout_1); $exp_time=$dta['timeout']; if($GLOBALS['IIIIIIIl11l1']() <$exp_time or $auto_logout==$tanda_tidak) return false; else { $GLOBALS['IIIIIIIII1l1']("delete from adm_chkaks where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"); awal_akses(); return true; } } } function check_akses() { require 'sysconfig.php'; $userid=$_SESSION["userid"]; $qry=$GLOBALS['IIIIIIIII1l1']("select adm_chkaks.* from adm_chkaks where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"); $ktm=mysql_num_rows($qry); if($ktm==0) return false; else return true; } function simpan_log() { require 'sysconfig.php'; $userid=$_SESSION['userid']; $qry=$GLOBALS['IIIIIIIII1l1']("select * from adm_logaks where adm_logaks.userid='".$GLOBALS['IIIIIIIII1ll']($userid)."'"); $dta=$GLOBALS['IIIIIIIII111']($qry); $tgl=$GLOBALS['IIIIIIIIIl11']('d-m-Y'); $jam=$GLOBALS['IIIIIIIIIl11']('H:i:s'); $ip=$_SERVER['REMOTE_ADDR']; $set=" set userid ='".$GLOBALS['IIIIIIIII1ll']($userid)."', tgl ='".$GLOBALS['IIIIIIIII1ll']($tgl)."', jam ='".$GLOBALS['IIIIIIIII1ll']($jam)."', ip ='".$GLOBALS['IIIIIIIII1ll']($ip)."'"; $GLOBALS['IIIIIIIII1l1']("insert into adm_logaks ".$set); return true; } function hapus_log() { require 'sysconfig.php'; $auto_logout=dapatkan_data('adm_set','isi','kde',$kode_auto_logout_0); if($auto_logout==$tanda_ya) { $qry=$GLOBALS['IIIIIIIII1l1'](" select adm_chkaks.* from adm_chkaks"); while($dta=$GLOBALS['IIIIIIIII111']($qry)) { $cek_userid=$dta['userid']; $cek_kdekry=dapatkan_data('prs_mstkry','kdekry','kdekry',$cek_userid); if(!empty($cek_kdekry)) { $GLOBALS['IIIIIIIII1l1'](" delete from adm_chkaks where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($cek_userid)."' and ".$GLOBALS['IIIIIIIl11l1']()." >= adm_chkaks.timeout"); } } } $auto_logout=dapatkan_data('adm_set','isi','kde',$kode_auto_logout_1); if($auto_logout==$tanda_ya) { $qry=$GLOBALS['IIIIIIIII1l1'](" select adm_chkaks.* from adm_chkaks"); while($dta=$GLOBALS['IIIIIIIII111']($qry)) { $cek_userid=$dta['userid']; $cek_kdekry=dapatkan_data('prs_mstkry','kdekry','kdekry',$cek_userid); if(empty($cek_kdekry)) { $GLOBALS['IIIIIIIII1l1'](" delete from adm_chkaks where adm_chkaks.userid='".$GLOBALS['IIIIIIIII1ll']($cek_userid)."' and ".$GLOBALS['IIIIIIIl11l1']()." >= adm_chkaks.timeout"); } } } return true; };