mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Simpler code moved to settings.php
This commit is contained in:
@@ -3,12 +3,6 @@ include("lib/headers.php");
|
||||
include("lib/settings.php");
|
||||
$t = $text['index'];
|
||||
|
||||
// Check IP permissions
|
||||
if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*", $_SESSION['allowedIPs'])) {
|
||||
header('Location: /');
|
||||
die("Sorry, not in allowed IPs list");
|
||||
};
|
||||
|
||||
$updateMsg = '';
|
||||
// Check for updates
|
||||
if ($ICEcoder["checkUpdates"]) {
|
||||
|
||||
@@ -164,16 +164,11 @@ for ($i=0;$i<count($settingsArray);$i++) {
|
||||
if (!isset($_SESSION[$settingsArray[$i]])) {$_SESSION[$settingsArray[$i]] = $ICEcoder[$settingsArray[$i]];}
|
||||
}
|
||||
|
||||
// Determin our allowed IP addresses
|
||||
$allowedIP = false;
|
||||
for($i=0;$i<count($_SESSION['allowedIPs']);$i++) {
|
||||
if ($_SESSION['allowedIPs'][$i]==$_SERVER["REMOTE_ADDR"]||$_SESSION['allowedIPs'][$i]=="*") {
|
||||
$allowedIP = true;
|
||||
}
|
||||
}
|
||||
// If user not allowed to view, display message
|
||||
if (!$allowedIP) {
|
||||
die('Sorry, access not permitted');
|
||||
// Check IP permissions
|
||||
if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*", $_SESSION['allowedIPs'])) {
|
||||
header('Location: /');
|
||||
die("Sorry, not in allowed IPs list");
|
||||
exit;
|
||||
};
|
||||
|
||||
// Establish any FTP site to use
|
||||
|
||||
Reference in New Issue
Block a user