2006-04-21_snapshot

git-svn-id: svn://192.168.202.10@5 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-07-07 15:17:45 +00:00
parent d82d30a9ef
commit 110b17ad04
54 changed files with 2283 additions and 1461 deletions
+249 -150
View File
@@ -1,159 +1,256 @@
<?
### admin.php - VICIDIAL administration page
###
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# admin.php - VICIDIAL administration page
#
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
require("dbconnect.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
$ADD=$_GET["ADD"]; if (!$ADD) {$ADD=$_POST["ADD"];}
$groups=$_GET["groups"]; if (!$groups) {$groups=$_POST["groups"];}
$remote_agent_id=$_GET["remote_agent_id"]; if (!$remote_agent_id) {$remote_agent_id=$_POST["remote_agent_id"];}
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
$user_level=$_GET["user_level"]; if (!$user_level) {$user_level=$_POST["user_level"];}
$user_group=$_GET["user_group"]; if (!$user_group) {$user_group=$_POST["user_group"];}
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
$campaign_name=$_GET["campaign_name"]; if (!$campaign_name) {$campaign_name=$_POST["campaign_name"];}
$active=$_GET["active"]; if (!$active) {$active=$_POST["active"];}
$park_ext=$_GET["park_ext"]; if (!$park_ext) {$park_ext=$_POST["park_ext"];}
$park_file_name=$_GET["park_file_name"]; if (!$park_file_name) {$park_file_name=$_POST["park_file_name"];}
$web_form_address=$_GET["web_form_address"]; if (!$web_form_address) {$web_form_address=$_POST["web_form_address"];}
$allow_closers=$_GET["allow_closers"]; if (!$allow_closers) {$allow_closers=$_POST["allow_closers"];}
$hopper_level=$_GET["hopper_level"]; if (!$hopper_level) {$hopper_level=$_POST["hopper_level"];}
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
$next_agent_call=$_GET["next_agent_call"]; if (!$next_agent_call) {$next_agent_call=$_POST["next_agent_call"];}
$local_call_time=$_GET["local_call_time"]; if (!$local_call_time) {$local_call_time=$_POST["local_call_time"];}
$voicemail_ext=$_GET["voicemail_ext"]; if (!$voicemail_ext) {$voicemail_ext=$_POST["voicemail_ext"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
$list_name=$_GET["list_name"]; if (!$list_name) {$list_name=$_POST["list_name"];}
$group_id=$_GET["group_id"]; if (!$group_id) {$group_id=$_POST["group_id"];}
$group_name=$_GET["group_name"]; if (!$group_name) {$group_name=$_POST["group_name"];}
$group_color=$_GET["group_color"]; if (!$group_color) {$group_color=$_POST["group_color"];}
$fronter_display=$_GET["fronter_display"]; if (!$fronter_display) {$fronter_display=$_POST["fronter_display"];}
$user_start=$_GET["user_start"]; if (!$user_start) {$user_start=$_POST["user_start"];}
$number_of_lines=$_GET["number_of_lines"]; if (!$number_of_lines) {$number_of_lines=$_POST["number_of_lines"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
$group_name=$_GET["group_name"]; if (!$group_name) {$group_name=$_POST["group_name"];}
$dial_status_a=$_GET["dial_status_a"]; if (!$dial_status_a) {$dial_status_a=$_POST["dial_status_a"];}
$dial_status_b=$_GET["dial_status_b"]; if (!$dial_status_b) {$dial_status_b=$_POST["dial_status_b"];}
$dial_status_c=$_GET["dial_status_c"]; if (!$dial_status_c) {$dial_status_c=$_POST["dial_status_c"];}
$dial_status_d=$_GET["dial_status_d"]; if (!$dial_status_d) {$dial_status_d=$_POST["dial_status_d"];}
$dial_status_e=$_GET["dial_status_e"]; if (!$dial_status_e) {$dial_status_e=$_POST["dial_status_e"];}
$lead_order=$_GET["lead_order"]; if (!$lead_order) {$lead_order=$_POST["lead_order"];}
$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];}
$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];}
$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];}
$campaign_vdad_exten=$_GET["campaign_vdad_exten"]; if (!$campaign_vdad_exten) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];}
$campaign_rec_exten=$_GET["campaign_rec_exten"]; if (!$campaign_rec_exten) {$campaign_rec_exten=$_POST["campaign_rec_exten"];}
$campaign_recording=$_GET["campaign_recording"]; if (!$campaign_recording) {$campaign_recording=$_POST["campaign_recording"];}
$campaign_rec_filename=$_GET["campaign_rec_filename"]; if (!$campaign_rec_filename) {$campaign_rec_filename=$_POST["campaign_rec_filename"];}
$hotkey=$_GET["hotkey"]; if (!$hotkey) {$hotkey=$_POST["hotkey"];}
$reset_list=$_GET["reset_list"]; if (!$reset_list) {$reset_list=$_POST["reset_list"];}
$old_campaign_id=$_GET["old_campaign_id"]; if (!$old_campaign_id) {$old_campaign_id=$_POST["old_campaign_id"];}
$OLDuser_group=$_GET["OLDuser_group"]; if (!$OLDuser_group) {$OLDuser_group=$_POST["OLDuser_group"];}
$status_name=$_GET["status_name"]; if (!$status_name) {$status_name=$_POST["status_name"];}
$selectable=$_GET["selectable"]; if (!$selectable) {$selectable=$_POST["selectable"];}
$HKstatus=$_GET["HKstatus"]; if (!$HKstatus) {$HKstatus=$_POST["HKstatus"];}
$force_logout=$_GET["force_logout"]; if (!$force_logout) {$force_logout=$_POST["force_logout"];}
$phone_login=$_GET["phone_login"]; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
$phone_pass=$_GET["phone_pass"]; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
$delete_users=$_GET["delete_users"]; if (!$delete_users) {$delete_users=$_POST["delete_users"];}
$delete_user_groups=$_GET["delete_user_groups"]; if (!$delete_user_groups) {$delete_user_groups=$_POST["delete_user_groups"];}
$delete_lists=$_GET["delete_lists"]; if (!$delete_lists) {$delete_lists=$_POST["delete_lists"];}
$delete_campaigns=$_GET["delete_campaigns"]; if (!$delete_campaigns) {$delete_campaigns=$_POST["delete_campaigns"];}
$delete_ingroups=$_GET["delete_ingroups"]; if (!$delete_ingroups) {$delete_ingroups=$_POST["delete_ingroups"];}
$delete_remote_agents=$_GET["delete_remote_agents"]; if (!$delete_remote_agents) {$delete_remote_agents=$_POST["delete_remote_agents"];}
$load_leads=$_GET["load_leads"]; if (!$load_leads) {$load_leads=$_POST["load_leads"];}
$campaign_detail=$_GET["campaign_detail"]; if (!$campaign_detail) {$campaign_detail=$_POST["campaign_detail"];}
$ast_admin_access=$_GET["ast_admin_access"]; if (!$ast_admin_access) {$ast_admin_access=$_POST["ast_admin_access"];}
$ast_delete_phones=$_GET["ast_delete_phones"]; if (!$ast_delete_phones) {$ast_delete_phones=$_POST["ast_delete_phones"];}
$CoNfIrM=$_GET["CoNfIrM"]; if (!$CoNfIrM) {$CoNfIrM=$_POST["CoNfIrM"];}
$delete_scripts=$_GET["delete_scripts"]; if (!$delete_scripts) {$delete_scripts=$_POST["delete_scripts"];}
$script_id=$_GET["script_id"]; if (!$script_id) {$script_id=$_POST["script_id"];}
$script_id = strtoupper($script_id);
$script_name=$_GET["script_name"]; if (!$script_name) {$script_name=$_POST["script_name"];}
$script_comments=$_GET["script_comments"]; if (!$script_comments) {$script_comments=$_POST["script_comments"];}
$script_text=$_GET["script_text"]; if (!$script_text) {$script_text=$_POST["script_text"];}
$reset_hopper=$_GET["reset_hopper"]; if (!$reset_hopper) {$reset_hopper=$_POST["reset_hopper"];}
$get_call_launch=$_GET["get_call_launch"]; if (!$get_call_launch) {$get_call_launch=$_POST["get_call_launch"];}
$am_message_exten=$_GET["am_message_exten"]; if (!$am_message_exten) {$am_message_exten=$_POST["am_message_exten"];}
$amd_send_to_vmx=$_GET["amd_send_to_vmx"]; if (!$amd_send_to_vmx) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];}
$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"]; if (!$xferconf_a_dtmf) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];}
$xferconf_a_number=$_GET["xferconf_a_number"]; if (!$xferconf_a_number) {$xferconf_a_number=$_POST["xferconf_a_number"];}
$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"]; if (!$xferconf_b_dtmf) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];}
$xferconf_b_number=$_GET["xferconf_b_number"]; if (!$xferconf_b_number) {$xferconf_b_number=$_POST["xferconf_b_number"];}
$modify_leads=$_GET["modify_leads"]; if (!$modify_leads) {$modify_leads=$_POST["modify_leads"];}
$hotkeys_active=$_GET["hotkeys_active"]; if (!$hotkeys_active) {$hotkeys_active=$_POST["hotkeys_active"];}
$change_agent_campaign=$_GET["change_agent_campaign"]; if (!$change_agent_campaign) {$change_agent_campaign=$_POST["change_agent_campaign"];}
$agent_choose_ingroups=$_GET["agent_choose_ingroups"]; if (!$agent_choose_ingroups) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];}
$alt_number_dialing=$_GET["alt_number_dialing"]; if (!$alt_number_dialing) {$alt_number_dialing=$_POST["alt_number_dialing"];}
$scheduled_callbacks=$_GET["scheduled_callbacks"]; if (!$scheduled_callbacks) {$scheduled_callbacks=$_POST["scheduled_callbacks"];}
$lead_filter_id=$_GET["lead_filter_id"]; if (!$lead_filter_id) {$lead_filter_id=$_POST["lead_filter_id"];}
$lead_filter_name=$_GET["lead_filter_name"]; if (!$lead_filter_name) {$lead_filter_name=$_POST["lead_filter_name"];}
$lead_filter_comments=$_GET["lead_filter_comments"]; if (!$lead_filter_comments) {$lead_filter_comments=$_POST["lead_filter_comments"];}
$lead_filter_sql=$_GET["lead_filter_sql"]; if (!$lead_filter_sql) {$lead_filter_sql=$_POST["lead_filter_sql"];}
$agentonly_callbacks=$_GET["agentonly_callbacks"]; if (!$agentonly_callbacks) {$agentonly_callbacks=$_POST["agentonly_callbacks"];}
$agentcall_manual=$_GET["agentcall_manual"]; if (!$agentcall_manual) {$agentcall_manual=$_POST["agentcall_manual"];}
$vicidial_recording=$_GET["vicidial_recording"]; if (!$vicidial_recording) {$vicidial_recording=$_POST["vicidial_recording"];}
$vicidial_transfers=$_GET["vicidial_transfers"]; if (!$vicidial_transfers) {$vicidial_transfers=$_POST["vicidial_transfers"];}
$delete_filters=$_GET["delete_filters"]; if (!$delete_filters) {$delete_filters=$_POST["delete_filters"];}
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
if (isset($_GET["groups"])) {$groups=$_GET["groups"];}
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];}
elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];}
elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];}
if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];}
elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];}
if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];}
elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];}
elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];}
if (isset($_GET["active"])) {$active=$_GET["active"];}
elseif (isset($_POST["active"])) {$active=$_POST["active"];}
if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];}
elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];}
if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];}
elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];}
if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];}
elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];}
if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];}
elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];}
if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];}
elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];}
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];}
elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];}
if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];}
elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];}
if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];}
elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];}
elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];}
if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];}
elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];}
if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];}
elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];}
if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];}
elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];}
if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];}
elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];}
if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];}
elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];}
if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];}
elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];}
elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];}
if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];}
elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];}
if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];}
elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];}
if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];}
elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];}
if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];}
elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];}
if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];}
elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];}
if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];}
elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];}
if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];}
elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];}
if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];}
elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];}
if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];}
elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];}
if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];}
elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];}
if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];}
elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];}
if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];}
elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];}
if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];}
elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];}
if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];}
elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];}
if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];}
elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];}
if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];}
elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];}
if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];}
elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];}
if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];}
elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];}
if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];}
elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];}
if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];}
elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];}
if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];}
elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];}
elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];}
if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];}
elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];}
if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];}
elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];}
if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];}
elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];}
if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];}
elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];}
if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];}
elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];}
if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];}
elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];}
if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];}
elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];}
if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];}
elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];}
if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];}
elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];}
if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];}
elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];}
if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];}
elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];}
if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];}
elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];}
if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];}
elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];}
if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];}
elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];}
if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];}
elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];}
if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];}
elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];}
if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];}
elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];}
if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];}
elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];}
if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];}
elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];}
if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];}
elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];}
if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];}
elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];}
if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];}
elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];}
if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];}
elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];}
if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];}
elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];}
if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];}
elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];}
if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];}
elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];}
if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];}
elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];}
if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];}
elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];}
if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];}
elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];}
if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];}
elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];}
if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];}
elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];}
if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];}
elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];}
if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];}
elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];}
if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];}
elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];}
if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];}
elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];}
if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];}
elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];}
if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];}
elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];}
if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];}
elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
### AST GUI database administration
### admin.php
###
### CHANGES
### 50315-1110 - Added Custom Campaign Statuses
### 50317-1438 - Added Fronter Display var to inbound groups
### 50322-1355 - Added custom callerID per campaign
### 50517-1356 - Added user_groups sections and user_group to vicidial_users
### 50517-1440 - Added ability to logout (must click OK with empty user/pass)
### 50602-1622 - Added lead loader pages to load new files into vicidial_list
### 50620-1351 - Added custom vdad transfer AGI extension per campaign
### 50810-1414 - modified in groups to kick out spaces and dashes
### 50908-2136 - Added Custom Campaign HotKeys
### 50914-0950 - Fixed user search by user_group
### 50926-1358 - Modified to allow for language translation
### 50926-1615 - Added WeBRooTWritablE write controls
### 51020-1008 - Added editable web address and park ext - NEW dial campaigns
### 51020-1056 - Added fields and help for campaign recording control
### 51123-1335 - Altered code to function in php globals=off
### 51208-1038 - Added user_level changes, function controls and default user phones
### 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents
### 51213-1706 - Added add/delete/modify vicidial scripts
### 51214-1737 - Added preview of vicidial script in popup window
### 51219-1225 - Added campaign and ingroups script selector and get_call_launch field
### 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button
### 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug
### 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen
### 60204-0659 - Fixed hopper reset bug
### 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets
### 60213-1100 - Added several vicidial_users permissions fields
### 60215-1319 - Added On-hold CallBacks display and links
### 60227-1226 - Fixed vicidial_inbound_groups insert bug
### 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables
### - Added status name in selected dial statuses in campaign screen
### 60417-1416 - Added vicidial_lead_filters sections
### - Changed the header links to color-coded sectional with sublinks below
### - Added filter name and script name to campaign and in-group modify sections
### - Added callback and alt dial options to campaigns section
### - Added callback, alt dial and other options to users section
### 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered
###
# AST GUI database administration
# admin.php
#
# CHANGES
# 50315-1110 - Added Custom Campaign Statuses
# 50317-1438 - Added Fronter Display var to inbound groups
# 50322-1355 - Added custom callerID per campaign
# 50517-1356 - Added user_groups sections and user_group to vicidial_users
# 50517-1440 - Added ability to logout (must click OK with empty user/pass)
# 50602-1622 - Added lead loader pages to load new files into vicidial_list
# 50620-1351 - Added custom vdad transfer AGI extension per campaign
# 50810-1414 - modified in groups to kick out spaces and dashes
# 50908-2136 - Added Custom Campaign HotKeys
# 50914-0950 - Fixed user search by user_group
# 50926-1358 - Modified to allow for language translation
# 50926-1615 - Added WeBRooTWritablE write controls
# 51020-1008 - Added editable web address and park ext - NEW dial campaigns
# 51020-1056 - Added fields and help for campaign recording control
# 51123-1335 - Altered code to function in php globals=off
# 51208-1038 - Added user_level changes, function controls and default user phones
# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents
# 51213-1706 - Added add/delete/modify vicidial scripts
# 51214-1737 - Added preview of vicidial script in popup window
# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field
# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button
# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug
# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen
# 60204-0659 - Fixed hopper reset bug
# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets
# 60213-1100 - Added several vicidial_users permissions fields
# 60215-1319 - Added On-hold CallBacks display and links
# 60227-1226 - Fixed vicidial_inbound_groups insert bug
# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables
# - Added status name in selected dial statuses in campaign screen
# 60417-1416 - Added vicidial_lead_filters sections
# - Changed the header links to color-coded sectional with sublinks below
# - Added filter name and script name to campaign and in-group modify sections
# - Added callback and alt dial options to campaigns section
# - Added callback, alt dial and other options to users section
# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered
# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
### make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$version = '1.1.10-8';
$build = '60419-1628';
$version = '1.1.10-9';
$build = '60421-1441';
$STARTtime = date("U");
@@ -181,7 +278,7 @@ $date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
@@ -233,6 +330,8 @@ echo "<head>\n";
echo "<!-- VERSION: $version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
echo "<title>VICIDIAL ADMIN: ";
if (!isset($ADD)) {$ADD=0;}
if ($ADD==1) {$hh='users'; echo "Add New User";}
if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";}
if ($ADD==111) {$hh='lists'; echo "Add New List";}
@@ -291,7 +390,7 @@ if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";}
if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";}
if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";}
if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";}
if ($ADD==0) {$hh='users'; echo "Welcome";}
if ($ADD==0) {$hh='users'; echo "Users List";}
if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";}
if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";}
if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";}
@@ -4307,7 +4406,7 @@ if ($ADD==8)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);
@@ -4322,7 +4421,7 @@ if ($ADD==81)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);
@@ -4337,7 +4436,7 @@ if ($ADD==811)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);