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
+12 -4
View File
@@ -1,7 +1,7 @@
<?php
# admin_url_multi.php
#
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# this screen will control the *url* settings needed when the Campaign or
# In-Group or List URL setting is set to "ALT". This screen allows for multiple
@@ -14,10 +14,11 @@
# 160331-2203 - Made URL form input fields longer
# 160508-0815 - Added colors features
# 160801-0657 - Added lists qualifier fields
# 170409-1545 - Added IP List validation code
#
$admin_version = '2.12-4';
$build = '160801-0657';
$admin_version = '2.14-5';
$build = '170409-1545';
require("dbconnect_mysqli.php");
require("functions.php");
@@ -117,7 +118,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;}
@@ -131,6 +132,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";