02-07-2019, 07:56 PM
There are a few ways you can handle this.
//go to users/maintenance.php and delete the line
if($settings->site_offline==0) Redirect::to($us_url_root.'index.php');
Then just go to usersc/includes/head_tags.php
At the bottom, open your php tag and use one of the two of these if statements
//if you want a massive amount of IPs that you can control from the dashboard, you can do
if($currentPage != 'maintenance.php'){//prevent redirect loops
$ip = ipCheck();
$check = $db->query("SELECT ip FROM us_ip_whitelist WHERE ip = ?",[$ip])->count();
if($check < 1){
Redirect::to($us_url_root.'users/maintenance.php');
}
}
//if you only want a few ip's to visit the site, then putting them in an array is a little faster
$ips = [
'127.0.0.1','192.168.95.153'
];
if($currentPage != 'maintenance.php'){//prevent redirect loops
$ip = ipCheck();
if(!in_array($ip,$ips)){
Redirect::to($us_url_root.'users/maintenance.php');
}
}
//go to users/maintenance.php and delete the line
if($settings->site_offline==0) Redirect::to($us_url_root.'index.php');
Then just go to usersc/includes/head_tags.php
At the bottom, open your php tag and use one of the two of these if statements
//if you want a massive amount of IPs that you can control from the dashboard, you can do
if($currentPage != 'maintenance.php'){//prevent redirect loops
$ip = ipCheck();
$check = $db->query("SELECT ip FROM us_ip_whitelist WHERE ip = ?",[$ip])->count();
if($check < 1){
Redirect::to($us_url_root.'users/maintenance.php');
}
}
//if you only want a few ip's to visit the site, then putting them in an array is a little faster
$ips = [
'127.0.0.1','192.168.95.153'
];
if($currentPage != 'maintenance.php'){//prevent redirect loops
$ip = ipCheck();
if(!in_array($ip,$ips)){
Redirect::to($us_url_root.'users/maintenance.php');
}
}