Added IP Lists feature, allowing creating of lists of IP Addresses that can

be used as whitelists on a User Group basis for Agent, Admin and API
 web resources.

git-svn-id: svn://192.168.202.10@2726 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-04-10 02:30:33 +00:00
parent c82912ac38
commit 784c71bd4a
138 changed files with 2233 additions and 387 deletions
@@ -1,7 +1,7 @@
<?php
# AST_admin_template_maker.php - version 2.10
#
# Copyright (C) 2014 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2017 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 120402-2132 - First Build
@@ -13,6 +13,7 @@
# 130824-2325 - Changed to mysqli PHP functions
# 141114-0912 - Finalized adding QXZ translation to all admin files
# 141229-2024 - Added code for on-the-fly language translations display
# 170409-1532 - Added IP List validation code
#
require("dbconnect_mysqli.php");
@@ -110,7 +111,7 @@ if ($sl_ct > 0)
}
$auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1);
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0);
if ($auth_message == 'GOOD')
{$auth=1;}
@@ -124,6 +125,13 @@ if ($auth < 1)
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
if ($auth_message == 'IPBLOCK')
{
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";