diff --git a/UPGRADE b/UPGRADE
index 70203de3..210befc3 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -89,6 +89,8 @@ OTHER CHANGES:
13. Changed all Agent and Administrative interface text output to use a function
instead of echo.(for future dynamic other-language interfaces)
+14. Added Admin Utility to split bug lists into smaller lists
+
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index 49245cf1..c6da6da9 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -33636,7 +33636,7 @@ if ($ADD==999994)
echo "
"._QXZ("Admin Report Log Viewer")."\n";
echo "
\n";
echo ""._QXZ("Bulk Phone Insert Page")."\n";
- echo ""._QXZ("Basic Lead Management Tools")." | "._QXZ("Advanced Lead Management Tools")."\n";
+ echo ""._QXZ("Basic Lead Management Tools")." | "._QXZ("Advanced Lead Management Tools")." | "._QXZ("List Split")."\n";
echo ""._QXZ("Reset Campaign Lists")."\n";
echo ""._QXZ("Callbacks Transferral Page")."\n";
echo ""._QXZ("Send a Call With Custom CID Page")."\n";
diff --git a/www/vicidial/list_split.php b/www/vicidial/list_split.php
new file mode 100644
index 00000000..b954bbc2
--- /dev/null
+++ b/www/vicidial/list_split.php
@@ -0,0 +1,577 @@
+ LICENSE: AGPLv2
+#
+# CHANGES
+# 140916-1215 - Initial Build
+# 141114-1330 - formatting changes, code cleanup
+#
+
+$version = '2.10-2';
+$build = '141114-1330';
+
+require("dbconnect_mysqli.php");
+require("functions.php");
+
+$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
+$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
+$PHP_SELF=$_SERVER['PHP_SELF'];
+$ip = getenv("REMOTE_ADDR");
+$SQLdate = date("Y-m-d H:i:s");
+
+$DB=0;
+$submit = "";
+$confirm = "";
+$orig_list = "";
+$start_dest_list_id = "";
+$num_leads = "";
+
+if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
+ elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
+if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
+ elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
+if (isset($_GET["confirm"])) {$confirm=$_GET["confirm"];}
+ elseif (isset($_POST["confirm"])) {$confirm=$_POST["confirm"];}
+if (isset($_GET["orig_list"])) {$orig_list=$_GET["orig_list"];}
+ elseif (isset($_POST["orig_list"])) {$orig_list=$_POST["orig_list"];}
+if (isset($_GET["start_dest_list_id"])) {$start_dest_list_id=$_GET["start_dest_list_id"];}
+ elseif (isset($_POST["start_dest_list_id"])) {$start_dest_list_id=$_POST["start_dest_list_id"];}
+if (isset($_GET["num_leads"])) {$num_leads=$_GET["num_leads"];}
+ elseif (isset($_POST["num_leads"])) {$num_leads=$_POST["num_leads"];}
+
+$DB = preg_replace('/[^0-9]/','',$DB);
+$submit = preg_replace('/[^-_0-9a-zA-Z]/','',$submit);
+$confirm = preg_replace('/[^-_0-9a-zA-Z]/','',$confirm);
+$orig_list = preg_replace('/[^0-9]/','',$orig_list);
+$start_dest_list_id = preg_replace('/[^0-9]/','',$start_dest_list_id);
+$num_leads = preg_replace('/[^0-9]/','',$num_leads);
+
+
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$sys_settings_stmt = "SELECT use_non_latin, outbound_autodial_active, sounds_central_control_active FROM system_settings;";
+$sys_settings_rslt=mysql_to_mysqli($sys_settings_stmt, $link);
+if ($DB) {echo "$sys_settings_stmt\n";}
+$num_rows = mysqli_num_rows($sys_settings_rslt);
+if ($num_rows > 0)
+ {
+ $sys_settings_row=mysqli_fetch_row($sys_settings_rslt);
+ $non_latin = $sys_settings_row[0];
+ $SSoutbound_autodial_active = $sys_settings_row[1];
+ $sounds_central_control_active = $sys_settings_row[2];
+ }
+else
+ {
+ # there is something really weird if there are no system settings
+ exit;
+ }
+##### END SETTINGS LOOKUP #####
+###########################################
+
+if ($non_latin < 1)
+ {
+ $PHP_AUTH_USER = preg_replace('/[^0-9a-zA-Z]/', '', $PHP_AUTH_USER);
+ $PHP_AUTH_PW = preg_replace('/[^0-9a-zA-Z]/', '', $PHP_AUTH_PW);
+ }
+else
+ {
+ $PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
+ $PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
+ }
+$list_id_override = preg_replace('/[^0-9]/','',$list_id_override);
+
+$auth=0;
+$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1);
+if ($auth_message == 'GOOD')
+ {$auth=1;}
+
+if ($auth < 1)
+ {
+ $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
+ if ($auth_message == 'LOCK')
+ {
+ $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
+ 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";
+ exit;
+ }
+
+header ("Content-type: text/html; charset=utf-8");
+header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header ("Pragma: no-cache"); // HTTP/1.0
+
+# valid user
+$rights_stmt = "SELECT user_level, user_group, load_leads, modify_leads, modify_lists from vicidial_users where user='$PHP_AUTH_USER';";
+if ($DB) {echo "|$stmt|\n";}
+$rights_rslt=mysql_to_mysqli($rights_stmt, $link);
+$rights_row=mysqli_fetch_row($rights_rslt);
+$user_level = $rights_row[0];
+$user_group = $rights_row[1];
+$load_leads = $rights_row[2];
+$modify_leads = $rights_row[3];
+$modify_lists = $rights_row[4];
+
+# check their permissions
+if ( $user_level < 9 )
+ {
+ header ("Content-type: text/html; charset=utf-8");
+ echo _QXZ("You need to be a level 9 user to use this tool");
+ exit;
+ }
+if ( $load_leads < 1 )
+ {
+ header ("Content-type: text/html; charset=utf-8");
+ echo _QXZ("You do not have permissions to load leads");
+ exit;
+ }
+if ( $modify_leads < 1 )
+ {
+ header ("Content-type: text/html; charset=utf-8");
+ echo _QXZ("You do not have permissions to modify leads");
+ exit;
+ }
+if ( $modify_lists < 1 )
+ {
+ header ("Content-type: text/html; charset=utf-8");
+ echo _QXZ("You do not have permissions to modify lists");
+ exit;
+ }
+
+echo "\n";
+echo "\n";
+echo "\n";
+echo "\n";
+echo ""._QXZ("ADMINISTRATION: List Split Tool")."\n";
+
+##### BEGIN Set variables to make header show properly #####
+$ADD = '999998';
+$hh = 'admin';
+$LOGast_admin_access = '1';
+$SSoutbound_autodial_active = '1';
+$ADMIN = 'admin.php';
+$page_width='770';
+$section_width='750';
+$header_font_size='3';
+$subheader_font_size='2';
+$subcamp_font_size='2';
+$header_selected_bold='';
+$header_nonselected_bold='';
+$admin_color = '#FFFF99';
+$admin_font = 'BLACK';
+$admin_color = '#E6E6E6';
+$subcamp_color = '#C6C6C6';
+##### END Set variables to make header show properly #####
+
+require("admin_header.php");
+
+echo "\n";
+echo "\n";
+echo "| \n";
+echo "\n";
+echo ""._QXZ("List Split Tool")."\n";
+echo "\n";
+echo " | \n";
+echo " | \n";
+echo "
\n";
+
+
+echo " \n";
+
+if ($DB>0)
+ {
+ echo "DB: $DB \n";
+ echo "submit: $submit \n";
+ echo "confirm: $confirm \n";
+ echo "orig_list: $orig_list \n";
+ echo "start_dest_list_id: $start_dest_list_id \n";
+ echo "num_leads: $num_leads \n";
+ }
+
+# confirmation page
+if ($submit == "submit" )
+ {
+ # make sure the original list id is valid
+ $id_chk_stmt = "SELECT list_id FROM vicidial_lists where list_id = $orig_list;";
+ if ($DB) { echo "|$id_chk_stmt|\n"; }
+ $id_chk_rslt = mysql_to_mysqli($id_chk_stmt, $link);
+ $id_chk_rows = mysqli_num_rows($id_chk_rslt);
+ if ( $id_chk_rows < 1 )
+ {
+ echo "$orig_list "._QXZ("is not a valid list id in the system.")." \n";
+ echo ""._QXZ("Click here to start over.")." \n";
+ echo "\n\n";
+ exit;
+ }
+
+ # figure out the highest list id in the system
+ $max_id_stmt = "SELECT MAX(list_id) FROM vicidial_lists;";
+ if ($DB) { echo "|$max_id_stmt|\n"; }
+ $max_id_rslt = mysql_to_mysqli($max_id_stmt, $link);
+ $max_id_row = mysqli_fetch_row($max_id_rslt);
+ $max_list_id = $max_id_row[0] + 1;
+
+ # make sure the start destination list id is >= to max_list_id and an integer
+ if ( ( is_int( $start_dest_list_id ) ) && ($start_dest_list_id < $max_list_id ) )
+ {
+ echo ""._QXZ("The Start Destination List must be greater than or equal to")." $max_list_id. "._QXZ("This is to ensure that new lists will not interfere with the existing ones.")." \n";
+ echo ""._QXZ("Click here to start over.")." \n";
+ echo " |