Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php date_default_timezone_set('Asia/Manila');session_save_path('/tmp');session_start();r..

Decoded Output download

<?php date_default_timezone_set('Asia/Manila');session_save_path('/tmp');session_start();require_once('../includes/iwifi.php');require_once('../includes/portal.php');function get_device_name(){$hostname=shell_exec('sudo python /var/iwifi/hostname.py &');$hostname=explode('*',$hostname);foreach($hostname as $devices){$deviceinfo=explode('|',$devices);if(trim($deviceinfo[0])==$_SESSION['mac'])$_SESSION['devicename']=trim($deviceinfo[1]);}if(get_device_name_from_mac($_SESSION['mac'])==''){$sql='UPDATE tbl_accounts SET devicename='.quotedstr($_SESSION['devicename']).' WHERE mac='.quotedstr($mac);mysqli_query($con,$sql);}}if(!isset($_SESSION['isadmin'])){if(isset($_POST['pg'])){if($_POST['pg']=='bind'){$code=$_POST['code'];$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&bind=1&code='.$code;$data=file_get_contents($url);if($data=='1'){$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&attendancev3&version='.$version.'&cputemp='.$cputemp;$data=file_get_contents($url);if($data!=''){$result=explode('*',$data);$latestversion=$result[0];$license=$result[1];$license_str=$result[2];$subscription_status=$result[3];$iscustomboard=$result[4];$ecpaybalance=$result[5];$sql='UPDATE tbl_portal_settings SET ecpaybalance='.quotedstr($ecpaybalance).', subscription_status='.quotedstr($subscription_status).', latest_version='.quotedstr($latest_version).', is_custom_board='.quotedstr($iscustomboard).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);$sql='UPDATE tbl_registration SET registered='.quotedstr('1').', license='.quotedstr($license).', license_str='.quotedstr($license_str).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);}echo '1';}else{echo '0';}}if($_POST['pg']=='check_bind'){$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&check&version='.$version;$data=file_get_contents($url);$result=explode('*',$data);$latestversion=$result[0];$license=$result[1];$license_str=$result[2];$subscription_status=$result[3];$iscustomboard=$result[4];if($license!='-1'){$sql='UPDATE tbl_portal_settings SET subscription_status='.quotedstr($subscription_status).', latest_version='.quotedstr($latestversion).', is_custom_board='.quotedstr($iscustomboard).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);$sql='UPDATE tbl_registration SET registered='.quotedstr('1').', license='.quotedstr($license).', license_str='.quotedstr($license_str).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);echo '1';}else{$str='<div class="text-center">';$str.='<p>Please input your usercode below to bind<br />this vendo to your account.</p>';$str.='<input class="form-control text-center" id="usercode_text" placeholder="Enter usercode here..."/>';$str.='<br />';$str.='<a href="#" class="btn btn-success" onclick="bind(); return false">BIND</a>';$str.='</div>';echo $str;}}if($_POST['pg']=='get_billers'){$cat=$_POST['cat'];echo get_billers($cat);}if($_POST['pg']=='get_biller_form'){$id=$_POST['id'];echo get_biller_form($id);}if($_POST['pg']=='login_admin'){$username=$_POST['username'];$password=$_POST['password'];echo login_admin($username,$password);}if($_POST['pg']=='get_remaining_time'){$restartstr='';if(get_mac_remaining_time($_SESSION['mac'])==10||get_mac_remaining_time($_SESSION['mac'])==5)$restartstr='<script>reload_page();</script>';echo get_remaining_time().$restartstr;}if($_POST['pg']=='get_device_name'){echo get_device_name();}if($_POST['pg']=='resume_mac_timer'){echo resume_mac_timer();}if($_POST['pg']=='pause_mac_timer'){echo pause_mac_timer();}if($_POST['pg']=='start_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='release_temp_ban'){echo release_temp_ban($_SESSION['mac']);}if($_POST['pg']=='insert_internet_coin'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=my-timer" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'1');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='mac_ban_status'){$str='<div class="alert"></div>';$str.='<div class="alert">';$str.='<h3>Attempt exceeded!</h3>Please wait for another '.(get_vendo_settings('max_insert_attempt_ban_duration')-get_temp_ban_remaining_time($_SESSION['mac'])).' minute(s) and try again...';$str.='<hr />';$str.='<button class="btn btn-success" onclick="close_timer_popup();">Close</button>';$str.='</div>';echo $str;}if($_POST['pg']=='coin_slot_busy_status'){$str='<div class="alert"></div>';$str.='<div class="alert">';$str.='<h3>Coinslot busy!</h3>Please try again later...';$str.='<hr />';$str.='<button class="btn btn-success" onclick="close_timer_popup();">Close</button>';$str.='</div>';echo $str;}if($_POST['pg']=='convert_check_remaining_time'){echo convertToHoursMins(get_mac_remaining_time($_SESSION['mac']));}if($_POST['pg']=='convert_time'){echo convert_time();}if($_POST['pg']=='use_ticket'){$ticket=$_POST['ticket'];echo use_ticket($ticket);}if($_POST['pg']=='buy_ecpay_epin'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_ecpay_epin_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_ecpay_epin_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='buy_ecpay_eload'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_ecpay_eload_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_ecpay_eload_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='send_epin'){if($_SESSION['process_eload']=='0'){$_SESSION['process_eload']='1';echo send_ecpay_epin();}}if($_POST['pg']=='send_eload'){if($_SESSION['process_eload']=='0'){$_SESSION['process_eload']='1';if(get_vendo_settings('api_mode')=='0')echo send_eload();else echo send_ecpay_eload();}}if($_POST['pg']=='eload_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='start_eload_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='buy_eload'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_lc_eload_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_lc_eload_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='get_eloads'){$num=$_POST['num'];$type=$_POST['type'];if(get_vendo_settings('api_mode')=='0'){echo get_lc_eloads($num,$type);}else{echo get_ecpay_eloads_epins($num,$type);}}if($_POST['pg']=='special_rate_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='special_rate'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['amount']=$_POST['amount'];fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat($_SESSION['amount']).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=special-rates" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'3');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='charge_phone'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=phone-charging" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'4');lock_charging_interface($_POST['pin']);append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='open_water_valve'){$hash=$_SESSION['hash'];if($_SESSION['process_water']=='0'){$_SESSION['process_water']='1';echo open_valve($hash);}}if($_POST['pg']=='water_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='water_dispenser'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['amount']=get_water_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center" id="water_money_counter_container">';$str.='<hr />';$str.='<div id="water_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_water_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=water-dispenser" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'10');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='start_water_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='carwash_pump'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=car-wash" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'11');lock_carwash_interface($_POST['pin']);append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}}}mysqli_close($con);?>

Did this file decode correctly?

Original Code

<?php date_default_timezone_set('Asia/Manila');session_save_path('/tmp');session_start();require_once('../includes/iwifi.php');require_once('../includes/portal.php');function get_device_name(){$hostname=shell_exec('sudo python /var/iwifi/hostname.py &');$hostname=explode('*',$hostname);foreach($hostname as $devices){$deviceinfo=explode('|',$devices);if(trim($deviceinfo[0])==$_SESSION['mac'])$_SESSION['devicename']=trim($deviceinfo[1]);}if(get_device_name_from_mac($_SESSION['mac'])==''){$sql='UPDATE tbl_accounts SET devicename='.quotedstr($_SESSION['devicename']).' WHERE mac='.quotedstr($mac);mysqli_query($con,$sql);}}if(!isset($_SESSION['isadmin'])){if(isset($_POST['pg'])){if($_POST['pg']=='bind'){$code=$_POST['code'];$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&bind=1&code='.$code;$data=file_get_contents($url);if($data=='1'){$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&attendancev3&version='.$version.'&cputemp='.$cputemp;$data=file_get_contents($url);if($data!=''){$result=explode('*',$data);$latestversion=$result[0];$license=$result[1];$license_str=$result[2];$subscription_status=$result[3];$iscustomboard=$result[4];$ecpaybalance=$result[5];$sql='UPDATE tbl_portal_settings SET ecpaybalance='.quotedstr($ecpaybalance).', subscription_status='.quotedstr($subscription_status).', latest_version='.quotedstr($latest_version).', is_custom_board='.quotedstr($iscustomboard).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);$sql='UPDATE tbl_registration SET registered='.quotedstr('1').', license='.quotedstr($license).', license_str='.quotedstr($license_str).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);}echo '1';}else{echo '0';}}if($_POST['pg']=='check_bind'){$url='https://www.iwifi-portal.com/api/portal-v3.php?cpuid='.$cpuid.'&check&version='.$version;$data=file_get_contents($url);$result=explode('*',$data);$latestversion=$result[0];$license=$result[1];$license_str=$result[2];$subscription_status=$result[3];$iscustomboard=$result[4];if($license!='-1'){$sql='UPDATE tbl_portal_settings SET subscription_status='.quotedstr($subscription_status).', latest_version='.quotedstr($latestversion).', is_custom_board='.quotedstr($iscustomboard).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);$sql='UPDATE tbl_registration SET registered='.quotedstr('1').', license='.quotedstr($license).', license_str='.quotedstr($license_str).' WHERE id='.quotedstr('1');mysqli_query($con,$sql);echo '1';}else{$str='<div class="text-center">';$str.='<p>Please input your usercode below to bind<br />this vendo to your account.</p>';$str.='<input class="form-control text-center" id="usercode_text" placeholder="Enter usercode here..."/>';$str.='<br />';$str.='<a href="#" class="btn btn-success" onclick="bind(); return false">BIND</a>';$str.='</div>';echo $str;}}if($_POST['pg']=='get_billers'){$cat=$_POST['cat'];echo get_billers($cat);}if($_POST['pg']=='get_biller_form'){$id=$_POST['id'];echo get_biller_form($id);}if($_POST['pg']=='login_admin'){$username=$_POST['username'];$password=$_POST['password'];echo login_admin($username,$password);}if($_POST['pg']=='get_remaining_time'){$restartstr='';if(get_mac_remaining_time($_SESSION['mac'])==10||get_mac_remaining_time($_SESSION['mac'])==5)$restartstr='<script>reload_page();</script>';echo get_remaining_time().$restartstr;}if($_POST['pg']=='get_device_name'){echo get_device_name();}if($_POST['pg']=='resume_mac_timer'){echo resume_mac_timer();}if($_POST['pg']=='pause_mac_timer'){echo pause_mac_timer();}if($_POST['pg']=='start_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='release_temp_ban'){echo release_temp_ban($_SESSION['mac']);}if($_POST['pg']=='insert_internet_coin'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=my-timer" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'1');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='mac_ban_status'){$str='<div class="alert"></div>';$str.='<div class="alert">';$str.='<h3>Attempt exceeded!</h3>Please wait for another '.(get_vendo_settings('max_insert_attempt_ban_duration')-get_temp_ban_remaining_time($_SESSION['mac'])).' minute(s) and try again...';$str.='<hr />';$str.='<button class="btn btn-success" onclick="close_timer_popup();">Close</button>';$str.='</div>';echo $str;}if($_POST['pg']=='coin_slot_busy_status'){$str='<div class="alert"></div>';$str.='<div class="alert">';$str.='<h3>Coinslot busy!</h3>Please try again later...';$str.='<hr />';$str.='<button class="btn btn-success" onclick="close_timer_popup();">Close</button>';$str.='</div>';echo $str;}if($_POST['pg']=='convert_check_remaining_time'){echo convertToHoursMins(get_mac_remaining_time($_SESSION['mac']));}if($_POST['pg']=='convert_time'){echo convert_time();}if($_POST['pg']=='use_ticket'){$ticket=$_POST['ticket'];echo use_ticket($ticket);}if($_POST['pg']=='buy_ecpay_epin'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_ecpay_epin_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_ecpay_epin_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='buy_ecpay_eload'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_ecpay_eload_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_ecpay_eload_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='send_epin'){if($_SESSION['process_eload']=='0'){$_SESSION['process_eload']='1';echo send_ecpay_epin();}}if($_POST['pg']=='send_eload'){if($_SESSION['process_eload']=='0'){$_SESSION['process_eload']='1';if(get_vendo_settings('api_mode')=='0')echo send_eload();else echo send_ecpay_eload();}}if($_POST['pg']=='eload_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='start_eload_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='buy_eload'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['num']=$_POST['num'];$_SESSION['amount']=get_lc_eload_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_lc_eload_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=electronic-loads" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'2');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='get_eloads'){$num=$_POST['num'];$type=$_POST['type'];if(get_vendo_settings('api_mode')=='0'){echo get_lc_eloads($num,$type);}else{echo get_ecpay_eloads_epins($num,$type);}}if($_POST['pg']=='special_rate_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='special_rate'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['amount']=$_POST['amount'];fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<div id="special_rate_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat($_SESSION['amount']).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=special-rates" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'3');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='charge_phone'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=phone-charging" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'4');lock_charging_interface($_POST['pin']);append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='open_water_valve'){$hash=$_SESSION['hash'];if($_SESSION['process_water']=='0'){$_SESSION['process_water']='1';echo open_valve($hash);}}if($_POST['pg']=='water_expected_amount'){$expected=$_SESSION['amount']-str_replace('.00','',read_coin_session());if($expected>0)echo $expected;else echo '0';}if($_POST['pg']=='water_dispenser'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$_SESSION['hash']=$_POST['hash'];$_SESSION['amount']=get_water_hash_amount($_POST['hash']);fetch_credit($_SESSION['mac']);$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center" id="water_money_counter_container">';$str.='<hr />';$str.='<div id="water_coins_interface">';$str.='<div class="row">';$str.='<div class="col-md-6" style="border-right: 1px solid #ccc;">';$str.='<h3 id="timer_cash_expected" class="text-primary">'.moneyformat(get_water_hash_amount($_POST['hash'])).'</h3>';$str.='Cash Expected';$str.='</div>';$str.='<div class="col-md-6">';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='</div>';$str.='</div>';$str.='</div>';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=water-dispenser" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'10');append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}if($_POST['pg']=='start_water_coin_read_status'){echo read_coin_session();}if($_POST['pg']=='carwash_pump'){$insert_attempts=check_insert_attempt($_SESSION['mac']);$max_insert_attempts=get_vendo_settings('max_insert_attempts');if($insert_attempts<$max_insert_attempts){if(interface_available()==''){$str='<div class="gauge_preview">';$str.='<br />';$str.='<div class="GaugeMeter" id="coingaugemeter" data-total="100" data-showvalue=false data-append="" data-size="100" data-theme="Red-Gold-Green" data-back="RGBa(0,0,0,.1)" data-animate_gauge_colors=false data-animate_text_colors=true data-width="8" data-label="" data-label_color="#000" data-animationstep="0" data-stripe="3"></div>';$str.='</div>';$str.='<div class="alert text-center">';$str.='<hr />';$str.='<h3 id="timer_cash_accepted">0.00</h3>';$str.='Cash Accepted';$str.='<br />';$str.='<br />';$str.='<a href="'.$home.'/?pg=car-wash" class="btn btn-success" onclick="clear_timers();">Done Paying!</a>';$str.='</div>';lock_interface($_SESSION['mac'],'11');lock_carwash_interface($_POST['pin']);append_insert_attempt($_SESSION['mac']);exec('sudo python /var/iwifi/rpi-relay-on.py &');exec('sudo python /var/iwifi/rpi-jst-off.py &');echo $str;}else{echo 'busy';}}else{if(get_temp_ban_time($_SESSION['mac'])=='')ban_mac($_SESSION['mac']);echo 'ban';}}}}mysqli_close($con);?>

Function Calls

date_default_timezone_set 1

Variables

None

Stats

MD5 46b30e3f7dad7a8020cbfc4507ad70da
Eval Count 0
Decode Time 166 ms