25098 lines
1.2 MiB
Plaintext
25098 lines
1.2 MiB
Plaintext
<?php
|
|
# admin.php - VICIDIAL administration page
|
|
#
|
|
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
|
#
|
|
|
|
require("dbconnect.php");
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### static variable settings for display options
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
$page_width='770';
|
|
$section_width='750';
|
|
$header_font_size='3';
|
|
$subheader_font_size='2';
|
|
$subcamp_font_size='2';
|
|
$header_selected_bold='<b>';
|
|
$header_nonselected_bold='';
|
|
$users_color = '#FFFF99';
|
|
$campaigns_color = '#FFCC99';
|
|
$lists_color = '#FFCCCC';
|
|
$ingroups_color = '#CC99FF';
|
|
$remoteagent_color ='#CCFFCC';
|
|
$usergroups_color = '#CCFFFF';
|
|
$scripts_color = '#99FFCC';
|
|
$filters_color = '#CCCCCC';
|
|
$admin_color = '#FF99FF';
|
|
$reports_color = '#99FF33';
|
|
$times_color = '#FF33FF';
|
|
$shifts_color = '#FF33FF';
|
|
$phones_color = '#FF33FF';
|
|
$conference_color = '#FF33FF';
|
|
$server_color = '#FF33FF';
|
|
$templates_color = '#FF33FF';
|
|
$carriers_color = '#FF33FF';
|
|
$settings_color = '#FF33FF';
|
|
$status_color = '#FF33FF';
|
|
$moh_color = '#FF33FF';
|
|
$vm_color = '#FF33FF';
|
|
$tts_color = '#FF33FF';
|
|
$subcamp_color = '#FF9933';
|
|
$users_font = 'BLACK';
|
|
$campaigns_font = 'BLACK';
|
|
$lists_font = 'BLACK';
|
|
$ingroups_font = 'BLACK';
|
|
$remoteagent_font = 'BLACK';
|
|
$usergroups_font = 'BLACK';
|
|
$scripts_font = 'BLACK';
|
|
$filters_font = 'BLACK';
|
|
$admin_font = 'BLACK';
|
|
$reports_font = 'BLACK';
|
|
$times_font = 'BLACK';
|
|
$phones_font = 'BLACK';
|
|
$conference_font = 'BLACK';
|
|
$server_font = 'BLACK';
|
|
$settings_font = 'BLACK';
|
|
$status_font = 'BLACK';
|
|
$moh_font = 'BLACK';
|
|
$vm_font = 'BLACK';
|
|
$tts_font = 'BLACK';
|
|
$subcamp_font = 'BLACK';
|
|
|
|
### comment this section out for colorful section headings
|
|
$users_color = '#E6E6E6';
|
|
$campaigns_color = '#E6E6E6';
|
|
$lists_color = '#E6E6E6';
|
|
$ingroups_color = '#E6E6E6';
|
|
$remoteagent_color ='#E6E6E6';
|
|
$usergroups_color = '#E6E6E6';
|
|
$scripts_color = '#E6E6E6';
|
|
$filters_color = '#E6E6E6';
|
|
$admin_color = '#E6E6E6';
|
|
$reports_color = '#E6E6E6';
|
|
$times_color = '#C6C6C6';
|
|
$shifts_color = '#C6C6C6';
|
|
$phones_color = '#C6C6C6';
|
|
$conference_color = '#C6C6C6';
|
|
$server_color = '#C6C6C6';
|
|
$templates_color = '#C6C6C6';
|
|
$carriers_color = '#C6C6C6';
|
|
$settings_color = '#C6C6C6';
|
|
$status_color = '#C6C6C6';
|
|
$moh_color = '#C6C6C6';
|
|
$vm_color = '#C6C6C6';
|
|
$tts_color = '#C6C6C6';
|
|
$subcamp_color = '#C6C6C6';
|
|
###
|
|
|
|
|
|
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
|
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### Form variable declaration
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
|
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
|
if (isset($_GET["active"])) {$active=$_GET["active"];}
|
|
elseif (isset($_POST["active"])) {$active=$_POST["active"];}
|
|
if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];}
|
|
elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];}
|
|
if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];}
|
|
elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];}
|
|
if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];}
|
|
elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];}
|
|
if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];}
|
|
elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];}
|
|
if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];}
|
|
elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];}
|
|
if (isset($_GET["SUB"])) {$SUB=$_GET["SUB"];}
|
|
elseif (isset($_POST["SUB"])) {$SUB=$_POST["SUB"];}
|
|
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
|
|
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
|
|
if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];}
|
|
elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];}
|
|
if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];}
|
|
elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];}
|
|
if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];}
|
|
elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];}
|
|
if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];}
|
|
elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];}
|
|
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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];}
|
|
elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];}
|
|
if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];}
|
|
elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];}
|
|
if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];}
|
|
elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];}
|
|
if (isset($_GET["agi_output"])) {$agi_output=$_GET["agi_output"];}
|
|
elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];}
|
|
if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];}
|
|
elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];}
|
|
if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];}
|
|
elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];}
|
|
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["alter_agent_interface_options"])) {$alter_agent_interface_options=$_GET["alter_agent_interface_options"];}
|
|
elseif (isset($_POST["alter_agent_interface_options"])) {$alter_agent_interface_options=$_POST["alter_agent_interface_options"];}
|
|
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["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];}
|
|
elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];}
|
|
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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];}
|
|
elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];}
|
|
if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
|
|
elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
|
|
if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
|
|
elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
|
|
if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];}
|
|
elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];}
|
|
if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];}
|
|
elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];}
|
|
if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
|
|
elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
|
|
if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];}
|
|
elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];}
|
|
if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];}
|
|
elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];}
|
|
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["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];}
|
|
elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];}
|
|
if (isset($_GET["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];}
|
|
elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
|
|
if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];}
|
|
elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];}
|
|
if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];}
|
|
elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];}
|
|
if (isset($_GET["call_time_comments"])) {$call_time_comments=$_GET["call_time_comments"];}
|
|
elseif (isset($_POST["call_time_comments"])) {$call_time_comments=$_POST["call_time_comments"];}
|
|
if (isset($_GET["call_time_id"])) {$call_time_id=$_GET["call_time_id"];}
|
|
elseif (isset($_POST["call_time_id"])) {$call_time_id=$_POST["call_time_id"];}
|
|
if (isset($_GET["call_time_name"])) {$call_time_name=$_GET["call_time_name"];}
|
|
elseif (isset($_POST["call_time_name"])) {$call_time_name=$_POST["call_time_name"];}
|
|
if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];}
|
|
elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];}
|
|
if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];}
|
|
elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];}
|
|
if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];}
|
|
elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];}
|
|
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["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_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["ingroup_rec_filename"])) {$ingroup_rec_filename=$_GET["ingroup_rec_filename"];}
|
|
elseif (isset($_POST["ingroup_rec_filename"])) {$ingroup_rec_filename=$_POST["ingroup_rec_filename"];}
|
|
if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];}
|
|
elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];}
|
|
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["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["client_browser"])) {$client_browser=$_GET["client_browser"];}
|
|
elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];}
|
|
if (isset($_GET["closer_default_blended"])) {$closer_default_blended=$_GET["closer_default_blended"];}
|
|
elseif (isset($_POST["closer_default_blended"])) {$closer_default_blended=$_POST["closer_default_blended"];}
|
|
if (isset($_GET["company"])) {$company=$_GET["company"];}
|
|
elseif (isset($_POST["company"])) {$company=$_POST["company"];}
|
|
if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];}
|
|
elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];}
|
|
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
|
|
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
|
|
if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];}
|
|
elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];}
|
|
if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];}
|
|
elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];}
|
|
if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];}
|
|
elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];}
|
|
if (isset($_GET["ct_default_start"])) {$ct_default_start=$_GET["ct_default_start"];}
|
|
elseif (isset($_POST["ct_default_start"])) {$ct_default_start=$_POST["ct_default_start"];}
|
|
if (isset($_GET["ct_default_stop"])) {$ct_default_stop=$_GET["ct_default_stop"];}
|
|
elseif (isset($_POST["ct_default_stop"])) {$ct_default_stop=$_POST["ct_default_stop"];}
|
|
if (isset($_GET["ct_friday_start"])) {$ct_friday_start=$_GET["ct_friday_start"];}
|
|
elseif (isset($_POST["ct_friday_start"])) {$ct_friday_start=$_POST["ct_friday_start"];}
|
|
if (isset($_GET["ct_friday_stop"])) {$ct_friday_stop=$_GET["ct_friday_stop"];}
|
|
elseif (isset($_POST["ct_friday_stop"])) {$ct_friday_stop=$_POST["ct_friday_stop"];}
|
|
if (isset($_GET["ct_monday_start"])) {$ct_monday_start=$_GET["ct_monday_start"];}
|
|
elseif (isset($_POST["ct_monday_start"])) {$ct_monday_start=$_POST["ct_monday_start"];}
|
|
if (isset($_GET["ct_monday_stop"])) {$ct_monday_stop=$_GET["ct_monday_stop"];}
|
|
elseif (isset($_POST["ct_monday_stop"])) {$ct_monday_stop=$_POST["ct_monday_stop"];}
|
|
if (isset($_GET["ct_saturday_start"])) {$ct_saturday_start=$_GET["ct_saturday_start"];}
|
|
elseif (isset($_POST["ct_saturday_start"])) {$ct_saturday_start=$_POST["ct_saturday_start"];}
|
|
if (isset($_GET["ct_saturday_stop"])) {$ct_saturday_stop=$_GET["ct_saturday_stop"];}
|
|
elseif (isset($_POST["ct_saturday_stop"])) {$ct_saturday_stop=$_POST["ct_saturday_stop"];}
|
|
if (isset($_GET["ct_sunday_start"])) {$ct_sunday_start=$_GET["ct_sunday_start"];}
|
|
elseif (isset($_POST["ct_sunday_start"])) {$ct_sunday_start=$_POST["ct_sunday_start"];}
|
|
if (isset($_GET["ct_sunday_stop"])) {$ct_sunday_stop=$_GET["ct_sunday_stop"];}
|
|
elseif (isset($_POST["ct_sunday_stop"])) {$ct_sunday_stop=$_POST["ct_sunday_stop"];}
|
|
if (isset($_GET["ct_thursday_start"])) {$ct_thursday_start=$_GET["ct_thursday_start"];}
|
|
elseif (isset($_POST["ct_thursday_start"])) {$ct_thursday_start=$_POST["ct_thursday_start"];}
|
|
if (isset($_GET["ct_thursday_stop"])) {$ct_thursday_stop=$_GET["ct_thursday_stop"];}
|
|
elseif (isset($_POST["ct_thursday_stop"])) {$ct_thursday_stop=$_POST["ct_thursday_stop"];}
|
|
if (isset($_GET["ct_tuesday_start"])) {$ct_tuesday_start=$_GET["ct_tuesday_start"];}
|
|
elseif (isset($_POST["ct_tuesday_start"])) {$ct_tuesday_start=$_POST["ct_tuesday_start"];}
|
|
if (isset($_GET["ct_tuesday_stop"])) {$ct_tuesday_stop=$_GET["ct_tuesday_stop"];}
|
|
elseif (isset($_POST["ct_tuesday_stop"])) {$ct_tuesday_stop=$_POST["ct_tuesday_stop"];}
|
|
if (isset($_GET["ct_wednesday_start"])) {$ct_wednesday_start=$_GET["ct_wednesday_start"];}
|
|
elseif (isset($_POST["ct_wednesday_start"])) {$ct_wednesday_start=$_POST["ct_wednesday_start"];}
|
|
if (isset($_GET["ct_wednesday_stop"])) {$ct_wednesday_stop=$_GET["ct_wednesday_stop"];}
|
|
elseif (isset($_POST["ct_wednesday_stop"])) {$ct_wednesday_stop=$_POST["ct_wednesday_stop"];}
|
|
if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];}
|
|
elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];}
|
|
if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];}
|
|
elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];}
|
|
if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];}
|
|
elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];}
|
|
if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];}
|
|
elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];}
|
|
if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];}
|
|
elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];}
|
|
if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];}
|
|
elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];}
|
|
if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];}
|
|
elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];}
|
|
if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];}
|
|
elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];}
|
|
if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];}
|
|
elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];}
|
|
if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];}
|
|
elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];}
|
|
if (isset($_GET["delete_call_times"])) {$delete_call_times=$_GET["delete_call_times"];}
|
|
elseif (isset($_POST["delete_call_times"])) {$delete_call_times=$_POST["delete_call_times"];}
|
|
if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];}
|
|
elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];}
|
|
if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];}
|
|
elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];}
|
|
if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];}
|
|
elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];}
|
|
if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];}
|
|
elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];}
|
|
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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];}
|
|
elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];}
|
|
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_users"])) {$delete_users=$_GET["delete_users"];}
|
|
elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];}
|
|
if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];}
|
|
elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];}
|
|
if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];}
|
|
elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];}
|
|
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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];}
|
|
elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];}
|
|
if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];}
|
|
elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];}
|
|
if (isset($_GET["drop_call_seconds"])) {$drop_call_seconds=$_GET["drop_call_seconds"];}
|
|
elseif (isset($_POST["drop_call_seconds"])) {$drop_call_seconds=$_POST["drop_call_seconds"];}
|
|
if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];}
|
|
elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];}
|
|
if (isset($_GET["drop_action"])) {$drop_action=$_GET["drop_action"];}
|
|
elseif (isset($_POST["drop_action"])) {$drop_action=$_POST["drop_action"];}
|
|
if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];}
|
|
elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];}
|
|
if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];}
|
|
elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];}
|
|
if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];}
|
|
elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];}
|
|
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
|
|
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
|
|
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
|
|
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
|
|
if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];}
|
|
elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];}
|
|
if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];}
|
|
elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];}
|
|
if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];}
|
|
elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];}
|
|
if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];}
|
|
elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];}
|
|
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
|
|
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
|
|
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["group_color"])) {$group_color=$_GET["group_color"];}
|
|
elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];}
|
|
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["groups"])) {$groups=$_GET["groups"];}
|
|
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
|
|
if (isset($_GET["XFERgroups"])) {$XFERgroups=$_GET["XFERgroups"];}
|
|
elseif (isset($_POST["XFERgroups"])) {$XFERgroups=$_POST["XFERgroups"];}
|
|
if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];}
|
|
elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];}
|
|
if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];}
|
|
elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];}
|
|
if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];}
|
|
elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];}
|
|
if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];}
|
|
elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];}
|
|
if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];}
|
|
elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];}
|
|
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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];}
|
|
elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];}
|
|
if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];}
|
|
elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];}
|
|
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["load_leads"])) {$load_leads=$_GET["load_leads"];}
|
|
elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];}
|
|
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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];}
|
|
elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];}
|
|
if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];}
|
|
elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];}
|
|
if (isset($_GET["login"])) {$login=$_GET["login"];}
|
|
elseif (isset($_POST["login"])) {$login=$_POST["login"];}
|
|
if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];}
|
|
elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];}
|
|
if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];}
|
|
elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];}
|
|
if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];}
|
|
elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];}
|
|
if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];}
|
|
elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];}
|
|
if (isset($_GET["modify_call_times"])) {$modify_call_times=$_GET["modify_call_times"];}
|
|
elseif (isset($_POST["modify_call_times"])) {$modify_call_times=$_POST["modify_call_times"];}
|
|
if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];}
|
|
elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];}
|
|
if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];}
|
|
elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];}
|
|
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["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["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["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];}
|
|
elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];}
|
|
if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];}
|
|
elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];}
|
|
if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];}
|
|
elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];}
|
|
if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];}
|
|
elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];}
|
|
if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];}
|
|
elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];}
|
|
if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];}
|
|
elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];}
|
|
if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];}
|
|
elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];}
|
|
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["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];}
|
|
elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];}
|
|
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
|
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
|
if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];}
|
|
elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];}
|
|
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
|
|
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
|
|
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
|
|
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
|
|
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
|
|
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
|
|
if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];}
|
|
elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];}
|
|
if (isset($_GET["picture"])) {$picture=$_GET["picture"];}
|
|
elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];}
|
|
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
|
|
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
|
|
if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];}
|
|
elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];}
|
|
if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];}
|
|
elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];}
|
|
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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];}
|
|
elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];}
|
|
if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];}
|
|
elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];}
|
|
if (isset($_GET["safe_harbor_exten"])) {$safe_harbor_exten=$_GET["safe_harbor_exten"];}
|
|
elseif (isset($_POST["safe_harbor_exten"])) {$safe_harbor_exten=$_POST["safe_harbor_exten"];}
|
|
if (isset($_GET["drop_action"])) {$drop_action=$_GET["drop_action"];}
|
|
elseif (isset($_POST["drop_action"])) {$drop_action=$_POST["drop_action"];}
|
|
if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];}
|
|
elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];}
|
|
if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];}
|
|
elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];}
|
|
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_text"])) {$script_text=$_GET["script_text"];}
|
|
elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];}
|
|
if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];}
|
|
elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];}
|
|
if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];}
|
|
elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];}
|
|
if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];}
|
|
elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];}
|
|
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
|
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
|
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
|
|
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
|
|
if (isset($_GET["state_call_time_state"])) {$state_call_time_state=$_GET["state_call_time_state"];}
|
|
elseif (isset($_POST["state_call_time_state"])) {$state_call_time_state=$_POST["state_call_time_state"];}
|
|
if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];}
|
|
elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];}
|
|
if (isset($_GET["status"])) {$status=$_GET["status"];}
|
|
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
|
|
if (isset($_GET["status_id"])) {$status_id=$_GET["status_id"];}
|
|
elseif (isset($_POST["status_id"])) {$status_id=$_POST["status_id"];}
|
|
if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];}
|
|
elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];}
|
|
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
|
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
|
if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];}
|
|
elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];}
|
|
if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];}
|
|
elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];}
|
|
if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];}
|
|
elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];}
|
|
if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];}
|
|
elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];}
|
|
if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];}
|
|
elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];}
|
|
if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];}
|
|
elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];}
|
|
if (isset($_GET["use_campaign_dnc"])) {$use_campaign_dnc=$_GET["use_campaign_dnc"];}
|
|
elseif (isset($_POST["use_campaign_dnc"])) {$use_campaign_dnc=$_POST["use_campaign_dnc"];}
|
|
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
|
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
|
if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];}
|
|
elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];}
|
|
if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];}
|
|
elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];}
|
|
if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];}
|
|
elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];}
|
|
if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];}
|
|
elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];}
|
|
if (isset($_GET["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];}
|
|
elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];}
|
|
if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];}
|
|
elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
|
|
if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];}
|
|
elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];}
|
|
if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];}
|
|
elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];}
|
|
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["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];}
|
|
elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];}
|
|
if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];}
|
|
elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];}
|
|
if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];}
|
|
elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
|
|
if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];}
|
|
elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];}
|
|
if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];}
|
|
elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];}
|
|
if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];}
|
|
elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];}
|
|
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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];}
|
|
elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];}
|
|
if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];}
|
|
elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];}
|
|
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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];}
|
|
elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];}
|
|
if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];}
|
|
elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];}
|
|
if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];}
|
|
elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];}
|
|
if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];}
|
|
elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];}
|
|
if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];}
|
|
elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];}
|
|
if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];}
|
|
elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];}
|
|
if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];}
|
|
elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];}
|
|
if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];}
|
|
elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];}
|
|
if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];}
|
|
elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];}
|
|
if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];}
|
|
elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];}
|
|
if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];}
|
|
elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];}
|
|
if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];}
|
|
elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];}
|
|
if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];}
|
|
elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];}
|
|
if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];}
|
|
elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];}
|
|
if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];}
|
|
elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];}
|
|
if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];}
|
|
elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];}
|
|
if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];}
|
|
elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];}
|
|
if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];}
|
|
elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];}
|
|
if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];}
|
|
elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];}
|
|
if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];}
|
|
elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];}
|
|
if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];}
|
|
elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];}
|
|
if (isset($_GET["billable"])) {$billable=$_GET["billable"];}
|
|
elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];}
|
|
if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];}
|
|
elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];}
|
|
if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];}
|
|
elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];}
|
|
if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];}
|
|
elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];}
|
|
if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];}
|
|
elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];}
|
|
if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];}
|
|
elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];}
|
|
if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];}
|
|
elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];}
|
|
if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];}
|
|
elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];}
|
|
if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];}
|
|
elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];}
|
|
if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];}
|
|
elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];}
|
|
if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];}
|
|
elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];}
|
|
if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];}
|
|
elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];}
|
|
if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];}
|
|
elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];}
|
|
if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];}
|
|
elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];}
|
|
if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];}
|
|
elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];}
|
|
if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];}
|
|
elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];}
|
|
if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];}
|
|
elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];}
|
|
if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];}
|
|
elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];}
|
|
if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];}
|
|
elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];}
|
|
if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];}
|
|
elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];}
|
|
if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];}
|
|
elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];}
|
|
if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];}
|
|
elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];}
|
|
if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];}
|
|
elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];}
|
|
if (isset($_GET["list_order_mix"])) {$list_order_mix=$_GET["list_order_mix"];}
|
|
elseif (isset($_POST["list_order_mix"])) {$list_order_mix=$_POST["list_order_mix"];}
|
|
if (isset($_GET["vcl_id"])) {$vcl_id=$_GET["vcl_id"];}
|
|
elseif (isset($_POST["vcl_id"])) {$vcl_id=$_POST["vcl_id"];}
|
|
if (isset($_GET["vcl_name"])) {$vcl_name=$_GET["vcl_name"];}
|
|
elseif (isset($_POST["vcl_name"])) {$vcl_name=$_POST["vcl_name"];}
|
|
if (isset($_GET["list_mix_container"])) {$list_mix_container=$_GET["list_mix_container"];}
|
|
elseif (isset($_POST["list_mix_container"])) {$list_mix_container=$_POST["list_mix_container"];}
|
|
if (isset($_GET["mix_method"])) {$mix_method=$_GET["mix_method"];}
|
|
elseif (isset($_POST["mix_method"])) {$mix_method=$_POST["mix_method"];}
|
|
if (isset($_GET["human_answered"])) {$human_answered=$_GET["human_answered"];}
|
|
elseif (isset($_POST["human_answered"])) {$human_answered=$_POST["human_answered"];}
|
|
if (isset($_GET["category"])) {$category=$_GET["category"];}
|
|
elseif (isset($_POST["category"])) {$category=$_POST["category"];}
|
|
if (isset($_GET["vsc_id"])) {$vsc_id=$_GET["vsc_id"];}
|
|
elseif (isset($_POST["vsc_id"])) {$vsc_id=$_POST["vsc_id"];}
|
|
if (isset($_GET["vsc_name"])) {$vsc_name=$_GET["vsc_name"];}
|
|
elseif (isset($_POST["vsc_name"])) {$vsc_name=$_POST["vsc_name"];}
|
|
if (isset($_GET["vsc_description"])) {$vsc_description=$_GET["vsc_description"];}
|
|
elseif (isset($_POST["vsc_description"])) {$vsc_description=$_POST["vsc_description"];}
|
|
if (isset($_GET["tovdad_display"])) {$tovdad_display=$_GET["tovdad_display"];}
|
|
elseif (isset($_POST["tovdad_display"])) {$tovdad_display=$_POST["tovdad_display"];}
|
|
if (isset($_GET["mix_container_item"])) {$mix_container_item=$_GET["mix_container_item"];}
|
|
elseif (isset($_POST["mix_container_item"])) {$mix_container_item=$_POST["mix_container_item"];}
|
|
if (isset($_GET["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_GET["enable_agc_xfer_log"];}
|
|
elseif (isset($_POST["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_POST["enable_agc_xfer_log"];}
|
|
if (isset($_GET["after_hours_action"])) {$after_hours_action=$_GET["after_hours_action"];}
|
|
elseif (isset($_POST["after_hours_action"])) {$after_hours_action=$_POST["after_hours_action"];}
|
|
if (isset($_GET["after_hours_message_filename"])) {$after_hours_message_filename=$_GET["after_hours_message_filename"];}
|
|
elseif (isset($_POST["after_hours_message_filename"])) {$after_hours_message_filename=$_POST["after_hours_message_filename"];}
|
|
if (isset($_GET["after_hours_exten"])) {$after_hours_exten=$_GET["after_hours_exten"];}
|
|
elseif (isset($_POST["after_hours_exten"])) {$after_hours_exten=$_POST["after_hours_exten"];}
|
|
if (isset($_GET["after_hours_voicemail"])) {$after_hours_voicemail=$_GET["after_hours_voicemail"];}
|
|
elseif (isset($_POST["after_hours_voicemail"])) {$after_hours_voicemail=$_POST["after_hours_voicemail"];}
|
|
if (isset($_GET["welcome_message_filename"])) {$welcome_message_filename=$_GET["welcome_message_filename"];}
|
|
elseif (isset($_POST["welcome_message_filename"])) {$welcome_message_filename=$_POST["welcome_message_filename"];}
|
|
if (isset($_GET["moh_context"])) {$moh_context=$_GET["moh_context"];}
|
|
elseif (isset($_POST["moh_context"])) {$moh_context=$_POST["moh_context"];}
|
|
if (isset($_GET["onhold_prompt_filename"])) {$onhold_prompt_filename=$_GET["onhold_prompt_filename"];}
|
|
elseif (isset($_POST["onhold_prompt_filename"])) {$onhold_prompt_filename=$_POST["onhold_prompt_filename"];}
|
|
if (isset($_GET["prompt_interval"])) {$prompt_interval=$_GET["prompt_interval"];}
|
|
elseif (isset($_POST["prompt_interval"])) {$prompt_interval=$_POST["prompt_interval"];}
|
|
if (isset($_GET["agent_alert_exten"])) {$agent_alert_exten=$_GET["agent_alert_exten"];}
|
|
elseif (isset($_POST["agent_alert_exten"])) {$agent_alert_exten=$_POST["agent_alert_exten"];}
|
|
if (isset($_GET["agent_alert_delay"])) {$agent_alert_delay=$_GET["agent_alert_delay"];}
|
|
elseif (isset($_POST["agent_alert_delay"])) {$agent_alert_delay=$_POST["agent_alert_delay"];}
|
|
if (isset($_GET["group_rank"])) {$group_rank=$_GET["group_rank"];}
|
|
elseif (isset($_POST["group_rank"])) {$group_rank=$_POST["group_rank"];}
|
|
if (isset($_GET["campaign_allow_inbound"])) {$campaign_allow_inbound=$_GET["campaign_allow_inbound"];}
|
|
elseif (isset($_POST["campaign_allow_inbound"])) {$campaign_allow_inbound=$_POST["campaign_allow_inbound"];}
|
|
if (isset($_GET["manual_dial_list_id"])) {$manual_dial_list_id=$_GET["manual_dial_list_id"];}
|
|
elseif (isset($_POST["manual_dial_list_id"])) {$manual_dial_list_id=$_POST["manual_dial_list_id"];}
|
|
if (isset($_GET["campaign_rank"])) {$campaign_rank=$_GET["campaign_rank"];}
|
|
elseif (isset($_POST["campaign_rank"])) {$campaign_rank=$_POST["campaign_rank"];}
|
|
if (isset($_GET["source_campaign_id"])) {$source_campaign_id=$_GET["source_campaign_id"];}
|
|
elseif (isset($_POST["source_campaign_id"])) {$source_campaign_id=$_POST["source_campaign_id"];}
|
|
if (isset($_GET["source_user_id"])) {$source_user_id=$_GET["source_user_id"];}
|
|
elseif (isset($_POST["source_user_id"])) {$source_user_id=$_POST["source_user_id"];}
|
|
if (isset($_GET["source_group_id"])) {$source_group_id=$_GET["source_group_id"];}
|
|
elseif (isset($_POST["source_group_id"])) {$source_group_id=$_POST["source_group_id"];}
|
|
if (isset($_GET["default_xfer_group"])) {$default_xfer_group=$_GET["default_xfer_group"];}
|
|
elseif (isset($_POST["default_xfer_group"])) {$default_xfer_group=$_POST["default_xfer_group"];}
|
|
if (isset($_GET["qc_enabled"])) {$qc_enabled=$_GET["qc_enabled"];}
|
|
elseif (isset($_POST["qc_enabled"])) {$qc_enabled=$_POST["qc_enabled"];}
|
|
if (isset($_GET["qc_user_level"])) {$qc_user_level=$_GET["qc_user_level"];}
|
|
elseif (isset($_POST["qc_user_level"])) {$qc_user_level=$_POST["qc_user_level"];}
|
|
if (isset($_GET["qc_pass"])) {$qc_pass=$_GET["qc_pass"];}
|
|
elseif (isset($_POST["qc_pass"])) {$qc_pass=$_POST["qc_pass"];}
|
|
if (isset($_GET["qc_finish"])) {$qc_finish=$_GET["qc_finish"];}
|
|
elseif (isset($_POST["qc_finish"])) {$qc_finish=$_POST["qc_finish"];}
|
|
if (isset($_GET["qc_commit"])) {$qc_commit=$_GET["qc_commit"];}
|
|
elseif (isset($_POST["qc_commit"])) {$qc_commit=$_POST["qc_commit"];}
|
|
if (isset($_GET["qc_campaigns"])) {$qc_campaigns=$_GET["qc_campaigns"];}
|
|
elseif (isset($_POST["qc_campaigns"])) {$qc_campaigns=$_POST["qc_campaigns"];}
|
|
if (isset($_GET["qc_groups"])) {$qc_groups=$_GET["qc_groups"];}
|
|
elseif (isset($_POST["qc_groups"])) {$qc_groups=$_POST["qc_groups"];}
|
|
if (isset($_GET["queue_priority"])) {$queue_priority=$_GET["queue_priority"];}
|
|
elseif (isset($_POST["queue_priority"])) {$queue_priority=$_POST["queue_priority"];}
|
|
if (isset($_GET["drop_inbound_group"])) {$drop_inbound_group=$_GET["drop_inbound_group"];}
|
|
elseif (isset($_POST["drop_inbound_group"])) {$drop_inbound_group=$_POST["drop_inbound_group"];}
|
|
if (isset($_GET["qc_statuses"])) {$qc_statuses=$_GET["qc_statuses"];}
|
|
elseif (isset($_POST["qc_statuses"])) {$qc_statuses=$_POST["qc_statuses"];}
|
|
if (isset($_GET["qc_lists"])) {$qc_lists=$_GET["qc_lists"];}
|
|
elseif (isset($_POST["qc_lists"])) {$qc_lists=$_POST["qc_lists"];}
|
|
if (isset($_GET["qc_get_record_launch"])) {$qc_get_record_launch=$_GET["qc_get_record_launch"];}
|
|
elseif (isset($_POST["qc_get_record_launch"])) {$qc_get_record_launch=$_POST["qc_get_record_launch"];}
|
|
if (isset($_GET["qc_show_recording"])) {$qc_show_recording=$_GET["qc_show_recording"];}
|
|
elseif (isset($_POST["qc_show_recording"])) {$qc_show_recording=$_POST["qc_show_recording"];}
|
|
if (isset($_GET["qc_shift_id"])) {$qc_shift_id=$_GET["qc_shift_id"];}
|
|
elseif (isset($_POST["qc_shift_id"])) {$qc_shift_id=$_POST["qc_shift_id"];}
|
|
if (isset($_GET["qc_web_form_address"])) {$qc_web_form_address=$_GET["qc_web_form_address"];}
|
|
elseif (isset($_POST["qc_web_form_address"])) {$qc_web_form_address=$_POST["qc_web_form_address"];}
|
|
if (isset($_GET["qc_script"])) {$qc_script=$_GET["qc_script"];}
|
|
elseif (isset($_POST["qc_script"])) {$qc_script=$_POST["qc_script"];}
|
|
if (isset($_GET["ingroup_recording_override"])) {$ingroup_recording_override=$_GET["ingroup_recording_override"];}
|
|
elseif (isset($_POST["ingroup_recording_override"])) {$ingroup_recording_override=$_POST["ingroup_recording_override"];}
|
|
if (isset($_GET["code"])) {$code=$_GET["code"];}
|
|
elseif (isset($_POST["code"])) {$code=$_POST["code"];}
|
|
if (isset($_GET["code_name"])) {$code_name=$_GET["code_name"];}
|
|
elseif (isset($_POST["code_name"])) {$code_name=$_POST["code_name"];}
|
|
if (isset($_GET["afterhours_xfer_group"])) {$afterhours_xfer_group=$_GET["afterhours_xfer_group"];}
|
|
elseif (isset($_POST["afterhours_xfer_group"])) {$afterhours_xfer_group=$_POST["afterhours_xfer_group"];}
|
|
if (isset($_GET["alias_id"])) {$alias_id=$_GET["alias_id"];}
|
|
elseif (isset($_POST["alias_id"])) {$alias_id=$_POST["alias_id"];}
|
|
if (isset($_GET["alias_name"])) {$alias_name=$_GET["alias_name"];}
|
|
elseif (isset($_POST["alias_name"])) {$alias_name=$_POST["alias_name"];}
|
|
if (isset($_GET["logins_list"])) {$logins_list=$_GET["logins_list"];}
|
|
elseif (isset($_POST["logins_list"])) {$logins_list=$_POST["logins_list"];}
|
|
if (isset($_GET["shift_id"])) {$shift_id=$_GET["shift_id"];}
|
|
elseif (isset($_POST["shift_id"])) {$shift_id=$_POST["shift_id"];}
|
|
if (isset($_GET["shift_name"])) {$shift_name=$_GET["shift_name"];}
|
|
elseif (isset($_POST["shift_name"])) {$shift_name=$_POST["shift_name"];}
|
|
if (isset($_GET["shift_start_time"])) {$shift_start_time=$_GET["shift_start_time"];}
|
|
elseif (isset($_POST["shift_start_time"])) {$shift_start_time=$_POST["shift_start_time"];}
|
|
if (isset($_GET["shift_length"])) {$shift_length=$_GET["shift_length"];}
|
|
elseif (isset($_POST["shift_length"])) {$shift_length=$_POST["shift_length"];}
|
|
if (isset($_GET["shift_weekdays"])) {$shift_weekdays=$_GET["shift_weekdays"];}
|
|
elseif (isset($_POST["shift_weekdays"])) {$shift_weekdays=$_POST["shift_weekdays"];}
|
|
if (isset($_GET["group_shifts"])) {$group_shifts=$_GET["group_shifts"];}
|
|
elseif (isset($_POST["group_shifts"])) {$group_shifts=$_POST["group_shifts"];}
|
|
if (isset($_GET["timeclock_end_of_day"])) {$timeclock_end_of_day=$_GET["timeclock_end_of_day"];}
|
|
elseif (isset($_POST["timeclock_end_of_day"])) {$timeclock_end_of_day=$_POST["timeclock_end_of_day"];}
|
|
if (isset($_GET["survey_first_audio_file"])) {$survey_first_audio_file=$_GET["survey_first_audio_file"];}
|
|
elseif (isset($_POST["survey_first_audio_file"])) {$survey_first_audio_file=$_POST["survey_first_audio_file"];}
|
|
if (isset($_GET["survey_dtmf_digits"])) {$survey_dtmf_digits=$_GET["survey_dtmf_digits"];}
|
|
elseif (isset($_POST["survey_dtmf_digits"])) {$survey_dtmf_digits=$_POST["survey_dtmf_digits"];}
|
|
if (isset($_GET["survey_ni_digit"])) {$survey_ni_digit=$_GET["survey_ni_digit"];}
|
|
elseif (isset($_POST["survey_ni_digit"])) {$survey_ni_digit=$_POST["survey_ni_digit"];}
|
|
if (isset($_GET["survey_opt_in_audio_file"])) {$survey_opt_in_audio_file=$_GET["survey_opt_in_audio_file"];}
|
|
elseif (isset($_POST["survey_opt_in_audio_file"])) {$survey_opt_in_audio_file=$_POST["survey_opt_in_audio_file"];}
|
|
if (isset($_GET["survey_ni_audio_file"])) {$survey_ni_audio_file=$_GET["survey_ni_audio_file"];}
|
|
elseif (isset($_POST["survey_ni_audio_file"])) {$survey_ni_audio_file=$_POST["survey_ni_audio_file"];}
|
|
if (isset($_GET["survey_method"])) {$survey_method=$_GET["survey_method"];}
|
|
elseif (isset($_POST["survey_method"])) {$survey_method=$_POST["survey_method"];}
|
|
if (isset($_GET["survey_no_response_action"])) {$survey_no_response_action=$_GET["survey_no_response_action"];}
|
|
elseif (isset($_POST["survey_no_response_action"])) {$survey_no_response_action=$_POST["survey_no_response_action"];}
|
|
if (isset($_GET["survey_ni_status"])) {$survey_ni_status=$_GET["survey_ni_status"];}
|
|
elseif (isset($_POST["survey_ni_status"])) {$survey_ni_status=$_POST["survey_ni_status"];}
|
|
if (isset($_GET["survey_response_digit_map"])) {$survey_response_digit_map=$_GET["survey_response_digit_map"];}
|
|
elseif (isset($_POST["survey_response_digit_map"])) {$survey_response_digit_map=$_POST["survey_response_digit_map"];}
|
|
if (isset($_GET["survey_xfer_exten"])) {$survey_xfer_exten=$_GET["survey_xfer_exten"];}
|
|
elseif (isset($_POST["survey_xfer_exten"])) {$survey_xfer_exten=$_POST["survey_xfer_exten"];}
|
|
if (isset($_GET["survey_camp_record_dir"])) {$survey_camp_record_dir=$_GET["survey_camp_record_dir"];}
|
|
elseif (isset($_POST["survey_camp_record_dir"])) {$survey_camp_record_dir=$_POST["survey_camp_record_dir"];}
|
|
if (isset($_GET["add_timeclock_log"])) {$add_timeclock_log=$_GET["add_timeclock_log"];}
|
|
elseif (isset($_POST["add_timeclock_log"])) {$add_timeclock_log=$_POST["add_timeclock_log"];}
|
|
if (isset($_GET["modify_timeclock_log"])) {$modify_timeclock_log=$_GET["modify_timeclock_log"];}
|
|
elseif (isset($_POST["modify_timeclock_log"])) {$modify_timeclock_log=$_POST["modify_timeclock_log"];}
|
|
if (isset($_GET["delete_timeclock_log"])) {$delete_timeclock_log=$_GET["delete_timeclock_log"];}
|
|
elseif (isset($_POST["delete_timeclock_log"])) {$delete_timeclock_log=$_POST["delete_timeclock_log"];}
|
|
if (isset($_GET["phone_numbers"])) {$phone_numbers=$_GET["phone_numbers"];}
|
|
elseif (isset($_POST["phone_numbers"])) {$phone_numbers=$_POST["phone_numbers"];}
|
|
if (isset($_GET["vdc_header_date_format"])) {$vdc_header_date_format=$_GET["vdc_header_date_format"];}
|
|
elseif (isset($_POST["vdc_header_date_format"])) {$vdc_header_date_format=$_POST["vdc_header_date_format"];}
|
|
if (isset($_GET["vdc_customer_date_format"])) {$vdc_customer_date_format=$_GET["vdc_customer_date_format"];}
|
|
elseif (isset($_POST["vdc_customer_date_format"])) {$vdc_customer_date_format=$_POST["vdc_customer_date_format"];}
|
|
if (isset($_GET["vdc_header_phone_format"])) {$vdc_header_phone_format=$_GET["vdc_header_phone_format"];}
|
|
elseif (isset($_POST["vdc_header_phone_format"])) {$vdc_header_phone_format=$_POST["vdc_header_phone_format"];}
|
|
if (isset($_GET["disable_alter_custphone"])) {$disable_alter_custphone=$_GET["disable_alter_custphone"];}
|
|
elseif (isset($_POST["disable_alter_custphone"])) {$disable_alter_custphone=$_POST["disable_alter_custphone"];}
|
|
if (isset($_GET["alter_custphone_override"])) {$alter_custphone_override=$_GET["alter_custphone_override"];}
|
|
elseif (isset($_POST["alter_custphone_override"])) {$alter_custphone_override=$_POST["alter_custphone_override"];}
|
|
if (isset($_GET["vdc_agent_api_access"])) {$vdc_agent_api_access=$_GET["vdc_agent_api_access"];}
|
|
elseif (isset($_POST["vdc_agent_api_access"])) {$vdc_agent_api_access=$_POST["vdc_agent_api_access"];}
|
|
if (isset($_GET["vdc_agent_api_active"])) {$vdc_agent_api_active=$_GET["vdc_agent_api_active"];}
|
|
elseif (isset($_POST["vdc_agent_api_active"])) {$vdc_agent_api_active=$_POST["vdc_agent_api_active"];}
|
|
if (isset($_GET["display_queue_count"])) {$display_queue_count=$_GET["display_queue_count"];}
|
|
elseif (isset($_POST["display_queue_count"])) {$display_queue_count=$_POST["display_queue_count"];}
|
|
if (isset($_GET["sale_category"])) {$sale_category=$_GET["sale_category"];}
|
|
elseif (isset($_POST["sale_category"])) {$sale_category=$_POST["sale_category"];}
|
|
if (isset($_GET["dead_lead_category"])) {$dead_lead_category=$_GET["dead_lead_category"];}
|
|
elseif (isset($_POST["dead_lead_category"])) {$dead_lead_category=$_POST["dead_lead_category"];}
|
|
if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];}
|
|
elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];}
|
|
if (isset($_GET["agent_clipboard_copy"])) {$agent_clipboard_copy=$_GET["agent_clipboard_copy"];}
|
|
elseif (isset($_POST["agent_clipboard_copy"])) {$agent_clipboard_copy=$_POST["agent_clipboard_copy"];}
|
|
if (isset($_GET["agent_extended_alt_dial"])) {$agent_extended_alt_dial=$_GET["agent_extended_alt_dial"];}
|
|
elseif (isset($_POST["agent_extended_alt_dial"])) {$agent_extended_alt_dial=$_POST["agent_extended_alt_dial"];}
|
|
if (isset($_GET["play_place_in_line"])) {$play_place_in_line=$_GET["play_place_in_line"];}
|
|
elseif (isset($_POST["play_place_in_line"])) {$play_place_in_line=$_POST["play_place_in_line"];}
|
|
if (isset($_GET["play_estimate_hold_time"])) {$play_estimate_hold_time=$_GET["play_estimate_hold_time"];}
|
|
elseif (isset($_POST["play_estimate_hold_time"])) {$play_estimate_hold_time=$_POST["play_estimate_hold_time"];}
|
|
if (isset($_GET["hold_time_option"])) {$hold_time_option=$_GET["hold_time_option"];}
|
|
elseif (isset($_POST["hold_time_option"])) {$hold_time_option=$_POST["hold_time_option"];}
|
|
if (isset($_GET["hold_time_option_seconds"])) {$hold_time_option_seconds=$_GET["hold_time_option_seconds"];}
|
|
elseif (isset($_POST["hold_time_option_seconds"])) {$hold_time_option_seconds=$_POST["hold_time_option_seconds"];}
|
|
if (isset($_GET["hold_time_option_exten"])) {$hold_time_option_exten=$_GET["hold_time_option_exten"];}
|
|
elseif (isset($_POST["hold_time_option_exten"])) {$hold_time_option_exten=$_POST["hold_time_option_exten"];}
|
|
if (isset($_GET["hold_time_option_voicemail"])) {$hold_time_option_voicemail=$_GET["hold_time_option_voicemail"];}
|
|
elseif (isset($_POST["hold_time_option_voicemail"])) {$hold_time_option_voicemail=$_POST["hold_time_option_voicemail"];}
|
|
if (isset($_GET["hold_time_option_xfer_group"])) {$hold_time_option_xfer_group=$_GET["hold_time_option_xfer_group"];}
|
|
elseif (isset($_POST["hold_time_option_xfer_group"])) {$hold_time_option_xfer_group=$_POST["hold_time_option_xfer_group"];}
|
|
if (isset($_GET["hold_time_option_callback_filename"])) {$hold_time_option_callback_filename=$_GET["hold_time_option_callback_filename"];}
|
|
elseif (isset($_POST["hold_time_option_callback_filename"])) {$hold_time_option_callback_filename=$_POST["hold_time_option_callback_filename"];}
|
|
if (isset($_GET["hold_time_option_callback_list_id"])) {$hold_time_option_callback_list_id=$_GET["hold_time_option_callback_list_id"];}
|
|
elseif (isset($_POST["hold_time_option_callback_list_id"])) {$hold_time_option_callback_list_id=$_POST["hold_time_option_callback_list_id"];}
|
|
if (isset($_GET["hold_recall_xfer_group"])) {$hold_recall_xfer_group=$_GET["hold_recall_xfer_group"];}
|
|
elseif (isset($_POST["hold_recall_xfer_group"])) {$hold_recall_xfer_group=$_POST["hold_recall_xfer_group"];}
|
|
if (isset($_GET["no_delay_call_route"])) {$no_delay_call_route=$_GET["no_delay_call_route"];}
|
|
elseif (isset($_POST["no_delay_call_route"])) {$no_delay_call_route=$_POST["no_delay_call_route"];}
|
|
if (isset($_GET["play_welcome_message"])) {$play_welcome_message=$_GET["play_welcome_message"];}
|
|
elseif (isset($_POST["play_welcome_message"])) {$play_welcome_message=$_POST["play_welcome_message"];}
|
|
if (isset($_GET["did_id"])) {$did_id=$_GET["did_id"];}
|
|
elseif (isset($_POST["did_id"])) {$did_id=$_POST["did_id"];}
|
|
if (isset($_GET["source_did"])) {$source_did=$_GET["source_did"];}
|
|
elseif (isset($_POST["source_did"])) {$source_did=$_POST["source_did"];}
|
|
if (isset($_GET["did_pattern"])) {$did_pattern=$_GET["did_pattern"];}
|
|
elseif (isset($_POST["did_pattern"])) {$did_pattern=$_POST["did_pattern"];}
|
|
if (isset($_GET["did_description"])) {$did_description=$_GET["did_description"];}
|
|
elseif (isset($_POST["did_description"])) {$did_description=$_POST["did_description"];}
|
|
if (isset($_GET["did_active"])) {$did_active=$_GET["did_active"];}
|
|
elseif (isset($_POST["did_active"])) {$did_active=$_POST["did_active"];}
|
|
if (isset($_GET["did_route"])) {$did_route=$_GET["did_route"];}
|
|
elseif (isset($_POST["did_route"])) {$did_route=$_POST["did_route"];}
|
|
if (isset($_GET["exten_context"])) {$exten_context=$_GET["exten_context"];}
|
|
elseif (isset($_POST["exten_context"])) {$exten_context=$_POST["exten_context"];}
|
|
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
|
|
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
|
|
if (isset($_GET["user_unavailable_action"])) {$user_unavailable_action=$_GET["user_unavailable_action"];}
|
|
elseif (isset($_POST["user_unavailable_action"])) {$user_unavailable_action=$_POST["user_unavailable_action"];}
|
|
if (isset($_GET["user_route_settings_ingroup"])) {$user_route_settings_ingroup=$_GET["user_route_settings_ingroup"];}
|
|
elseif (isset($_POST["user_route_settings_ingroup"])) {$user_route_settings_ingroup=$_POST["user_route_settings_ingroup"];}
|
|
if (isset($_GET["call_handle_method"])) {$call_handle_method=$_GET["call_handle_method"];}
|
|
elseif (isset($_POST["call_handle_method"])) {$call_handle_method=$_POST["call_handle_method"];}
|
|
if (isset($_GET["agent_search_method"])) {$agent_search_method=$_GET["agent_search_method"];}
|
|
elseif (isset($_POST["agent_search_method"])) {$agent_search_method=$_POST["agent_search_method"];}
|
|
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
|
|
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
|
|
if (isset($_GET["email"])) {$email=$_GET["email"];}
|
|
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
|
|
if (isset($_GET["modify_inbound_dids"])) {$modify_inbound_dids=$_GET["modify_inbound_dids"];}
|
|
elseif (isset($_POST["modify_inbound_dids"])) {$modify_inbound_dids=$_POST["modify_inbound_dids"];}
|
|
if (isset($_GET["delete_inbound_dids"])) {$delete_inbound_dids=$_GET["delete_inbound_dids"];}
|
|
elseif (isset($_POST["delete_inbound_dids"])) {$delete_inbound_dids=$_POST["delete_inbound_dids"];}
|
|
if (isset($_GET["three_way_call_cid"])) {$three_way_call_cid=$_GET["three_way_call_cid"];}
|
|
elseif (isset($_POST["three_way_call_cid"])) {$three_way_call_cid=$_POST["three_way_call_cid"];}
|
|
if (isset($_GET["three_way_dial_prefix"])) {$three_way_dial_prefix=$_GET["three_way_dial_prefix"];}
|
|
elseif (isset($_POST["three_way_dial_prefix"])) {$three_way_dial_prefix=$_POST["three_way_dial_prefix"];}
|
|
if (isset($_GET["forced_timeclock_login"])) {$forced_timeclock_login=$_GET["forced_timeclock_login"];}
|
|
elseif (isset($_POST["forced_timeclock_login"])) {$forced_timeclock_login=$_POST["forced_timeclock_login"];}
|
|
if (isset($_GET["answer_sec_pct_rt_stat_one"])) {$answer_sec_pct_rt_stat_one=$_GET["answer_sec_pct_rt_stat_one"];}
|
|
elseif (isset($_POST["answer_sec_pct_rt_stat_one"])) {$answer_sec_pct_rt_stat_one=$_POST["answer_sec_pct_rt_stat_one"];}
|
|
if (isset($_GET["answer_sec_pct_rt_stat_two"])) {$answer_sec_pct_rt_stat_two=$_GET["answer_sec_pct_rt_stat_two"];}
|
|
elseif (isset($_POST["answer_sec_pct_rt_stat_two"])) {$answer_sec_pct_rt_stat_two=$_POST["answer_sec_pct_rt_stat_two"];}
|
|
if (isset($_GET["list_active_change"])) {$list_active_change=$_GET["list_active_change"];}
|
|
elseif (isset($_POST["list_active_change"])) {$list_active_change=$_POST["list_active_change"];}
|
|
if (isset($_GET["web_form_target"])) {$web_form_target=$_GET["web_form_target"];}
|
|
elseif (isset($_POST["web_form_target"])) {$web_form_target=$_POST["web_form_target"];}
|
|
if (isset($_GET["alt_server_ip"])) {$alt_server_ip=$_GET["alt_server_ip"];}
|
|
elseif (isset($_POST["alt_server_ip"])) {$alt_server_ip=$_POST["alt_server_ip"];}
|
|
if (isset($_GET["recording_web_link"])) {$recording_web_link=$_GET["recording_web_link"];}
|
|
elseif (isset($_POST["recording_web_link"])) {$recording_web_link=$_POST["recording_web_link"];}
|
|
if (isset($_GET["enable_vtiger_integration"])) {$enable_vtiger_integration=$_GET["enable_vtiger_integration"];}
|
|
elseif (isset($_POST["enable_vtiger_integration"])) {$enable_vtiger_integration=$_POST["enable_vtiger_integration"];}
|
|
if (isset($_GET["vtiger_server_ip"])) {$vtiger_server_ip=$_GET["vtiger_server_ip"];}
|
|
elseif (isset($_POST["vtiger_server_ip"])) {$vtiger_server_ip=$_POST["vtiger_server_ip"];}
|
|
if (isset($_GET["vtiger_dbname"])) {$vtiger_dbname=$_GET["vtiger_dbname"];}
|
|
elseif (isset($_POST["vtiger_dbname"])) {$vtiger_dbname=$_POST["vtiger_dbname"];}
|
|
if (isset($_GET["vtiger_login"])) {$vtiger_login=$_GET["vtiger_login"];}
|
|
elseif (isset($_POST["vtiger_login"])) {$vtiger_login=$_POST["vtiger_login"];}
|
|
if (isset($_GET["vtiger_pass"])) {$vtiger_pass=$_GET["vtiger_pass"];}
|
|
elseif (isset($_POST["vtiger_pass"])) {$vtiger_pass=$_POST["vtiger_pass"];}
|
|
if (isset($_GET["vtiger_url"])) {$vtiger_url=$_GET["vtiger_url"];}
|
|
elseif (isset($_POST["vtiger_url"])) {$vtiger_url=$_POST["vtiger_url"];}
|
|
if (isset($_GET["vtiger_search_category"])) {$vtiger_search_category=$_GET["vtiger_search_category"];}
|
|
elseif (isset($_POST["vtiger_search_category"])) {$vtiger_search_category=$_POST["vtiger_search_category"];}
|
|
if (isset($_GET["vtiger_create_call_record"])) {$vtiger_create_call_record=$_GET["vtiger_create_call_record"];}
|
|
elseif (isset($_POST["vtiger_create_call_record"])) {$vtiger_create_call_record=$_POST["vtiger_create_call_record"];}
|
|
if (isset($_GET["vtiger_create_lead_record"])) {$vtiger_create_lead_record=$_GET["vtiger_create_lead_record"];}
|
|
elseif (isset($_POST["vtiger_create_lead_record"])) {$vtiger_create_lead_record=$_POST["vtiger_create_lead_record"];}
|
|
if (isset($_GET["vtiger_screen_login"])) {$vtiger_screen_login=$_GET["vtiger_screen_login"];}
|
|
elseif (isset($_POST["vtiger_screen_login"])) {$vtiger_screen_login=$_POST["vtiger_screen_login"];}
|
|
if (isset($_GET["qc_features_active"])) {$qc_features_active=$_GET["qc_features_active"];}
|
|
elseif (isset($_POST["qc_features_active"])) {$qc_features_active=$_POST["qc_features_active"];}
|
|
if (isset($_GET["outbound_autodial_active"])) {$outbound_autodial_active=$_GET["outbound_autodial_active"];}
|
|
elseif (isset($_POST["outbound_autodial_active"])) {$outbound_autodial_active=$_POST["outbound_autodial_active"];}
|
|
if (isset($_GET["cpd_amd_action"])) {$cpd_amd_action=$_GET["cpd_amd_action"];}
|
|
elseif (isset($_POST["cpd_amd_action"])) {$cpd_amd_action=$_POST["cpd_amd_action"];}
|
|
if (isset($_GET["download_lists"])) {$download_lists=$_GET["download_lists"];}
|
|
elseif (isset($_POST["download_lists"])) {$download_lists=$_POST["download_lists"];}
|
|
if (isset($_GET["active_asterisk_server"])) {$active_asterisk_server=$_GET["active_asterisk_server"];}
|
|
elseif (isset($_POST["active_asterisk_server"])) {$active_asterisk_server=$_POST["active_asterisk_server"];}
|
|
if (isset($_GET["generate_vicidial_conf"])) {$generate_vicidial_conf=$_GET["generate_vicidial_conf"];}
|
|
elseif (isset($_POST["generate_vicidial_conf"])) {$generate_vicidial_conf=$_POST["generate_vicidial_conf"];}
|
|
if (isset($_GET["rebuild_conf_files"])) {$rebuild_conf_files=$_GET["rebuild_conf_files"];}
|
|
elseif (isset($_POST["rebuild_conf_files"])) {$rebuild_conf_files=$_POST["rebuild_conf_files"];}
|
|
if (isset($_GET["template_id"])) {$template_id=$_GET["template_id"];}
|
|
elseif (isset($_POST["template_id"])) {$template_id=$_POST["template_id"];}
|
|
if (isset($_GET["conf_override"])) {$conf_override=$_GET["conf_override"];}
|
|
elseif (isset($_POST["conf_override"])) {$conf_override=$_POST["conf_override"];}
|
|
if (isset($_GET["template_name"])) {$template_name=$_GET["template_name"];}
|
|
elseif (isset($_POST["template_name"])) {$template_name=$_POST["template_name"];}
|
|
if (isset($_GET["template_contents"])) {$template_contents=$_GET["template_contents"];}
|
|
elseif (isset($_POST["template_contents"])) {$template_contents=$_POST["template_contents"];}
|
|
if (isset($_GET["carrier_id"])) {$carrier_id=$_GET["carrier_id"];}
|
|
elseif (isset($_POST["carrier_id"])) {$carrier_id=$_POST["carrier_id"];}
|
|
if (isset($_GET["carrier_name"])) {$carrier_name=$_GET["carrier_name"];}
|
|
elseif (isset($_POST["carrier_name"])) {$carrier_name=$_POST["carrier_name"];}
|
|
if (isset($_GET["registration_string"])) {$registration_string=$_GET["registration_string"];}
|
|
elseif (isset($_POST["registration_string"])) {$registration_string=$_POST["registration_string"];}
|
|
if (isset($_GET["account_entry"])) {$account_entry=$_GET["account_entry"];}
|
|
elseif (isset($_POST["account_entry"])) {$account_entry=$_POST["account_entry"];}
|
|
if (isset($_GET["globals_string"])) {$globals_string=$_GET["globals_string"];}
|
|
elseif (isset($_POST["globals_string"])) {$globals_string=$_POST["globals_string"];}
|
|
if (isset($_GET["dialplan_entry"])) {$dialplan_entry=$_GET["dialplan_entry"];}
|
|
elseif (isset($_POST["dialplan_entry"])) {$dialplan_entry=$_POST["dialplan_entry"];}
|
|
if (isset($_GET["group_alias_id"])) {$group_alias_id=$_GET["group_alias_id"];}
|
|
elseif (isset($_POST["group_alias_id"])) {$group_alias_id=$_POST["group_alias_id"];}
|
|
if (isset($_GET["group_alias_name"])) {$group_alias_name=$_GET["group_alias_name"];}
|
|
elseif (isset($_POST["group_alias_name"])) {$group_alias_name=$_POST["group_alias_name"];}
|
|
if (isset($_GET["caller_id_number"])) {$caller_id_number=$_GET["caller_id_number"];}
|
|
elseif (isset($_POST["caller_id_number"])) {$caller_id_number=$_POST["caller_id_number"];}
|
|
if (isset($_GET["caller_id_name"])) {$caller_id_name=$_GET["caller_id_name"];}
|
|
elseif (isset($_POST["caller_id_name"])) {$caller_id_name=$_POST["caller_id_name"];}
|
|
if (isset($_GET["agent_allow_group_alias"])) {$agent_allow_group_alias=$_GET["agent_allow_group_alias"];}
|
|
elseif (isset($_POST["agent_allow_group_alias"])) {$agent_allow_group_alias=$_POST["agent_allow_group_alias"];}
|
|
if (isset($_GET["default_group_alias"])) {$default_group_alias=$_GET["default_group_alias"];}
|
|
elseif (isset($_POST["default_group_alias"])) {$default_group_alias=$_POST["default_group_alias"];}
|
|
if (isset($_GET["outbound_calls_per_second"])) {$outbound_calls_per_second=$_GET["outbound_calls_per_second"];}
|
|
elseif (isset($_POST["outbound_calls_per_second"])) {$outbound_calls_per_second=$_POST["outbound_calls_per_second"];}
|
|
if (isset($_GET["shift_enforcement"])) {$shift_enforcement=$_GET["shift_enforcement"];}
|
|
elseif (isset($_POST["shift_enforcement"])) {$shift_enforcement=$_POST["shift_enforcement"];}
|
|
if (isset($_GET["agent_shift_enforcement_override"])) {$agent_shift_enforcement_override=$_GET["agent_shift_enforcement_override"];}
|
|
elseif (isset($_POST["agent_shift_enforcement_override"])) {$agent_shift_enforcement_override=$_POST["agent_shift_enforcement_override"];}
|
|
if (isset($_GET["manager_shift_enforcement_override"])) {$manager_shift_enforcement_override=$_GET["manager_shift_enforcement_override"];}
|
|
elseif (isset($_POST["manager_shift_enforcement_override"])) {$manager_shift_enforcement_override=$_POST["manager_shift_enforcement_override"];}
|
|
if (isset($_GET["export_reports"])) {$export_reports=$_GET["export_reports"];}
|
|
elseif (isset($_POST["export_reports"])) {$export_reports=$_POST["export_reports"];}
|
|
if (isset($_GET["delete_from_dnc"])) {$delete_from_dnc=$_GET["delete_from_dnc"];}
|
|
elseif (isset($_POST["delete_from_dnc"])) {$delete_from_dnc=$_POST["delete_from_dnc"];}
|
|
if (isset($_GET["vtiger_search_dead"])) {$vtiger_search_dead=$_GET["vtiger_search_dead"];}
|
|
elseif (isset($_POST["vtiger_search_dead"])) {$vtiger_search_dead=$_POST["vtiger_search_dead"];}
|
|
if (isset($_GET["vtiger_status_call"])) {$vtiger_status_call=$_GET["vtiger_status_call"];}
|
|
elseif (isset($_POST["vtiger_status_call"])) {$vtiger_status_call=$_POST["vtiger_status_call"];}
|
|
if (isset($_GET["sale"])) {$sale=$_GET["sale"];}
|
|
elseif (isset($_POST["sale"])) {$sale=$_POST["sale"];}
|
|
if (isset($_GET["dnc"])) {$dnc=$_GET["dnc"];}
|
|
elseif (isset($_POST["dnc"])) {$dnc=$_POST["dnc"];}
|
|
if (isset($_GET["customer_contact"])) {$customer_contact=$_GET["customer_contact"];}
|
|
elseif (isset($_POST["customer_contact"])) {$customer_contact=$_POST["customer_contact"];}
|
|
if (isset($_GET["not_interested"])) {$not_interested=$_GET["not_interested"];}
|
|
elseif (isset($_POST["not_interested"])) {$not_interested=$_POST["not_interested"];}
|
|
if (isset($_GET["unworkable"])) {$unworkable=$_GET["unworkable"];}
|
|
elseif (isset($_POST["unworkable"])) {$unworkable=$_POST["unworkable"];}
|
|
if (isset($_GET["user_code"])) {$user_code=$_GET["user_code"];}
|
|
elseif (isset($_POST["user_code"])) {$user_code=$_POST["user_code"];}
|
|
if (isset($_GET["territory"])) {$territory=$_GET["territory"];}
|
|
elseif (isset($_POST["territory"])) {$territory=$_POST["territory"];}
|
|
if (isset($_GET["survey_third_digit"])) {$survey_third_digit=$_GET["survey_third_digit"];}
|
|
elseif (isset($_POST["survey_third_digit"])) {$survey_third_digit=$_POST["survey_third_digit"];}
|
|
if (isset($_GET["survey_fourth_digit"])) {$survey_fourth_digit=$_GET["survey_fourth_digit"];}
|
|
elseif (isset($_POST["survey_fourth_digit"])) {$survey_fourth_digit=$_POST["survey_fourth_digit"];}
|
|
if (isset($_GET["survey_third_audio_file"])) {$survey_third_audio_file=$_GET["survey_third_audio_file"];}
|
|
elseif (isset($_POST["survey_third_audio_file"])) {$survey_third_audio_file=$_POST["survey_third_audio_file"];}
|
|
if (isset($_GET["survey_fourth_audio_file"])) {$survey_fourth_audio_file=$_GET["survey_fourth_audio_file"];}
|
|
elseif (isset($_POST["survey_fourth_audio_file"])) {$survey_fourth_audio_file=$_POST["survey_fourth_audio_file"];}
|
|
if (isset($_GET["survey_third_status"])) {$survey_third_status=$_GET["survey_third_status"];}
|
|
elseif (isset($_POST["survey_third_status"])) {$survey_third_status=$_POST["survey_third_status"];}
|
|
if (isset($_GET["survey_fourth_status"])) {$survey_fourth_status=$_GET["survey_fourth_status"];}
|
|
elseif (isset($_POST["survey_fourth_status"])) {$survey_fourth_status=$_POST["survey_fourth_status"];}
|
|
if (isset($_GET["survey_third_exten"])) {$survey_third_exten=$_GET["survey_third_exten"];}
|
|
elseif (isset($_POST["survey_third_exten"])) {$survey_third_exten=$_POST["survey_third_exten"];}
|
|
if (isset($_GET["survey_fourth_exten"])) {$survey_fourth_exten=$_GET["survey_fourth_exten"];}
|
|
elseif (isset($_POST["survey_fourth_exten"])) {$survey_fourth_exten=$_POST["survey_fourth_exten"];}
|
|
if (isset($_GET["menu_id"])) {$menu_id=$_GET["menu_id"];}
|
|
elseif (isset($_POST["menu_id"])) {$menu_id=$_POST["menu_id"];}
|
|
if (isset($_GET["menu_name"])) {$menu_name=$_GET["menu_name"];}
|
|
elseif (isset($_POST["menu_name"])) {$menu_name=$_POST["menu_name"];}
|
|
if (isset($_GET["menu_prompt"])) {$menu_prompt=$_GET["menu_prompt"];}
|
|
elseif (isset($_POST["menu_prompt"])) {$menu_prompt=$_POST["menu_prompt"];}
|
|
if (isset($_GET["menu_timeout"])) {$menu_timeout=$_GET["menu_timeout"];}
|
|
elseif (isset($_POST["menu_timeout"])) {$menu_timeout=$_POST["menu_timeout"];}
|
|
if (isset($_GET["menu_timeout_prompt"])) {$menu_timeout_prompt=$_GET["menu_timeout_prompt"];}
|
|
elseif (isset($_POST["menu_timeout_prompt"])) {$menu_timeout_prompt=$_POST["menu_timeout_prompt"];}
|
|
if (isset($_GET["menu_invalid_prompt"])) {$menu_invalid_prompt=$_GET["menu_invalid_prompt"];}
|
|
elseif (isset($_POST["menu_invalid_prompt"])) {$menu_invalid_prompt=$_POST["menu_invalid_prompt"];}
|
|
if (isset($_GET["menu_repeat"])) {$menu_repeat=$_GET["menu_repeat"];}
|
|
elseif (isset($_POST["menu_repeat"])) {$menu_repeat=$_POST["menu_repeat"];}
|
|
if (isset($_GET["menu_time_check"])) {$menu_time_check=$_GET["menu_time_check"];}
|
|
elseif (isset($_POST["menu_time_check"])) {$menu_time_check=$_POST["menu_time_check"];}
|
|
if (isset($_GET["track_in_vdac"])) {$track_in_vdac=$_GET["track_in_vdac"];}
|
|
elseif (isset($_POST["track_in_vdac"])) {$track_in_vdac=$_POST["track_in_vdac"];}
|
|
if (isset($_GET["source_menu"])) {$source_menu=$_GET["source_menu"];}
|
|
elseif (isset($_POST["source_menu"])) {$source_menu=$_POST["source_menu"];}
|
|
if (isset($_GET["agentonly_callback_campaign_lock"])) {$agentonly_callback_campaign_lock=$_GET["agentonly_callback_campaign_lock"];}
|
|
elseif (isset($_POST["agentonly_callback_campaign_lock"])) {$agentonly_callback_campaign_lock=$_POST["agentonly_callback_campaign_lock"];}
|
|
if (isset($_GET["sounds_central_control_active"])) {$sounds_central_control_active=$_GET["sounds_central_control_active"];}
|
|
elseif (isset($_POST["sounds_central_control_active"])) {$sounds_central_control_active=$_POST["sounds_central_control_active"];}
|
|
if (isset($_GET["sounds_web_server"])) {$sounds_web_server=$_GET["sounds_web_server"];}
|
|
elseif (isset($_POST["sounds_web_server"])) {$sounds_web_server=$_POST["sounds_web_server"];}
|
|
if (isset($_GET["sounds_web_directory"])) {$sounds_web_directory=$_GET["sounds_web_directory"];}
|
|
elseif (isset($_POST["sounds_web_directory"])) {$sounds_web_directory=$_POST["sounds_web_directory"];}
|
|
if (isset($_GET["sounds_update"])) {$sounds_update=$_GET["sounds_update"];}
|
|
elseif (isset($_POST["sounds_update"])) {$sounds_update=$_POST["sounds_update"];}
|
|
if (isset($_GET["active_voicemail_server"])) {$active_voicemail_server=$_GET["active_voicemail_server"];}
|
|
elseif (isset($_POST["active_voicemail_server"])) {$active_voicemail_server=$_POST["active_voicemail_server"];}
|
|
if (isset($_GET["auto_dial_limit"])) {$auto_dial_limit=$_GET["auto_dial_limit"];}
|
|
elseif (isset($_POST["auto_dial_limit"])) {$auto_dial_limit=$_POST["auto_dial_limit"];}
|
|
if (isset($_GET["user_territories_active"])) {$user_territories_active=$_GET["user_territories_active"];}
|
|
elseif (isset($_POST["user_territories_active"])) {$user_territories_active=$_POST["user_territories_active"];}
|
|
if (isset($_GET["vicidial_recording_limit"])) {$vicidial_recording_limit=$_GET["vicidial_recording_limit"];}
|
|
elseif (isset($_POST["vicidial_recording_limit"])) {$vicidial_recording_limit=$_POST["vicidial_recording_limit"];}
|
|
if (isset($_GET["phone_context"])) {$phone_context=$_GET["phone_context"];}
|
|
elseif (isset($_POST["phone_context"])) {$phone_context=$_POST["phone_context"];}
|
|
if (isset($_GET["carrier_logging_active"])) {$carrier_logging_active=$_GET["carrier_logging_active"];}
|
|
elseif (isset($_POST["carrier_logging_active"])) {$carrier_logging_active=$_POST["carrier_logging_active"];}
|
|
if (isset($_GET["drop_lockout_time"])) {$drop_lockout_time=$_GET["drop_lockout_time"];}
|
|
elseif (isset($_POST["drop_lockout_time"])) {$drop_lockout_time=$_POST["drop_lockout_time"];}
|
|
if (isset($_GET["allow_custom_dialplan"])) {$allow_custom_dialplan=$_GET["allow_custom_dialplan"];}
|
|
elseif (isset($_POST["allow_custom_dialplan"])) {$allow_custom_dialplan=$_POST["allow_custom_dialplan"];}
|
|
if (isset($_GET["custom_dialplan_entry"])) {$custom_dialplan_entry=$_GET["custom_dialplan_entry"];}
|
|
elseif (isset($_POST["custom_dialplan_entry"])) {$custom_dialplan_entry=$_POST["custom_dialplan_entry"];}
|
|
if (isset($_GET["phone_ring_timeout"])) {$phone_ring_timeout=$_GET["phone_ring_timeout"];}
|
|
elseif (isset($_POST["phone_ring_timeout"])) {$phone_ring_timeout=$_POST["phone_ring_timeout"];}
|
|
if (isset($_GET["conf_secret"])) {$conf_secret=$_GET["conf_secret"];}
|
|
elseif (isset($_POST["conf_secret"])) {$conf_secret=$_POST["conf_secret"];}
|
|
if (isset($_GET["tracking_group"])) {$tracking_group=$_GET["tracking_group"];}
|
|
elseif (isset($_POST["tracking_group"])) {$tracking_group=$_POST["tracking_group"];}
|
|
if (isset($_GET["no_agent_no_queue"])) {$no_agent_no_queue=$_GET["no_agent_no_queue"];}
|
|
elseif (isset($_POST["no_agent_no_queue"])) {$no_agent_no_queue=$_POST["no_agent_no_queue"];}
|
|
if (isset($_GET["no_agent_action"])) {$no_agent_action=$_GET["no_agent_action"];}
|
|
elseif (isset($_POST["no_agent_action"])) {$no_agent_action=$_POST["no_agent_action"];}
|
|
if (isset($_GET["no_agent_action_value"])) {$no_agent_action_value=$_GET["no_agent_action_value"];}
|
|
elseif (isset($_POST["no_agent_action_value"])) {$no_agent_action_value=$_POST["no_agent_action_value"];}
|
|
if (isset($_GET["quick_transfer_button"])) {$quick_transfer_button=$_GET["quick_transfer_button"];}
|
|
elseif (isset($_POST["quick_transfer_button"])) {$quick_transfer_button=$_POST["quick_transfer_button"];}
|
|
if (isset($_GET["prepopulate_transfer_preset"])) {$prepopulate_transfer_preset=$_GET["prepopulate_transfer_preset"];}
|
|
elseif (isset($_POST["prepopulate_transfer_preset"])) {$prepopulate_transfer_preset=$_POST["prepopulate_transfer_preset"];}
|
|
if (isset($_GET["enable_tts_integration"])) {$enable_tts_integration=$_GET["enable_tts_integration"];}
|
|
elseif (isset($_POST["enable_tts_integration"])) {$enable_tts_integration=$_POST["enable_tts_integration"];}
|
|
if (isset($_GET["tts_id"])) {$tts_id=$_GET["tts_id"];}
|
|
elseif (isset($_POST["tts_id"])) {$tts_id=$_POST["tts_id"];}
|
|
if (isset($_GET["tts_name"])) {$tts_name=$_GET["tts_name"];}
|
|
elseif (isset($_POST["tts_name"])) {$tts_name=$_POST["tts_name"];}
|
|
if (isset($_GET["tts_text"])) {$tts_text=$_GET["tts_text"];}
|
|
elseif (isset($_POST["tts_text"])) {$tts_text=$_POST["tts_text"];}
|
|
if (isset($_GET["drop_rate_group"])) {$drop_rate_group=$_GET["drop_rate_group"];}
|
|
elseif (isset($_POST["drop_rate_group"])) {$drop_rate_group=$_POST["drop_rate_group"];}
|
|
if (isset($_GET["agent_status_viewable_groups"])) {$agent_status_viewable_groups=$_GET["agent_status_viewable_groups"];}
|
|
elseif (isset($_POST["agent_status_viewable_groups"])) {$agent_status_viewable_groups=$_POST["agent_status_viewable_groups"];}
|
|
if (isset($_GET["agent_status_view_time"])) {$agent_status_view_time=$_GET["agent_status_view_time"];}
|
|
elseif (isset($_POST["agent_status_view_time"])) {$agent_status_view_time=$_POST["agent_status_view_time"];}
|
|
if (isset($_GET["view_calls_in_queue"])) {$view_calls_in_queue=$_GET["view_calls_in_queue"];}
|
|
elseif (isset($_POST["view_calls_in_queue"])) {$view_calls_in_queue=$_POST["view_calls_in_queue"];}
|
|
if (isset($_GET["view_calls_in_queue_launch"])) {$view_calls_in_queue_launch=$_GET["view_calls_in_queue_launch"];}
|
|
elseif (isset($_POST["view_calls_in_queue_launch"])) {$view_calls_in_queue_launch=$_POST["view_calls_in_queue_launch"];}
|
|
if (isset($_GET["grab_calls_in_queue"])) {$grab_calls_in_queue=$_GET["grab_calls_in_queue"];}
|
|
elseif (isset($_POST["grab_calls_in_queue"])) {$grab_calls_in_queue=$_POST["grab_calls_in_queue"];}
|
|
if (isset($_GET["call_requeue_button"])) {$call_requeue_button=$_GET["call_requeue_button"];}
|
|
elseif (isset($_POST["call_requeue_button"])) {$call_requeue_button=$_POST["call_requeue_button"];}
|
|
if (isset($_GET["pause_after_each_call"])) {$pause_after_each_call=$_GET["pause_after_each_call"];}
|
|
elseif (isset($_POST["pause_after_each_call"])) {$pause_after_each_call=$_POST["pause_after_each_call"];}
|
|
if (isset($_GET["no_hopper_dialing"])) {$no_hopper_dialing=$_GET["no_hopper_dialing"];}
|
|
elseif (isset($_POST["no_hopper_dialing"])) {$no_hopper_dialing=$_POST["no_hopper_dialing"];}
|
|
if (isset($_GET["agent_dial_owner_only"])) {$agent_dial_owner_only=$_GET["agent_dial_owner_only"];}
|
|
elseif (isset($_POST["agent_dial_owner_only"])) {$agent_dial_owner_only=$_POST["agent_dial_owner_only"];}
|
|
if (isset($_GET["reset_time"])) {$reset_time=$_GET["reset_time"];}
|
|
elseif (isset($_POST["reset_time"])) {$reset_time=$_POST["reset_time"];}
|
|
if (isset($_GET["allow_alerts"])) {$allow_alerts=$_GET["allow_alerts"];}
|
|
elseif (isset($_POST["allow_alerts"])) {$allow_alerts=$_POST["allow_alerts"];}
|
|
if (isset($_GET["agent_display_dialable_leads"])) {$agent_display_dialable_leads=$_GET["agent_display_dialable_leads"];}
|
|
elseif (isset($_POST["agent_display_dialable_leads"])) {$agent_display_dialable_leads=$_POST["agent_display_dialable_leads"];}
|
|
if (isset($_GET["vicidial_balance_rank"])) {$vicidial_balance_rank=$_GET["vicidial_balance_rank"];}
|
|
elseif (isset($_POST["vicidial_balance_rank"])) {$vicidial_balance_rank=$_POST["vicidial_balance_rank"];}
|
|
if (isset($_GET["agent_script_override"])) {$agent_script_override=$_GET["agent_script_override"];}
|
|
elseif (isset($_POST["agent_script_override"])) {$agent_script_override=$_POST["agent_script_override"];}
|
|
if (isset($_GET["moh_id"])) {$moh_id=$_GET["moh_id"];}
|
|
elseif (isset($_POST["moh_id"])) {$moh_id=$_POST["moh_id"];}
|
|
if (isset($_GET["moh_name"])) {$moh_name=$_GET["moh_name"];}
|
|
elseif (isset($_POST["moh_name"])) {$moh_name=$_POST["moh_name"];}
|
|
if (isset($_GET["random"])) {$random=$_GET["random"];}
|
|
elseif (isset($_POST["random"])) {$random=$_POST["random"];}
|
|
if (isset($_GET["filename"])) {$filename=$_GET["filename"];}
|
|
elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];}
|
|
if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
|
|
elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
|
|
if (isset($_GET["rebuild_music_on_hold"])) {$rebuild_music_on_hold=$_GET["rebuild_music_on_hold"];}
|
|
elseif (isset($_POST["rebuild_music_on_hold"])) {$rebuild_music_on_hold=$_POST["rebuild_music_on_hold"];}
|
|
if (isset($_GET["active_agent_login_server"])) {$active_agent_login_server=$_GET["active_agent_login_server"];}
|
|
elseif (isset($_POST["active_agent_login_server"])) {$active_agent_login_server=$_POST["active_agent_login_server"];}
|
|
if (isset($_GET["enable_second_webform"])) {$enable_second_webform=$_GET["enable_second_webform"];}
|
|
elseif (isset($_POST["enable_second_webform"])) {$enable_second_webform=$_POST["enable_second_webform"];}
|
|
if (isset($_GET["web_form_address_two"])) {$web_form_address_two=$_GET["web_form_address_two"];}
|
|
elseif (isset($_POST["web_form_address_two"])) {$web_form_address_two=$_POST["web_form_address_two"];}
|
|
if (isset($_GET["waitforsilence_options"])) {$waitforsilence_options=$_GET["waitforsilence_options"];}
|
|
elseif (isset($_POST["waitforsilence_options"])) {$waitforsilence_options=$_POST["waitforsilence_options"];}
|
|
if (isset($_GET["campaign_cid_override"])) {$campaign_cid_override=$_GET["campaign_cid_override"];}
|
|
elseif (isset($_POST["campaign_cid_override"])) {$campaign_cid_override=$_POST["campaign_cid_override"];}
|
|
if (isset($_GET["am_message_exten_override"])) {$am_message_exten_override=$_GET["am_message_exten_override"];}
|
|
elseif (isset($_POST["am_message_exten_override"])) {$am_message_exten_override=$_POST["am_message_exten_override"];}
|
|
if (isset($_GET["drop_inbound_group_override"])) {$drop_inbound_group_override=$_GET["drop_inbound_group_override"];}
|
|
elseif (isset($_POST["drop_inbound_group_override"])) {$drop_inbound_group_override=$_POST["drop_inbound_group_override"];}
|
|
if (isset($_GET["agent_select_territories"])) {$agent_select_territories=$_GET["agent_select_territories"];}
|
|
elseif (isset($_POST["agent_select_territories"])) {$agent_select_territories=$_POST["agent_select_territories"];}
|
|
if (isset($_GET["agent_choose_territories"])) {$agent_choose_territories=$_GET["agent_choose_territories"];}
|
|
elseif (isset($_POST["agent_choose_territories"])) {$agent_choose_territories=$_POST["agent_choose_territories"];}
|
|
if (isset($_GET["carrier_description"])) {$carrier_description=$_GET["carrier_description"];}
|
|
elseif (isset($_POST["carrier_description"])) {$carrier_description=$_POST["carrier_description"];}
|
|
if (isset($_GET["delete_vm_after_email"])) {$delete_vm_after_email=$_GET["delete_vm_after_email"];}
|
|
elseif (isset($_POST["delete_vm_after_email"])) {$delete_vm_after_email=$_POST["delete_vm_after_email"];}
|
|
if (isset($_GET["custom_one"])) {$custom_one=$_GET["custom_one"];}
|
|
elseif (isset($_POST["custom_one"])) {$custom_one=$_POST["custom_one"];}
|
|
if (isset($_GET["custom_two"])) {$custom_two=$_GET["custom_two"];}
|
|
elseif (isset($_POST["custom_two"])) {$custom_two=$_POST["custom_two"];}
|
|
if (isset($_GET["custom_three"])) {$custom_three=$_GET["custom_three"];}
|
|
elseif (isset($_POST["custom_three"])) {$custom_three=$_POST["custom_three"];}
|
|
if (isset($_GET["custom_four"])) {$custom_four=$_GET["custom_four"];}
|
|
elseif (isset($_POST["custom_four"])) {$custom_four=$_POST["custom_four"];}
|
|
if (isset($_GET["custom_five"])) {$custom_five=$_GET["custom_five"];}
|
|
elseif (isset($_POST["custom_five"])) {$custom_five=$_POST["custom_five"];}
|
|
if (isset($_GET["crm_popup_login"])) {$crm_popup_login=$_GET["crm_popup_login"];}
|
|
elseif (isset($_POST["crm_popup_login"])) {$crm_popup_login=$_POST["crm_popup_login"];}
|
|
if (isset($_GET["crm_login_address"])) {$crm_login_address=$_GET["crm_login_address"];}
|
|
elseif (isset($_POST["crm_login_address"])) {$crm_login_address=$_POST["crm_login_address"];}
|
|
if (isset($_GET["timer_action"])) {$timer_action=$_GET["timer_action"];}
|
|
elseif (isset($_POST["timer_action"])) {$timer_action=$_POST["timer_action"];}
|
|
if (isset($_GET["timer_action_message"])) {$timer_action_message=$_GET["timer_action_message"];}
|
|
elseif (isset($_POST["timer_action_message"])) {$timer_action_message=$_POST["timer_action_message"];}
|
|
if (isset($_GET["timer_action_seconds"])) {$timer_action_seconds=$_GET["timer_action_seconds"];}
|
|
elseif (isset($_POST["timer_action_seconds"])) {$timer_action_seconds=$_POST["timer_action_seconds"];}
|
|
if (isset($_GET["start_call_url"])) {$start_call_url=$_GET["start_call_url"];}
|
|
elseif (isset($_POST["start_call_url"])) {$start_call_url=$_POST["start_call_url"];}
|
|
if (isset($_GET["dispo_call_url"])) {$dispo_call_url=$_GET["dispo_call_url"];}
|
|
elseif (isset($_POST["dispo_call_url"])) {$dispo_call_url=$_POST["dispo_call_url"];}
|
|
if (isset($_GET["xferconf_c_number"])) {$xferconf_c_number=$_GET["xferconf_c_number"];}
|
|
elseif (isset($_POST["xferconf_c_number"])) {$xferconf_c_number=$_POST["xferconf_c_number"];}
|
|
if (isset($_GET["xferconf_d_number"])) {$xferconf_d_number=$_GET["xferconf_d_number"];}
|
|
elseif (isset($_POST["xferconf_d_number"])) {$xferconf_d_number=$_POST["xferconf_d_number"];}
|
|
if (isset($_GET["xferconf_e_number"])) {$xferconf_e_number=$_GET["xferconf_e_number"];}
|
|
elseif (isset($_POST["xferconf_e_number"])) {$xferconf_e_number=$_POST["xferconf_e_number"];}
|
|
|
|
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
|
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
|
|
|
|
if (strlen($dial_status) > 0)
|
|
{
|
|
$ADD='28';
|
|
$status = $dial_status;
|
|
}
|
|
|
|
#############################################
|
|
##### START SYSTEM_SETTINGS LOOKUP #####
|
|
$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$qm_conf_ct = mysql_num_rows($rslt);
|
|
if ($qm_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$non_latin = $row[0];
|
|
$SSenable_queuemetrics_logging = $row[1];
|
|
$SSenable_vtiger_integration = $row[2];
|
|
$SSqc_features_active = $row[3];
|
|
$SSoutbound_autodial_active = $row[4];
|
|
$SSsounds_central_control_active = $row[5];
|
|
$SSenable_second_webform = $row[6];
|
|
$SSuser_territories_active = $row[7];
|
|
}
|
|
##### END SETTINGS LOOKUP #####
|
|
###########################################
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### Form variable filtering for security and data integrity
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
if ($non_latin < 1)
|
|
{
|
|
### DIGITS ONLY ###
|
|
$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
|
|
$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
|
|
$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
|
|
$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled);
|
|
$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled);
|
|
$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups);
|
|
$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual);
|
|
$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks);
|
|
$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled);
|
|
$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay);
|
|
$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options);
|
|
$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent);
|
|
$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access);
|
|
$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones);
|
|
$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay);
|
|
$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum);
|
|
$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number);
|
|
$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits);
|
|
$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled);
|
|
$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled);
|
|
$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail);
|
|
$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten);
|
|
$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten);
|
|
$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign);
|
|
$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended);
|
|
$conf_exten = ereg_replace("[^0-9]","",$conf_exten);
|
|
$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension);
|
|
$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled);
|
|
$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start);
|
|
$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop);
|
|
$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start);
|
|
$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop);
|
|
$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start);
|
|
$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop);
|
|
$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start);
|
|
$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop);
|
|
$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start);
|
|
$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop);
|
|
$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start);
|
|
$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop);
|
|
$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start);
|
|
$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop);
|
|
$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start);
|
|
$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop);
|
|
$DBX_port = ereg_replace("[^0-9]","",$DBX_port);
|
|
$DBY_port = ereg_replace("[^0-9]","",$DBY_port);
|
|
$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks);
|
|
$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times);
|
|
$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns);
|
|
$delete_filters = ereg_replace("[^0-9]","",$delete_filters);
|
|
$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups);
|
|
$delete_lists = ereg_replace("[^0-9]","",$delete_lists);
|
|
$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents);
|
|
$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts);
|
|
$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups);
|
|
$delete_users = ereg_replace("[^0-9]","",$delete_users);
|
|
$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout);
|
|
$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number);
|
|
$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh);
|
|
$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql);
|
|
$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate);
|
|
$hopper_level = ereg_replace("[^0-9]","",$hopper_level);
|
|
$hotkey = ereg_replace("[^0-9]","",$hotkey);
|
|
$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active);
|
|
$list_id = ereg_replace("[^0-9]","",$list_id);
|
|
$load_leads = ereg_replace("[^0-9]","",$load_leads);
|
|
$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks);
|
|
$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times);
|
|
$modify_users = ereg_replace("[^0-9]","",$modify_users);
|
|
$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns);
|
|
$modify_lists = ereg_replace("[^0-9]","",$modify_lists);
|
|
$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts);
|
|
$modify_filters = ereg_replace("[^0-9]","",$modify_filters);
|
|
$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups);
|
|
$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups);
|
|
$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents);
|
|
$modify_servers = ereg_replace("[^0-9]","",$modify_servers);
|
|
$view_reports = ereg_replace("[^0-9]","",$view_reports);
|
|
$modify_leads = ereg_replace("[^0-9]","",$modify_leads);
|
|
$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix);
|
|
$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines);
|
|
$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten);
|
|
$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid);
|
|
$park_ext = ereg_replace("[^0-9]","",$park_ext);
|
|
$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension);
|
|
$phone_number = ereg_replace("[^0-9]","",$phone_number);
|
|
$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled);
|
|
$recording_exten = ereg_replace("[^0-9]","",$recording_exten);
|
|
$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id);
|
|
$telnet_port = ereg_replace("[^0-9]","",$telnet_port);
|
|
$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled);
|
|
$user_level = ereg_replace("[^0-9]","",$user_level);
|
|
$user_start = ereg_replace("[^0-9]","",$user_start);
|
|
$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled);
|
|
$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call);
|
|
$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension);
|
|
$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording);
|
|
$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers);
|
|
$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled);
|
|
$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten);
|
|
$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext);
|
|
$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten);
|
|
$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds);
|
|
$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin);
|
|
$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable);
|
|
$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging);
|
|
$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages);
|
|
$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages);
|
|
$mix_container_item = ereg_replace("[^0-9]","",$mix_container_item);
|
|
$prompt_interval = ereg_replace("[^0-9]","",$prompt_interval);
|
|
$agent_alert_delay = ereg_replace("[^0-9]","",$agent_alert_delay);
|
|
$manual_dial_list_id = ereg_replace("[^0-9]","",$manual_dial_list_id);
|
|
$qc_user_level = ereg_replace("[^0-9]","",$qc_user_level);
|
|
$qc_pass = ereg_replace("[^0-9]","",$qc_pass);
|
|
$qc_finish = ereg_replace("[^0-9]","",$qc_finish);
|
|
$qc_commit = ereg_replace("[^0-9]","",$qc_commit);
|
|
$shift_start_time = ereg_replace("[^0-9]","",$shift_start_time);
|
|
$timeclock_end_of_day = ereg_replace("[^0-9]","",$timeclock_end_of_day);
|
|
$survey_xfer_exten = ereg_replace("[^0-9]","",$survey_xfer_exten);
|
|
$add_timeclock_log = ereg_replace("[^0-9]","",$add_timeclock_log);
|
|
$modify_timeclock_log = ereg_replace("[^0-9]","",$modify_timeclock_log);
|
|
$delete_timeclock_log = ereg_replace("[^0-9]","",$delete_timeclock_log);
|
|
$vdc_agent_api_access = ereg_replace("[^0-9]","",$vdc_agent_api_access);
|
|
$vdc_agent_api_active = ereg_replace("[^0-9]","",$vdc_agent_api_active);
|
|
$hold_time_option_seconds = ereg_replace("[^0-9]","",$hold_time_option_seconds);
|
|
$hold_time_option_callback_list_id = ereg_replace("[^0-9]","",$hold_time_option_callback_list_id);
|
|
$did_id = ereg_replace("[^0-9]","",$did_id);
|
|
$source_did = ereg_replace("[^0-9]","",$source_did);
|
|
$modify_inbound_dids = ereg_replace("[^0-9]","",$modify_inbound_dids);
|
|
$delete_inbound_dids = ereg_replace("[^0-9]","",$delete_inbound_dids);
|
|
$answer_sec_pct_rt_stat_one = ereg_replace("[^0-9]","",$answer_sec_pct_rt_stat_one);
|
|
$answer_sec_pct_rt_stat_two = ereg_replace("[^0-9]","",$answer_sec_pct_rt_stat_two);
|
|
$enable_vtiger_integration = ereg_replace("[^0-9]","",$enable_vtiger_integration);
|
|
$qc_features_active = ereg_replace("[^0-9]","",$qc_features_active);
|
|
$outbound_autodial_active = ereg_replace("[^0-9]","",$outbound_autodial_active);
|
|
$download_lists = ereg_replace("[^0-9]","",$download_lists);
|
|
$caller_id_number = ereg_replace("[^0-9]","",$caller_id_number);
|
|
$outbound_calls_per_second = ereg_replace("[^0-9]","",$outbound_calls_per_second);
|
|
$manager_shift_enforcement_override = ereg_replace("[^0-9]","",$manager_shift_enforcement_override);
|
|
$export_reports = ereg_replace("[^0-9]","",$export_reports);
|
|
$delete_from_dnc = ereg_replace("[^0-9]","",$delete_from_dnc);
|
|
$menu_timeout = ereg_replace("[^0-9]","",$menu_timeout);
|
|
$menu_time_check = ereg_replace("[^0-9]","",$menu_time_check);
|
|
$track_in_vdac = ereg_replace("[^0-9]","",$track_in_vdac);
|
|
$menu_repeat = ereg_replace("[^0-9]","",$menu_repeat);
|
|
$agentonly_callback_campaign_lock = ereg_replace("[^0-9]","",$agentonly_callback_campaign_lock);
|
|
$sounds_central_control_active = ereg_replace("[^0-9]","",$sounds_central_control_active);
|
|
$user_territories_active = ereg_replace("[^0-9]","",$user_territories_active);
|
|
$vicidial_recording_limit = ereg_replace("[^0-9]","",$vicidial_recording_limit);
|
|
$allow_custom_dialplan = ereg_replace("[^0-9]","",$allow_custom_dialplan);
|
|
$phone_ring_timeout = ereg_replace("[^0-9]","",$phone_ring_timeout);
|
|
$enable_tts_integration = ereg_replace("[^0-9]","",$enable_tts_integration);
|
|
$allow_alerts = ereg_replace("[^0-9]","",$allow_alerts);
|
|
$vicidial_balance_rank = ereg_replace("[^0-9]","",$vicidial_balance_rank);
|
|
$rank = ereg_replace("[^0-9]","",$rank);
|
|
$enable_second_webform = ereg_replace("[^0-9]","",$enable_second_webform);
|
|
$campaign_cid_override = ereg_replace("[^0-9]","",$campaign_cid_override);
|
|
$agent_choose_territories = ereg_replace("[^0-9]","",$agent_choose_territories);
|
|
$timer_action_seconds = ereg_replace("[^0-9]","",$timer_action_seconds);
|
|
|
|
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
|
|
|
|
### DIGITS and COLONS
|
|
$shift_length = ereg_replace("[^\:0-9]","",$shift_length);
|
|
|
|
### DIGITS and HASHES and STARS
|
|
$survey_dtmf_digits = ereg_replace("[^\#\*0-9]","",$survey_dtmf_digits);
|
|
$survey_ni_digit = ereg_replace("[^\#\*0-9]","",$survey_ni_digit);
|
|
|
|
### DIGITS and DASHES
|
|
$group_rank = ereg_replace("[^-0-9]","",$group_rank);
|
|
$campaign_rank = ereg_replace("[^-0-9]","",$campaign_rank);
|
|
$queue_priority = ereg_replace("[^-0-9]","",$queue_priority);
|
|
|
|
### DIGITS and NEWLINES
|
|
$phone_numbers = ereg_replace("[^X\n0-9]","",$phone_numbers);
|
|
|
|
### Y or N ONLY ###
|
|
$allow_closers = ereg_replace("[^NY]","",$allow_closers);
|
|
$reset_hopper = ereg_replace("[^NY]","",$reset_hopper);
|
|
$amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx);
|
|
$alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing);
|
|
$selectable = ereg_replace("[^NY]","",$selectable);
|
|
$reset_list = ereg_replace("[^NY]","",$reset_list);
|
|
$fronter_display = ereg_replace("[^NY]","",$fronter_display);
|
|
$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code);
|
|
$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally);
|
|
$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log);
|
|
$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active);
|
|
$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs);
|
|
$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh);
|
|
$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata);
|
|
$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins);
|
|
$human_answered = ereg_replace("[^NY]","",$human_answered);
|
|
$tovdad_display = ereg_replace("[^NY]","",$tovdad_display);
|
|
$campaign_allow_inbound = ereg_replace("[^NY]","",$campaign_allow_inbound);
|
|
$display_queue_count = ereg_replace("[^NY]","",$display_queue_count);
|
|
$qc_show_recording = ereg_replace("[^NY]","",$qc_show_recording);
|
|
$sale_category = ereg_replace("[^NY]","",$sale_category);
|
|
$dead_lead_category = ereg_replace("[^NY]","",$dead_lead_category);
|
|
$agent_extended_alt_dial = ereg_replace("[^NY]","",$agent_extended_alt_dial);
|
|
$play_place_in_line = ereg_replace("[^NY]","",$play_place_in_line);
|
|
$play_estimate_hold_time = ereg_replace("[^NY]","",$play_estimate_hold_time);
|
|
$no_delay_call_route = ereg_replace("[^NY]","",$no_delay_call_route);
|
|
$did_active = ereg_replace("[^NY]","",$did_active);
|
|
$active_asterisk_server = ereg_replace("[^NY]","",$active_asterisk_server);
|
|
$generate_vicidial_conf = ereg_replace("[^NY]","",$generate_vicidial_conf);
|
|
$rebuild_conf_files = ereg_replace("[^NY]","",$rebuild_conf_files);
|
|
$agent_allow_group_alias = ereg_replace("[^NY]","",$agent_allow_group_alias);
|
|
$vtiger_status_call = ereg_replace("[^NY]","",$vtiger_status_call);
|
|
$sale = ereg_replace("[^NY]","",$sale);
|
|
$dnc = ereg_replace("[^NY]","",$dnc);
|
|
$customer_contact = ereg_replace("[^NY]","",$customer_contact);
|
|
$not_interested = ereg_replace("[^NY]","",$not_interested);
|
|
$unworkable = ereg_replace("[^NY]","",$unworkable);
|
|
$sounds_update = ereg_replace("[^NY]","",$sounds_update);
|
|
$carrier_logging_active = ereg_replace("[^NY]","",$carrier_logging_active);
|
|
$agent_status_view_time = ereg_replace("[^NY]","",$agent_status_view_time);
|
|
$no_hopper_dialing = ereg_replace("[^NY]","",$no_hopper_dialing);
|
|
$agent_display_dialable_leads = ereg_replace("[^NY]","",$agent_display_dialable_leads);
|
|
$random = ereg_replace("[^NY]","",$random);
|
|
$rebuild_music_on_hold = ereg_replace("[^NY]","",$rebuild_music_on_hold);
|
|
$active_agent_login_server = ereg_replace("[^NY]","",$active_agent_login_server);
|
|
$agent_select_territories = ereg_replace("[^NY]","",$agent_select_territories);
|
|
$delete_vm_after_email = ereg_replace("[^NY]","",$delete_vm_after_email);
|
|
$crm_popup_login = ereg_replace("[^NY]","",$crm_popup_login);
|
|
|
|
$qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled);
|
|
$active = ereg_replace("[^0-9NY]","",$active);
|
|
|
|
|
|
### ALPHA-NUMERIC ONLY ###
|
|
$script_id = ereg_replace("[^0-9a-zA-Z]","",$script_id);
|
|
$agent_script_override = ereg_replace("[^0-9a-zA-Z]","",$agent_script_override);
|
|
$campaign_script = ereg_replace("[^0-9a-zA-Z]","",$campaign_script);
|
|
$submit = ereg_replace("[^0-9a-zA-Z]","",$submit);
|
|
$campaign_cid = ereg_replace("[^0-9a-zA-Z]","",$campaign_cid);
|
|
$get_call_launch = ereg_replace("[^0-9a-zA-Z]","",$get_call_launch);
|
|
$campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording);
|
|
$ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD);
|
|
$dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix);
|
|
$state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state);
|
|
$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks);
|
|
$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers);
|
|
$billable = ereg_replace("[^0-9a-zA-Z]","",$billable);
|
|
$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code);
|
|
$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override);
|
|
$ingroup_recording_override = ereg_replace("[^0-9a-zA-Z]","",$ingroup_recording_override);
|
|
$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id);
|
|
$after_hours_exten = ereg_replace("[^0-9a-zA-Z]","",$after_hours_exten);
|
|
$after_hours_voicemail = ereg_replace("[^0-9a-zA-Z]","",$after_hours_voicemail);
|
|
$qc_script = ereg_replace("[^0-9a-zA-Z]","",$qc_script);
|
|
$code = ereg_replace("[^0-9a-zA-Z]","",$code);
|
|
$survey_no_response_action = ereg_replace("[^0-9a-zA-Z]","",$survey_no_response_action);
|
|
$survey_ni_status = ereg_replace("[^0-9a-zA-Z]","",$survey_ni_status);
|
|
$qc_get_record_launch = ereg_replace("[^0-9a-zA-Z]","",$qc_get_record_launch);
|
|
$agent_pause_codes_active = ereg_replace("[^0-9a-zA-Z]","",$agent_pause_codes_active);
|
|
$three_way_dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$three_way_dial_prefix);
|
|
$shift_enforcement = ereg_replace("[^0-9a-zA-Z]","",$shift_enforcement);
|
|
$agent_shift_enforcement_override = ereg_replace("[^0-9a-zA-Z]","",$agent_shift_enforcement_override);
|
|
$survey_third_status = ereg_replace("[^0-9a-zA-Z]","",$survey_third_status);
|
|
$survey_fourth_status = ereg_replace("[^0-9a-zA-Z]","",$survey_fourth_status);
|
|
$sounds_web_directory = ereg_replace("[^0-9a-zA-Z]","",$sounds_web_directory);
|
|
$disable_alter_custphone = ereg_replace("[^0-9a-zA-Z]","",$disable_alter_custphone);
|
|
$view_calls_in_queue = ereg_replace("[^0-9a-zA-Z]","",$view_calls_in_queue);
|
|
$view_calls_in_queue_launch = ereg_replace("[^0-9a-zA-Z]","",$view_calls_in_queue_launch);
|
|
$grab_calls_in_queue = ereg_replace("[^0-9a-zA-Z]","",$grab_calls_in_queue);
|
|
$call_requeue_button = ereg_replace("[^0-9a-zA-Z]","",$call_requeue_button);
|
|
$pause_after_each_call = ereg_replace("[^0-9a-zA-Z]","",$pause_after_each_call);
|
|
$use_internal_dnc = ereg_replace("[^0-9a-zA-Z]","",$use_internal_dnc);
|
|
$use_campaign_dnc = ereg_replace("[^0-9a-zA-Z]","",$use_campaign_dnc);
|
|
$voicemail_id = ereg_replace("[^0-9a-zA-Z]","",$voicemail_id);
|
|
$status_id = ereg_replace("[^0-9a-zA-Z]","",$status_id);
|
|
|
|
### DIGITS and Dots
|
|
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
|
|
$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level);
|
|
$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level);
|
|
$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip);
|
|
$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip);
|
|
$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
|
|
$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip);
|
|
$vtiger_server_ip = ereg_replace("[^\.0-9]","",$vtiger_server_ip);
|
|
$active_voicemail_server = ereg_replace("[^\.0-9]","",$active_voicemail_server);
|
|
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
|
|
$adaptive_dropped_percentage = ereg_replace("[^\.0-9]","",$adaptive_dropped_percentage);
|
|
$drop_lockout_time = ereg_replace("[^\.0-9]","",$drop_lockout_time);
|
|
|
|
### ALPHA-NUMERIC and spaces and hash and star and comma
|
|
$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
|
|
$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf);
|
|
$xferconf_c_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_c_dtmf);
|
|
$xferconf_d_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_d_dtmf);
|
|
$xferconf_e_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_e_dtmf);
|
|
$survey_third_digit = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_third_digit);
|
|
$survey_fourth_digit = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_fourth_digit);
|
|
$survey_third_exten = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_third_exten);
|
|
$survey_fourth_exten = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_fourth_exten);
|
|
|
|
### ALPHACAPS-NUMERIC
|
|
$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number);
|
|
$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash
|
|
$agi_output = ereg_replace("[^-_0-9a-zA-Z]","",$agi_output);
|
|
$ASTmgrSECRET = ereg_replace("[^-_0-9a-zA-Z]","",$ASTmgrSECRET);
|
|
$ASTmgrUSERNAME = ereg_replace("[^-_0-9a-zA-Z]","",$ASTmgrUSERNAME);
|
|
$ASTmgrUSERNAMElisten = ereg_replace("[^-_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten);
|
|
$ASTmgrUSERNAMEsend = ereg_replace("[^-_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend);
|
|
$ASTmgrUSERNAMEupdate = ereg_replace("[^-_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate);
|
|
$call_time_id = ereg_replace("[^-_0-9a-zA-Z]","",$call_time_id);
|
|
$campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$campaign_id);
|
|
$CoNfIrM = ereg_replace("[^-_0-9a-zA-Z]","",$CoNfIrM);
|
|
$DBX_database = ereg_replace("[^-_0-9a-zA-Z]","",$DBX_database);
|
|
$DBX_pass = ereg_replace("[^-_0-9a-zA-Z]","",$DBX_pass);
|
|
$DBX_user = ereg_replace("[^-_0-9a-zA-Z]","",$DBX_user);
|
|
$DBY_database = ereg_replace("[^-_0-9a-zA-Z]","",$DBY_database);
|
|
$DBY_pass = ereg_replace("[^-_0-9a-zA-Z]","",$DBY_pass);
|
|
$DBY_user = ereg_replace("[^-_0-9a-zA-Z]","",$DBY_user);
|
|
$dial_method = ereg_replace("[^-_0-9a-zA-Z]","",$dial_method);
|
|
$dial_status_a = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status_a);
|
|
$dial_status_b = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status_b);
|
|
$dial_status_c = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status_c);
|
|
$dial_status_d = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status_d);
|
|
$dial_status_e = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status_e);
|
|
$ext_context = ereg_replace("[^-_0-9a-zA-Z]","",$ext_context);
|
|
$group_id = ereg_replace("[^-_0-9a-zA-Z]","",$group_id);
|
|
$lead_filter_id = ereg_replace("[^-_0-9a-zA-Z]","",$lead_filter_id);
|
|
$local_call_time = ereg_replace("[^-_0-9a-zA-Z]","",$local_call_time);
|
|
$login = ereg_replace("[^-_0-9a-zA-Z]","",$login);
|
|
$login_campaign = ereg_replace("[^-_0-9a-zA-Z]","",$login_campaign);
|
|
$login_pass = ereg_replace("[^-_0-9a-zA-Z]","",$login_pass);
|
|
$login_user = ereg_replace("[^-_0-9a-zA-Z]","",$login_user);
|
|
$next_agent_call = ereg_replace("[^-_0-9a-zA-Z]","",$next_agent_call);
|
|
$old_campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$old_campaign_id);
|
|
$old_server_id = ereg_replace("[^-_0-9a-zA-Z]","",$old_server_id);
|
|
$OLDuser_group = ereg_replace("[^-_0-9a-zA-Z]","",$OLDuser_group);
|
|
$park_file_name = ereg_replace("[^-_0-9a-zA-Z]","",$park_file_name);
|
|
$pass = ereg_replace("[^-_0-9a-zA-Z]","",$pass);
|
|
$phone_login = ereg_replace("[^-_0-9a-zA-Z]","",$phone_login);
|
|
$phone_pass = ereg_replace("[^-_0-9a-zA-Z]","",$phone_pass);
|
|
$PHP_AUTH_PW = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_PW);
|
|
$PHP_AUTH_USER = ereg_replace("[^-_0-9a-zA-Z]","",$PHP_AUTH_USER);
|
|
$protocol = ereg_replace("[^-_0-9a-zA-Z]","",$protocol);
|
|
$server_id = ereg_replace("[^-_0-9a-zA-Z]","",$server_id);
|
|
$stage = ereg_replace("[^-_0-9a-zA-Z]","",$stage);
|
|
$state_rule = ereg_replace("[^-_0-9a-zA-Z]","",$state_rule);
|
|
$trunk_restriction = ereg_replace("[^-_0-9a-zA-Z]","",$trunk_restriction);
|
|
$user = ereg_replace("[^-_0-9a-zA-Z]","",$user);
|
|
$user_group = ereg_replace("[^-_0-9a-zA-Z]","",$user_group);
|
|
$VICIDIAL_park_on_filename = ereg_replace("[^-_0-9a-zA-Z]","",$VICIDIAL_park_on_filename);
|
|
$auto_alt_dial = ereg_replace("[^-_0-9a-zA-Z]","",$auto_alt_dial);
|
|
$dial_status = ereg_replace("[^-_0-9a-zA-Z]","",$dial_status);
|
|
$queuemetrics_eq_prepend = ereg_replace("[^-_0-9a-zA-Z]","",$queuemetrics_eq_prepend);
|
|
$vicidial_agent_disable = ereg_replace("[^-_0-9a-zA-Z]","",$vicidial_agent_disable);
|
|
$alter_custdata_override = ereg_replace("[^-_0-9a-zA-Z]","",$alter_custdata_override);
|
|
$list_order_mix = ereg_replace("[^-_0-9a-zA-Z]","",$list_order_mix);
|
|
$vcl_id = ereg_replace("[^-_0-9a-zA-Z]","",$vcl_id);
|
|
$mix_method = ereg_replace("[^-_0-9a-zA-Z]","",$mix_method);
|
|
$category = ereg_replace("[^-_0-9a-zA-Z]","",$category);
|
|
$vsc_id = ereg_replace("[^-_0-9a-zA-Z]","",$vsc_id);
|
|
$moh_context = ereg_replace("[^-_0-9a-zA-Z]","",$moh_context);
|
|
$source_campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_campaign_id);
|
|
$source_user_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_user_id);
|
|
$source_group_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_group_id);
|
|
$default_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$default_xfer_group);
|
|
$drop_exten = ereg_replace("[^-_0-9a-zA-Z]","",$drop_exten);
|
|
$safe_harbor_exten = ereg_replace("[^-_0-9a-zA-Z]","",$safe_harbor_exten);
|
|
$drop_action = ereg_replace("[^-_0-9a-zA-Z]","",$drop_action);
|
|
$drop_inbound_group = ereg_replace("[^-_0-9a-zA-Z]","",$drop_inbound_group);
|
|
$afterhours_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$afterhours_xfer_group);
|
|
$after_hours_action = ereg_replace("[^-_0-9a-zA-Z]","",$after_hours_action);
|
|
$alias_id = ereg_replace("[^-_0-9a-zA-Z]","",$alias_id);
|
|
$shift_id = ereg_replace("[^-_0-9a-zA-Z]","",$shift_id);
|
|
$qc_shift_id = ereg_replace("[^-_0-9a-zA-Z]","",$qc_shift_id);
|
|
$survey_first_audio_file = ereg_replace("[^-_0-9a-zA-Z]","",$survey_first_audio_file);
|
|
$survey_opt_in_audio_file = ereg_replace("[^-_0-9a-zA-Z]","",$survey_opt_in_audio_file);
|
|
$survey_ni_audio_file = ereg_replace("[^-_0-9a-zA-Z]","",$survey_ni_audio_file);
|
|
$survey_method = ereg_replace("[^-_0-9a-zA-Z]","",$survey_method);
|
|
$alter_custphone_override = ereg_replace("[^-_0-9a-zA-Z]","",$alter_custphone_override);
|
|
$manual_dial_filter = ereg_replace("[^-_0-9a-zA-Z]","",$manual_dial_filter);
|
|
$agent_clipboard_copy = ereg_replace("[^-_0-9a-zA-Z]","",$agent_clipboard_copy);
|
|
$hold_time_option = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option);
|
|
$hold_time_option_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_xfer_group);
|
|
$hold_recall_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$hold_recall_xfer_group);
|
|
$play_welcome_message = ereg_replace("[^-_0-9a-zA-Z]","",$play_welcome_message);
|
|
$did_route = ereg_replace("[^-_0-9a-zA-Z]","",$did_route);
|
|
$user_unavailable_action = ereg_replace("[^-_0-9a-zA-Z]","",$user_unavailable_action);
|
|
$user_route_settings_ingroup = ereg_replace("[^-_0-9a-zA-Z]","",$user_route_settings_ingroup);
|
|
$call_handle_method = ereg_replace("[^-_0-9a-zA-Z]","",$call_handle_method);
|
|
$agent_search_method = ereg_replace("[^-_0-9a-zA-Z]","",$agent_search_method);
|
|
$hold_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_voicemail);
|
|
$exten_context = ereg_replace("[^-_0-9a-zA-Z]","",$exten_context);
|
|
$three_way_call_cid = ereg_replace("[^-_0-9a-zA-Z]","",$three_way_call_cid);
|
|
$web_form_target = ereg_replace("[^-_0-9a-zA-Z]","",$web_form_target);
|
|
$recording_web_link = ereg_replace("[^-_0-9a-zA-Z]","",$recording_web_link);
|
|
$vtiger_search_category = ereg_replace("[^-_0-9a-zA-Z]","",$vtiger_search_category);
|
|
$vtiger_create_call_record = ereg_replace("[^-_0-9a-zA-Z]","",$vtiger_create_call_record);
|
|
$vtiger_create_lead_record = ereg_replace("[^-_0-9a-zA-Z]","",$vtiger_create_lead_record);
|
|
$vtiger_screen_login = ereg_replace("[^-_0-9a-zA-Z]","",$vtiger_screen_login);
|
|
$cpd_amd_action = ereg_replace("[^-_0-9a-zA-Z]","",$cpd_amd_action);
|
|
$template_id = ereg_replace("[^-_0-9a-zA-Z]","",$template_id);
|
|
$carrier_id = ereg_replace("[^-_0-9a-zA-Z]","",$carrier_id);
|
|
$group_alias_id = ereg_replace("[^-_0-9a-zA-Z]","",$group_alias_id);
|
|
$default_group_alias = ereg_replace("[^-_0-9a-zA-Z]","",$default_group_alias);
|
|
$vtiger_search_dead = ereg_replace("[^-_0-9a-zA-Z]","",$vtiger_search_dead);
|
|
$survey_third_audio_file = ereg_replace("[^-_0-9a-zA-Z]","",$survey_third_audio_file);
|
|
$survey_fourth_audio_file = ereg_replace("[^-_0-9a-zA-Z]","",$survey_fourth_audio_file);
|
|
$menu_id = ereg_replace("[^-_0-9a-zA-Z]","",$menu_id);
|
|
$source_menu = ereg_replace("[^-_0-9a-zA-Z]","",$source_menu);
|
|
$call_time_id = ereg_replace("[^-_0-9a-zA-Z]","",$call_time_id);
|
|
$phone_context = ereg_replace("[^-_0-9a-zA-Z]","",$phone_context);
|
|
$conf_secret = ereg_replace("[^-_0-9a-zA-Z]","",$conf_secret);
|
|
$tracking_group = ereg_replace("[^-_0-9a-zA-Z]","",$tracking_group);
|
|
$no_agent_no_queue = ereg_replace("[^-_0-9a-zA-Z]","",$no_agent_no_queue);
|
|
$no_agent_action = ereg_replace("[^-_0-9a-zA-Z]","",$no_agent_action);
|
|
$quick_transfer_button = ereg_replace("[^-_0-9a-zA-Z]","",$quick_transfer_button);
|
|
$prepopulate_transfer_preset = ereg_replace("[^-_0-9a-zA-Z]","",$prepopulate_transfer_preset);
|
|
$tts_id = ereg_replace("[^-_0-9a-zA-Z]","",$tts_id);
|
|
$drop_rate_group = ereg_replace("[^-_0-9a-zA-Z]","",$drop_rate_group);
|
|
$agent_dial_owner_only = ereg_replace("[^-_0-9a-zA-Z]","",$agent_dial_owner_only);
|
|
$reset_time = ereg_replace("[^-_0-9a-zA-Z]","",$reset_time);
|
|
$moh_id = ereg_replace("[^-_0-9a-zA-Z]","",$moh_id);
|
|
$drop_inbound_group_override = ereg_replace("[^-_0-9a-zA-Z]","",$drop_inbound_group_override);
|
|
$timer_action = ereg_replace("[^-_0-9a-zA-Z]","",$timer_action);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash and slash and dot
|
|
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
|
|
$menu_timeout_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_timeout_prompt);
|
|
$menu_invalid_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_invalid_prompt);
|
|
$after_hours_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$after_hours_message_filename);
|
|
$welcome_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$welcome_message_filename);
|
|
$onhold_prompt_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$onhold_prompt_filename);
|
|
$hold_time_option_callback_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$hold_time_option_callback_filename);
|
|
$agent_alert_exten = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$agent_alert_exten);
|
|
$filename = ereg_replace("[^-\/\._0-9a-zA-Z]","",$filename);
|
|
$am_message_exten = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$am_message_exten);
|
|
$am_message_exten_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$am_message_exten_override);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash and comma
|
|
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
|
|
$forced_timeclock_login = ereg_replace("[^-\,\_0-9a-zA-Z]","",$forced_timeclock_login);
|
|
|
|
### ALPHA-NUMERIC and dots
|
|
$sounds_web_server = ereg_replace("[^\.0-9a-zA-Z]","",$sounds_web_server);
|
|
### ALPHA-NUMERIC and spaces
|
|
$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order);
|
|
### ALPHA-NUMERIC and hash
|
|
$group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color);
|
|
### ALPHA-NUMERIC and hash and star and dot and underscore
|
|
$hold_time_option_exten = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$hold_time_option_exten);
|
|
$did_pattern = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$did_pattern);
|
|
$voicemail_ext = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$voicemail_ext);
|
|
$phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone);
|
|
$phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone_code);
|
|
|
|
### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores
|
|
$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
|
|
$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity);
|
|
$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version);
|
|
$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
|
|
$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
|
|
$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name);
|
|
$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
|
|
$ingroup_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$ingroup_rec_filename);
|
|
$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company);
|
|
$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name);
|
|
$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname);
|
|
$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name);
|
|
$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus);
|
|
$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments);
|
|
$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name);
|
|
$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name);
|
|
$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
|
|
$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type);
|
|
$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture);
|
|
$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments);
|
|
$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name);
|
|
$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description);
|
|
$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status);
|
|
$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name);
|
|
$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message);
|
|
$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name);
|
|
$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description);
|
|
$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description);
|
|
$vcl_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vcl_name);
|
|
$vsc_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_name);
|
|
$vsc_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_description);
|
|
$code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$code_name);
|
|
$alias_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$alias_name);
|
|
$shift_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$shift_name);
|
|
$did_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$did_description);
|
|
$alt_server_ip = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$alt_server_ip);
|
|
$template_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$template_name);
|
|
$carrier_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$carrier_name);
|
|
$group_alias_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_alias_name);
|
|
$caller_id_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$caller_id_name);
|
|
$user_code = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$user_code);
|
|
$territory = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$territory);
|
|
$tts_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$tts_name);
|
|
$moh_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$moh_name);
|
|
$timer_action_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$timer_action_message);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
|
|
$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
|
|
$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser);
|
|
$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server);
|
|
$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server);
|
|
$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension);
|
|
$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension);
|
|
$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory);
|
|
$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension);
|
|
$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host);
|
|
$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname);
|
|
$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login);
|
|
$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass);
|
|
$email = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$email);
|
|
$vtiger_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_dbname);
|
|
$vtiger_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_login);
|
|
$vtiger_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_pass);
|
|
$custom_one = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_one);
|
|
$custom_two = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_two);
|
|
$custom_three = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_three);
|
|
$custom_four = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_four);
|
|
$custom_five = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_five);
|
|
|
|
### NUMERIC and comma and pipe
|
|
$waitforsilence_options = ereg_replace("[^\|\,0-9]","",$waitforsilence_options);
|
|
|
|
### value cleaning
|
|
$no_agent_action_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$no_agent_action_value);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash and slash and at and space and colon
|
|
$vdc_header_date_format = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$vdc_header_date_format);
|
|
$vdc_customer_date_format = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$vdc_customer_date_format);
|
|
$menu_name = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$menu_name);
|
|
|
|
### ALPHA-NUMERIC and underscore and dash and at and space and parantheses
|
|
$vdc_header_phone_format = ereg_replace("[^- \(\)\_0-9a-zA-Z]","",$vdc_header_phone_format);
|
|
|
|
### remove semi-colons ###
|
|
$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
|
|
$list_mix_container = ereg_replace(";","",$list_mix_container);
|
|
$survey_response_digit_map = ereg_replace(";","",$survey_response_digit_map);
|
|
$survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir);
|
|
$conf_override = ereg_replace(";","",$conf_override);
|
|
$template_contents = ereg_replace(";","",$template_contents);
|
|
$registration_string = ereg_replace(";","",$registration_string);
|
|
$account_entry = ereg_replace(";","",$account_entry);
|
|
$account_entry = ereg_replace("\r","",$account_entry);
|
|
$globals_string = ereg_replace(";","",$globals_string);
|
|
$dialplan_entry = ereg_replace(";","",$dialplan_entry);
|
|
$dialplan_entry = ereg_replace("\r","",$dialplan_entry);
|
|
$custom_dialplan_entry = ereg_replace("\\\\","",$custom_dialplan_entry);
|
|
$custom_dialplan_entry = ereg_replace(";","",$custom_dialplan_entry);
|
|
$custom_dialplan_entry = ereg_replace("\r","",$custom_dialplan_entry);
|
|
$tts_text = ereg_replace("\\\\","",$tts_text);
|
|
$tts_text = ereg_replace(";","",$tts_text);
|
|
$tts_text = ereg_replace("\r","",$tts_text);
|
|
$tts_text = ereg_replace("\"","",$tts_text);
|
|
$carrier_description = ereg_replace("\\\\","",$carrier_description);
|
|
$carrier_description = ereg_replace(";","",$carrier_description);
|
|
$carrier_description = ereg_replace("\r","",$carrier_description);
|
|
$carrier_description = ereg_replace("\"","",$carrier_description);
|
|
|
|
|
|
### VARIABLES TO BE mysql_real_escape_string ###
|
|
# $web_form_address
|
|
# $queuemetrics_url
|
|
# $admin_home_url
|
|
# $qc_web_form_address
|
|
# $vtiger_url
|
|
# $web_form_address_two
|
|
# $crm_login_address
|
|
# $start_call_url
|
|
# $dispo_call_url
|
|
|
|
### VARIABLES not filtered at all ###
|
|
# $script_text
|
|
|
|
} # end of non_latin
|
|
else
|
|
{
|
|
$PHP_AUTH_PW = ereg_replace("'|\"|\\\\|;","",$PHP_AUTH_PW);
|
|
$PHP_AUTH_USER = ereg_replace("'|\"|\\\\|;","",$PHP_AUTH_USER);
|
|
}
|
|
|
|
|
|
|
|
##### END VARIABLE FILTERING FOR SECURITY #####
|
|
|
|
|
|
# ViciDial database administration
|
|
# admin.php
|
|
#
|
|
# CHANGELOG:
|
|
# 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
|
|
# 60425-2355 - Added agent options to vicidial_users, reformatted user page
|
|
# 60502-1627 - Added drop_call_seconds and safe_harbor_ fields to campaign screen
|
|
# 60503-1228 - Added drop_call_seconds and drop_ fields to inbound groups screen
|
|
# 60505-1117 - Added initial framework for new local_call_times tables and definitions
|
|
# 60506-1033 - More revisions to the local_call_time section
|
|
# 60508-1354 - Finished call_times and state_call_times sections
|
|
# - Added modify/delete options for call_times
|
|
# 60509-1311 - Functionalize campaign dialable leads calculation
|
|
# - Change state_call_times selection from call_times to only allow one per state
|
|
# - Added dialable leads count popup to campaign screen if auto-calc is disabled
|
|
# - Added test dialable leads count popup to filter screen
|
|
# 60510-1050 - Added Wrapup seconds and Wrapup message to campaigns screen
|
|
# 60608-1401 - Added allowable inbound_groups checkboxes to CLOSER campaign detail screen
|
|
# 60609-1051 - Added add-to-dnc in LISTS section
|
|
# 60613-1415 - Added lead recycling options to campaign detail screen
|
|
# 60619-1523 - Added variable filtering to eliminate SQL injection attack threat
|
|
# 60622-1216 - Fixed HotKey addition form issues and variable filtering
|
|
# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug and filter_sql bug
|
|
# 60808-1147 - Changed filtering for and added instructions for consutative transfers
|
|
# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php
|
|
# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses
|
|
# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial
|
|
# 60821-1625 - Added ALLFORCE recording option for campaign_recording
|
|
# 60823-1154 - Added fields for adaptive dialing
|
|
# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
|
|
# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods
|
|
# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time
|
|
# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown
|
|
# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab
|
|
# 61002-1402 - Added fields for vicidial balance trunk controls
|
|
# 61003-1123 - Added functions for vicidial_server_trunks records
|
|
# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen
|
|
# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100
|
|
# 61122-1228 - Added user group campaign restrictions
|
|
# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS
|
|
# 61129-1028 - Added headers to Users and Phones with clickable order-by titles
|
|
# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods
|
|
# - Screen width definable at top of script, merged server_stats into this script
|
|
# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys
|
|
# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns
|
|
# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns
|
|
# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers
|
|
# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen
|
|
# 70117-1235 - Added header formatting variables at top of script
|
|
# - Moved Call Times and Phones/Server functions to Admin section
|
|
# 70118-1706 - Added new user group displays and links
|
|
# 70123-1519 - Added user permission settings for all sections
|
|
# 70124-1346 - Fixed spelling errors and formatting consistency
|
|
# 70202-1120 - Added agent_pause_codes section to campaigns
|
|
# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists
|
|
# 70206-1323 - Added user setting for vicidial_recording_override
|
|
# 70212-1412 - Added system settings section
|
|
# 70214-1226 - Added QueueMetrics Log ID field to system settings section
|
|
# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit
|
|
# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field
|
|
# 70302-1111 - Fixed small bug in dialable leads calculation
|
|
# 70314-1133 - Added insert selection on script forms
|
|
# 70319-1423 - Added Alter Customer Data and agent disable display functions
|
|
# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper
|
|
# 70322-1455 - Added sipsak messages parameters
|
|
# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section
|
|
# 70516-1628 - Started reformatting campaigns to use submenus to break up options
|
|
# 70529-1653 - Added help for list mix
|
|
# 70530-1354 - Added human_answered field to statuses, added system status modification
|
|
# 70530-1714 - Added lists for all campaign subsections
|
|
# 70531-1631 - Development on List mix admin interface
|
|
# 70601-1629 - More development on List mix admin interface, formatting, and added some javascript
|
|
# 70602-1300 - More development on List mix admin interface, more javascript
|
|
# 70608-1459 - Added option to set LIVE Callbacks to INACTIVE after one month
|
|
# 70612-1451 - Added Callback INACTIVE link for after one week, sort by user/group/entrydate
|
|
# 70614-0231 - Added Status Categories, ability to Modify Statuses, moved system statuses to sub-section
|
|
# 70623-1008 - List Mix section now allows modification of list mix entries
|
|
# 70629-1721 - List Mix section adding and removing of list entries active
|
|
# 70706-1636 - List Mix section cleanup and more error-checking
|
|
# 70908-0941 - Added agc logile enable system_settings
|
|
# 71020-1934 - Added inbound groups options: on-hold music, messages, call_times
|
|
# 71022-1343 - Added inbound group ranks for users
|
|
# 71029-1710 - Added option for campaign to be inbound and/or blended with no restrictions on the campaign_id name
|
|
# - Added 5th NEW and 6th NEW to the dial order options
|
|
# 71030-2010 - Added Manual Dial List ID field to campaigns table
|
|
# 71103-2207 - Added inbound_group_rank and fewest_calls to the inbound groups call order options
|
|
# 71113-1521 - Added campaign_rank to agent options
|
|
# - Added ability to Copy a campaign's setting to a new campaign
|
|
# 71113-2225 - Added ability to copy user and in-group settings to new users and in-groups
|
|
# 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
|
|
# 71122-1135 - Added default transfer group for campaigns and inbound groups
|
|
# 71125-1751 - Added allowable transfer groups to campaign detail screen
|
|
# 80107-1204 - Started framework for new QC section
|
|
# 80112-0242 - Added more options for lead order
|
|
# 80211-1901 - Added DB Schema Version to system settings display
|
|
# 80224-1334 - Added Queue Priority to in-groups and campaigns
|
|
# 80302-0232 - added drop_action and transfer to in-group for both in-groups and outbound
|
|
# 80310-1504 - added QC settings section to campaign screen
|
|
# 80317-2037 - Added Recording override settings to in-groups
|
|
# 80414-1505 - More work on QC, added vicidial_qc_codes
|
|
# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
|
|
# 80505-0333 - Added phones_alias sections to allow for load-balanced-phone-logins
|
|
# 80512-1529 - Added auto-generate of User ID feature
|
|
# 80515-1345 - Added Shifts sub-section to Admin section
|
|
# 80528-0001 - Added campaign survey sub-section
|
|
# 80528-1102 - Added user timeclock edit options
|
|
# 80608-1304 - Changed add-to-DNC to allow for multiple entries per submission
|
|
# 80625-0032 - Added time/phone display format options to system settings
|
|
# 80703-0124 - Added alter cust phone and api settings
|
|
# 80715-1130 - Added Recycle leads limit count
|
|
# 80719-1351 - Changed QC settings in campaigns and In-Groups
|
|
# 80809-2305 - Added Sale and Dead Lead categories to status categories page
|
|
# 80815-1036 - Added manual dial filter to capaigns
|
|
# 80823-2124 - Added copy to clipboard campaign option
|
|
# 80829-2359 - Added EXTENDED auto_alt_dial options
|
|
# 80831-0406 - Added agent screen extended alt-dial option to campaigns
|
|
# 80909-0553 - Added campaign-specific DNC list option and add
|
|
# 81002-1101 - Added more in-group options and new DID section and user options
|
|
# 81007-0936 - Added three_way_call_cid option to campaigns
|
|
# 81012-1725 - Added INBOUND_MAN dial method allowing for manual list dialing with inbound calls
|
|
# 81030-0348 - Added campaign pause code force option
|
|
# 81030-2228 - Fixed DIDs creation issue
|
|
# 81103-1408 - Added 3way call dial prefix option
|
|
# 81107-1551 - Added Stats Percent of Calls Answered Within X seconds fields to in-groups
|
|
# 81118-0933 - Changed lists listing with links and more options
|
|
# 81119-0715 - Added ability to bulk enable/disable lists from modify campaign screen
|
|
# 81209-1538 - Added web_form_target to campaign screen
|
|
# 81210-1430 - Added http server IP and recording link options to servers
|
|
# 81222-0500 - Reformatted all listings to same format changed to field selects instead of *
|
|
# 81228-2300 - Added fields for vtiger integration and active vicidial_user display
|
|
# 90101-1216 - Added options for user synchronization with vtiger
|
|
# 90112-0335 - Added vtiger_create_lead_record and vtiger_create_lead_record options
|
|
# 90115-0502 - Activated AGENT DID routing option
|
|
# 90126-2256 - Added vtiger_screen_login campaign option and user agent alert option
|
|
# 90201-1503 - Added option to disable the viewing of inactive QC features
|
|
# 90202-0112 - Added option to disable outbound autodialing(or list dialing)
|
|
# 90202-0444 - Added cpd_amd_action option for processing of AMD messages
|
|
# 90209-1339 - Added download_lists option to allow downloading of lists
|
|
# 90210-1042 - Added options for auto-generation of asterisk conf files
|
|
# 90301-2026 - Added Vtiger group synchronization
|
|
# 90302-2046 - Changed Section heading to be on the left side of the screen
|
|
# 90303-0631 - Added web vars to agent campaign and in-group settings
|
|
# 90303-2047 - Added group aliases and default group aliases
|
|
# 90306-1214 - Added shift enforcement and server/system calls per second options
|
|
# 90308-0956 - Added server statistics
|
|
# 90309-0059 - Changed logging to admin_server_log
|
|
# 90310-2203 - Added export_reports option for call activity report data exports
|
|
# 90315-1010 - Changed revision for new trunk 2.2.0
|
|
# 90320-0424 - Fixed several small bugs conf records group alias and permissions
|
|
# 90322-0122 - Added ability to delete from the DNC lists
|
|
# 90322-1105 - Added new status settings and vtiger options
|
|
# 90409-2133 - Fixed special characters in SCRIPTS
|
|
# 90413-0755 - Fixed filter and script slashes issues
|
|
# 90417-0211 - Fixed filter and script slashes issues
|
|
# 90422-0613 - Added user_code, territory and email to vicidial_users
|
|
# 90429-0542 - Added 3rd&4th options to SURVEY campaigns
|
|
# 90430-0154 - Added RANDOM and LAST CALL TIME options to lead order for campaigns
|
|
# 90504-0901 - Added Call Menu feature, changed script to use long PHP tags
|
|
# 90511-0910 - Added agentonly_callback_campaign_lock to system_settings
|
|
# 90512-0440 - Added sounds settings to system_settings table
|
|
# 90514-0607 - Added select prompts from list in call menu and in-group screens
|
|
# 90521-0029 - Added user territories enable option
|
|
# 90522-0506 - Security fix for logins when using non-latin setting
|
|
# 90524-2307 - Changed Reports screen layout
|
|
# 90528-2055 - Added ViciDial recording limit field in servers and phone_context to phones
|
|
# 90530-1206 - Changed List Mix to allow for 40 mixes
|
|
# 90531-1802 - Added auto-generated options for users, campaigns, in-groups, etc..., added option to HIDE custphone
|
|
# 90531-2339 - Added Dynamic options for Call Menu
|
|
# 90605-0248 - Added carrier_logging_active servers option
|
|
# 90607-1716 - Changed drop percent limit to allow for 0.1 steps under 3%
|
|
# 90608-0944 - Added Drop Lockout Time feature to Campaign Detail Modification screen
|
|
# 90612-0909 - Added audio prompt selection feature to survey screen
|
|
# 90614-0827 - Added In-Group routing to Call Menu screen, Added pull-down Call Menu option to DID screen
|
|
# 90617-0733 - Added phone ring timeout and call menu custom dialplan entries
|
|
# 90621-0821 - Added phone Conf File Secret field to use a separate password from the user interface for a phone
|
|
# 90621-1220 - Added Call Menu logging tracking_group
|
|
# 90627-0547 - Added no-agent-no-queue options
|
|
# 90627-2333 - Added default transfer button and prepopulate preset options
|
|
# 90628-0924 - Added Text To Speech(TTS) fields
|
|
# 90628-2213 - Added Multi-campaign drop rate groups
|
|
# 90705-0926 - Added User Group agent view options
|
|
# 90710-1528 - Added Agent view and grab queue calls and every call pause options
|
|
# 90717-0646 - Added dialed_label and dialed_number to script variables
|
|
# 90721-1350 - Added RANK and OWNER as list order options and list screen display tables
|
|
# 90722-1235 - Added list reset time and campaign no hopper dialing, agent dial owner only options
|
|
# 90726-0153 - Added allow_alerts for users to disable agent browser alerts
|
|
# 90729-0555 - Added agent_display_dialable_leads and vicidial_balance_rank options
|
|
# 90808-0300 - Added longest_wait_time option for agent call routing
|
|
# 90827-1552 - Added agent_script_override option for lists
|
|
# 90830-2217 - Added Music On Hold section
|
|
# 90904-1536 - Added moh chooser option, timezone list ordering
|
|
# 90908-1207 - Added cross-listing linking for DIDs, CallMenus and In-groups
|
|
# 90916-1105 - Added second web form to ingroups and campaigns and added audio choose for answering machine message and waitforsilence_options
|
|
# 90917-1108 - Added Extra Voicemail boxes config in Admin section
|
|
# 90919-2251 - Removed all SELECT STAR instances in the code, code cleanup to conform to standard
|
|
# 90924-1645 - Added list_id overrides for cid, am_message and drop in-group
|
|
# 90930-2107 - Added agent territory selection options for ViciDial agents
|
|
# 91026-1050 - Added AREACODE DNC option for campaigns
|
|
# 91031-1232 - Added carrier_description field, campaigns links from in-group screen, server links on reports page, agent ranks listing active only
|
|
# 91121-0334 - Limited list called count display to 100+
|
|
# 91125-0628 - Added conf_secret for servers
|
|
# 91204-1652 - Added recording_filename and recording_id as script variables
|
|
# 91205-2231 - Added delete_vm_after_email voicemail option to phones and extra voicemail sections
|
|
# 91210-2038 - Added better logging of Campaign emergency logout
|
|
# 91211-1359 - Added custom user fields and campaign CRM login fields
|
|
# 91219-0719 - Changed some field backgrounds in the Campaign Modification screens
|
|
# 91223-1031 - Added VIDPROMPT options for in-group routing in DIDs
|
|
# 91228-1837 - Added timer action settings to in-groups and campaigns
|
|
# 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides
|
|
# 100104-1454 - Fixed in-group/campaign copy duplication issue
|
|
# 100116-0718 - Added presets to script select list
|
|
# 100319-1708 - Changed user/pass for users to 20 characters in length, highlighted conf file secret in phones
|
|
# 100413-2328 - several small fixes, logging, removal of old SIP/IAX monitor/barge links
|
|
#
|
|
# 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
|
|
|
|
$admin_version = '2.2.0-236';
|
|
$build = '100413-2328';
|
|
|
|
$STARTtime = date("U");
|
|
$SQLdate = date("Y-m-d H:i:s");
|
|
$REPORTdate = date("Y-m-d");
|
|
$MT[0]='';
|
|
$US='_';
|
|
$active_lists=0;
|
|
$inactive_lists=0;
|
|
|
|
$month_old = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
|
|
$past_month_date = date("Y-m-d H:i:s",$month_old);
|
|
$week_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y"));
|
|
$past_week_date = date("Y-m-d H:i:s",$week_old);
|
|
|
|
$dtmf[0]='0'; $dtmf_key[0]='0';
|
|
$dtmf[1]='1'; $dtmf_key[1]='1';
|
|
$dtmf[2]='2'; $dtmf_key[2]='2';
|
|
$dtmf[3]='3'; $dtmf_key[3]='3';
|
|
$dtmf[4]='4'; $dtmf_key[4]='4';
|
|
$dtmf[5]='5'; $dtmf_key[5]='5';
|
|
$dtmf[6]='6'; $dtmf_key[6]='6';
|
|
$dtmf[7]='7'; $dtmf_key[7]='7';
|
|
$dtmf[8]='8'; $dtmf_key[8]='8';
|
|
$dtmf[9]='9'; $dtmf_key[9]='9';
|
|
$dtmf[10]='HASH'; $dtmf_key[10]='#';
|
|
$dtmf[11]='STAR'; $dtmf_key[11]='*';
|
|
$dtmf[12]='A'; $dtmf_key[12]='A';
|
|
$dtmf[13]='B'; $dtmf_key[13]='B';
|
|
$dtmf[14]='C'; $dtmf_key[14]='C';
|
|
$dtmf[15]='D'; $dtmf_key[15]='D';
|
|
$dtmf[16]='TIMECHECK'; $dtmf_key[16]='TIMECHECK';
|
|
$dtmf[17]='TIMEOUT'; $dtmf_key[17]='TIMEOUT';
|
|
$dtmf[18]='INVALID'; $dtmf_key[18]='INVALID';
|
|
|
|
if ($force_logout)
|
|
{
|
|
if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) )
|
|
{
|
|
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
|
Header("HTTP/1.0 401 Unauthorized");
|
|
}
|
|
echo "Voce efetuou logout. Obrigado\n";
|
|
exit;
|
|
}
|
|
|
|
#############################################
|
|
##### START SYSTEM_SETTINGS LOOKUP #####
|
|
$stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$qm_conf_ct = mysql_num_rows($rslt);
|
|
if ($qm_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$non_latin = $row[0];
|
|
$SSauto_dial_limit = $row[1];
|
|
$SSuser_territories_active = $row[2];
|
|
$SSallow_custom_dialplan = $row[3];
|
|
}
|
|
##### END SETTINGS LOOKUP #####
|
|
###########################################
|
|
|
|
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and active='Y';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$auth=$row[0];
|
|
|
|
if ($WeBRooTWritablE > 0)
|
|
{$fp = fopen ("./project_auth_entries.txt", "a");}
|
|
|
|
$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<1))
|
|
{
|
|
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
|
Header("HTTP/1.0 401 Unauthorized");
|
|
echo "Nome ou Senha inválidos: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
|
exit;
|
|
}
|
|
else
|
|
{
|
|
if($auth>0)
|
|
{
|
|
$office_no=strtoupper($PHP_AUTH_USER);
|
|
$password=strtoupper($PHP_AUTH_PW);
|
|
$stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$LOGfull_name =$row[3];
|
|
$LOGuser_level =$row[4];
|
|
$LOGuser_group =$row[5];
|
|
$LOGdelete_users =$row[8];
|
|
$LOGdelete_user_groups =$row[9];
|
|
$LOGdelete_lists =$row[10];
|
|
$LOGdelete_campaigns =$row[11];
|
|
$LOGdelete_ingroups =$row[12];
|
|
$LOGdelete_remote_agents =$row[13];
|
|
$LOGload_leads =$row[14];
|
|
$LOGcampaign_detail =$row[15];
|
|
$LOGast_admin_access =$row[16];
|
|
$LOGast_delete_phones =$row[17];
|
|
$LOGdelete_scripts =$row[18];
|
|
$LOGdelete_filters =$row[29];
|
|
$LOGalter_agent_interface =$row[30];
|
|
$LOGdelete_call_times =$row[32];
|
|
$LOGmodify_call_times =$row[33];
|
|
$LOGmodify_users =$row[34];
|
|
$LOGmodify_campaigns =$row[35];
|
|
$LOGmodify_lists =$row[36];
|
|
$LOGmodify_scripts =$row[37];
|
|
$LOGmodify_filters =$row[38];
|
|
$LOGmodify_ingroups =$row[39];
|
|
$LOGmodify_usergroups =$row[40];
|
|
$LOGmodify_remoteagents =$row[41];
|
|
$LOGmodify_servers =$row[42];
|
|
$LOGview_reports =$row[43];
|
|
$LOGmodify_dids =$row[56];
|
|
$LOGdelete_dids =$row[57];
|
|
$LOGmanager_shift_enforcement_override=$row[61];
|
|
$LOGexport_reports =$row[64];
|
|
$LOGdelete_from_dnc =$row[65];
|
|
|
|
$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$LOGallowed_campaigns = $row[0];
|
|
|
|
if ($WeBRooTWritablE > 0)
|
|
{
|
|
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|XXXX|$ip|$browser|$LOGfull_name|\n");
|
|
fclose($fp);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if ($WeBRooTWritablE > 0)
|
|
{
|
|
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
|
fclose($fp);
|
|
}
|
|
}
|
|
}
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### Header settings
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
header ("Content-type: text/html; charset=utf-8");
|
|
echo "<html>\n";
|
|
echo "<head>\n";
|
|
echo "<!-- VERSÃO: $admin_version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
|
|
echo "<title>ADMINISTRATION: ";
|
|
|
|
if (!isset($ADD)) {$ADD=0;}
|
|
|
|
if ($ADD=="1") {$hh='users'; echo "Incluir Usuário";}
|
|
if ($ADD=="1A") {$hh='users'; echo "Copiar Usuário";}
|
|
if ($ADD==11) {$hh='campaigns'; $sh='basic'; echo "Incluir Campanha";}
|
|
if ($ADD==12) {$hh='campaigns'; $sh='basic'; echo "Copiar Campanha";}
|
|
if ($ADD==111) {$hh='lists'; echo "Incluir Lista";}
|
|
if ($ADD==121) {$hh='lists'; echo "Novo Bloqueio";}
|
|
if ($ADD==1111) {$hh='ingroups'; echo "Incluir Grupo de Entrada";}
|
|
if ($ADD==1211) {$hh='ingroups'; echo "Copiar Grupo de Entrada";}
|
|
if ($ADD==1311) {$hh='ingroups'; echo "IncluirDID";}
|
|
if ($ADD==1411) {$hh='ingroups'; echo "CopiarDID";}
|
|
if ($ADD==1511) {$hh='ingroups'; echo "Incluir Menu de Chamada";}
|
|
if ($ADD==1611) {$hh='ingroups'; echo "Copiar Menu de Chamada";}
|
|
if ($ADD==11111) {$hh='remoteagent'; echo "Incluir Usuário Remoto";}
|
|
if ($ADD==111111) {$hh='usergroups'; echo "Incluir Grupo de Usuários";}
|
|
if ($ADD==1111111) {$hh='scripts'; echo "Incluir Script";}
|
|
if ($ADD==11111111) {$hh='filters'; echo "Incluir Novo Filtro";}
|
|
if ($ADD==111111111) {$hh='admin'; $sh='times'; echo "Novo Horário de Cham.";}
|
|
if ($ADD==131111111) {$hh='admin'; $sh='shifts'; echo "Incluir Turno";}
|
|
if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Novo Horário de Cham. por Estado";}
|
|
if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "NOVO RAMAL";}
|
|
if ($ADD==12111111111) {$hh='admin'; $sh='phones'; echo "INCLUIR ALIAS DE RAMAL";}
|
|
if ($ADD==13111111111) {$hh='admin'; $sh='phones'; echo "INCLUIR ALIAS DE GRUPO";}
|
|
if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "NOVO SERVIDOR";}
|
|
if ($ADD==131111111111) {$hh='admin'; $sh='templates'; echo "INCLUIR TEMPLATE CONF";}
|
|
if ($ADD==141111111111) {$hh='admin'; $sh='carriers'; echo "Incluir Operadora";}
|
|
if ($ADD==151111111111) {$hh='admin'; $sh='tts'; echo "ADD NEW TTS ENTRADA";}
|
|
if ($ADD==161111111111) {$hh='admin'; $sh='moh'; echo "ADD NEW MUSIC EN ESPERA DE ENTRADA";}
|
|
if ($ADD==171111111111) {$hh='admin'; $sh='vm'; echo "ADD NEW contestador";}
|
|
if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "NOVA CONFERÊNCIA";}
|
|
if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";}
|
|
if ($ADD=='2') {$hh='users'; echo "Novo usuário";}
|
|
if ($ADD=='2A') {$hh='users'; echo "Inclusão de Usuário Copiado";}
|
|
if ($ADD==20) {$hh='campaigns'; $sh='basic'; echo "Inclusão de Campanha Copiada";}
|
|
if ($ADD==21) {$hh='campaigns'; $sh='basic'; echo "Nova Campanha";}
|
|
if ($ADD==22) {$hh='campaigns'; $sh='status'; echo "Novo Status de Campanha";}
|
|
if ($ADD==23) {$hh='campaigns'; $sh='hotkey'; echo "New Campanha HotKey Addition";}
|
|
if ($ADD==25) {$hh='campaigns'; $sh='recycle'; echo "Nova Reciclagem de registros";}
|
|
if ($ADD==26) {$hh='campaigns'; $sh='autoalt'; echo "Novo Status de Disc. Alt.";}
|
|
if ($ADD==27) {$hh='campaigns'; $sh='pause'; echo "Novo Código de Pausa";}
|
|
if ($ADD==28) {$hh='campaigns'; $sh='dialstat'; echo "Status de Discagem Adicionado";}
|
|
if ($ADD==29) {$hh='campaigns'; $sh='listmix'; echo "Mesclagem de Listas Incluído";}
|
|
if ($ADD==211) {$hh='lists'; echo "Nova Lista";}
|
|
if ($ADD==2111) {$hh='ingroups'; echo "Novo Grupo de Entrada";}
|
|
if ($ADD==2011) {$hh='ingroups'; echo "Inclusão de Grupo de Entrada Copiada";}
|
|
if ($ADD==2311) {$hh='ingroups'; echo "Incluir DDR";}
|
|
if ($ADD==2411) {$hh='ingroups'; echo "Inclusão de DDR por cópia";}
|
|
if ($ADD==2511) {$hh='ingroups'; echo "Novo Menu de Chamada";}
|
|
if ($ADD==2611) {$hh='ingroups'; echo "Novo Menu de Chamada";}
|
|
if ($ADD==21111) {$hh='remoteagent'; echo "Novo Agente Remoto";}
|
|
if ($ADD==211111) {$hh='usergroups'; echo "Novo Grupo de Usuários";}
|
|
if ($ADD==2111111) {$hh='scripts'; echo "Novo Script";}
|
|
if ($ADD==21111111) {$hh='filters'; echo "Novo Filtro";}
|
|
if ($ADD==211111111) {$hh='admin'; $sh='times'; echo "Nova Inclusão de Horário de Cham.";}
|
|
if ($ADD==231111111) {$hh='admin'; $sh='shifts'; echo "Inclusão de Turno";}
|
|
if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "Nova Inclusão de Hor. de Cham. por Estado";}
|
|
if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "INCLUINDO RAMAL";}
|
|
if ($ADD==22111111111) {$hh='admin'; $sh='phones'; echo "INCLUINDO ALIAS DE RAMAL";}
|
|
if ($ADD==23111111111) {$hh='admin'; $sh='phones'; echo "INCLUINDO ALIAS DE GRUPO";}
|
|
if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ADICIONANDO SERVIDOR";}
|
|
if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADICIONANDO TRUNK DO SERVIDOR VICIDIAL";}
|
|
if ($ADD==231111111111) {$hh='admin'; $sh='templates'; echo "INCLUINDO TEMPLATE CONF";}
|
|
if ($ADD==241111111111) {$hh='admin'; $sh='carriers'; echo "INCLUIR OPERADORA";}
|
|
if ($ADD==251111111111) {$hh='admin'; $sh='tts'; echo "AGREGAR NUEVO TTS ENTRADA";}
|
|
if ($ADD==261111111111) {$hh='admin'; $sh='moh'; echo "ADDING NEW MUSIC EN ESPERA DE ENTRADA";}
|
|
if ($ADD==271111111111) {$hh='admin'; $sh='vm'; echo "AGREGAR NUEVO contestador";}
|
|
if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADICIONANDO CONFERÊNCIA";}
|
|
if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";}
|
|
if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo "INCLUINDO STATUS DE SISTEMA DO VICIDIAL";}
|
|
if ($ADD==231111111111111) {$hh='admin'; $sh='status'; echo "INCLUIR CATEGORIA DE STATUS";}
|
|
if ($ADD==241111111111111) {$hh='admin'; $sh='status'; echo "INCLUINDO CÓDIGO DE STATUS DE CQ";}
|
|
if ($ADD==3) {$hh='users'; echo "Alterar Usuário";}
|
|
if ($ADD==30) {$hh='campaigns'; echo "Campanha não permitida";}
|
|
if ($ADD==31)
|
|
{
|
|
$hh='campaigns'; $sh='detail'; echo "Alterar Campanha - Detalhes - $campaign_id";
|
|
if ($SUB==22) {echo " - Status";}
|
|
if ($SUB==23) {echo " - Atalhos";}
|
|
if ($SUB==25) {echo " -Reciclagem de RegistrosEntries";}
|
|
if ($SUB==26) {echo " - Discar Num. Alt. Status";}
|
|
if ($SUB==27) {echo " - Agent Códigos de Pausa";}
|
|
if ($SUB==28) {echo " - QC";}
|
|
if ($SUB==29) {echo " - Mesclagem de Listaes";}
|
|
if ($SUB=='20A') {echo " - Pesquisa";}
|
|
}
|
|
if ($ADD==34)
|
|
{
|
|
$hh='campaigns'; $sh='basic'; echo "Alterar Campanha - Visão Básica - $campaign_id";
|
|
if ($SUB==22) {echo " - Status";}
|
|
if ($SUB==23) {echo " - Atalhos";}
|
|
if ($SUB==25) {echo " -Reciclagem de RegistrosEntries";}
|
|
if ($SUB==26) {echo " - Discar Num. Alt. Status";}
|
|
if ($SUB==27) {echo " - Agent Códigos de Pausa";}
|
|
if ($SUB==28) {echo " - QC";}
|
|
if ($SUB==29) {echo " - Mesclagem de Listaes";}
|
|
if ($SUB=='20A') {echo " - Pesquisa";}
|
|
}
|
|
if ($ADD==32) {$hh='campaigns'; $sh='status'; echo "Status da Campanha";}
|
|
if ($ADD==33) {$hh='campaigns'; $sh='hotkey'; echo "Atalhos da Campanha";}
|
|
if ($ADD==35) {$hh='campaigns'; $sh='recycle'; echo "Reciclagem de Registros da Campanha";}
|
|
if ($ADD==36) {$hh='campaigns'; $sh='autoalt'; echo "Status de Disc. Alt. da Campanha";}
|
|
if ($ADD==37) {$hh='campaigns'; $sh='pause'; echo "Códigos de Pausa de Agente da Campanha";}
|
|
if ($ADD==38) {$hh='campaigns'; $sh='dialstat'; echo "Status de Discagem da Campanha";}
|
|
if ($ADD==39) {$hh='campaigns'; $sh='listmix'; echo "Mesclagem de Listas";}
|
|
if ($ADD==311) {$hh='lists'; echo "Alterar Lista";}
|
|
if ($ADD==3111) {$hh='ingroups'; echo "Alterar Groupo de Entrada";}
|
|
if ($ADD==3311) {$hh='ingroups'; echo "AlterarDID";}
|
|
if ($ADD==3511) {$hh='ingroups'; echo "Alterar Menu de Chamada";}
|
|
if ($ADD==31111) {$hh='remoteagent'; echo "Alterar Agentes Remotos";}
|
|
if ($ADD==311111) {$hh='usergroups'; echo "Alterar Grupos de Usuários";}
|
|
if ($ADD==3111111) {$hh='scripts'; echo "Alterar Script";}
|
|
if ($ADD==31111111) {$hh='filters'; echo "Alterar Filtro";}
|
|
if ($ADD==311111111) {$hh='admin'; $sh='times'; echo "Alterar um Hor. de Cham.";}
|
|
if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Alterar as configurações de horário de chamada por estado";}
|
|
if ($ADD==331111111) {$hh='admin'; $sh='shifts'; echo "Alterar Turno";}
|
|
if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Alterar um horário de chamada por estado";}
|
|
if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR RAMAL";}
|
|
if ($ADD==32111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR ALIAS DE RAMAL";}
|
|
if ($ADD==33111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR ALIAS DE GRUPO";}
|
|
if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "ALTERAR SERVIDOR";}
|
|
if ($ADD==331111111111) {$hh='admin'; $sh='templates'; echo "ALTERAR TEMPLATE CONF";}
|
|
if ($ADD==341111111111) {$hh='admin'; $sh='carriers'; echo "ALTERAR OPERADORA";}
|
|
if ($ADD==351111111111) {$hh='admin'; $sh='tts'; echo "MODIFICAR TTS ENTRADA";}
|
|
if ($ADD==361111111111) {$hh='admin'; $sh='moh'; echo "MODIFICAR MÚSICA EN ESPERA DE ENTRADA";}
|
|
if ($ADD==371111111111) {$hh='admin'; $sh='vm'; echo "MODIFICAR contestador";}
|
|
if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "ALTERAR CONFERÊNCIA";}
|
|
if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";}
|
|
if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "ALTERAR CONFIG. DE SISTEMA DO VICIDIAL";}
|
|
if ($ADD==321111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR STATUS DE SISTEMA DO VICIDIAL";}
|
|
if ($ADD==331111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR CATEGORIA DE STATUS";}
|
|
if ($ADD==341111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR CÓDIGO DE STATUS DE CQ";}
|
|
if ($ADD=="4A") {$hh='users'; echo "Alterar Usuário - Admin";}
|
|
if ($ADD=="4B") {$hh='users'; echo "Alterar Usuário - Admin";}
|
|
if ($ADD==4) {$hh='users'; echo "Alterar Usuário";}
|
|
if ($ADD==41) {$hh='campaigns'; $sh='detail'; echo "Alterar Campanha";}
|
|
if ($ADD==42) {$hh='campaigns'; $sh='status'; echo "Alterar Campanha Status";}
|
|
if ($ADD==43) {$hh='campaigns'; $sh='hotkey'; echo "Alterar Campanha HotKey";}
|
|
if ($ADD==44) {$hh='campaigns'; $sh='basic'; echo "Alterar Campanha - Visão Básica";}
|
|
if ($ADD==45) {$hh='campaigns'; $sh='recycle'; echo "Alterar Reciclagem de registros";}
|
|
if ($ADD==47) {$hh='campaigns'; $sh='pause'; echo "Alterar Código de Pausa";}
|
|
if ($ADD==48) {$hh='campaigns'; $sh='qc'; echo "Alterar Configurações de CQ";}
|
|
if ($ADD==49) {$hh='campaigns'; $sh='listmix'; echo "Alterar Mesclagem de Listas";}
|
|
if ($ADD=='40A') {$hh='campaigns'; $sh='survey'; echo "Alterar Campanha de Pesquisa";}
|
|
if ($ADD==411) {$hh='lists'; echo "Alterar Lista";}
|
|
if ($ADD==4111) {$hh='ingroups'; echo "Alterar Groupo de Entrada";}
|
|
if ($ADD==4311) {$hh='ingroups'; echo "AlterarDID";}
|
|
if ($ADD==4511) {$hh='ingroups'; echo "Alterar Menu de Chamada";}
|
|
if ($ADD==41111) {$hh='remoteagent'; echo "Alterar Agentes Remotos";}
|
|
if ($ADD==411111) {$hh='usergroups'; echo "Alterar Grupos de Usuários";}
|
|
if ($ADD==4111111) {$hh='scripts'; echo "Alterar Script";}
|
|
if ($ADD==41111111) {$hh='filters'; echo "Alterar Filtro";}
|
|
if ($ADD==411111111) {$hh='admin'; $sh='times'; echo "Alterar um Hor. de Cham.";}
|
|
if ($ADD==431111111) {$hh='admin'; $sh='shifts'; echo "Alterar Turno";}
|
|
if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Alterar um horário de chamada por estado";}
|
|
if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR RAMAL";}
|
|
if ($ADD==42111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR ALIAS DE RAMAL";}
|
|
if ($ADD==43111111111) {$hh='admin'; $sh='phones'; echo "ALTERAR ALIAS DE GRUPO";}
|
|
if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "ALTERAR SERVIDOR";}
|
|
if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "ALTERAR TRUNK DO SERVIDOR VICIDIAL";}
|
|
if ($ADD==431111111111) {$hh='admin'; $sh='templates'; echo "ALTERAR TEMPLATE CONF";}
|
|
if ($ADD==441111111111) {$hh='admin'; $sh='carriers'; echo "ALTERAR OPERADORA";}
|
|
if ($ADD==451111111111) {$hh='admin'; $sh='tts'; echo "MODIFICAR TTS ENTRADA";}
|
|
if ($ADD==461111111111) {$hh='admin'; $sh='moh'; echo "MODIFICAR MÚSICA EN ESPERA DE ENTRADA";}
|
|
if ($ADD==471111111111) {$hh='admin'; $sh='vm'; echo "MODIFICAR contestador";}
|
|
if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "ALTERAR CONFERÊNCIA";}
|
|
if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";}
|
|
if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "ALTERAR CONFIG. DE SISTEMA DO VICIDIAL";}
|
|
if ($ADD==421111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR STATUS DE SISTEMA DO VICIDIAL";}
|
|
if ($ADD==431111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR CATEGORIA DE STATUS";}
|
|
if ($ADD==441111111111111) {$hh='admin'; $sh='status'; echo "ALTERAR CÓDIGO DE STATUS DE CQ";}
|
|
if ($ADD==5) {$hh='users'; echo "RemoverUsuário";}
|
|
if ($ADD==51) {$hh='campaigns'; $sh='detail'; echo "RemoverCampanha";}
|
|
if ($ADD==52) {$hh='campaigns'; $sh='detail'; echo "Efetuar Saída dos Agentes";}
|
|
if ($ADD==53) {$hh='campaigns'; $sh='detail'; echo "Limpador de emergência para VDAC";}
|
|
if ($ADD==511) {$hh='lists'; echo "RemoverList";}
|
|
if ($ADD==5111) {$hh='ingroups'; echo "RemoverIn-Group";}
|
|
if ($ADD==5311) {$hh='ingroups'; echo "RemoverDID";}
|
|
if ($ADD==5511) {$hh='ingroups'; echo "Remover Menu de Chamada";}
|
|
if ($ADD==51111) {$hh='remoteagent'; echo "Apagar Usuários Remotos";}
|
|
if ($ADD==511111) {$hh='usergroups'; echo "Apagar Usuários Group";}
|
|
if ($ADD==5111111) {$hh='scripts'; echo "Apagar Scripts";}
|
|
if ($ADD==51111111) {$hh='filters'; echo "Apagar Filtro";}
|
|
if ($ADD==511111111) {$hh='admin'; $sh='times'; echo "RemoverCall Time";}
|
|
if ($ADD==531111111) {$hh='admin'; $sh='shifts'; echo "Remover Turno";}
|
|
if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Apagar Hor. de Cham. por Estado";}
|
|
if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";}
|
|
if ($ADD==52111111111) {$hh='admin'; $sh='phones'; echo "REMOVER ALIAS DE RAMAL";}
|
|
if ($ADD==53111111111) {$hh='admin'; $sh='phones'; echo "REMOVER ALIAS DE GRUPO";}
|
|
if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";}
|
|
if ($ADD==531111111111) {$hh='admin'; $sh='templates'; echo "REMOVER TEMPLATE CONF";}
|
|
if ($ADD==541111111111) {$hh='admin'; $sh='carriers'; echo "REMOVER OPERADORA";}
|
|
if ($ADD==551111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRADA";}
|
|
if ($ADD==561111111111) {$hh='admin'; $sh='moh'; echo "DELETE MÚSICA EN ESPERA DE ENTRADA";}
|
|
if ($ADD==571111111111) {$hh='admin'; $sh='vm'; echo "DELETE contestador";}
|
|
if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";}
|
|
if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";}
|
|
if ($ADD==6) {$hh='users'; echo "RemoverUsuário";}
|
|
if ($ADD==61) {$hh='campaigns'; $sh='detail'; echo "RemoverCampanha";}
|
|
if ($ADD==62) {$hh='campaigns'; $sh='detail'; echo "Efetuar Saída dos Agentes";}
|
|
if ($ADD==63) {$hh='campaigns'; $sh='detail'; echo "Limpador de emergência para VDAC";}
|
|
if ($ADD==65) {$hh='campaigns'; $sh='recycle'; echo "Remover Reciclagem de Registros";}
|
|
if ($ADD==66) {$hh='campaigns'; $sh='autoalt'; echo "Remover Status de Disc. Alt.";}
|
|
if ($ADD==67) {$hh='campaigns'; $sh='pause'; echo "Apagar Código de Pausa";}
|
|
if ($ADD==68) {$hh='campaigns'; $sh='dialstat'; echo "Status de Discagem Removido";}
|
|
if ($ADD==69) {$hh='campaigns'; $sh='listmix'; echo "Listas de Campanha Removida";}
|
|
if ($ADD==611) {$hh='lists'; echo "RemoverList";}
|
|
if ($ADD==6111) {$hh='ingroups'; echo "RemoverIn-Group";}
|
|
if ($ADD==6311) {$hh='ingroups'; echo "RemoverDID";}
|
|
if ($ADD==6511) {$hh='ingroups'; echo "Remover Menu de Chamada";}
|
|
if ($ADD==61111) {$hh='remoteagent'; echo "Apagar Usuários Remotos";}
|
|
if ($ADD==611111) {$hh='usergroups'; echo "Apagar Usuários Group";}
|
|
if ($ADD==6111111) {$hh='scripts'; echo "Apagar Scripts";}
|
|
if ($ADD==61111111) {$hh='filters'; echo "Apagar Filtro";}
|
|
if ($ADD==611111111) {$hh='admin'; $sh='times'; echo "RemoverCall Time";}
|
|
if ($ADD==631111111) {$hh='admin'; $sh='shifts'; echo "Remover Turno";}
|
|
if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Apagar Hor. de Cham. por Estado";}
|
|
if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";}
|
|
if ($ADD==62111111111) {$hh='admin'; $sh='phones'; echo "REMOVER ALIAS DE RAMAL";}
|
|
if ($ADD==63111111111) {$hh='admin'; $sh='phones'; echo "REMOVER ALIAS DE GRUPO";}
|
|
if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";}
|
|
if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "REMOVER TRUNK DO SERVIDOR VICIDIAL";}
|
|
if ($ADD==631111111111) {$hh='admin'; $sh='templates'; echo "REMOVER TEMPLATE CONF";}
|
|
if ($ADD==641111111111) {$hh='admin'; $sh='carriers'; echo "REMOVER OPERADORA";}
|
|
if ($ADD==651111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRADA";}
|
|
if ($ADD==661111111111) {$hh='admin'; $sh='moh'; echo "DELETE MÚSICA EN ESPERA DE ENTRADA";}
|
|
if ($ADD==671111111111) {$hh='admin'; $sh='vm'; echo "DELETE contestador";}
|
|
if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";}
|
|
if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";}
|
|
if ($ADD==73) {$hh='campaigns'; echo "Total de Registros Discáveis";}
|
|
if ($ADD==7111111) {$hh='scripts'; echo "Pré-Visualizar Script";}
|
|
if ($ADD==700000000000000) {$hh='reports'; echo "VICIDIAL LOG DE ALT. ADMIN";}
|
|
if ($ADD==710000000000000) {$hh='reports'; echo "VICIDIAL LOG DE ALT. DO USUÁRIO ADMIN";}
|
|
if ($ADD==720000000000000) {$hh='reports'; echo "VICIDIAL LOG DE ALT. DA SEÇÃO ADMIN";}
|
|
if ($ADD==730000000000000) {$hh='reports'; echo "VICIDIAL LOG DE ALT. DE DETALHES ADMIN";}
|
|
if ($ADD==0) {$hh='users'; echo "Lista de Usuários";}
|
|
if ($ADD==8) {$hh='users'; echo "Chamadas Agendadas deste Agente";}
|
|
if ($ADD==81) {$hh='campaigns'; $sh='list'; echo "Chamadas Agendadas nesta Campanha";}
|
|
if ($ADD==811) {$hh='lists'; echo "Chamadas Agendadas nesta Lista";}
|
|
if ($ADD==8111) {$hh='usergroups'; echo "Agendamentos do Grupo de Usuários";}
|
|
if ($ADD==10) {$hh='campaigns'; $sh='list'; echo "Campanhas";}
|
|
if ($ADD==100) {$hh='lists'; echo "Listas";}
|
|
if ($ADD==1000) {$hh='ingroups'; echo "Groupos de Entrada";}
|
|
if ($ADD==1300) {$hh='ingroups'; echo "DIDs";}
|
|
if ($ADD==1500) {$hh='ingroups'; echo "Menus de Chamada";}
|
|
if ($ADD==10000) {$hh='remoteagent'; echo "Agentes Remotos";}
|
|
if ($ADD==100000) {$hh='usergroups'; echo "Grupos de Usuário";}
|
|
if ($ADD==1000000) {$hh='scripts'; echo "Scripts";}
|
|
if ($ADD==10000000) {$hh='filters'; echo "Filtros";}
|
|
if ($ADD==100000000) {$hh='admin'; $sh='times'; echo "Horários de Cham.";}
|
|
if ($ADD==130000000) {$hh='admin'; $sh='shifts'; echo "Turnos";}
|
|
if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "Horários de Chamada por Estado";}
|
|
if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "LISTA DE RAMAIS";}
|
|
if ($ADD==12000000000) {$hh='admin'; $sh='phones'; echo "LISTA DE ALIAS DE RAMAL";}
|
|
if ($ADD==13000000000) {$hh='admin'; $sh='phones'; echo "LISTA DE ALIAS DE GRUPOS";}
|
|
if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "LISTA DE SERVIDORES";}
|
|
if ($ADD==130000000000) {$hh='admin'; $sh='templates'; echo "LISTA DE TEMPLATES CONF";}
|
|
if ($ADD==140000000000) {$hh='admin'; $sh='carriers'; echo "LISTA DE OPERADORAS";}
|
|
if ($ADD==150000000000) {$hh='admin'; $sh='tts'; echo "TTS LISTA INSCRITOS";}
|
|
if ($ADD==160000000000) {$hh='admin'; $sh='moh'; echo "MÚSICA EN ESPERA LISTA DE ENTRADA";}
|
|
if ($ADD==170000000000) {$hh='admin'; $sh='vm'; echo "LISTA DE CORREO DE VOZ CAJAS";}
|
|
if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "LISTA DE CONFERÊNCIAS";}
|
|
if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL LISTA DE CONFERÊNCIAS";}
|
|
if ($ADD==550) {$hh='users'; echo "Formulário de Pesquisa";}
|
|
if ($ADD==551) {$hh='users'; echo "PESQUISAR RAMAIS";}
|
|
if ($ADD==660) {$hh='users'; echo "RESULTADOS DA PESQUISA";}
|
|
if ($ADD==661) {$hh='users'; echo "RESULTADO DA PESQUISA DE RAMAIS";}
|
|
if ($ADD==99999) {$hh='users'; echo "AJUDA";}
|
|
if ($ADD==999999) {$hh='reports'; echo "RELATÓRIOS";}
|
|
|
|
if ( ($ADD>9) && ($ADD < 99998) )
|
|
{
|
|
##### get scripts listing for dynamic pulldown
|
|
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$scripts_to_print = mysql_num_rows($rslt);
|
|
$scripts_list="<option value=\"\">NONE</option>\n";
|
|
|
|
$o=0;
|
|
while ($scripts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$scripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$scriptname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
##### get filters listing for dynamic pulldown
|
|
$stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_sql from vicidial_lead_filters order by lead_filter_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$filters_to_print = mysql_num_rows($rslt);
|
|
$filters_list="<option value=\"\">NONE</option>\n";
|
|
|
|
$o=0;
|
|
while ($filters_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$filters_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$filtername_list["$rowx[0]"] = "$rowx[1]";
|
|
$filtersql_list["$rowx[0]"] = "$rowx[2]";
|
|
$o++;
|
|
}
|
|
|
|
##### get call_times listing for dynamic pulldown
|
|
$stmt="SELECT call_time_id,call_time_name from vicidial_call_times order by call_time_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$times_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($times_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$call_times_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$call_timename_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) )
|
|
{
|
|
##### get server listing for dynamic pulldown
|
|
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rslt);
|
|
$servers_list='';
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
##### BEGIN get campaigns listing for rankings #####
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
$campaigns_value='';
|
|
$RANKcampaigns_list="<tr><td>CAMPANHA</td><td> RANK</td><td> CALLS</td><td ALIGN=CENTER>WEB VARS</td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$campaign_id_values[$o] = $rowx[0];
|
|
$campaign_name_values[$o] = $rowx[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$group_web_vars='';
|
|
$campaign_web='';
|
|
$stmt="SELECT campaign_rank,calls_today,group_web_vars from vicidial_campaign_agents where user='$user' and campaign_id='$campaign_id_values[$o]'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ranks_to_print = mysql_num_rows($rslt);
|
|
if ($ranks_to_print > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$SELECT_campaign_rank = $row[0];
|
|
$calls_today = $row[1];
|
|
$group_web_vars = $row[2];
|
|
}
|
|
else
|
|
{$calls_today=0; $SELECT_campaign_rank=0; $group_web_vars='';}
|
|
if ( ($ADD=="4A") or ($ADD=="4B") )
|
|
{
|
|
$stmt_grp_values='';
|
|
if (isset($_GET["RANK_$campaign_id_values[$o]"])) {$campaign_rank=$_GET["RANK_$campaign_id_values[$o]"];}
|
|
elseif (isset($_POST["RANK_$campaign_id_values[$o]"])) {$campaign_rank=$_POST["RANK_$campaign_id_values[$o]"];}
|
|
if (isset($_GET["WEB_$campaign_id_values[$o]"])) {$campaign_web=$_GET["WEB_$campaign_id_values[$o]"];}
|
|
elseif (isset($_POST["WEB_$campaign_id_values[$o]"])) {$campaign_web=$_POST["WEB_$campaign_id_values[$o]"];}
|
|
if ($non_latin < 1)
|
|
{
|
|
$campaign_rank = ereg_replace("[^-\_0-9]","",$campaign_rank);
|
|
$campaign_web = preg_replace("/;|\"|\'/","",$campaign_web);
|
|
}
|
|
|
|
if ($ranks_to_print > 0)
|
|
{
|
|
$stmt="UPDATE vicidial_campaign_agents set campaign_rank='$campaign_rank', campaign_weight='$campaign_rank', group_web_vars='$campaign_web' where campaign_id='$campaign_id_values[$o]' and user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_campaign_agents set campaign_rank='$campaign_rank', campaign_weight='$campaign_rank', campaign_id='$campaign_id_values[$o]', user='$user', group_web_vars='$campaign_web';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
|
|
$stmt="UPDATE vicidial_live_agents set campaign_weight='$campaign_rank' where campaign_id='$campaign_id_values[$o]' and user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
else {$campaign_rank = $SELECT_campaign_rank;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
# disable non user-group allowable campaign ranks
|
|
$stmt="SELECT user_group from vicidial_users where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$Ruser_group = $row[0];
|
|
|
|
$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$Ruser_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$allowed_campaigns = $row[0];
|
|
$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
|
|
$UGcampaigns = explode(" ", $allowed_campaigns);
|
|
|
|
$p=0; $RANK_camp_active=0; $CR_disabled = '';
|
|
if (eregi('-ALL-CAMPANHAS-',$allowed_campaigns))
|
|
{$RANK_camp_active++;}
|
|
else
|
|
{
|
|
$UGcampaign_ct = count($UGcampaigns);
|
|
while ($p < $UGcampaign_ct)
|
|
{
|
|
if ($campaign_id_values[$o] == $UGcampaigns[$p])
|
|
{$RANK_camp_active++;}
|
|
$p++;
|
|
}
|
|
}
|
|
if ($RANK_camp_active < 1) {$CR_disabled = 'DISABLED';}
|
|
|
|
$RANKcampaigns_list .= "<tr $bgcolor><td>";
|
|
$campaigns_list .= "<a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id_values[$o]\">$campaign_id_values[$o]</a> - $campaign_name_values[$o] <BR>\n";
|
|
$RANKcampaigns_list .= "<a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id_values[$o]\">$campaign_id_values[$o]</a> - $campaign_name_values[$o] </td>";
|
|
$RANKcampaigns_list .= "<td> <select size=1 name=RANK_$campaign_id_values[$o] $CR_disabled>\n";
|
|
$h="9";
|
|
while ($h>=-9)
|
|
{
|
|
$RANKcampaigns_list .= "<option value=\"$h\"";
|
|
if ($h==$campaign_rank)
|
|
{$RANKcampaigns_list .= " SELECTED";}
|
|
$RANKcampaigns_list .= ">$h</option>";
|
|
$h--;
|
|
}
|
|
if ( (strlen($campaign_web) < 1) and (strlen($group_web_vars) > 0) )
|
|
{$campaign_web=$group_web_vars;}
|
|
$RANKcampaigns_list .= "</select></td>\n";
|
|
$RANKcampaigns_list .= "<td align=right> $calls_today</td>\n";
|
|
$RANKcampaigns_list .= "<td> <input type=text size=25 maxlength=255 name=WEB_$campaign_id_values[$o] value=\"$campaign_web\"></td></tr>\n";
|
|
$o++;
|
|
}
|
|
##### END get campaigns listing for rankings #####
|
|
|
|
|
|
##### BEGIN get inbound groups listing for checkboxes #####
|
|
$xfer_groupsSQL='';
|
|
if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) or ( ($ADD==41) and (eregi('list_activation', $stage))) )
|
|
{
|
|
$stmt="SELECT closer_campaigns,xfer_groups from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$closer_campaigns = $row[0];
|
|
$closer_campaigns = preg_replace("/ -$/","",$closer_campaigns);
|
|
$groups = explode(" ", $closer_campaigns);
|
|
$xfer_groups = $row[1];
|
|
$xfer_groups = preg_replace("/ -$/","",$xfer_groups);
|
|
$XFERgroups = explode(" ", $xfer_groups);
|
|
$xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups);
|
|
$xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL);
|
|
$xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')";
|
|
}
|
|
if ($ADD==41)
|
|
{
|
|
$p=0;
|
|
$XFERgroup_ct = count($XFERgroups);
|
|
while ($p < $XFERgroup_ct)
|
|
{
|
|
$xfer_groups .= " $XFERgroups[$p]";
|
|
$p++;
|
|
}
|
|
$xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups);
|
|
$xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL);
|
|
$xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')";
|
|
}
|
|
|
|
if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) )
|
|
{
|
|
$stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$closer_campaigns = $row[0];
|
|
$closer_campaigns = preg_replace("/ -$/","",$closer_campaigns);
|
|
$groups = explode(" ", $closer_campaigns);
|
|
}
|
|
|
|
if ($ADD==3)
|
|
{
|
|
$stmt="SELECT closer_campaigns from vicidial_users where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$closer_campaigns = $row[0];
|
|
$closer_campaigns = preg_replace("/ -$/","",$closer_campaigns);
|
|
$groups = explode(" ", $closer_campaigns);
|
|
}
|
|
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
|
# $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$groups_to_print = mysql_num_rows($rslt);
|
|
$groups_list='';
|
|
$groups_value='';
|
|
$XFERgroups_list='';
|
|
$RANKgroups_list="<tr><td>ENTRANTE GROUP</td><td> RANK</td><td> CALLS</td><td ALIGN=CENTER>WEB VARS</td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($groups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$group_id_values[$o] = $rowx[0];
|
|
$group_name_values[$o] = $rowx[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($groups_to_print > $o)
|
|
{
|
|
$group_web_vars='';
|
|
$group_web='';
|
|
$stmt="SELECT group_rank,calls_today,group_web_vars from vicidial_inbound_group_agents where user='$user' and group_id='$group_id_values[$o]'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ranks_to_print = mysql_num_rows($rslt);
|
|
if ($ranks_to_print > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$SELECT_group_rank = $row[0];
|
|
$calls_today = $row[1];
|
|
$group_web_vars = $row[2];
|
|
}
|
|
else
|
|
{$calls_today=0; $SELECT_group_rank=0;}
|
|
if ( ($ADD=="4A") or ($ADD=="4B") )
|
|
{
|
|
if (isset($_GET["RANK_$group_id_values[$o]"])) {$group_rank=$_GET["RANK_$group_id_values[$o]"];}
|
|
elseif (isset($_POST["RANK_$group_id_values[$o]"])) {$group_rank=$_POST["RANK_$group_id_values[$o]"];}
|
|
if (isset($_GET["WEB_$group_id_values[$o]"])) {$group_web=$_GET["WEB_$group_id_values[$o]"];}
|
|
elseif (isset($_POST["WEB_$group_id_values[$o]"])) {$group_web=$_POST["WEB_$group_id_values[$o]"];}
|
|
|
|
if ($non_latin < 1)
|
|
{
|
|
$group_rank = ereg_replace("[^-\_0-9]","",$group_rank);
|
|
$group_web = preg_replace("/;|\"|\'/","",$group_web);
|
|
}
|
|
|
|
if ($ranks_to_print > 0)
|
|
{
|
|
$stmt="UPDATE vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank', group_web_vars='$group_web' where group_id='$group_id_values[$o]' and user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank', group_id='$group_id_values[$o]', user='$user', group_web_vars='$group_web';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
|
|
$stmt="UPDATE vicidial_live_inbound_agents set group_weight='$group_rank' where group_id='$group_id_values[$o]' and user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmt_grp_values .= "$stmt|";
|
|
}
|
|
else {$group_rank = $SELECT_group_rank;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
$groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_values[$o]\"";
|
|
$XFERgroups_list .= "<input type=\"checkbox\" name=\"XFERgroups[]\" value=\"$group_id_values[$o]\"";
|
|
$RANKgroups_list .= "<tr $bgcolor><td><input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_values[$o]\"";
|
|
$p=0;
|
|
$group_ct = count($groups);
|
|
while ($p < $group_ct)
|
|
{
|
|
if ($group_id_values[$o] == $groups[$p])
|
|
{
|
|
$groups_list .= " CHECKED";
|
|
$RANKgroups_list .= " CHECKED";
|
|
$groups_value .= " $group_id_values[$o]";
|
|
}
|
|
$p++;
|
|
}
|
|
$p=0;
|
|
$XFERgroup_ct = count($XFERgroups);
|
|
while ($p < $XFERgroup_ct)
|
|
{
|
|
if ($group_id_values[$o] == $XFERgroups[$p])
|
|
{
|
|
$XFERgroups_list .= " CHECKED";
|
|
$XFERgroups_value .= " $group_id_values[$o]";
|
|
}
|
|
$p++;
|
|
}
|
|
$stmt="SELECT queue_priority from vicidial_inbound_groups where group_id='$group_id_values[$o]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$VIG_priority = $row[0];
|
|
|
|
$groups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] - $VIG_priority <BR>\n";
|
|
$XFERgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] <BR>\n";
|
|
$RANKgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] </td>";
|
|
$RANKgroups_list .= "<td> <select size=1 name=RANK_$group_id_values[$o]>\n";
|
|
$h="9";
|
|
while ($h>=-9)
|
|
{
|
|
$RANKgroups_list .= "<option value=\"$h\"";
|
|
if ($h==$group_rank)
|
|
{$RANKgroups_list .= " SELECTED";}
|
|
$RANKgroups_list .= ">$h</option>";
|
|
$h--;
|
|
}
|
|
if ( (strlen($group_web) < 1) and (strlen($group_web_vars) > 0) )
|
|
{$group_web=$group_web_vars;}
|
|
$RANKgroups_list .= "</select></td>\n";
|
|
$RANKgroups_list .= "<td align=right> $calls_today</td>\n";
|
|
$RANKgroups_list .= "<td> <input type=text size=25 maxlength=255 name=WEB_$group_id_values[$o] value=\"$group_web\"></td></tr>\n";
|
|
$o++;
|
|
}
|
|
if (strlen($groups_value)>2) {$groups_value .= " -";}
|
|
if (strlen($XFERgroups_value)>2) {$XFERgroups_value .= " -";}
|
|
}
|
|
##### END get inbound groups listing for checkboxes #####
|
|
|
|
|
|
##### BEGIN get campaigns listing for checkboxes #####
|
|
if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) )
|
|
{
|
|
if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) )
|
|
{
|
|
$stmt="SELECT allowed_campaigns,qc_allowed_campaigns,qc_allowed_inbound_groups from vicidial_user_groups where user_group='$user_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$allowed_campaigns = $row[0];
|
|
$qc_allowed_campaigns = $row[1];
|
|
$qc_allowed_inbound_groups = $row[2];
|
|
$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
|
|
$campaigns = explode(" ", $allowed_campaigns);
|
|
$qc_allowed_campaigns = preg_replace("/ -$/","",$qc_allowed_campaigns);
|
|
$qc_campaigns = explode(" ", $qc_allowed_campaigns);
|
|
$qc_allowed_inbound_groups = preg_replace("/ -$/","",$qc_allowed_inbound_groups);
|
|
$qc_groups = explode(" ", $qc_allowed_inbound_groups);
|
|
}
|
|
|
|
$campaigns_value='';
|
|
$campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPANHAS-"';
|
|
$qc_campaigns_value='';
|
|
$qc_campaigns_list='<B><input type="checkbox" name="qc_campaigns[]" value="-ALL-CAMPANHAS-"';
|
|
$qc_groups_value='';
|
|
$qc_groups_list='<B><input type="checkbox" name="qc_groups[]" value="-ALL-GROUPS-"';
|
|
$p=0;
|
|
while ($p<2000)
|
|
{
|
|
if (eregi('ALL-CAMPANHAS',$campaigns[$p]))
|
|
{
|
|
$campaigns_list.=" CHECKED";
|
|
$campaigns_value .= " -ALL-CAMPANHAS-";
|
|
}
|
|
if (eregi('ALL-CAMPANHAS',$qc_campaigns[$p]))
|
|
{
|
|
$qc_campaigns_list.=" CHECKED";
|
|
$qc_campaigns_value .= " -ALL-CAMPANHAS-";
|
|
}
|
|
if (eregi('ALL-GROUPS',$qc_groups[$p]))
|
|
{
|
|
$qc_groups_list.=" CHECKED";
|
|
$qc_groups_value .= " -ALL-GROUPS-";
|
|
}
|
|
$p++;
|
|
}
|
|
$campaigns_list.="> ALL-CAMPANHAS - USUÁRIOS PODEM VER QUALQUER CAMPANHA</B><BR>\n";
|
|
$qc_campaigns_list.="> ALL-CAMPANHAS - USUÁRIOS PODEM FAZER CQ EM QUALQUER CAMPANHA</B><BR>\n";
|
|
$qc_groups_list.="> ALL-GROUPS - USUÁRIOS PODEM FAZER CQ EM QUALQUER GRUPO DE ENTRADA</B><BR>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaign_id_value = $rowx[0];
|
|
$campaign_name_value = $rowx[1];
|
|
$campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\"";
|
|
$qc_campaigns_list .= "<input type=\"checkbox\" name=\"qc_campaigns[]\" value=\"$campaign_id_value\"";
|
|
$p=0;
|
|
while ($p<1000)
|
|
{
|
|
if ( ($campaign_id_value == $campaigns[$p]) and (strlen($campaign_id_value) > 1) )
|
|
{
|
|
# echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->";
|
|
$campaigns_list .= " CHECKED";
|
|
$campaigns_value .= " $campaign_id_value";
|
|
}
|
|
if ($campaign_id_value == $qc_campaigns[$p])
|
|
{
|
|
$qc_campaigns_list .= " CHECKED";
|
|
$qc_campaigns_value .= " $campaign_id_value";
|
|
}
|
|
# echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->";
|
|
$p++;
|
|
}
|
|
$campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
|
|
$qc_campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$groups_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($groups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$group_id_value = $rowx[0];
|
|
$group_name_value = $rowx[1];
|
|
$qc_groups_list .= "<input type=\"checkbox\" name=\"qc_groups[]\" value=\"$group_id_value\"";
|
|
$p=0;
|
|
while ($p<2000)
|
|
{
|
|
if ( ($group_id_value == $qc_groups[$p]) and (strlen($group_id_value) > 1) )
|
|
{
|
|
$qc_groups_list .= " CHECKED";
|
|
$qc_groups_value .= " $group_id_value";
|
|
}
|
|
$p++;
|
|
}
|
|
$qc_groups_list .= "> $group_id_value - $group_name_value<BR>\n";
|
|
$o++;
|
|
}
|
|
|
|
if (strlen($campaigns_value)>2) {$campaigns_value .= " -";}
|
|
if (strlen($qc_campaigns_value)>2) {$qc_campaigns_value .= " -";}
|
|
if (strlen($qc_groups_value)>2) {$qc_groups_value .= " -";}
|
|
}
|
|
##### END get campaigns listing for checkboxes #####
|
|
|
|
|
|
if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) )
|
|
{
|
|
##### get server listing for dynamic pulldown
|
|
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rsltx);
|
|
$servers_list='';
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$NWB = " <a href=\"javascript:openNewWindow('$PHP_SELF?ADD=99999";
|
|
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 Border=0 ALT=\"AJUDA\" ALIGN=TOP></A>";
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 9 series, HELP screen
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
######################
|
|
# ADD=99999 display the HELP SCREENS
|
|
######################
|
|
|
|
if ($ADD==99999)
|
|
{
|
|
echo "</title>\n";
|
|
echo "</head>\n";
|
|
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
|
echo "<CENTER>\n";
|
|
echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=4><B>ADMINISTRATION: AJUDA<BR></B></FONT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><BR><BR>\n";
|
|
|
|
?>
|
|
<B><FONT SIZE=3>VICIDIAL_USUÁRIOS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_users-user">
|
|
<BR>
|
|
<B>ID de Usuário -</B> Este campo é onde deve ser colocado o ID de usuário do VICIDIAL, pode ter até 8 caracteres de comprimento, Deve ter pelo menos 2 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-pass">
|
|
<BR>
|
|
<B>Senha -</B> Este campo é onde deve ser configurada a senha do usuário do VICIDIAL. Deve ter pelo menos 2 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-full_name">
|
|
<BR>
|
|
<B>Nome completo -</B> Neste campo é configurado o Nome completo do usuário do VICIDIAL. Deve ter no mínimo 2 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-user_level">
|
|
<BR>
|
|
<B>Nível de usuário -</B> Neste menu deve ser selecionado o nível do usuário do VICIDIAL. Deve ser pelo menos 1 para acessar o VICIDIAL, deve ser maior que 2 para acessar como finalizador, deve ser nível 8 ou maior para acessar a tela de admin.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-user_group">
|
|
<BR>
|
|
<B>Grupo de usuário -</B> Este menu é onde você seleciona o grupo de usuários do VICIDIAL ao qual esse usuário pertence. Isto ainda não faz restrições, é usado somente para subdividir usuários e permitir futuras funcionalidades baseadas nele.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-phone_login">
|
|
<BR>
|
|
<B>Login do Ramal -</B> Aqui é onde você pode configurar um valor padrão para o login do ramal, usado quando o usuário loga no vicidial.php. Este valor será colocado no campo de login do ramal automaticamente quando o usuário loga na campanha no vicidial pela tela do vicidial.php.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-phone_pass">
|
|
<BR>
|
|
<B>Senha do Ramal-</B> Aqui é onde fica configurada a senha padrão para o ramal quando o usuário loga no vicidial.php. Este valor será colocado automaticamente no campo da senha, quando o usuário faz logon na campanha pela tela vicidial.php.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-active">
|
|
<BR>
|
|
<B>Ativo - </B> Este campo define se o usuário está ativo no sistema e pode usar os recursos do VICIDIAL. O padrão é Y
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-optional">
|
|
<BR>
|
|
<B>Email, Código do Usuário e Território -</B> Estes são campos opcionais.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-hotkeys_active">
|
|
<BR>
|
|
<B>Atalhos Ativos -</B> Esta opção quando configurada, permite ao usuário usar atalhos de teclado para classificação da chamada vicidial.php.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-agent_choose_ingroups">
|
|
<BR>
|
|
<B>Agente Escolhe Grupos de Entrada -</B> Esta opção com valor 1, permite ao usuário escolher os grupos de entrada que quer receber chamadas quando fazem sogon em uma campanha CLOSER ou ENTRANTE. Caso contrário, o Gerente vai precisar configurar isto na tela de detalhes do cadastro de usuários no site admin.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-agent_choose_territories">
|
|
<BR>
|
|
<B>Agente Elija territorios -</B> Esta opción si se establece en 1 permite al usuario elegir los territorios que van a recibir llamadas de los usuarios cuando ingresan a un manual o campaña ENTRANTE_MAN. De lo contrario el usuario será configurado para utilizar todos los territorios que se establecen a pertenecer a los territorios de usuario administrativos sección.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-scheduled_callbacks">
|
|
<BR>
|
|
<B>Scheduled Callbacks -</B> Esta opción permite que un agente a disposición de una llamada como CALLBK y elegir la fecha y hora en que el plomo se vuelva a activar.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-agentonly_callbacks">
|
|
<BR>
|
|
<B>Chamada Agendada por Agente -</B> Permite que um agente configure uma chamada agendada com fidelização, assim ela retorna somente para ele. Isso também permite ao agente ver a sua lista de agendamentos e os chamar qualquer hora que desejem.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-agentcall_manual">
|
|
<BR>
|
|
<B>Agente com Chamada Manual-</B> Permite que um agente manualmente adicione um novo registro ao sistema e comande a discagem. Isso também permite que seja comandado a discagem de qualquer número na tela do vicidial e a coloque na sua sessão. Use esta opção com cautela.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-vicidial_recording">
|
|
<BR>
|
|
<B>Gravação do Vicidial -</B> Esta opção previne um agente de fazer qualquer gravação após ter entrado no vicidial. Esta opção deve estar ligada para que o vicidial grave as chamadas da campanha .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-vicidial_transfers">
|
|
<BR>
|
|
<B>Transferências Vicidial -</B> Esta opção pode previnir que um agente abra a sessão de transferência/conferência do vicidial. Se estiver desabilitada, o agente não poderá transferir ou incluir um terceiro na chamada.
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_users-closer_default_blended">
|
|
<BR>
|
|
<B>Padrão Mesclado para Finalizador -</B> Esta opção simplesmente marca ou nao o checkbox de Mesclado(blended) no login da campanha Finalizador (closer).
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-vicidial_recording_override">
|
|
<BR>
|
|
<B>Sobrepor Config. de Gravação do VICIDIAL -</B> Esta opção irá sobrepor qualquer configuração de gravação que esteja na campanha. DISABLED não irá sobrepor a configuração da campanha. NEVER irá desabilitar a gravação no client. ONDEMAND é o padrão e permite ao agente iniciar e parar a gravação conforme necessário. ALLCALLS irá iniciar a gravação no client quando uma chamada é enviada ao agente. ALLFORCE irá iniciar a gravação no client quando uma chamada é enviada para o agente, sem dar a opção de parar a gravação, Para ALLCALLS e ALLFORCE existe uma opção para atrasar a gravação e evitar gravações curtas demais e evitar carga no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-agent_shift_enforcement_override">
|
|
<BR>
|
|
<B>Sobrepor Controle de Turno do Agente -</B> Esta configuração irá sobrepor qualquer configuração feita no grupo do agente para controle de turno. DISABLED irá usár a configuração do grupo. OFF não irá forçar turnos. START irá somente forçar o horário de login do turno mas não terá efeito sobre horário acima do final do turno se o usuário ainda estiver logado. ALL irá forçar o inicio do turno e irá fazer logout do agente caso passe do final do horário do turno. O padrão é DISABLED.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-alert_enabled">
|
|
<BR>
|
|
<B>Alerta Ativo - </B> Este campo mostra se o agente tem alertas pelo browser habilitados para quando chamadas entram na sessão do usuário. O padrão é 0 para Não.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-allow_alerts">
|
|
<BR>
|
|
<B>Permitir Alertas -</B> Este campo le da la capacidad para permitir navegador agente de alertas para ser habilitado por el agente para cuando las llamadas entran en su período de sesiones vicidial.php. Por defecto es 0 para el NO.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-vicidial_users-campaign_ranks">
|
|
<BR>
|
|
<B>Rankings da Campanha -</B> Nessa sessão você define o ranking que cada agente terá em cada campanha. Esses rankings podem ser usados para permitir roteamento preferencial de chamadas quando o campo Próximo Agente está como campaign_rank. Também nesta seção estão as variáveis WEB para caba campanha. Elas permitem cada agente ter variáveis diferentes que podem ser adicionadas a URL do WEB FORM ou do SCRIPT, simplestemnte colocando --A--web_vars--B-- da mesma forma que faria com qualquer outro campo
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-closer_campaigns">
|
|
<BR>
|
|
<B>Grupos de entrada -</B> Aqui é selecionado o grupo de entrada do qual você quer receber chamadas se você selecionou uma campanha CLOSER(finalização). Você também poderá configurar o ranking, ou nível de conhecimento, nessa sessão para cada grupo de entrada, assim como será capaz de ver o número de chamadas recebidas por cada grupo de entrada por agente específico. Também nessa sessão está a possibilidade de atribuir um ranking do agente para cada Grupo de Entrada. Esses rankings podem ser usados para roteamento preferencial quando essa opção está selecionada na tela de Grupos de Entrada. Também nesta seção estão as variáveis WEB para caba campanha. Elas permitem cada agente ter variáveis diferentes que podem ser adicionadas a URL do WEB FORM ou do SCRIPT, simplestemnte colocando --A--web_vars--B-- da mesma forma que faria com qualquer outro campo
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-alter_custdata_override">
|
|
<BR>
|
|
<B>Sobrepor Permissão de Alteração-<\/B> Esta opção irá sobrepor qualquer opção na campanha para alterar dados do cliente. NOT_ACTIVE irá usar qualquer configuração presente na campanha. ALLOW_ALTER irá sempre permitir alteração no registro do cliente, não importando a configuração da campanha. O padrão é NOT_ACTIVE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-alter_custphone_override">
|
|
<BR>
|
|
<B>Sobrepor Permissão de Alter. de Telefone- </B> Esta opção irá sobrepor qualquer configuração na campanha sobre alterar o telefone do cliente. NOT_ACTIVE irá usar a configuração presente na campanha. ALLOW_ALTER irá sempre permitir que o agente altere o telefone do cliente, não importando a configuração da campanha. O padrão é NOT_ACTIVE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-custom_one">
|
|
<BR>
|
|
<B>Los campos de usuario personalizada -</B> Estos cinco campos se puede utilizar para diversos fines, y que se puede rellenar en el formulario web y direcciones de secuencias de comandos como user_custom_one y así sucesivamente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-alter_agent_interface_options">
|
|
<BR>
|
|
<B>Alterar Opções da Interface do Agente -</B> Esta opção quando configurada como 1 permite ao usuário administrativo modificar a interface do agente no admin.php.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_users">
|
|
<BR>
|
|
<B>Apagar Usuários -</B> Esta opção quando habilitada permite que o usuário apaga outros usuários de igual ou menor nível do sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_user_groups">
|
|
<BR>
|
|
<B>Apagar Grupos de Usuários -</B> Esta opção, quando habilitada, permite que este usuário apague grupos de usuário do sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_lists">
|
|
<BR>
|
|
<B>Apagar Listas -</B> Esta opção, quando habilitada, permite ao usuário apagar listas do vicidial.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_campaigns">
|
|
<BR>
|
|
<B>Apagar Campanhas -</B> Esta opção, quando habilitada, permite ao usuário apagar campanhas do vicidial.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_ingroups">
|
|
<BR>
|
|
<B>Apagar Grupos de Entrada-</B> Esta opção, quando habilitada, permite ao usuário apagar Grupos de entrada do sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_remote_agents">
|
|
<BR>
|
|
<B>Apagar Agentes Remotos -</B> Esta opção quando comfigurada como 1, permite ao usuário apagar agentes remotos do sistema.
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_users-load_leads">
|
|
<BR>
|
|
<B>Carregar Registros -</B> Esta opção, quando configurada como 1, permite ao usuário carregar novos registros de clientes na tabela vicidial_list atravéz do carregador de arquivos no client web.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-campaign_detail">
|
|
<BR>
|
|
<B>Detalhes da Campanha-</B> Esta opção, quando configurada como 1, permite ao usuário ver e modificar os detalhes da campanha .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-ast_admin_access">
|
|
<BR>
|
|
<B>Acesso AGC Admin-</B> Esta opção, quando configurada como 1, permite o usuário efetuar logon nas páginas de admin do astGUIclient.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-ast_delete_phones">
|
|
<BR>
|
|
<B>Apagar Fones no AGC-</B> Esta opção, quando configurada como 1, permite ao usuário apagar registros de fone nas paginas de admin do astGUIclient.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_scripts">
|
|
<BR>
|
|
<B>Apagar Scripts -</B> Esta opção, quando configurada como 1, permite o usuário apagar scripts de campanha na tela de configuração do script.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-modify_leads">
|
|
<BR>
|
|
<B>Modificar Registros -</B> Esta opção quando configurada permite ao usuário modificar registros na página de pesquisa do site admin.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-change_agent_campaign">
|
|
<BR>
|
|
<B>Trocar Campanha do Agente -</B> Esta opção quando configurada, permite ao usuário trocar a campanha em que um agente está logado no sistema sem que haja necessidade de sair do sistema.
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_filters">
|
|
<BR>
|
|
<B>Apagar Filtros -</B> Esta opção permite que o usuário possa apagar filtros de registro no sistema vicidial.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_call_times">
|
|
<BR>
|
|
<B>Remover Horários de Chamada -</B> Esta opção permite ao usuário apagar registros de horários de chamada e chamadas por estado do sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-modify_call_times">
|
|
<BR>
|
|
<B>Alterar Horários de Chamada -</B> Esta opção permite ao usuário visualizar e alterar os registros de horários e estados de ligação. O usuário não precisa desta opção habilitada se for somente alterar as opções de horário na tela de configuração de campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-modify_sections">
|
|
<BR>
|
|
<B>Alterar Sessões -</B> Estas opções permitem ao usuário visualizar e alterar registros de cada sessão. Se configurado como 0, o usuário será capaz de ver a lista de sessões, mas não poderá ver os detalhes nem alterar os registros da sessão.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-view_reports">
|
|
<BR>
|
|
<B>Visualizar Relatórios -</B> Esta opção permite ao usuário visualizar os relatórios VICIDIAL.
|
|
|
|
<?php
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_users-qc_enabled">
|
|
<BR>
|
|
<B>CQ Habilitado - </B> Esta opção permite ao usuário logar na tela de agente de Controle de Qualidade.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-qc_user_level">
|
|
<BR>
|
|
<B>Nível de usuário CQ - </B> Esta configuração define qual é o nível do usuário do Controle de Qualidade. Isso irá ditar o nível de funcionalidade desse agente na seção de CQ:<BR>
|
|
1 - Não Modificar Nada<BR>
|
|
2 - Não Modificar Nada Exceto Status<BR>
|
|
3 - Modificar Todos Campos<BR>
|
|
4 - Verificar primeiro nível de CQ<BR>
|
|
5 - Vizualizar Estatísticas de CQ<BR>
|
|
6 - Capacidade de Alterar Registros Finalizados<BR>
|
|
7 - Nível Gerente<BR>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-qc_pass">
|
|
<BR>
|
|
<B>Registro Passou no CQ - </B> Esta opção permite ao agente especificar que um registro passou no primeiro nível de Controle de Qualidade após revisar o registro.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-qc_finish">
|
|
<BR>
|
|
<B>Finalizado no CQ - </B> Esta opção permite ao agente especificar que um registro finalizou o segundo nível de Controle de Qualidade após revisar o registro.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-qc_commit">
|
|
<BR>
|
|
<B>Confirmado no CQ - </B> Esta opção permite ao agente especificar que um registro foi Confirmado no Controle de Qualidade. E não poderá ser alterado por ninguém.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-add_timeclock_log">
|
|
<BR>
|
|
<B>Incluir Registro de Ponto - </B> Esta opção permite ao usuário adicionar registros de log ao Relógio de Ponto.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-modify_timeclock_log">
|
|
<BR>
|
|
<B>Alterar Registro de Log do Ponto - </B> Esta opção permite ao usuário alterar os registros do log do Relógio de ponto.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_timeclock_log">
|
|
<BR>
|
|
<B>Remover Registro de Log do Ponto - </B> Esta opção permite ao usuário remover registros do log do relógio de ponto.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-vdc_agent_api_access">
|
|
<BR>
|
|
<B>Agente para Acesso ao API - </B> Esta opção permite esta conta ser usada com comandos de API.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-manager_shift_enforcement_override">
|
|
<BR>
|
|
<B>Sobrepor Controle de Turno do Gerente -</B> Esta configuração quando 1 irá permitir ao gerente entrar com suas credenciais na tela do agente para sobrepor o controle do turno caso o agente esteja tentando logar fora do horário determinado para seu turno. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-download_lists">
|
|
<BR>
|
|
<B>Download Listas -</B> Esta configuração quando 1 permite aoa gerente clicar no download da lista na parte inferior da tela de alteração de listas para exportar o conteúdo da lista para um arquivo em formato de texto. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-export_reports">
|
|
<BR>
|
|
<B>Exportar Relatórios -</B> Esta configuração quando configurada como 1 irá permitir ao gerente acessar o ítem de exportação de relatórios na tela de relatórios. O padrão é 0
|
|
: <BR>call_date, phone_number, status, user, full_name, campaign_id/in-group, vendor_lead_code, source_id, list_id, gmt_offset_now, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments, length_in_sec, user_group, alt_dial/queue_seconds, rank, owner
|
|
|
|
<BR>
|
|
<A NAME="vicidial_users-delete_from_dnc">
|
|
<BR>
|
|
<B>Remover da Lista de Bloqueio -</B> Esta configuração quando 1 permite que o gerente remova números de telefone da lista de bloqueio no sistema VICIDIAL .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_CAMPANHAS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_campaigns-campaign_id">
|
|
<BR>
|
|
<B>ID da Campanha -</B> Este é o nome curto para a campanha, não é editável após cadastrado, não pode conter espaços e deve ter entre 2 e 8 caracteres de comprimentoh.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_name">
|
|
<BR>
|
|
<B>Nome da Campanha-</B> Esta é a descrição da campanha, deve ter entre 6 e 40 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_description">
|
|
<BR>
|
|
<B>Descrição da Campanha -</B> Este é um campo de texto para a campanha, é opicional e pode ter no máximo 255 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_changedate">
|
|
<BR>
|
|
<B>Data de Alteração da Campanha -</B> Esta é a última vez que a configuração desta campanha foi alterada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_logindate">
|
|
<BR>
|
|
<B>Data do Último Login na Campanha -</B> É a data da última vez que um agente logou nesta campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_calldate">
|
|
<BR>
|
|
<B>Última fecha de convocatoria de la Campaña -</B> Esta es la última vez que una llamada fue manejado por un agente registrado en esta campaña.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_stats_refresh">
|
|
<BR>
|
|
<B>Atualizar Estat. da Campanha -</B> Este checkbox irá permitir que você force uma atualizaão das estatísticas, mesmo se a campanha não estiver ativa.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-active">
|
|
<BR>
|
|
<B>Ativo -</B> Aqui é onde você configura a campanha coma Ativa ou Inativa. Se Inativa, ninguem pode entrar nela.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-park_ext">
|
|
<BR>
|
|
<B>Exten do Estacionamento -</B> Aqui é onde você pode customizar a musica em espera para o VICIDIAL. Tenha certeza que a extensão existe no extensions.conf e que aponta para o nome de arquivo abaixo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-park_file_name">
|
|
<BR>
|
|
<B>Nome do arquivo de Estacionamento -</B> Aqui é onde você pode customizar a musica em espera para o VICIDIAL. Tenha certeza que o nome do arquivo tem 10 ou menos caracteres de comprimento e que o arquivo está na pasta /var/lib/asterisk/sounds .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-web_form_address">
|
|
<BR>
|
|
<B>Formulário Web -</B> Aqui é onde você configura a página web customizada que é aberta quando o usuário clica no botão WEB FORM. Para personalizar a string de pesquisa do formulário web, simplesmente inicie o formulário web com VAR e então a URL que você quer usar, substituindo as variáveis com os nomes de variável que você quer usar --A--phone_number--B-- da mesma forma que na seção SCRIPTS.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-web_form_target">
|
|
<BR>
|
|
<B>Target do Form. Web-</B> Esta configuração é onde você coloca o frame da página que o formulário web irá ser aberto quando o usuário clica no botão WEB FORM. O padrão é _blank.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-allow_closers">
|
|
<BR>
|
|
<B>Permitir Finalizadores -</B> Aqui é onde você pode configurar se os usuários dessa campanha poderão ter a opção de enviar a chamada para um finalizador.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-default_xfer_group">
|
|
<BR>
|
|
<B>Grupo de Transf. Padrão -</B> Este campo é o Grupo de Entrada padrão que será automaticamente selecionado quando um agente seleciona transferência-conferência na tela do agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-xfer_groups">
|
|
<BR>
|
|
<B>Grupos de Transferência Permitidos -</B> Nessa lista você pode selecionar grupos para os quais os agentes nessa campanha podem transferir chamadas. Permitir Finalizadores (closers) deve estar habilitado para que esta opção seja mostrada.
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_allow_inbound">
|
|
<BR>
|
|
<B>Permitir Entrantes e Blended -</B> Aqui é onde se configura se o usuário desta campanha irá ter a opção de receber chamadas entrantes nesta campanha. Se você quiser mesclar entrantes e saintes, deve estar configurado como Y. Se você quer apenas fazer chamadas saintes nesta campnaha, configure como N. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-dial_status">
|
|
<BR>
|
|
<B>Status da Discagem -</B> Aqui é onde você configura os status que você deseja discar nas listas ativas para a campanha abaixo. Para adicionar outro status de discagem, selecione-o na lista e clique ADD. Para remover um dos status, clique no link REMOVE ao lado do status que você quer remover.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-lead_order">
|
|
<BR>
|
|
<B>Ordem da Lista -</B> Este menu é onde você seleciona como os registros nos status selecionados acima serão colocados no hopper:
|
|
<BR> - DOWN: selecione o primeiro registro carregado na tabela vicidial_list
|
|
<BR> - UP: selecione o último registro carregado na tabela vicidial_list
|
|
<BR> - UP PHONE: seleciona o número de telefone mais alto e desce até o fim
|
|
<BR> - DOWN PHONE: seleciona o telefone mais baixo e sube até o topo
|
|
<BR> - UP LAST NAME: inicia com sobrenomes iniciando em Z e desce até o fim
|
|
<BR> - DOWN LAST NAME: inicia com sobrenomes iniciando em A e sobe até o inicio
|
|
<BR> - UP COUNT: inicia com registros mais chamados e vai até o fim
|
|
<BR> - DOWN COUNT: inicia com registros menos chamados e vai até o começo
|
|
<BR> - DOWN COUNT 2nd NEW: inicia com registros menos chamados e vai até o começo inserindo registros NOVOS intercalados - Não deve ter selecionado NOVOS nos status de discagem
|
|
<BR> - DOWN COUNT 3nd NEW: inicia com registros menos chamados e vai até o começo inserindo um registro NOVO a cada três registros - Não deve ter NOVOS selecionado nos status de discagem
|
|
<BR> - DOWN COUNT 4th NEW: inicia com registros menos chamados e vai até o começo inserindo um registro novo a cada quatro registros - Não deve ter NOVOS selecionado nos status de discagem
|
|
<BR> - RANDOM: Aleatoriamente pega um registro entre os status e listas definidas
|
|
<BR> - HORA DA ÚLTIMA CHAMADA PARA CIMA: Ordena os registros pela chamada mais recente
|
|
<BR> - HORA DA ÚLTIMA CHAMADA PARA BAIXO: Ordena os registros pela chamada mais antiga
|
|
<BR> - UP RANK: Comienza con la más alta categoría y se abre camino hacia abajo
|
|
<BR> - DOWN RANK: Comienza con el rango más bajo y se abre camino hasta
|
|
<BR> - UP OWNER: Comienza con los propietarios de inicio con Z y obras de su camino hacia abajo
|
|
<BR> - DOWN OWNER: Comienza con los propietarios empiezan con la letra y se abre camino hasta
|
|
<BR> - UP TIMEZONE: Comienza con las zonas horarias del Este y del Oeste de obras
|
|
<BR> - DOWN TIMEZONE: Comienza con las zonas horarias occidental y oriental de obras
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-hopper_level">
|
|
<BR>
|
|
<B>Nível de Hopper -</B> Aqui é onde fica configurado quantos registros o VDhopper mantém na tabela vicidial_hopper para esta campanha. Se estiver rodando VDhopper a cada minuto, tenha a garantia que é acima do número de registros discados por minuto.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-lead_filter_id">
|
|
<BR>
|
|
<B>Filtro de Registros -</B> Este é um método de filtrar os registros usando um fragmento de uma query SQL. Use este recurso com cuidado, é fácil parar de discar acidentalmente com uma pequena alteração no comando SQL. O padrão é NONE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-drop_lockout_time">
|
|
<BR>
|
|
<B>Tiempo de caída de bloqueo -</B> Este es un número de horas que DROP abandonar pide se le impida que se está marcando, para establecer inhabilitar a 0. Esta opción es muy útil en países como el Reino Unido, donde existen normas que impiden la tentativa de llamar a los clientes dentro de las 72 horas de abandono, o DROP. Por defecto es 0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-force_reset_hopper">
|
|
<BR>
|
|
<B>Força Limpeza do Hopper -</B> Isto permite que você limpe o conteúdo do hopper a partir do comando enviar da página. O hopper deve ser preenchido assim que o script do VDhopper for executado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-dial_method">
|
|
<BR>
|
|
<B>Método de discagem -</B> Esta é a definição de como a discagem deve ser feita. Se MANUAL então o níver de discagem automática ficará travado em 0 a não ser que o método seja alterado. Se RATIO então a discagem será feita baseada na quantidade de agentes livres. ADAPT_HARD_LIMIT irá discar preditivamente até o nível de chamadas derrubadas e não discará agressivamente após o nível ter sido alcançado até que abaixe novamente. ADAPT_TAPERED permite se passar do nível de derrubadas na primeira metade do turno, conforme definido no horário de campanha, e fica menos agressivo conforme o turno avança. ADAPT_AVERAGE tenta manter uma média no percentual de derrubadas não impondo limites e não sendo tão agressivo como os outros dois métodos. Você não pode mudar o nível de discagem automática se você usar alguns dos métodos ADAPT. Somente o Discador pode mudar o nível no modo preditivo. ENTRANTE_MAN permite ao agente fazer chamadas manuais a partir de uma campanha enquanto está disponível para receber chamadas entrantes, entre as chamadas manuais.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-auto_dial_level">
|
|
<BR>
|
|
<B>Nível de Discagem Automática -</B> Aqui deve ser configurado quantas linhas o VICIDIAL deve usar por agente ativo. Zero(0) significa que o discador automático está desligado e os agentes devem clicar para discar cada número. Caso contrário o VICIDIAL irá manter discando na quantidade de linhas igual ao número de agentes livres multiplicado pelo valor deste campo. O checkbox SOBREPOR APAPT permite que você force um nível de discagem mesmo que o método seja um dos ADAPT. Isto é útil quando existe uma mudança grande na qualidade dos registros e você quer mudar manualmente o nível.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-available_only_ratio_tally">
|
|
<BR>
|
|
<B>Somente Lista Autom. -</B> Este campo quando configurado como Y não considera a quantidade de chamadas entrantes nem em fila de espera para calcular a quantidade de chamadas para discagem automática. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-adaptive_dropped_percentage">
|
|
<BR>
|
|
<B>Percentual Limite de Derrubadas (drop) -</B> Este campo é onde você configura o limite em percentual das chamadas derrubadas quando usamos um dos métodos preditivos(ADAPT), não válido para métodos MANUAL ou RATIO.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-adaptive_maximum_level">
|
|
<BR>
|
|
<B>Nível Máximo de Adapt -</B> Este campo é onde você configura o limite máximo da quantidade de linhas a usar por usuário quando usando um método preditivo (ADAPT), não válido para MANUAL ou RATIO. Este número pode ser maior que o nível de discagem automática se o seu hardware permitir. O valor deve ser um número positivo maior que 1 e pode ter casas decimáis. O padrão é 3.0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-adaptive_latest_server_time">
|
|
<BR>
|
|
<B>Horário Final do Servidor -</B> Este campo só é usado pelo método ADAPT_TAPERED. Você deve entrar com a hora e o minuto em que vai parar de fazer chamadas para esta campanha, 2100 significa que você vai parar de discar esta campanha as 21 horas. Isto permite ao algoritmo do método Tapered decidir quanto agressivo deve ser e quanto tempo tem até o horário de parar.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-adaptive_intensity">
|
|
<BR>
|
|
<B>Modificador de Intensidade -</B> Este campo é usado para ajustar a intensidade preditiva para cima ou para baixo. Quanto mais alto(positivo) o valor selecionado, mais o discador vai aumentar o ritmo de chamadas quando aumentar a velocidade e mais lento será para o discador diminuir a velocidade. Quanto mais negativo for o número que você selecionou, mais devagar o discador irá aumentar o ritmo quando precisar, e mais rápido diminuirá a velocidade quando precisar diminuir o ritmo. O padrão é 0. Este campo não é usado pelos métodos MANUAL ou RATIO. .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-adaptive_dl_diff_target">
|
|
<BR>
|
|
<B>Alvo da Diferença de Nível -</B> Este campo é usado para definir se você quer alcançar um número específico de agentes esperando chamadas ou chamadas esperando agentes. Por exemplo: se você gostaria de sempre ter em média um agente livre para receber chamadas imediatamente, você configura como -1, se você gostaria que sempre houvesse uma chamada esperando por agente, você configura como 1. O padrão é 0. Este campo não é usado pelos métodos MANUAL e RATIO.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-concurrent_transfers">
|
|
<BR>
|
|
<B>Transferências Simultâneas -</B> Esta configuração é usada para definir o número de chamadas que podem ser enviadas para agentes ao mesmo tempo. É recomendado que esta configuração seja deixada em AUTO. Este campo não é usado pelo método MANUAL de discagem.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-queue_priority">
|
|
<BR>
|
|
<B>Prioridade da Fila - </B> Valor utilizado para definir a ordem na qual as chamadas dessa campanha de saída devem ser respondidas em relação as chamadas entrantes desta campanha em modo blended.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-drop_rate_group">
|
|
<BR>
|
|
<B>Varias campañas Drop Rate Grupo -</B> Esta característica le permite establecer una campaña como miembro de una campaña de la velocidad de descenso del Grupo, o un grupo de campañas cuyas llamadas contestadas y llamadas Humanos Drop para todas las campañas en el grupo se combinarán en un porcentaje de caída compartida, o tasa de abandono. Esto le permite ejecutar varias campañas a la vez y más fácil de controlar su tasa de caída. Esto es particularmente útil en el Reino Unido, donde las regulaciones lo permiten esta disminución método del tipo de cálculo con la campaña de la agrupación por la misma empresa, incluso si hay varias campañas que la empresa está ejecutando en el mismo día. Para habilitar esta para una campaña, sólo tienes que seleccionar un grupo de la lista. Hay 10 grupos definidos en el sistema por defecto, puede ponerse en contacto con el administrador del sistema para añadir más. Desactivado por defecto.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-auto_alt_dial">
|
|
<BR>
|
|
<B>Auto Discar Alternativo -</B> Esta configuração é usada para automaticamente discar números alternativos enquanto os métodos RATIO e ADAPT são usados e não há contato no telefone principal para um registro com status NA, B, DC e N. Esta configuração não é usada pelo método MANUAL de discagem. EXTENDIDOS são números alternativos que são carregados no sistema fora da tela padrão de informações sobre registros. Usando EXTENDED você pode ter centenas de números de telefone para um único registro de cliente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-dial_timeout">
|
|
<BR>
|
|
<B>Tempo excedido de discagem -</B> Se configurado, as chamadas que normalmente seriam desligadas após o tempo definido no extensions.conf serão desligadas no tempo configurado aqui, caso este valor seja menor do que o do extensions.conf. Isso permite que rapidamente sejam alterados os timeouts por campanha e que a configuração seja igual para todos os servidores. Se você está recebendo muitas chamadas de secretária eletrônica ou correio de voz, pode tentar mudar esse valor para valores entre 21 e 26 e verifique se melhora.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_vdad_exten">
|
|
<BR>
|
|
<B>Extensão VDAD da Campanha -</B> Este campo permite personalizar a extensão de transferência do VDAD. Isso permite que você use métodos de controle da chamada dependendo da sua campanha
|
|
- 8364 - mesma que 8368
|
|
- 8365 - Irá enviar a chamada somente para o servidor no qual o agente está logado
|
|
- 8366 - Utilizado somente para campanhas de pressione-1 e pesquisa
|
|
- 8367 - Irá tentar enviar a chamada para um agente no servidor local, então irá procurar em outros servidores
|
|
- 8368 - DEFAULT � Will send the call to the next available agent no matter what server they are on
|
|
- 8369 - Usado para detecção de secretária eletrônica, após a detecção segue o mesmo caminho da 8368
|
|
- 8373 - Usado para detecção de secretária eletrônica, após a detecção segue o mesmo caminho da 8366
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-am_message_exten">
|
|
<BR>
|
|
<B>Mensagem na Secretária Eletrônica -</B> Este campo es para entrar en el sistema para jugar cuando el agente recibe un contestador automático y hace clic en el botón Responder a máquina contestadora en el marco de conferencias de transferencia. Debe establecer que esto sea un archivo de audio en la tienda de audio o un sistema TTS TTS si está habilitada en su sistema de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-waitforsilence_options">
|
|
<BR>
|
|
<B>Opciones WaitForSilence -</B> Si Wait For silencio es deseada en las llamadas que se detectan como Contestadoras entonces este campo tiene esas opciones. Hay dos opciones separadas por una coma, la primera opción es el tiempo para detectar silencio en milisegundos y la segunda opción es para cuántas veces se detecta que antes de reproducir el mensaje. Por defecto está vacío para discapacitados. Un valor estándar para este sería esperar 2 segundos de silencio en dos ocasiones: 2000,2
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-amd_send_to_vmx">
|
|
<BR>
|
|
<B>AMD envia para exten correio de voz-</B> Este menu permite definir se uma mensagem deve ser deixada na secretária eletrônica quando é detectada. A chamada irá imediatamente ser direcionada para a extensão se o AMD estiver ativo e determinar que é uma secretária eletrônica.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-cpd_amd_action">
|
|
<BR>
|
|
<B>Ação CPD AMD - </B> Se você estiver usando o software de Detecção Sangoma ParaXip Call Progress então você deve habilitar esta configuração para DISPO que irá finalizar a chamada como AA e desligar se a chamada estiver sendo processada e ainda não foi enviada para um agente ou MESSAGE que irá enviar a chamada para o campo definido como Mensagem de Secretária Eletrônica para esta Campanha. O padrão é DISABLED.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-alt_number_dialing">
|
|
<BR>
|
|
<B>Discagem para Número Alt. -</B> Permite que um agente manualmente disque para o telefone alternativo ou campo address3 após o número principal tenha sido discado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-drop_call_seconds">
|
|
<BR>
|
|
<B>Segundos para derrubar chamada -</B> Número de segundos entre o atendimento pelo cliente até a chamada ser considerada um DROP (derrubada), só se aplica a chamadas saintes.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-drop_action">
|
|
<BR>
|
|
<B>Ação de Drop - </B> Este menu permite que você escolha o que acontece com uma chamada quando esta ficou esperando mais que o tempo configurado no campo Tempo Limite de Drop. HANGUP irá simplesmente desligar a chamada, MESSAGE irá enviar a chamada para Extensão de Drop que você definiu abaixo, VOICEMAIL irá enviar a chamada para a caixa de voicemail que você definiu abaixo e IN_GROUP irá enviar a chamada para o grupo de entrada que você define abaixo
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-safe_harbor_exten">
|
|
<BR>
|
|
<B>Exten do Porto Seguro -</B> Esta é a extensão do plano de discagem designada para o porto seguro, deve tocar o arquivo de mensagem localizado no seu servidor.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-voicemail_ext">
|
|
<BR>
|
|
<B>Correio de Voz -</B> Se configurado, as chamadas que normalmente seriam derrubadas por falta de agente, serão transferidas para esse Correio de Voz, irão ouvir uma mensagem e poderão gravar um recado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-drop_inbound_group">
|
|
<BR>
|
|
<B>Grupo de Transferência de Drop - </B> Caso a Ação de Drop esteja configurada como IN_GROUP, a chamada será enviada para esse Grupo de Entrada após o tempo limite.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-no_hopper_leads_logins">
|
|
<BR>
|
|
<B>Permitir Logar sem Registro no Hopper -</B> Quando Y, permite agentes logarem na campanha mesmo que não existam registros carregados no hopper para esta campanha. Esta funcionalidade não é necessária em campanha de Finalização(CLOSER). O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-no_hopper_dialing">
|
|
<BR>
|
|
<B>N marcado Hopper -</B> Si esta opción está activada, la tolva no se ejecutará para esta campaña. Esta opción sólo está disponible cuando el método de línea se establece en Manual o ENTRANTE_MAN. Se recomienda que no habilite esta opción si usted tiene una base de datos de plomo muy grande, más de 100.000 clientes potenciales. Con n marcado Hopper, las características siguientes no funcionan: reciclaje de plomo, auto-alt-marcación, la mezcla lista, lista de pedido con X NEW. Si desea utilizar único dueño de marcado no debe tener marcado Hopper habilitado. Por defecto es n para discapacitados.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_dial_owner_only">
|
|
<BR>
|
|
<B>Único propietario de marcado -</B> Si esta opción está activada, el agente sólo recibirá las pistas que están dentro de los parámetros de la propiedad. Si esto se establece a usuario entonces el agente debe ser definida por el usuario en la base de datos como el propietario de este lugar. Si esto se establece en territorio que entonces el dueño de la iniciativa debe coincidir con el territorio que figuran en la pantalla de modificación del usuario de este agente. Si esto se establece a USER_GROUP entonces el dueño de la iniciativa debe coincidir con el grupo de usuarios que el agente es un miembro de. Para que esta característica funcione el método de línea se debe establecer en Manual o ENTRANTE_MAN marcado Hopper y no debe estar activado. El valor predeterminado es NINGUNO para discapacitados.
|
|
|
|
<?php
|
|
if ($SSuser_territories_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_select_territories">
|
|
<BR>
|
|
<B>Agente Seleccione territorios -</B> Si esta opción está activada y el agente pertenece a al menos un territorio, el agente tendrá la opción de selección de territorios a los cables de línea. El agente podrá ver una lista de los territorios disponibles a inicio de sesión y tendrán la capacidad de volver a la lista territorio cuando se detuvo a cambiar sus territorios. Para esta función a la labor del único dueño de marcado opción debe configurarse con el territorio y territorios de usuario debe estar habilitado en la configuración del sistema.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-list_order_mix">
|
|
<BR>
|
|
<B>Ordem de Mesclagem -</B> Sobrepõe a ordem nos campos Ordem de Registros e Status de Discagem. .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vcl_id">
|
|
<BR>
|
|
<B>ID da Mescl. de Lista -</B> ID da mesclagem de listas. Deve ter entre 2 e 20 caracteres de comprimento sem espaços ou pontos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vcl_name">
|
|
<BR>
|
|
<B>Nome da Mescl. de Lista -</B> nombre descriptivo de la mezcla dela lista. Debe ser a partir de 2-50 caracteres en longitud.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-list_mix_container">
|
|
<BR>
|
|
<B>Detalhes da Mescl. de Lista -</B> Composição da Mesclagem de listas. Contém o ID, ordem, percentuais, e status que montam essa Mesclagem. Os percentuais devem sempre somar 100, e as listas devem estar ativas e configuradas na campanha em que a mesclagem vai ser configurada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-mix_method">
|
|
<BR>
|
|
<B>Método de Mesclagem -</B> O método de Mesclagem de todos os ítens da lista. EVEN_MIX mistura os registros de cada parte intercalados com as outras partes, por exemplo: 1,2,3,1,2,3,1,2,3. IN_ORDER irá colocar os registros na ordem que estão listados na tela de detalhes 1,1,1,2,2,2,3,3,3. RANDOM irá colocar em ordem randômica: 1,3,2,1,1,3,2,1,3. O padrão é IN_ORDER.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_extended_alt_dial">
|
|
<BR>
|
|
<B>Discagem Extendida na tela do Agente - </B> Este recurso permite ao agente acessar a lista extendida de telefones alternativos para o registro, além dos campos Alt Phone e Address3, que podem ser usados no vicidial para números de telefone além do telefone principal do cliente. Os números extendidos podem ser discados automaticamente usando-se o recurso Auto-Alt-Dial nas config. da campanha, mas habilitar isso na tela do Agente irá permitir ao agente ligar para estes números a partir da tela e também alterar essas informações.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_first_audio_file">
|
|
<BR>
|
|
<B>Primeiro Audio da Pesquisa - </B> Este é o nome do arquivo de audio que é tocado assim que o cliente atende o telefone em uma campanha de pesquisa.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_dtmf_digits">
|
|
<BR>
|
|
<B>Digitos DTMF da Pesquisa - </B> Este campo é onde você define os digitos que um cliente pode digitar como opção para campanha de pesquisa. Digitos válidos são 0123456789*#. Todas as opções, com exceção de Not Interested, Terceiro e Quarto dígito, irão mover a chamada para o método de Pesquisa(Pesquisa).
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_ni_digit">
|
|
<BR>
|
|
<B>Digito de Não Interessado - </B> Este campo é onde você define qual digito o cliente aperta para dizer que não está interessado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_ni_status">
|
|
<BR>
|
|
<B>Status de Não Interessado - </B> Este campo é onde você seleciona o status a ser usado para Não Interessado. Se o DNC for usado e a campanha estiver configurada para Bloquear DNC então o número do telefone irá automaticamente para a lista de Não Ligar do VICIDIAL.e possivelmente a lista específica de bloqueio.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_opt_in_audio_file">
|
|
<BR>
|
|
<B>Arquivo de Aceito - </B> Este é o arquivo de audio que é tocado quando o cliente aceita participar da pesquisa, não respondeu "não interessado" e não respondeu, se a opção de ação sem resposta for OPTOUT. Após esse arquivo de audio ser tocado, a ação do método de pesquisa é realizada
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_ni_audio_file">
|
|
<BR>
|
|
<B>Arquivo de Não Interessado - </B> Este é o nome do arquivo de audio que é tocado quando o cliente desistiu da pesquisa, não aceitou a pesquisa ou não respondeu, caso a ação para sem resposta seja OPTIN. Após este arquivo de audio ser tocado, a chamada será desligada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_method">
|
|
<BR>
|
|
<B>Método de Pesquisa - </B> Esta opção define o que acontece com uma chamada após o cliente ter aceitado a pesquisa. AGENT_XFER irá enviar a chamada para o próximo agente disponível. VOICEMAIL irá enviar a chamada para o voicemail especificado no campo Correio de Voz. EXTENSION irá enviar o cliente para uma extensão definida no campo Extensão de Transf. HANGUP irá desligar o cliente. CAMPREC_60_WAV irá enviar o cliente para que grave uma resposta, esta gravação ficará na pasta com o nome da campanha, dentro do diretório de gravações da Campanha de Pesquisa
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_no_response_action">
|
|
<BR>
|
|
<B>Ação p/ Sem Resposta - </B> Aqui é definido o que acontece se não há resposta para a pergunta da pesquisa. OPTIN só irá enviar a chamada para o método de pesquisa se o cliente apertar algum digito DTMF. OPTOUT irá enviar o cliente para o método mesmo que ele não pressione um dígito.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_response_digit_map">
|
|
<BR>
|
|
<B> Mapa de Digitos de Resposta - </B> Aqui você pode definir uma descrição para representar cada dígito que o cliente pode selecionar
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_xfer_exten">
|
|
<BR>
|
|
<B>Extensão de Transfer. - </B> Se o método de pesquisa selecionado for EXTENSION o cliente será transferido para esta extensão do plano de discagem.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_camp_record_dir">
|
|
<BR>
|
|
<B>Diretório de Gravação - </B> Se o método de pesquisa selecionado for CAMPREC_60_WAV então o cliente poderá gravar uma mensagem que será colocada no diretório com o nome da campanha, dentro deste diretório
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_third_digit">
|
|
<BR>
|
|
<B>Terceiro Dígito -</B> Isto permite que exista um terceiro caminho se o terceiro dígito conforme definido por este campo for pressionado pelo cliente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_fourth_digit">
|
|
<BR>
|
|
<B>Quarto Dígito -</B> Isto permite que exista um quarto caminho se o quarto digito conforme digitado neste campo for digitado pelo cliente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_third_audio_file">
|
|
<BR>
|
|
<B>Terceiro Arquivo de Audio -</B> Este é o terceiro arquivo de audio a ser tocado assim que seja selecionado pelo cliente a terceira opção.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_third_status">
|
|
<BR>
|
|
<B>Terceiro Status -</B> Este é o terceiro status usado para a chamada assim que o cliente escolhe a terceira opção.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-survey_third_exten">
|
|
<BR>
|
|
<B>Terceira Extensão -</B> Esta é a terceira extensão usada pela chamada assim que é selecionada pelo cliente a terceira opção. O padrão é 8300 que imediatamente desliga a chamada após a mensagem de audio é reproduzida.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_display_dialable_leads">
|
|
<BR>
|
|
<B>Agente de pantalla Dialable Leads -</B> Esta opción se mostrará si está habilitado el número de derivaciones dialable disponibles en la campaña en la pantalla del agente. Este segundo número se actualiza en el sistema una vez por minuto y se actualiza en la pantalla del agente por cada par de.
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-next_agent_call">
|
|
<BR>
|
|
<B>Próximo Agente -</B> Isto determina qual agente recebe a próxima chamada disponível:
|
|
<BR> - random: ordena por um número randômico de atualizações na tabela vicidial_live_agents
|
|
<BR> - oldest_call_start: ordena pela última vez que um agente recebeu uma chamada. Resulta nos agentes recebendo uma média igual de chamadas.
|
|
<BR> - oldest_call_finish: ordena pela última vez que um agente finalizou uma chamada. Também conhecido como agente que está mais tempo esperando cliente, recebe a primeira chamada.
|
|
<BR> - overall_user_level: ordena pelo nível do usuário do agente conforme definido na tabela vicidial_users, um valor mais alto irá receber mais chamadas.
|
|
<BR> - campaign_rank: ordena pelo ranking dado para o agente na campanha. Mais alto para Mais baixo.
|
|
<BR> - fewest_calls: ordena pelo número de chamadas recebidas por um agente para o grupo de entrada específico. Menor qtd de chamadas primeiro.
|
|
<BR> - longest_wait_time: pedidos por la cantidad de tiempo que el agente ha estado activamente la espera de una llamada de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-local_call_time">
|
|
<BR>
|
|
<B>Horário de chamada local -</B> Aqui é onde se configura o horário que se deseja discar, conforme determinação do horário no local para o qual está se discando. Isto é controlado por código de área e é ajustado para o horário de verão caso esteja em vigor. A recomendação para os EUA é de empresa para empresa, das 9:00 as 17:00 e da empresa para consumidor, das 9:00 as 21:00.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-dial_prefix">
|
|
<BR>
|
|
<B>Prefixo de Discagem -</B> Este campo permite que facilmente configuremos o caminho de discagem sem precisar alteração de configurações de servidor e sem precisar recarregar o Asterisk. O padrão é 9 baseado em 91NXXNXXXXXX no plano de discagem - extensions.conf.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-omit_phone_code">
|
|
<BR>
|
|
<B>Omitir o Código do Telefone -</B> Este campo permite que você deixe o campo código do telefone de fora quando discando pelo VICIDIAL. Por exemplo se você estiver discando dentro do Reino Unido você teria 44 como seu código do telefone nos registros, mas você só quer discar 10 digitos no seu plano de discagem para fazer a chamada, ao invés de 44 mais 10 digitos. Padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_cid">
|
|
<BR>
|
|
<B>CallerID da Campanha-</B> Este campo permite que seja enviado um número customizado de CallerID nas chamadas saintes. Este número irá ser mostrado no Identificador da pessoa que você está chamando. O padrão é UNKNOWN. Se você está usando T1 ou E1 para discar esta opção está disponível apenas se estiver usando PRIs - ISDN T1 ou E1 - que tenham o recurso de customizar o callerID habilitados, isso nao irá funcionar em circuitos RBS (Robbed-bit Service). Isto também funciona na maioria dos provedores SIP ou IAX que permitem customizar callerID. O callerID customizado se aplica apenas a chamadas feitas por campanhas VICIDIAL diretamente, qualquer chamadas de terceiros ou transferências nao receberá o callerID customizado. ATENÇÃO: algumas vezes colocando-se UNKNOWN ou PRIVATE neste campo pode causar que seja enviado o callerID da sua operadora. Você pode testar isso colocando 00000000000 no campo callerid se você nao quer enviar seu CallerID .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_rec_exten">
|
|
<BR>
|
|
<B>Extensão de Gravação -</B> Este campo permite que se use uma extensão de gravação customizada com o VICIDIAL. Isto permite que sejas usadas extensões diferentes dependendo de quanto tempo máximo você quer permitir uma gravação e que tipo de codec você quer usar. A extensão padrão é 8309 a qual, se você seguiu os exemplos do SCRATCH_INSTALL irá gravar as chamadas no formato WAV até uma hora. Outra opção incluida nos exemplos é 8310 que irá gravar no formato GSM até uma hora.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_recording">
|
|
<BR>
|
|
<B>Gravação da Campanha -</B> Este menu permite que você escolha o nível de gravação permitido para esta campanha. NEVER irá desabilitar a gravação no client. ONDEMAND é o padrão e permite ao agente iniciar e parar a gravação conforme necessário. ALLCALLS irá iniciar a gravação assim que uma chamada for enviada para o client. ALLFORCE irá iniciar gravação no client assim que uma chamada for enviada ao agente e não dando opção ao agente de parar a gravação. Para ALLCALLS e ALLFORCE existe uma opção para usar o atraso de gravação para evitar gravações curtas e reduzir carga no servidor.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_rec_filename">
|
|
<BR>
|
|
<B>Nome do Arquivo de Gravação -</B> Este campo permite que seja customizado o nome do arquivo de gravação quando a configuração de gravação da campanha esteja em ONDEMAND ou ALLCALLS. As variáveis permitidas sao CAMPANHA CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. O padrão é FULLDATE_AGENTE e se parece assim: 20051020-103108-6666. Outro exemplo é CAMPANHA_TINYDATE_CUSTPHONE que se parece assim: TESTCAMP_51020103108_312551212. 50 char max.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-allcalls_delay">
|
|
<BR>
|
|
<B>Atraso de Gravação -</B> Somente para gravações ALLCALLS e ALLFORCE. Esta configuração irá atrasar a gravação da chamada o tempo em segundos especificado no campo. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-campaign_script">
|
|
<BR>
|
|
<B>Script da Campanha -</B> Este menu permite que seja escolhido um script que irá aparecer na tela do agente para essa campanha. Selecione NONE para não mostrar scripts para esta campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-get_call_launch">
|
|
<BR>
|
|
<B>Abrir com Chamada -</B> Este menu permite que seja escolhido se você deseja abrir automaticamente a pagina web em uma janela separada, abrir a aba SCRIPT ou nao fazer nada quando uma chamada é enviada ao agente para esta campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-xferconf_a_dtmf">
|
|
<BR>
|
|
<B>Xfer-Conf DTMF -</B> Estos cuatro campos permiten que usted tenga dos conjuntos de transferencia de la Conferencia y presets DTMF. Cuando se carga la llamada o de la campaña, la secuencia de comandos vicidial.php mostrará dos botones en el marco de la transferencia de conferencias y rellenará de forma automática el número a marcar y el enviar los campos DTMF cuando se presiona. Si desea permitir Consultivo transferencias, un Fronter a una mayor, que el agente utiliza la casilla de consulta, que no funciona por falta de terceros Vicidial llamadas de consulta. Para aquellos que sólo tienen el agente, haga clic en el dial con el botón del cliente. Entonces, el agente puede dejar-3way-CALL y pasar a la siguiente llamada. Si desea permitir la transferencia ciega de los clientes a una secuencia de comandos AGI Vicidial para el registro o un IVR, a continuación, AXFER lugar en el número a marcar el terreno. También puede especificar una extensión personalizada después de la AXFER, por ejemplo, si usted quiere hacer una llamada a un IVR especiales que se han fijado a la extensión 83900 pondrías AXFER83900 en el número a marcar el terreno.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-quick_transfer_button">
|
|
<BR>
|
|
<B>Rápida transferencia Button -</B> Esta opción agrega un botón de la transferencia rápida a la pantalla por debajo de la agente de transferencia de botón Conf. que permitirá la transferencia de un solo clic ciego de llamadas a los seleccionados en Grupo o un número. IN_GROUP enviará pide al Grupo de Xfer predeterminado para esta campaña, o en grupo-si hay una llamada entrante. Las opciones predeterminadas enviará las llamadas a los preset seleccionado. Por defecto es n para discapacitados.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-prepopulate_transfer_preset">
|
|
<BR>
|
|
<B>Transferencia de rellenar previamente Preset -</B> Esta opción le proporcione el número telefónico al campo en el marco de la Conferencia de transferencia de la pantalla si el agente definido. Por defecto es n para discapacitados.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-timer_action">
|
|
<BR>
|
|
<B>Temporizador de Acción de -</B> Esta característica le permite activar acciones después de una cierta cantidad de tiempo. D1 y D2 opciones de marcación lanzará un llamamiento a la transferencia de presets Conferencia Número y enviarlos a la sesión del agente, éste se utiliza generalmente para aplicaciones sencillas de validación IVR AGI o simplemente para jugar un mensaje pregrabado. WebForm se abrirá la dirección de formulario web. MESSAGE_ONLY simplemente mostrará el mensaje de que está en el campo de abajo. Ninguna de ellas podrá deshabilitar esta característica y es el predeterminado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-timer_action_message">
|
|
<BR>
|
|
<B>Temporizador de mensaje de acción -</B> Este es el mensaje que aparece en la pantalla del agente en el momento de la acción del temporizador se dispara.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-timer_action_seconds">
|
|
<BR>
|
|
<B>Temporizador Segundos Acción -</B> Esta es la cantidad de tiempo después de la llamada se conecta a los clientes que se desencadena la acción del temporizador. El valor predeterminado es -1, que también está inactivo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-scheduled_callbacks">
|
|
<BR>
|
|
<B>Chamadas Agendadas -</B> Permite um agente classificar uma chamada como CALLBK e escolher uma data e hora na qual deseja que o registro seja discado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-wrapup_seconds">
|
|
<BR>
|
|
<B>Segundos de Pós Atendimento -</B> Quantidade de segundos para forçar o agente esperar antes de permitir que ele receba ou faça outra chamada. O timer inicia assim que o agente desliga a chamada com o cliente, ou em caso de chamada a número alternativo, quando termina o trabalho com um registro. Valor padrão é 0 segundos. Se o timer acabar antes que o agente tenha finalizado a chamada, o agente não receberá novo registro até que finalize o atual.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-wrapup_message">
|
|
<BR>
|
|
<B>Mensagem de Pós Atendimento -</B> É uma mensagem específica da campanha a ser mostrada na tela de pós atendimento se o tempo de pós atendimento for configurado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-use_internal_dnc">
|
|
<BR>
|
|
<B>Usar Lista de Bloqueio Interna -</B> Define se esta campanha deve filtrar registros levando em conta a lista de bloqueio interna. Se estiver configurada como Y, o hopper irá procurar cada número na lista de bloqueio antes de carregar. Se o número estiver na lista de bloqueio, o registro de chamada será alterado para o status DNCL assim não será chamado. Padrão é N. La opción codigoDeArea es como la opción-y, excepto que se utiliza para filtrar también un código de área en toda América del Norte desde que se está marcando, en este caso mediante la entrada en la lista 201XXXXXXX DNC podría bloquear todas las llamadas a los 201 codigoDeArea si está habilitada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-use_campaign_dnc">
|
|
<BR>
|
|
<B>Usar Lista de Bloqueio - </B> Este recurso define se a campanha deve filtrar registros usando a lista de Bloqueio que é específica para esta campanha. Se configurado como Y, o hopper irá procurar cada número na lista específica de Bloqueio antes de colocar o número na lista do hopper. Se estiver em uma lista específica de Bloqueio, então ele irá alterar o status do registro para DNCC para que este registro não seja discado. O padrão é N La opción codigoDeArea es como la opción-y, excepto que se utiliza para filtrar también un código de área en toda América del Norte desde que se está marcando, en este caso mediante la entrada en la lista 201XXXXXXX DNC podría bloquear todas las llamadas a los 201 codigoDeArea si está habilitada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-closer_campaigns">
|
|
<BR>
|
|
<B>Grupos De entrada Permitidos -</B> For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound-outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_pause_codes_active">
|
|
<BR>
|
|
<B>Códigos de Pausa do Agente Ativos -</B> Permite aos agentes selecionar códigos de pausa quando eles clicam o botão pausa no vicidial.php. Códigos de pausa são definidos por campanha no final da página de detalhes da campanha e são guardados na tabela vicidial_agent_log. O padrão é N. FORCE irá forçar o agente escolher um código de pausa se eles clicar no botão pausa.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-disable_alter_custdata">
|
|
<BR>
|
|
<B>Desabilitar Alteração nos Dados do Cliente -</B> Quando configurada como Y, não permite ao usuário alterar registros de cliente quando o Agente finaliza a chamada. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-disable_alter_custphone">
|
|
<BR>
|
|
<B>Desab. Alterar Telefone do Cliente - </B> Se configurado como Y, não altera o telefone do cliente quando um agente finaliza a chamada. O padrão é Y. Utilice la opción Ocultar para eliminar completamente el número de teléfono del cliente de la pantalla del agente de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-display_queue_count">
|
|
<BR>
|
|
<B>Mostrar Contagem da Fila ao Agente - </B> Quando configurada como Y, quando um cliente está esperando um agente, será demonstrado na tela do agente a quantidade de clientes em espera. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-manual_dial_list_id">
|
|
<BR>
|
|
<B>ID da Lista Manual -</B> O list_id padrão para ser usado quando um agente faz uma chamada manual e novos registros são criados na vicidial_list. O padrão é 999. O campo pode receber somente digitos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-manual_dial_filter">
|
|
<BR>
|
|
<B>Filtro de Discagem Manual - </B> Permite que você filtre as chamadas que os agentes fazem no modo manual de discagem para esta campanha por uma combinação dos seguintes: DNC - para tirar, CAMPANHALISTAS - o número deve estar nas lístas para a campanha, NONE - sem filtros na discagem manual ou lista de discagem rápida .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_clipboard_copy">
|
|
<BR>
|
|
<B>Cópia p/ Área de Transf. do Agente - </B> ESTE RECURSO SÓ FUNCIONA NO INTERNET EXPLORER. Este recurso permite que você escolha um campo que será copiado para a área de transferência do agente quando uma chamada é enviada ao agente. Um uso comum para este recurso é permitir fácil uso do comando "colar" para números do cliente ou números de telefone em aplicativos cliente no computador do agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-three_way_call_cid">
|
|
<BR>
|
|
<B>CallerID de Chamada a 3 - </B> Isso define o que é enviado como número do CallerID em chamadas a 3 realizadas pelo agente. CAMPANHA usa o CallerID customizado da campanha, CUSTOMER usa o número do cliente que está ativo na tela do agente e AGENT_PHONE usa o callerID do ramal que o agente está logado. AGENT_CHOOSE permite que o agente escolha qual CallerID usar em chamadas a 3 a partir de uma lista de opções
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-three_way_dial_prefix">
|
|
<BR>
|
|
<B>Prefixo para Chamadas a 3 - </B> Isso define o que será usado como prefixo de discagem nas chamadas a 3, o padrão é vazio, então o prefixo da campanha é usado, uma alternativa para se ouvir tocar é 88.
|
|
|
|
<?php
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_enabled">
|
|
<BR>
|
|
<B>CQ Ativado - </B> Configurando este campo como Y permite que os recursos de Controle de Qualidade do agente funcionem. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_statuses">
|
|
<BR>
|
|
<B>Status de CQ - </B> Esta área é onde você escolhe quais status de registro devem passar pelo Controle de Qualidade. Selecione o status que você quer que o CQ revise.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_shift_id">
|
|
<BR>
|
|
<B>Turno de CQ- </B> Este é o controle de tempo usado para trazer registros de uma campanha para o CQ. Os dias da semana são ignorados para esta função.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_get_record_launch">
|
|
<BR>
|
|
<B>Entrada do Registro de CQ -</B> Isso permite uma das seguintes ações a ser ativada na entrada de um registro de CQ para um agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_show_recording">
|
|
<BR>
|
|
<B>Mostrar Gravação do CQ - </B> Permite que uma gravação que está ligada com o registro do CQ seja mostrada na tela do agente de CQ.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_web_form_address">
|
|
<BR>
|
|
<B>Endereço WebForm de CQ - </B> Este é o endereço do websitem que o agente de CQ pode entrar quando clicar no botão WEBFORM na tela de CQ.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-qc_script">
|
|
<BR>
|
|
<B>Script CQ - </B> Este é o Script que pode ser usado pelos agentes de CQ na aba SCRIPT na tela de CQ.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_search_category">
|
|
<BR>
|
|
<B>Categoria de Pesquisa Vtiger- </B> Se a integração do Vtiger estiver habilitada no sistema então esta configuração irá definir onde a página vtiger_search.php irá pesquisar o número do telefone que foi digitado. Existem 4 opções que podem ser usadas nesse campo: LEAD- Esta opção irá pesquisar apenas nos registros do Vtiger, ACCOUNT- Esta opção irá pesquisar nas contas do Vtiger e todos os contatos e sub-contatos para o número do telefone, VENDOR- Esta opção irá apenas pesquisar nos vendedores do Vtiger, ACCTID- Esta opção funciona somente para contas e irá pegar o campo vendor_lead_code no vicidial e tentará procurar no ID da conta do Vtiger. Se nao tiver sucesso irá tentar outros métodos listados que você selecionou. Múltiplas opções podem ser usadas para pesquisa, mas em bases de dados grandes não é recomendado. O padrão é LEAD. UNIFIED_CONTACT-Esta opción se utiliza la versión beta 5.1.0 Vtiger función para buscar por número de teléfono y acceder a la página de búsqueda en Vtiger.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_search_dead">
|
|
<BR>
|
|
<B>Pesquisar contas Mortas no Vtiger -</B> Se a integração com o Vtiger estiver habilitada nas confifurações do sistema então esta configuração define se contas apagadas serão pesquisadas quando o agente clica em WEB FORM para procurar no sistema Vtiger. DISABLED- registros apagados não serão pesquisados, ASK- registros apagados serão pesquisados e a página de pesquisa do vtiger irá perguntar ao agente se ele quer ativar a conta no Vtiger, RESURRECT- irá automaticamente ativar a conta e levar o agente para a tela da conta sem atrasos após clicar em WEB FORM. O padrão é DISABLED.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_create_call_record">
|
|
<BR>
|
|
<B>Vtiger Cria Registro de Chamada - </B> Se a integração com Vtiger estiver habilitada, esta configuração define se um registro de atividade do Vtiger é gravado quando o agente entra na página de pesquisa do vtiger (vtiger_search). O padrão é Y. A opção DISPO irá criar um registro de chamada para a conta Vtiger sem que o agente precise ir para a página da conta no Vtiger através do botão WEB FORM.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_create_lead_record">
|
|
<BR>
|
|
<B>Criar Registro de Tel. no Vtiger-</B> Se a integração com o Vtiger estiver habilitada no sistema e a Categoria de Pesquisa no Vtiger incluir LEAD, esta configuração define se um novo registro da chamada do Vtiger é criado quando o agente entra na página de pesquisa do vtiger e o registro não é encontrado para que se tenha um número de telefone. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_screen_login">
|
|
<BR>
|
|
<B>Tela de Login do Vtiger - </B> Se a integração do Vtiger estiver habilitada então esta configuração irá definir se o usuário será logado automaticamente na interface do Vtiger quando entra no VICIDIAL. O padrão é Y. A opção NEW_WINDOW irá abrir uma nova janela ao efetuar login na tela do agente do VICIDIAL.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-vtiger_status_call">
|
|
<BR>
|
|
<B>Status da Chamada no Vtiger -</B> Se a integração com o Vtiger estiver habilitada nas configurações do sistema então esta configuração irá definir se o status da conta no Vtiger irá ser atualizada com o status da chamada no VICIDIAL depois que ela foi finalizada. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-crm_popup_login">
|
|
<BR>
|
|
<B>CRM Popup Login -</B> Si se establece en Y, la Dirección de Popup CRM se utiliza para abrir una nueva ventana de inicio de sesión agente a esta campaña. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-crm_login_address">
|
|
<BR>
|
|
<B>CRM Dirección Popup -</B> La dirección en Internet de una página de acceso de CRM, puede tener las variables de población como la dirección de formulario web, con el VAR en el frente y con la opción - A - user_custom_one - B - para definir variables.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-start_call_url">
|
|
<BR>
|
|
<B>Iniciar llamada URL -</B> Esta web dirección URL no es visto por el agente, sino que es llamado cada vez que una llamada se envía a un agente si se poblaron. Utiliza las mismas variables que los campos de formulario web y scripts. Esta URL no puede ser una ruta relativa. La URL de inicio no funciona para las llamadas de marcación manual. Por defecto está en blanco.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-dispo_call_url">
|
|
<BR>
|
|
<B>Dispo Call URL -</B> Esta web dirección URL no es visto por el agente, sino que es llamado cada vez que una llamada es dispositioned por un agente, si se poblaron. Utiliza las mismas variables que los campos de formulario web y scripts. dispo y talk_time son las variables que puede utilizar para recuperar el agente definido por la disposición de la llamada y el tiempo de conversación real en segundos de la llamada. Esta URL no puede ser una ruta relativa. Por defecto está en blanco.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-agent_allow_group_alias">
|
|
<BR>
|
|
<B>Alias de Grupo Permitidas - </B> Se você quer permitir seus agentes a usarem alias de grupo então você deve configurar como Y. Alias de grupo são explicados melhor na seção Admin, eles permitem que os agentes usem CallerIDs diferentes para chamadas manuais que realizam. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-default_group_alias">
|
|
<BR>
|
|
<B>Alias de Grupo Padrão - </B> Se você permitiu Alias de Grupo então este é o alias de grupo que será selecionado como padrão quando o agente escolhe usar um alias de grupo em uma chamada manual. O padrão é NONE ou vazio.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-view_calls_in_queue">
|
|
<BR>
|
|
<B>Agente Pide Ver en cola -</B> Si se pone a nada, pero NINGUNO, los agentes podrán consultar los detalles de las llamadas que están esperando en la cola en la pantalla de su agente. Si se establece en un valor de número, las llamadas que aparecerá será limitada al número seleccionado. El valor predeterminado es NINGUNO.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-view_calls_in_queue_launch">
|
|
<BR>
|
|
<B>Ver las llamadas en cola de lanzamiento -</B> Este ajuste, si en AUTO tendrá las convocatorias en el marco de la cola aparecen en inicio de sesión por el agente en la pantalla del agente. El valor predeterminado es MANUAL.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-grab_calls_in_queue">
|
|
<BR>
|
|
<B>Agente Pide Agarre en cola -</B> Esta opción si se define Y permitirá que el agente para seleccionar la llamada que desea tomar de las llamadas en la pantalla de la cola haciendo clic en él durante la pausa. Los agentes sólo podrán coger las llamadas entrantes o las llamadas transferidas, las llamadas no de salida. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-call_requeue_button">
|
|
<BR>
|
|
<B>Agente de Call Re-Cola Button -</B> Esta opción si se define Y agregará un botón Re-cliente de la cola a la pantalla del agente, permite a las agencias para enviar la llamada en una cola de AGENTDIRECT que está reservado para el único agente. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_campaigns-pause_after_each_call">
|
|
<BR>
|
|
<B>Agente de pausa después de cada llamada -</B> Esta opción si se define como Y hará una pausa en el agente después de cada llamada automáticamente. Por defecto es n.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_LISTAS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_lists-list_id">
|
|
<BR>
|
|
<B>ID da Lista -</B> Este é o nome numérico da lista, não é editável após a confirmação do cadastro, deve conter somente numeros e deve ter entre 2 e 8 caracteres de comprimento. Must be a number greater than 100.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-list_name">
|
|
<BR>
|
|
<B>Nome da Lista -</B> Esta é a descrição da lista, deve ter entre 2 e 20 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-list_description">
|
|
<BR>
|
|
<B>Descrição da List -</B> É um campo texto para descrião da lista, é opicional.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-list_changedate">
|
|
<BR>
|
|
<B>Data de Alteração da Lista -</B> Esta é a última vez que as configurações da lista foram modificadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-list_lastcalldate">
|
|
<BR>
|
|
<B>Data da Última Chamada da Lista -</B> É a data em que o último registro da lista foi discado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-campaign_id">
|
|
<BR>
|
|
<B>Campanha -</B> Este é a campanha que esta lista pertence. Uma lista só pode ser discada por uma campanha de cada vez.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-active">
|
|
<BR>
|
|
<B>Ativo -</B> Indica se a lista é para ser discada ou não.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-reset_list">
|
|
<BR>
|
|
<B>Zerar Status de chamada dos registros desta lista -</B> Zera todos os registros desta lista colocando N para \"not called since last reset"\ e significa que qualquer registro pode ser discado agora se for do status conforme configurado na tela da campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-reset_time">
|
|
<BR>
|
|
<B>Perdí Times -</B> Este campo le permite poner veces, separados por un guión, que esta lista se restablece automáticamente por el sistema. Los tiempos deben estar en formato de 24 horas sin puntuacion, por ejemplo 0800-1700 se restablecer la lista de las 8 AM y las 5 PM todos los días. Por defecto está vacío.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-agent_script_override">
|
|
<BR>
|
|
<B>Agente de secuencias de comandos Reemplazar -</B> Si se establece este campo, esta será la secuencia de comandos que el agente ve en su pantalla en lugar de la secuencia de comandos de campaña cuando la ventaja es de esta lista. Por defecto no se establece.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-campaign_cid_override">
|
|
<BR>
|
|
<B>Campaña CID Override -</B> Si se establece este campo, que reemplazarán la campaña CallerID que se establece para las llamadas que se colocan a la cabeza en esta lista. Por defecto no se establece.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-am_message_exten_override">
|
|
<BR>
|
|
<B>Contestador automático de mensajes Override -</B> Si se establece este campo, esto anulará el mensaje de contestador automático situado en la campaña para los clientes en esta lista. Por defecto no se establece.
|
|
<BR>
|
|
<A NAME="vicidial_lists-drop_inbound_group_override">
|
|
<BR>
|
|
<B>Drop de entrada Grupo de Override -</B> Si se establece este campo, en este grupo se utilizará para las llamadas salientes dentro de esta lista que la caída de la campaña de salida en lugar de la caída en grupo situado en la pantalla de detalle de la campaña. Por defecto no se establece.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lists-xferconf_a_dtmf">
|
|
<BR>
|
|
<B>Xfer-Conf Número Override -</B> Estos cinco campos permiten reemplazar la transferencia de presets Conferencia número cuando la iniciativa es de esta lista. Por defecto está en blanco.
|
|
|
|
|
|
<BR>
|
|
<A NAME="vicidial_list-dnc">
|
|
<BR>
|
|
<B>Lista de Bloqueio do VICIDIAL - </B> Esta lista de bloqueio contém cada registro que foi enviado para um status de Não Ligar no sistema. Através da página: LISTAS - INCLUIR BLOQUEIO você pode manualmente adicionar números para esta lista para que não sejam ligados por campanhas que usam a lista de bloqueio interna. Existe também a opção de incluir registros em listas de bloqueio específicas de campanhas. Si usted tiene la opción de DNC activas de codigoDeArea a continuación, usted también puede usar el código de entradas de la zona este 201XXXXXXX como comodín para bloquear todas las llamadas a los 201 codigoDeArea cuando está activado.
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_ENTRANTE_GROUPS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_inbound_groups-group_id">
|
|
<BR>
|
|
<B>ID do Grupo -</B> Nome curto do grupo de entrada, não é editável após confirmação, não deve conter qualquer espaços e deve ter entre 2 e 20 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-group_name">
|
|
<BR>
|
|
<B>Nome do Grupo -</B> Descrição do grupo, deve ter entre 2 e 30 caracteres de comprimento. Não pode incluir os caracteres - + ou espaço .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-group_color">
|
|
<BR>
|
|
<B>Cor do Grupo -</B> Cor mostrada no aplicativo client do VICIDIAL quando uma chamada entra para este grupo. Deve ser entre 2 e 7 caracteres de comprimento. Se for uma definição de cor em hexadecimal, você deve lembrar de colocar o # no começo ou o VICIDIAL não vai funcionar corretamente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-active">
|
|
<BR>
|
|
<B>Ativo -</B> Indica se o grupo será mostrado na caixa de seleção quando o agente do VICIDIAL efetua logon .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-web_form_address">
|
|
<BR>
|
|
<B>Formulário Web -</B> Endereço customizado para o qual o botão WEB FORM no VICIDIAL leva quando clicado, nas chamadas que entram para este grupo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-next_agent_call">
|
|
<BR>
|
|
<B>Próximo Agente -</B> Isto determina qual agente recebe a próxima chamada disponível:
|
|
<BR> - random: ordena por um número randômico de atualizações na tabela vicidial_live_agents
|
|
<BR> - oldest_call_start: ordena pela última vez que um agente recebeu uma chamada. Resulta nos agentes recebendo uma média igual de chamadas.
|
|
<BR> - oldest_call_finish: ordena pela última vez que um agente finalizou uma chamada. Também conhecido como agente que está mais tempo esperando cliente, recebe a primeira chamada.
|
|
<BR> - overall_user_level: ordena pelo nível do usuário do agente conforme definido na tabela vicidial_users, um valor mais alto irá receber mais chamadas.
|
|
<BR> - inbound_group_rank: ordena pelo ranking dado para um agente para um grupo de entrada. Do mais alto para o mais baixo.
|
|
<BR> - fewest_calls: ordena pelo número de chamadas recebidas por um agente para o grupo de entrada específico. Menor qtd de chamadas primeiro.
|
|
<BR> - campaign_rank: ordena pelo ranking dado para o agente na campanha. Mais alto para Mais baixo.
|
|
<BR> - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first.
|
|
<BR> - longest_wait_time: pedidos por la cantidad de tiempo que el agente ha estado activamente la espera de una llamada de.
|
|
<BR>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-queue_priority">
|
|
<BR>
|
|
<B>Queue Priority -</B> This setting is used to define the order in which the calls from this inbound group should be answered in relation to calls from other inbound groups.
|
|
|
|
<A NAME="vicidial_inbound_groups-fronter_display">
|
|
<BR>
|
|
<B>Exibição do Primário -</B> Este campo determina se uma chamada entrante para o agente VICIDIAL deve ter o nome do agente primário, se existir, exibido no campo status da tela quando uma chamada é transferida para o agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-ingroup_script">
|
|
<BR>
|
|
<B>Script da Campanha -</B> Este menu permite que seja escolhido um script que irá aparecer na tela do agente para essa campanha. Selecione NONE para não mostrar scripts para esta campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-get_call_launch">
|
|
<BR>
|
|
<B>Abrir com Chamada -</B> Este menu permite que seja escolhido se você deseja abrir automaticamente a pagina web em uma janela separada, abrir a aba SCRIPT ou nao fazer nada quando uma chamada é enviada ao agente para esta campanha.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-xferconf_a_dtmf">
|
|
<BR>
|
|
<B>Xfer-Conf DTMF -</B> Estos cuatro campos permiten que usted tenga dos conjuntos de transferencia de la Conferencia y presets DTMF. Cuando se carga la llamada o de la campaña, la secuencia de comandos vicidial.php mostrará dos botones en el marco de la transferencia de conferencias y rellenará de forma automática el número a marcar y el enviar los campos DTMF cuando se presiona. Si desea permitir Consultivo transferencias, un Fronter a una mayor, que el agente utiliza la casilla de consulta, que no funciona por falta de terceros Vicidial llamadas de consulta. Para aquellos que sólo tienen el agente, haga clic en el dial con el botón del cliente. Entonces, el agente puede dejar-3way-CALL y pasar a la siguiente llamada. Si desea permitir la transferencia ciega de los clientes a una secuencia de comandos AGI Vicidial para el registro o un IVR, a continuación, AXFER lugar en el número a marcar el terreno. También puede especificar una extensión personalizada después de la AXFER, por ejemplo, si usted quiere hacer una llamada a un IVR especiales que se han fijado a la extensión 83900 pondrías AXFER83900 en el número a marcar el terreno.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-timer_action">
|
|
<BR>
|
|
<B>Temporizador de Acción de -</B> Esta característica le permite activar acciones después de una cierta cantidad de tiempo. D1 y D2 opciones de marcación lanzará un llamamiento a la transferencia de presets Conferencia Número y enviarlos a la sesión del agente, éste se utiliza generalmente para aplicaciones sencillas de validación IVR AGI o simplemente para jugar un mensaje pregrabado. WebForm se abrirá la dirección de formulario web. MESSAGE_ONLY simplemente mostrará el mensaje de que está en el campo de abajo. Ninguna de ellas podrá deshabilitar esta característica y es el predeterminado. Esta configuración anula la configuración de la campaña.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-timer_action_message">
|
|
<BR>
|
|
<B>Temporizador de mensaje de acción -</B> Este es el mensaje que aparece en la pantalla del agente en el momento de la acción del temporizador se dispara.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-timer_action_seconds">
|
|
<BR>
|
|
<B>Temporizador Segundos Acción -</B> Esta es la cantidad de tiempo después de la llamada se conecta a los clientes que se desencadena la acción del temporizador. El valor predeterminado es -1, que también está inactivo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-drop_call_seconds">
|
|
<BR>
|
|
<B>Tempo Limite de Drop- </B> O número em segundos que uma chamada deve ficar na fila de espera até ser considerada um DROP.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-drop_action">
|
|
<BR>
|
|
<B>Ação de Drop - </B> Este menu permite que você escolha o que acontece com uma chamada quando esta ficou esperando mais que o tempo configurado no campo Tempo Limite de Drop. HANGUP irá simplesmente desligar a chamada, MESSAGE irá enviar a chamada para Extensão de Drop que você definiu abaixo, VOICEMAIL irá enviar a chamada para a caixa de voicemail que você definiu abaixo e IN_GROUP irá enviar a chamada para o grupo de entrada que você define abaixo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-drop_exten">
|
|
<BR>
|
|
<B>Extensão de Drop - </B> Se a Ação de Drop estiver configurada como MESSAGE, este é o número do plano de discagem a ser discado para transferir a chamada após o tempo limite de drop.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-voicemail_ext">
|
|
<BR>
|
|
<B>Correio de Voz -</B> If Drop Action is set to VOICEMAIL, the call DROP would instead be directed to this voicemail box to hear and leave a message.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-drop_inbound_group">
|
|
<BR>
|
|
<B>Grupo de Transferência de Drop - </B> Caso a Ação de Drop esteja configurada como IN_GROUP, a chamada será enviada para esse Grupo de Entrada após o tempo limite.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-call_time_id">
|
|
<BR>
|
|
<B>Horário de Chamada </B> É a configuração do horário de chamada para ser usado neste grupo de entrada. Lembre-se que o horário é baseado no horário do servidor. Padrão é 24Horas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-after_hours_action">
|
|
<BR>
|
|
<B>Ação Fora do Expediente - </B> A ação a ser realizada se o horário for fora do definido no horário de chamada para este grupo de entrada. HANGUP irá imediatamente desligar a chamada, MESSAGE irá tocar o arquivo no campo Arquivo de Mensagem Fora de Expediente, EXTENSION irá enviar a chamada para o extensão do campo Extensão Fora do Expediente no plano de discagem e VOICEMAIL irá enviar a chamada para a caixa de voicemail listada no campo de Correio de Voz Fora do Expediente, IN_GROUP irá enviar a chamada para o grupo de entrada selecionado na lista Grupo de Entrada Fora do Expediente. Padrão é MESSAGE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-after_hours_message_filename">
|
|
<BR>
|
|
<B>Arquivo Fora do Expediente -</B> O arquivo de audio localizado no servidor, que deve ser tocado quando a ação estiver configurada como MESSAGE. Padrão é vm-goodbye
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-after_hours_exten">
|
|
<BR>
|
|
<B>Extensão Fora do Expediente -</B> Extensão a ser enviada a chamada que entrar se o campo Ação estiver como EXTENSION. O padrão é 8300.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-after_hours_voicemail">
|
|
<BR>
|
|
<B>Correio de Voz Fora do Expediente-</B> A caixa de VoiceMail a ser enviada a chamada, quando o campo Ação for VOICEMAIL.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-afterhours_xfer_group">
|
|
<BR>
|
|
<B>Grupo de Transferência Fora do Expediente- </B> Se a Ação de Fora do Expediente estiver configurada para IN_GROUP, a chamada irá ser enviada para esse grupo de entrada se ela entrar neste grupo de entrada fora do horário configurado no Horário de Chamadas para este grupo de entrada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-no_agent_no_queue">
|
|
<BR>
|
|
<B>N de colas n Agentes -</B> Si este campo está establecido en Y o NO_PAUSED entonces no se pide se pondrá en la cola de este grupo en si no hay agentes conectado y las llamadas se vaya a la agente n Ninguna acción de la cola. La opción NO_PAUSED no se envían también las personas que llaman a la cola si sólo hay una pausa en los agentes en el grupo. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-no_agent_action">
|
|
<BR>
|
|
<B>No No Acción cola de agente -</B> Si está activada ninguna cola Ningún Agente, entonces este campo se define en la llamada pasará si no hay agentes en la A-Group. Por defecto es el mensaje, este reproduce los archivos de sonido en el campo el valor de acción y luego cuelga el.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-no_agent_action_value">
|
|
<BR>
|
|
<B>No hay ninguna cola Acción Agente Valor -</B> Este es el valor de la acción anterior. El valor predeterminado es nbdy-avail-to-take-call|vm-goodbye.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-welcome_message_filename">
|
|
<BR>
|
|
<B>Arquivo de Mensagem Boasvindas -</B> Arquivo de audio localizado no servidor a ser tocado quando uma chamada entra. Se estiver configurado como ---NONE--- então nenhuma mensagem irá ser tocada. O padrão é ---NONE---. Este campo como con los otros campos de audio en In-grupos, con la excepción del nombre de archivo de alerta de agente, puede tener múltiples archivos de audio reproducido si se pone un tubo de lista separada de los archivos de audio en el campo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-play_welcome_message">
|
|
<BR>
|
|
<B>Tocar Mensagem de Boas Vindas - </B> Esta configuração seleciona quando tocar mensagens de boas vindas, ALWAYS irá tocar toda vez, NEVER nunca irá tocar, IF_WAIT_ONLY irá somente tocar a mensagem se a chamada não for diretamente para o agente, e YES_UNLESS_NODELAY irá sempre tocar a mensagem a não ser que a configuração de Sem Atraso estiver habilitada. O padrão é ALWAYS.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-moh_context">
|
|
<BR>
|
|
<B>Contexto da Música de Espera-</B> O contexto de Música de Espera a ser usado quando o cliente é colocado em espera. O padrão é default.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-onhold_prompt_filename">
|
|
<BR>
|
|
<B>Arquivo de Mensagem de Espera -</B> Arquivo de audio localizado no servidor a ser tocado em um intervalo regular quando o cliente está em espera. O padrão é generic_hold. Este arquivo de audio deve ter até 9 segundos
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-prompt_interval">
|
|
<BR>
|
|
<B>Intervalo de Anúncio -</B> O tempo em segundos para esperar até tocar a mensagem de Espera. O padrão é 60. Para desabilitar a Mensagem em Espera, configuro o intervalo como 0.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-play_place_in_line">
|
|
<BR>
|
|
<B>Tocar Posição na Fila - </B> Isto define se o cliente irá ouvir seu lugar na fila de atendimento quando entram na fila e também periodicamente. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-play_estimate_hold_time">
|
|
<BR>
|
|
<B>Tocar Tempo Estimado - </B> Isto define se o cliente irá ouvir o tempo estimado de espera antes de ser transferido para um agente. O padrão é N. Se o cliente está em espera e ouve o tempo estimado de atendimento, o tempo mínimo que será tocado é de 15 segundos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option">
|
|
<BR>
|
|
<B>Opção de Tempo de Espera - </B> Permite que você especifique uma rota para a chamada caso o tempo de espera esteja superior a quantidade de segundos configurada abaixo. O padrão é NONE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_seconds">
|
|
<BR>
|
|
<B>Tempo de Opção de Espera - </B> Se a opção de tempo de espera estiver configurado para um valor diferente de NONE, este número em segundos de tempo estimado de atendimento irá acionar esta opção de espera. O padrão é 360 segundos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_exten">
|
|
<BR>
|
|
<B>Extensão de Opção de Tempo - </B> Se a Opção de Tempo de Espera estiver como EXTENSION, esta extensão do plano de discagem será usada para enviar a chamada quando o tempo de espera superar a configuração de tempo de espera.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_voicemail">
|
|
<BR>
|
|
<B>VoiceMail da Opção de Espera - </B> Se a Opção de Espera estiver como VOICEMAIL, esta é a caixa de voicemail que a chamada será direcionada, caso o tempo de espera exceda o tempo configurado na opção de tempo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_xfer_group">
|
|
<BR>
|
|
<B>Gr. de Entr. da Opção de Espera - </B> Se a Opção de Espera for IN_GROUP, este grupo de entrada será usado para transferir a chamada que entrar e o tempo de espera estimado for maior que o tempo da opção..
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_callback_filename">
|
|
<BR>
|
|
<B>Arquivo de Agendamento da Espera - </B> Se a configuração de Opção de Tempo de Espera estiver como CALLERID_CALLBACK, esse arquivo será tocado e então a chamada será considerada com status de novo para a lista abaixo se o tempo estimado de espera exceder o tempo configurado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_time_option_callback_list_id">
|
|
<BR>
|
|
<B>ID da Lista de Agendamento de Espera - Se a Opção de Tempo de Espera estiver como CALLERID_CALLBACK, esta é a ID da lista na qual a chamada é adicionada como novo registro caso o tempo de chamada exceda o tempo definido na configuração</B> .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-agent_alert_exten">
|
|
<BR>
|
|
<B>Agente de Alerta Nombre de archivo -</B> El archivo de audio a jugar a un agente de anunciar que una llamada está llegando a su agente. Para no utilizar esta función establezca este valor por defecto es a X. Ding.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-agent_alert_delay">
|
|
<BR>
|
|
<B>Atraso de Alerta ao Agente -</B> O tempo em milisegundos para esperar antes de enviar a chamada para o agente após tocar na extensão do agente. O padrão é 1000.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-default_xfer_group">
|
|
<BR>
|
|
<B>Grupo de Transf. Padrão -</B> Este campo é o Grupo de Entrada padrão que será automaticamente selecionado quando um agente seleciona transferência-conferência na tela do agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-ingroup_recording_override">
|
|
<BR>
|
|
<B>Sobreposição de Gravação de Entrada - </B> Este campo permite a sobreposição da configuração da gravação na campanha. Esta configuração pode ser sobreposta pela configuração de sobreposição de gravação do usuário. DISABLED não irá sobrepor a configuração da campanha. NEVER irá desabilitar a gravação no client. ONDEMAND é o padrão e permite ao agente iniciar e finalizar a gravação conforme necessário. ALLCALLS irá iniciar a gravação no client quando uma chamada é enviada ao agente. ALLFORCE irá iniciar gravação no client sempre que uma ligação é enviada ao agente sem dar opção ao agente de parar a gravação.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-ingroup_rec_filename">
|
|
<BR>
|
|
<B>Nome do Arquivo de Gravação de Entrada- </B> Este campo irá sobrepor o perfil de nome de arquivo de gravação da campanha, a não ser que esteja configurado como NONE. As variáveis permitidas são: CAMPANHA CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. O padrão é FULLDATE_AGENTE e irá ficar assim: 20051020-103108_6666. Outro exemplo é CAMPANHA_TINYDATE_CUSTPHONE que irá ficar assim: TESTCAMP_51020103108_3125551212. 50 caracteres no máximo. Padrão é NONE.
|
|
|
|
<?php
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_enabled">
|
|
<BR>
|
|
<B>CQ Ativado - </B> Configurando este campo como Y permite que os recursos de Controle de Qualidade do agente funcionem. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_statuses">
|
|
<BR>
|
|
<B>Status de CQ - </B> Esta área é onde você escolhe quais status de registro devem passar pelo Controle de Qualidade. Selecione o status que você quer que o CQ revise.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_shift_id">
|
|
<BR>
|
|
<B>Turno de CQ - </B> Este é o turno usado pelo CQ para trazer registros de CQ para um grupo de entrada. Os dias da semana são ignorados para estas funções.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_get_record_launch">
|
|
<BR>
|
|
<B>Entrada do Registro de CQ -</B> Isso permite uma das seguintes ações a ser ativada na entrada de um registro de CQ para um agente.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_show_recording">
|
|
<BR>
|
|
<B>Mostrar Gravação do CQ - </B> Permite que uma gravação que está ligada com o registro do CQ seja mostrada na tela do agente de CQ.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_web_form_address">
|
|
<BR>
|
|
<B>Endereço WebForm de CQ - </B> Este é o endereço do websitem que o agente de CQ pode entrar quando clicar no botão WEBFORM na tela de CQ.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-qc_script">
|
|
<BR>
|
|
<B>Script CQ - </B> Este é o Script que pode ser usado pelos agentes de CQ na aba SCRIPT na tela de CQ.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-hold_recall_xfer_group">
|
|
<BR>
|
|
<B>Grupo de Rechamada de Espera- </B> Se um cliente liga de volta para este grupo de entrada mais de uma vez e esta config. estiver como NONE, então a chamada é automaticamente desviada para o Grupo de Entrada selecionado neste campo. O padrão é NONE.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-no_delay_call_route">
|
|
<BR>
|
|
<B>Rotear Sem Atraso - </B> Configurando como Y irá remover qualquer tempo de espera ou anuncios de audio e irá tentar enviar a chamada direto para o agente. Não sobrepõe mensagem de boas vindas e anuncios da fila de espera. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-answer_sec_pct_rt_stat_one">
|
|
<BR>
|
|
<B>Percentual Estatístico de Chamadas Atendidas em X seg - </B> Este campo permite você configurar o número de segundos que a tela de estatísticas em tempo real demorará para calcular o percentual de chamadas atendidas que foram atendidas antes de X segundos em espera.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-start_call_url">
|
|
<BR>
|
|
<B>Iniciar llamada URL -</B> This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. Default is blank.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-dispo_call_url">
|
|
<BR>
|
|
<B>Dispo Call URL -</B> This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call. Default is blank.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_groups-default_group_alias">
|
|
<BR>
|
|
<B>Alias de Grupo Padrão - </B> Se você permitium Alias de Grupo para a campanha que o agente está logado, então este é o alias de grupo que é selecionado como padrão em uma chamada vindo deste grupo de entrada quando o agente escolhe um alias de grupo para uma chamada manual. O padrão é NONE ou vazio.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_ENTRANTE_DIDS TABELA</FONT></B><BR><BR>
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-did_pattern">
|
|
<BR>
|
|
<B>Extensão DDR- </B> Este é o número, extensão ou DDR que irá acionar esta entrada e que você irá rotear no sistema usando este recurso. Existe um DDR padrão reservado que você pode usar que é a palavra -default- sem os traços, que irá permitir que você envie uma chamada que não pertenca a nenhum padrão existente para o DDR padrão.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-did_description">
|
|
<BR>
|
|
<B>Descrição do DDR - </B> Esta é a descrição do roteamento ao DDR.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-did_active">
|
|
<BR>
|
|
<B>DDR Ativo - </B> Este é o campo que você configura se o DDR está ativo ou não. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-did_route">
|
|
<BR>
|
|
<B>Rota DDR - </B> Este é o tipo de rota que seu DDR irá usar. EXTEN irá enviar as chamadas para a extensão abaixo, VOICEMAIL irá enviar as chamadas para uma caixa de voicemail digitada abaixo, AGENTE irá enviar as chamadas para um agente do VICIDIAL se ele estiver logado no sistema, PHONE irá enviar a chamada para um ramal configurado abaixo, IN_GROUP irá enviar as chamadas diretamente para um grupo de entrada especificado abaixo. O padrão é EXTEN. MENU irá enviar a chamada para o menu determinado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-extension">
|
|
<BR>
|
|
<B>Extensão -</B> Se EXTEN for selecionado como rota, então este é a extensão do plano de discagem que as chamadas serão enviadas. O padrão é 999811112, sem-serviço.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-exten_context">
|
|
<BR>
|
|
<B>Contexto da Extensão -</B> Se EXTEN estiver selecionado como Rota do DDR, então este é o contexto do plano de discagem para o qual as chamadas serão enviadas. O padrão é default.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-voicemail_ext">
|
|
<BR>
|
|
<B>Caixa de VoiceMail - </B> Se VOICEMAIL estiver selecionado como rota de DDR, então esta é a caixa de voicemail que a chamada deve ser enviada. O padrão é vazio.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-phone">
|
|
<BR>
|
|
<B>Extensão do Ramal - </B> Se PHONE estiver selecionado na rota DDR, então esta é a extensão do ramal que as chamadas serão enviadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-server_ip">
|
|
<BR>
|
|
<B>IP do Servidor do Ramal - </B> Se PHONE estiver selecionado como rota DDR, então este é o IP do servidor do ramal que as chamadas devem ser enviadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-menu_id">
|
|
<BR>
|
|
<B>Menu -</B> Se CALLMENU estiver selecionado como Rota de DDR, então este é o Menu para o qual a chamada será transferida.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-user">
|
|
<BR>
|
|
<B>Usuário do Agente - </B> Se AGENTE estiver selecionado como rota DDR, então este é o agente do vicidial que as chamadas devem ser enviadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-user_unavailable_action">
|
|
<BR>
|
|
<B>Ação p/ Usuário não Dispon. - </B> Se AGENTE estiver selecionado como rota de DDR, e o usuário não estiver logado ou disponível, então esta é a rota que as chamadas serão direcionadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-user_route_settings_ingroup">
|
|
<BR>
|
|
<B>Config. de Grupo de Entr. do Agente - </B> Se AGENTE estiver selecionado como roda DDR, então este é o grupo de entrada que irá ser usado para configurações de fila na qual o cliente ficará esperando para ser direcionado ao agente. O padrão é AGENTDIRECT.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-group_id">
|
|
<BR>
|
|
<B>ID do Grupo de Entr. - </B> Se IN_GROUP estiver selecionado como rota de DDR, então este é o grupo de entrada a ser enviadas as chamadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-call_handle_method">
|
|
<BR>
|
|
<B>In-Group Call Handle Method -</B> IN_GROUP Si se selecciona como la Ruta de DID, entonces este es el llamado método de control utilizado para estas llamadas. Cid agregar un registro de conducir nuevo con cada llamada mediante la CallerID como el número de teléfono, CIDLOOKUP intentará buscar el número de teléfono por el CallerID en todo el sistema, CIDLOOKUPRL intentará buscar el número de teléfono por el CallerID en una sola lista especificada , CIDLOOKUPRC intentará buscar el número de teléfono por el CallerID en todas las listas que pertenecen a la campaña especificada, más cerca se especifica para Vicidial Closer llamadas, ANI añadirá un nuevo registro de conducir con cada llamada mediante la ANI como el número de teléfono, ANILOOKUP intentará buscar el número de teléfono de la ANI en todo el sistema, ANILOOKUPRL intentará buscar el número de teléfono de la ANI en una sola lista especificada, XDIGITID pedirá la llamada de un código de dos dígitos X antes de la llamada se pondrá en la cola, VIDPROMPT pedirá la persona que llama por su número de identificación y creará un registro de conducir nuevo con el CallerID como el número de teléfono y el ID como el identificador de proveedor, VIDPROMPTLOOKUP intentará buscar el ID en todo el sistema, VIDPROMPTLOOKUPRL intentará búsqueda del proveedor de identificación de la identificación en una sola lista se especifica, VIDPROMPTLOOKUPRC tratará de buscar el proveedor de identificación de la identificación en todas las listas que pertenecen a la campaña especificado. El valor predeterminado es CID.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-agent_search_method">
|
|
<BR>
|
|
<B>Método de Busca do Grupo de Entrada - </B> Se IN_GROUP estiver selecionado na rota de DDR, então este é o método de pesquisa do agente a ser usado pelo grupo de entrada, LO é Balanceamento de Carga com Transbordo e irá tentar enviar a chamada para um agente no servidor local antes de tentar enviar para outro servidor, LB é balanceamento de carga e tentará enviar a chamada para o próximo agente não importando o servidor que estiver logado, SO é Somente Servidor e tentará enviar a chamada somente para agentes no mesmo servidor da chamada. O padrão é LB.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-list_id">
|
|
<BR>
|
|
<B>ID da Lista do Grupo de Entrada- </B> Se IN_GROUP estiver selecionado como rota de DDR, então este é o ID da lista que os registros devem ser pesquisados e onde o novo registro será incluído se necessário.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-campaign_id">
|
|
<BR>
|
|
<B>ID da Camp. do Grp. de Entrada- </B> Se IN_GROUP estiver selecionado como rota de DDR, então este é o ID da campanha que os registros devem ser procurados quando o método de pesquisa for CIDLOOKUPRC.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_inbound_dids-phone_code">
|
|
<BR>
|
|
<B>Código do Tel. de Entrada -</B> Se IN_GROUP estiver selecionado como rota de DDR, então este é o código de telefone usado para um novo registro.
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_CALL MENU TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_call_menu-menu_id">
|
|
<BR>
|
|
<B>ID do Menu -</B> Este é o ID para este passo do menu de chamadas. Ele irá aparecer como o contexto que é usado no plano de discagem para este menu de chamadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_name">
|
|
<BR>
|
|
<B>Nome do Menu -</B> Este campo é o nome descritivo do menu de chamadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_prompt">
|
|
<BR>
|
|
<B>Audio do Menu -</B> Este campo contém o nome do arquivo para o audio que será tocado no inicio do menu. Puede introducir propmts múltiples en este campo y los demás ámbitos del sistema mediante la separación de ellos con un carácter de canalización.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_timeout">
|
|
<BR>
|
|
<B>Tempo max do menu -</B> Este campo é onde você configura o tempo máximo em segundos que um menu irá aguardar o cliente digitar uma opção em DTMF. Establecer este campo a cero 0 significa que no habrá tiempo de espera después de que el sistema se juega.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_timeout_prompt">
|
|
<BR>
|
|
<B>Audio de tempo excedido do menu -</B> Este campo contém o arquivo de audio a ser tocado caso o tempo máximo de espera tenha sido alcançado. O padrão é NONE para nao tocar audio.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_invalid_prompt">
|
|
<BR>
|
|
<B>Audio de Opção Inválida do menu -</B> Este campo contém o nome do arquivo de audio que será tocado quando o cliente selecionar uma opção inválida. O padrão é NONE que não toca audio quando a opção é inválida.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_repeat">
|
|
<BR>
|
|
<B>Repetir Menu -</B> Este campo é onde você define o número de vezes que o menu irá tocar depois da primeira vez, se nenhuma opção for escolhida pelo cliente. O padrão é 1 para repetir o menu uma vez.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-menu_time_check">
|
|
<BR>
|
|
<B>Verif. Horário de Menu -</B> Este campo é onde você seleciona se as chamadas á URA devem ser restritas a horários específicos cadastrados no Cadastro de Horários de Chamada. Se o Horário de chamada estiver vazio, esta configuração será ignorada. O padrão é 0 para desabilitado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-call_time_id">
|
|
<BR>
|
|
<B>ID do Horário de Cham. -</B> Este é o ID do Horário de chamadas que será usado para restringir horários de chamada para este menu, quando a opção estiver habilitada.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-track_in_vdac">
|
|
<BR>
|
|
<B>Rastrear Chamadas no Relat. Tempo-Real -</B> Este campo é onde você seleciona se deseja que as chamadas devem ser rastreadas no relatório de Tempo-Real como uma chamada de URA. O padrão é 1 para ativo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-tracking_group">
|
|
<BR>
|
|
<B>Grupo de seguimiento de -</B> Esta es la identificación que se puede utilizar para rastrear las llamadas a este menú de llamada cuando se mira al Informe de IVR. La lista incluye CALLMENU como predeterminado, así como todos los Grupos de In -.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-option_value">
|
|
<BR>
|
|
<B>Valor da Opção -</B> Este campo é onde você define a opção de menu, as opções são: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. A opção especial TIMECHECK pode ser usada somente se você habilitou a verificação de horário e existe um horário de chamadas definido para o menu. Para remover uma opção, apenas selecione a rota como REMOVE e a opção será removida quando você clicar no botão enviar.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-option_description">
|
|
<BR>
|
|
<B>Descrição da Opção -</B> Este campo é onde você descreve a opção, esta descrição será colocada no plano de discagem como um comentário acima da opção.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-option_route">
|
|
<BR>
|
|
<B>Rota da Opção -</B>
|
|
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-option_route_value">
|
|
<BR>
|
|
<B>Valor da rota da opção -</B> Este campo é onde você coloca o valor que define para onde, na Opção de Rota selecionada, a chamada deve ser direcionada .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-option_route_value_context">
|
|
<BR>
|
|
<B>Contexto do valor da rota da opção -</B> Este campo é opcional e somente é usado para Rotas do tipo EXTENSION.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_menu-custom_dialplan_entry">
|
|
<BR>
|
|
<B>Custom Dilplan entrada -</B> Este campo le permite entrar en los elementos dialplan que desea para el menú de llamada.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_REMOTE_AGENTS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_remote_agents-user_start">
|
|
<BR>
|
|
<B>Início do ID do usuário -</B> Esta é a ID inicial que será usada quando um agente remoto for cadastrado no sistema. Se o número de linhas estiver configurado maior que 1, este número é incrementado por um até cada linha ter sua entrada. Tenha certeza que você criou uma nova conta de usuário VICIDIAL com nível 4 ou superior se você quer que eles sejam capazes de usar a página vdremote.php para acesso remoto a esta conta.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-number_of_lines">
|
|
<BR>
|
|
<B>Número de Linhas -</B> Define quantas entradas de usuários remotos o sistema deve criar, e determina quantas linhas podem ser enviadas com segurança para o número abaixo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-server_ip">
|
|
<BR>
|
|
<B>IP do Servidor -</B> Um cadastro de agente remoto só funciona em um servidor, aqui é onde você seleciona qual servidor.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-conf_exten">
|
|
<BR>
|
|
<B>Extensão Externa -</B> Este é o número para o qual você quer que as chamadas sejam direcionadas. Tenha certeza que é um número completo do plano de discagem e que se você precisa de um 9 no começo, você o coloca aqui. Teste discando o número de um fone no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-status">
|
|
<BR>
|
|
<B>Status -</B> Aqui é onde você desliga ou liga o agente remoto. Assim que o agente está ativo, o sistema entende que ele pode receber chamadas. Pode demorar até 30 segundos após a mudança do status para Inactive para parar de receber chamadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-campaign_id">
|
|
<BR>
|
|
<B>Campanha -</B> Aqui é onde você escolhe a campanha que este agente remoto deve ser logado. Chamadas entrantes precisam usar uma campanha CLOSER e selecionar uma campanha entrante abaixo para que você receba chamadas.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_remote_agents-closer_campaigns">
|
|
<BR>
|
|
<B>Grupos de entrada -</B> Aqui é selecionado o grupo de entrada do qual você quer receber chamadas se você selecionou uma campanha CLOSER(finalização).
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_CAMPANHA_LISTAS</FONT></B><BR><BR>
|
|
<A NAME="vicidial_campaign_lists">
|
|
<BR>
|
|
<B>As listas dentro desta campanha são listadas aqui, estando ativas ou desativadas será demonstrado por Y ou N e você pode ir para a tela de cadastro de listas clicando no Id na primeira coluna.</B>
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_CAMPANHA_STATUS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_campaign_statuses">
|
|
<BR>
|
|
<B>Através do uso de status de campanha customizados, você pode ter status que somente existem para uma campanha específica. Os Status devem ter entre 1 e 8 caracteres de comprimento, a descrição deve ter entre 2-30 caracteres de comprimento e "Selectable" determina se será mostrado no VICIDIAL como um resultado. O campo RESPOSTA HUMANOA(human_answered) é usado quando é calculado o percentual de desligamento(drop), ou índice de abandono. Configurando como Y irá usar este status quando for contar chamadas atendidas por humanos A opção de categoria permite agrupar vários status em uma categoria que podem ser usados para análise estatística.</B>
|
|
|
|
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_CAMPANHA_HOTKEYS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_campaign_hotkeys">
|
|
<BR>
|
|
<B>Através do uso de atalhos de teclado customizados por campanha, agentes que usam o web-client do vicidial podem desligar e classificar uma chamada pressionando uma tecla do teclado.</B> Existem duas opções de atalhos especiais que você pode usar em conjunto com discagem a Telefones Alternativos, ALTPH2 - Discar para o Tel. Alt. e ADDR3----Discagem rápida do endereço 3, permitem ao agente usar o atalho para desligar a chamada, permanecer no mesmo registro e discar outro telefone do mesmo registro.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_LEAD_RECYCLE TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_lead_recycle">
|
|
<BR>
|
|
<B>Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links.</B>
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>STATUS DE DISCAGEM ALT.</FONT></B><BR><BR>
|
|
<A NAME="vicidial_auto_alt_dial_statuses">
|
|
<BR>
|
|
<B>Se o campo Auto Discar Alternativo estiver marcado, os registros que são finalizados sob estes status terão os números alternativos discados após qualquer um desses status de não atendidos.</B>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL CÓDIGOS DE PAUSA DO AGENTE</FONT></B><BR><BR>
|
|
<A NAME="vicidial_pause_codes">
|
|
<BR>
|
|
<B>Se o Código de Pausa do Agente estiver ativa então os agentes serão capazes de escolher entre esses códigos de pausa quando clicarem no botão PAUSA em suas telas. Esta informação será então gravada na tabela de log do agente. O código de pausa deve conter somente letras e números e deve ser menor que 7 caracteres. O nome do código de pausa não pode ser maior que 30 caracteres.</B>
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_USER_GROUPS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_user_groups-user_group">
|
|
<BR>
|
|
<B>Grupo de usuário -</B> É o nome curto do grupo de usuários do Vicidial, tente não usar espaços ou caracteres especias neste campo. Máximo de 20 caracteres e mínimo de 2.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-group_name">
|
|
<BR>
|
|
<B>Nome do Grupo -</B> Esta é a descrição do grupo de usuários do vicidial, máximo de 40 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-forced_timeclock_login">
|
|
<BR>
|
|
<B>Forçar Login no Ponto - </B> Esta opção permite você não deixar um agente entrar na interface de agente do VICIDIAL se ele não estiver logado no sistema de relógio de ponto. O padrão é N. Existe uma opção para isentar usuários admin, níveis 8 e 9.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-shift_enforcement">
|
|
<BR>
|
|
<B>Controle de Turno -</B> Esta configuração permite você restringir logins do agente baseado nos turnos selecionados abaixo. OFF não irá forçar controle de turno. START irá forçar o horário de login mas não terá efeito sobre um agente que está fazendo horário além do limite final e não saiu do sistema. ALL irá forçar o horário de início e fim, retirando o agente do sistema quando o horário do turno estiver terminado. O padrão é OFF
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-group_shifts">
|
|
<BR>
|
|
<B>Turnos do Grupo - </B> Esta é uma lista selecionável de turnos que podem restringir o login do agente no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-allowed_campaigns">
|
|
<BR>
|
|
<B>Campanhas Permitidas -</B> Esta é uma lista selecionável de campanhas nas quais os membros deste grupo podem se logar. A opção ALL-CAMPANHAS permite aos usuários neste grupo ver e logar em qualquer campanha no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-agent_status_viewable_groups">
|
|
<BR>
|
|
<B>Estado del agente visible Grupos -</B> Esta es una lista seleccionable de grupos de usuarios y las funciones de usuario al que los miembros de este grupo de usuarios pueden ver el estado de las llamadas, así como la transferencia al interior de la pantalla del agente. La opción de grupo permite a los usuarios de este grupo para ver y transferir llamadas a cualquier usuario en el sistema. La campaña-AGENTES opción permite a los usuarios en este grupo para ver y transferir llamadas a cualquier usuario en la campaña que se registran en la.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-agent_status_view_time">
|
|
<BR>
|
|
<B>Ver estado del agente de turno -</B> Esta opción define si el agente va a ver la cantidad de tiempo que los usuarios en su barra lateral agente han sido en su estado actual. Por defecto es n sin o con discapacidad.
|
|
|
|
<?php
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
?>
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-qc_allowed_campaigns">
|
|
<BR>
|
|
<B>Campanha com CQ - </B> Esta lista selecionável de campanhas tem os membros para esse grupo de usuários que terão habilitado o controle de qualidade. A opcão ALL-CAMPANHAS permite ao usuário neste grupo fazer controle de qualidade em qualquer campanha do sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_user_groups-qc_allowed_inbound_groups">
|
|
<BR>
|
|
<B>Permitir CQ de Entrada- </B> Esta é uma lista selecionável de Grupos de Entrada aos quais os membros deste grupo de usuários podem realizar Controle de Qualidade. A opção ALL-GROUPS permite que usuários deste grupo fazer Controle de Qualidade em qualquer grupo do sistema.
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_SCRIPTS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_scripts-script_id">
|
|
<BR>
|
|
<B>ID do Script -</B> Este é o nome curto do script Vicidial. É necessário que seja uma identificação única. Tente não usar espaços ou caracteres especias para este campo. Máximo de 10 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_scripts-script_name">
|
|
<B>Nome do Script -</B> Este é o título do script Vicidial. Este é um resumo curto do script. Máximo de 50 caracteres, mínimo de 2 caracteres. Não devem ser usados espaços ou caracteres especiais de qualquer forma neste campo.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_scripts-script_comments">
|
|
<B>Comentários do Script -</B> Aqui é onde você pode colocar comentários para um Script Vicidial como: -alterado em 23 de Set.-. Máximo 255 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_scripts-script_text">
|
|
<B>Texto do Script -</B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner, camp_script, in_script, script_width, script_height, recording_filename, recording_id. For example, this sentence would print the persons name in it----<BR><BR> Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?<BR><BR> This would read----<BR><BR>Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?<BR><BR> You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
|
|
|
|
<DIV style="height:200px;width:400px;background:white;overflow:scroll;font-size:12px;font-family:sans-serif;" id=iframe_example>
|
|
<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--&camp_script=--A--camp_script--B--&in_script=--A--in_script--B--&script_width=--A--script_width--B--&script_height=--A--script_height--B--&recording_filename=--A--recording_filename--B--&recording_id=--A--recording_id--B--&" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17">
|
|
</iframe>
|
|
</DIV>
|
|
|
|
<BR>
|
|
<A NAME="vicidial_scripts-active">
|
|
<BR>
|
|
<B>Ativo -</B> Isto determina se o script pode ser selecionado para ser usado na campanha.
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_LEAD_FILTROS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_lead_filters-lead_filter_id">
|
|
<BR>
|
|
<B>ID do filtro -</B> É o nome curto para o filtro de registros. Precisa ser um identificador único. Não use espaços ou caracteres especiais para este campo. Máximo de 10 caracteres e mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lead_filters-lead_filter_name">
|
|
<B>Nome do Filtro -</B> É um nome mais descritivo para o filtro. É um resumo da função do filtro. Máximo de 30 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lead_filters-lead_filter_comments">
|
|
<B>Comentários do Filtro -</B> Aqui é onde são colocados comentários para um Filtro Vicidial como por exemplo -liga para todos os registros da California-. Máximo de 255 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_lead_filters-lead_filter_sql">
|
|
<B>Filtro SQL -</B> É onde colocamos o fragmento da consulta SQL que você deseja usar para filtrar. Não inicie nem termine com AND, isso será adicionado pelo script do hopper automaticamente. Um exemplo de consulta SQL que funcionaría é: called_count \> 4 and called_count \<8 .
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_HORÁRIOS DE CHAMADA TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_call_times-call_time_id">
|
|
<BR>
|
|
<B>ID de Horário de Chamada -</B> Este é o nome curto para a definição do tempo de discagem do Vicidial. Precisa ser um identificador único. Não use espaços ou pontos para este campo. Máximo de 10 caracteres e mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-call_time_name">
|
|
<B>Nome do Horário de Chamada -</B> Nome mais descritivo da definição de Horário de Chamada. É um resumo do Horário de Chamada. Máximo de 30 caracteres e mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-call_time_comments">
|
|
<B>Comentários do Horário de Chamada - Aqui devem ser colocados os comentários para a definição de Horários de chamada, por ex: "10:00 as 16:00 com chamadas restritas". Máximo de 255 caracteres</B> .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-ct_default_start">
|
|
<B>Horário de Início e Fim Padrão -</B> Este é o padrão de horário no qual chamadas são permitidas se o dia de início na semana não estiver definido. 0 é meia noite. Para evitar chamadas a qualquer horário, coloque 2400 no início e 2400 no fim. Para permitir chamadas nas 24 horas do dia, coloque 0 e 2400 nestes campos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-ct_sunday_start">
|
|
<B>Horários de Início e Fim em dias Úteis -</B> Estes são os horários por dia que podem ser configurados para chamada. As mesmas regras se aplicam conforme os horários de início e fim.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-ct_state_call_times">
|
|
<B>Definição de Horários por Estado -</B> Esta é a lista de horários específica por Estado que deve ser seguida por esta definição de horário.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_call_times-state_call_time_state">
|
|
<B>Estado da definição de horário -</B> Código de duas letras para o estado ao qual esta definição foi configurada. Para que funcione corretamente o horário local da campanha deve ter selecionado o horário local deste estado e os registros de clientes devem ter as mesmas letras de estado.
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_SHIFTS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_shifts-shift_id">
|
|
<BR>
|
|
<B>ID do Turno- </B> Este é o nome curto para uma definicao de Turno. Precisa ser um identificador único. Não usar pontos ou espaços para este campo, máximo de 20 e mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_shifts-shift_name">
|
|
<B>Nome do Turno - </B> Este é um nome mais descritivo da definição do turno. É um resumo da definição do turno. Máximo de 50 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_shifts-shift_start_time">
|
|
<B>Início do Turno- </B> É o horário que o turno da campanha começa. Deve ter apenas números, 9:30 seria apenas 0930 e 17:00 seria 1700.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_shifts-shift_length">
|
|
<B>Duração do Turno -</B> Este é o tempo em horas e minutos que dura o turno. 8 horas seria 08:00 e 7 horas e 30 minutos seria 7:30.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_shifts-shift_weekdays">
|
|
<B>Dias do Turno -</B> Nesta sessão você deve escolher os dias da semana em que este turno funciona.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
<A NAME="audio_store">
|
|
<B>Audio de la tienda -</B> Esta utilidad te permite subir archivos de audio para el servidor de forma que puedan ser distribuidos a todos los servidores de Vicidial en un multi-cluster de servidores. Una nota importante, sólo dos tipos de archivos de audio de trabajo,. Archivos WAV PCM de 16 bits que se 8k y los archivos. GSM que se 8bit 8k. Por favor, verifique que los archivos tienen el formato correcto antes de subirlos aquí.
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_MUSIC_ON_HOLD TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_music_on_hold-moh_id">
|
|
<BR>
|
|
<B>Música en espera de identificación -</B> Este es el nombre corto de una música en espera de entrada. Esto debe ser un identificador único. No utilice espacios ni puntuacion para este campo. 100 caracteres como máximo, mínimo de 2 caracteres de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_music_on_hold-moh_name">
|
|
<B>Música en espera Nombre -</B> Este es un nombre más descriptivo de la música en espera de entrada. Este es un breve resumen de la música en espera contexto y se verá como un comentario en el musiconhold archivo vicidial.conf. máximo de 255 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_music_on_hold-active">
|
|
<B>Ativo -</B> Esta opción le permite definir la música en espera la entrada en activo o inactivo. Inactivo eliminará la entrada de los archivos de conf.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_music_on_hold-random">
|
|
<B>Orden aleatorio -</B> Esta opción le permite definir la reproducción de los archivos de audio en un orden aleatorio. Si se establece a N, entonces el orden definido se utilizará.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_music_on_hold-filename">
|
|
<B>Filename -</B> Para añadir un nuevo archivo de audio a una música en espera de entrada el primer archivo debe estar en la tienda de audio, puede seleccionar el archivo y haga clic en Enviar para añadirlo a la lista de archivos. Música en espera se actualiza una vez por minuto si se han producido cambios realizados. Cualquier archivo que no figuran en la música en la entrada de reserva que están presentes en la música en la carpeta celebrar serán eliminados.
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_TTS_PROMPTS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_tts_prompts-tts_id">
|
|
<BR>
|
|
<B>TTS ID -</B> Este es el nombre corto de una entrada de TTS. Esto debe ser un identificador único. No utilice espacios ni puntuacion para este campo. caracteres como máximo 50, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_tts_prompts-tts_name">
|
|
<B>Nombre TTS -</B> Este es un nombre más descriptivo de la entrada TTS. Este es un breve resumen de la definición de TTS. 100 caracteres como máximo, mínimo de 2 caracteres de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_tts_prompts-active">
|
|
<B>Ativo -</B> Esta opción le permite establecer la entrada de TTS a activos o inactivos.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_tts_prompts-tts_text">
|
|
<B>TTS Texto -</B> Este es el texto real de campo de datos de voz que se envía a Cepstral para la creación del archivo de audio que deben desempeñar para el cliente. Usted puede utilizar Speech Syntesis Markup Language-SSML-en este campo, por ejemplo,, <break time='1000ms'/> de 1 segundo descanso. También puede utilizar varias variables como el nombre, apellido y el título como variables Vicidial tal como lo harías en una secuencia de comandos: - A - first_name - B -. Aquí está una lista de las variables disponibles:lead_id, entry_date, modify_date, status, user, vendor_lead_code, source_id, list_id, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments, called_count, last_local_call_time, rank, owner
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_VOICEMAIL TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_voicemail-voicemail_id">
|
|
<BR>
|
|
<B>ID de correo de voz -</B> Este es el identificador de todos los números de este buzón. Esto no debe ser un duplicado de un mensaje de voz existentes de identificación o la identificación del correo de voz de un teléfono en el sistema, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_voicemail-fullname">
|
|
<B>Name -</B> Este es el nombre asociado a este buzón de voz. 100 caracteres como máximo, mínimo de 2 caracteres de.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_voicemail-pass">
|
|
<B>Password -</B> Esta es la contraseña que se utiliza para acceder al buzón de voz cuando se marca para revisar los mensajes máximo 10 caracteres, mínimo de 2 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_voicemail-active">
|
|
<B>Ativo -</B> Esta opción le permite configurar la casilla de correo de voz activo o inactivo. Si el cuadro está inactivo no se puede dejar mensajes en él y no se puede revisar los mensajes en él.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_voicemail-email">
|
|
<B>Email -</B> Este ajuste opcional le permite tener los mensajes de correo de voz enviado a una cuenta de correo electrónico, si su sistema está configurado para enviar correo electrónico. Si este campo está vacío, entonces no los correos electrónicos se envían.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_voicemail-delete_vm_after_email">
|
|
<B>Eliminar correo de voz después del email -</B> Este ajuste opcional le permite tener los mensajes de correo de voz se elimina del sistema después de haber sido enviado por correo electrónico a cabo. Por defecto es n.
|
|
|
|
|
|
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>FUNCIONALIDADE DE CARREGADOR DE LISTA DO VICIDIAL</FONT></B><BR><BR>
|
|
<A NAME="vicidial_list_loader">
|
|
<BR>
|
|
O carregador de registros baseado em Web do VICIDIAL simplesmente recebe um arquivo de registros, de até 8MB, que é delimitado por tab ou pipe e o carrega na tabela vicidial_list. O Carregador permite escolher os campos, e os formatos TXT - Texto Simples, CSV - Separado por Virgulas, e XLS - Excel. O carregador de arquivos não valida dados, mas permite que você verifique duplicidades nele próprio, na campanha ou no sistema inteiro. Também, tenha certeza que você criou a lista em que esses registros serão carregados antes de carregar o arquivo. Aqui está uma lista dos campos e sua ordem correta para o arquivo de registros:
|
|
<OL>
|
|
<LI>Código do Vendedor no Registro - é mostrado no campo Vendor ID na tela do agente
|
|
<LI>Código Fonte - uso interno, somente para admins e DBAs
|
|
<LI>ID da Lista - número da lista em que esses registros vão ser carregados
|
|
<LI>Código do Telefone - prefixo do número do telefone - 1 para EUA, 01144 para Reino Unido, 01161 para Australia, 55 para Brasil, etc
|
|
<LI>Número do telefone - deve ter pelo menos 8 digitos
|
|
<LI>Título - título do cliente(Sr. Sra. Srta., etc...)
|
|
<LI>Nome
|
|
<LI>Inicial do Meio
|
|
<LI>Sobrenome
|
|
<LI>Endereço, linha 1
|
|
<LI>Endereço, linha 2
|
|
<LI>Endereço, linha 3
|
|
<LI>Cidade
|
|
<LI>Estado - limitado a 2 caracteres
|
|
<LI>Província
|
|
<LI>CEP
|
|
<LI>País
|
|
<LI>Sexo
|
|
<LI>Data de Nascimento
|
|
<LI>Número Alternativo
|
|
<LI>Endereço de Email
|
|
<LI>Frase de Segurança
|
|
<LI>Comentários
|
|
</OL>
|
|
|
|
<BR>ATENÇÃO: A funcionalidade de carregar registros usando arquivos EXCEL é permitida por uma série de scripts e precisa estar devidamente configurada no arquivo /etc/astguiclient.conf no servidor web. Também, alguns módulos perl devem ser carregados para que funcione, OLE-Storage_Lite e Spreadsheet-ParseExcel. Você pode verificar erros de tempo de execução neles olhando o arquivo de log do apache. Também, para verificação de duplicados na lista da campanha, a lista com os novos registros precisa existir no sistema antes de iniciar a carga.
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<B><FONT SIZE=3>TABELA DE RAMAIS</FONT></B><BR><BR>
|
|
<A NAME="phones-extension">
|
|
<BR>
|
|
<B>Número do Ramal -</B> Este campo é onde você coloca o número do ramal conforme aparece no Asterisk sem incluir o protocolo ou a barra no começo. Por exemplo: para o ramal SIP\/test101 o número do ramal seria test101. Também, para os ramais IAX2 tenha certeza de usar o nome completo: IAX2/IAXphone1@IAXphone1 seria IAXphone1@IAXphone1. Para Zap tenha certeza que você usa o canal completo: Zap/25-1 seria 25-1. Outro aviso, tenha certeza que você configura o protocolo abaixo corretamente para seu tipo de telefone.
|
|
|
|
<BR>
|
|
<A NAME="phones-dialplan_number">
|
|
<BR>
|
|
<B>Numero do plano de discagem -</B> Este campo é para o número que você disca para tocar o ramal. Esse número é definido no arquivo extensions.conf do seu servidor Asterisk
|
|
|
|
<BR>
|
|
<A NAME="phones-voicemail_id">
|
|
<BR>
|
|
<B>Caixa Postal -</B> Este campo é para a caixa postal de voz para onde vao as menssagens para o usuário deste ramal. Utilizamos isto para verificar as mensagens e para o usuário utilizar o botão VOICEMAIL no aplicativo astGUIclient.
|
|
|
|
<BR>
|
|
<A NAME="phones-outbound_cid">
|
|
<BR>
|
|
<B>Identificador de Saída -</B> Este campo é onde deve ser colocado o número que você quer que saia no identificador para as ligações de saída feitas pelo astguiclient. Isto não funciona em linhas RTB(non-PRI) T1/E1.
|
|
|
|
<BR>
|
|
<A NAME="phones-phone_ip">
|
|
<BR>
|
|
<B>Endereço IP do ramal -</B> Este campo é para o endereço IP do ramal se for um ramal VOIP. Este campo é opcional
|
|
|
|
<BR>
|
|
<A NAME="phones-computer_ip">
|
|
<BR>
|
|
<B>Endereço IP do computador -</B> Este campo é para o endereço IP do computador do usuário. Este campo é opcional
|
|
|
|
<BR>
|
|
<A NAME="phones-server_ip">
|
|
<BR>
|
|
<B>IP do Servidor -</B> Este menu é onde você escolhe em qual servidor está o ramal ativo.
|
|
|
|
<BR>
|
|
<A NAME="phones-login">
|
|
<BR>
|
|
<B>Login -</B> O login usado pelo usuário do ramal para logar no aplicativo client.
|
|
|
|
<BR>
|
|
<A NAME="phones-pass">
|
|
<BR>
|
|
<B>Senha -</B> A senha usada pelo usuário do ramal para entrar no aplicativo client. Importante, esta es la única contraseña para la red de interfaz de usuario del agente de teléfono, para cambiar el sip.conf iax.conf o contraseña, o en secreto, para este dispositivo de teléfono que tenga que modificar el campo Archivo Secreto Conf. más abajo en esta página.
|
|
|
|
<BR>
|
|
<A NAME="phones-status">
|
|
<BR>
|
|
<B>Status -</B> O status do ramal no sistema, ATIVO e ADMIN permiten que os clientes GUI trabalhem. ADMIN permite o acceso ao Website de administração. Os outros status não permitem o acceso ao GUI ou ao Website de Admin.
|
|
|
|
<BR>
|
|
<A NAME="phones-active">
|
|
<BR>
|
|
<B>Conta ativa -</B> Se o ramal está ativado será incluído na lista do cliente GUI.
|
|
|
|
<BR>
|
|
<A NAME="phones-phone_type">
|
|
<BR>
|
|
<B>Tipo de Ramal -</B> Somente para informação administrativa.
|
|
|
|
<BR>
|
|
<A NAME="phones-fullname">
|
|
<BR>
|
|
<B>Nome Completo -</B> Usado pelo GUIclient na lista de ramais ativos.
|
|
|
|
<BR>
|
|
<A NAME="phones-company">
|
|
<BR>
|
|
<B>Empresa -</B> Somente para informação administrativa.
|
|
|
|
<BR>
|
|
<A NAME="phones-email">
|
|
<BR>
|
|
<B>Email do Ramal - </B> Endereço de email associado ao ramal. Isto pode ser usado para configurações de VoiceMail.
|
|
|
|
<BR>
|
|
<A NAME="phones-delete_vm_after_email">
|
|
<B>Eliminar correo de voz después del email -</B> Este ajuste opcional le permite tener los mensajes de correo de voz se elimina del sistema después de haber sido enviado por correo electrónico a cabo. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="phones-picture">
|
|
<BR>
|
|
<B>Foto -</B> Ainda não implementado.
|
|
|
|
<BR>
|
|
<A NAME="phones-messages">
|
|
<BR>
|
|
<B>Novas Mensagens -</B> Número de mensagens novas na conta de correio de voz para esse ramal no servidor Asterisk.
|
|
|
|
<BR>
|
|
<A NAME="phones-old_messages">
|
|
<BR>
|
|
<B>Mensagens Antigas -</B> .
|
|
|
|
<BR>
|
|
<A NAME="phones-protocol">
|
|
<BR>
|
|
<B>Protocolo Client -</B> O protocolo que o ramal utiliza para se conectar com o servidor Asterisk: SIP, IAX2, Zap. Também, para os números Externos ou número de discagem rápida que você deseja listar como ramais.
|
|
|
|
<BR>
|
|
<A NAME="phones-local_gmt">
|
|
<BR>
|
|
<B>GMT Local -</B> A diferença a partir do horário de Greenwich, ou Horário ZULU para o local onde o ramal está localizado. NÃO AJUSTE PARA O HORÁRIO DE VERÃO. É usado pela campanha do VICIDIAL para demonstrar corretamente o horário local e o horário do cliente..
|
|
|
|
<BR>
|
|
<A NAME="phones-phone_ring_timeout">
|
|
<BR>
|
|
<B>Teléfono Anillo de tiempo de espera -</B> Esta es la cantidad de tiempo, en segundos, que el teléfono sonará en el dialplan antes de enviar la llamada al buzón de voz. El valor predeterminado es 60 segundos.
|
|
|
|
<BR>
|
|
<A NAME="phones-ASTmgrUSERNAME">
|
|
<BR>
|
|
<B>Login de Gerenciamento-</B> Este é o login que o client GUI para esse ramal usará para acessar o Banco de Dados onde os dados do servidor residem .
|
|
|
|
<BR>
|
|
<A NAME="phones-ASTmgrSECRET">
|
|
<BR>
|
|
<B>Senha de Gerenciamento -</B> Esta é a senha que o client GUI para esse ramal usará para acessar o Banco de Dados onde os dados do servidor residem.
|
|
|
|
<BR>
|
|
<A NAME="phones-login_user">
|
|
<BR>
|
|
<B>Usuário padrão do VICIDIAL -</B> O valor desse campo será colocado no campo de usuário quando esse ramal entrar no aplicativo astVICIDIAL .
|
|
|
|
<BR>
|
|
<A NAME="phones-login_pass">
|
|
<BR>
|
|
<B>Senha padrão VICIDIAL -</B> Este valor de senha será preenchido no campo da senha do usuário quando esse ramal entrar no aplicativo astVICIDIAL .
|
|
|
|
<BR>
|
|
<A NAME="phones-login_campaign">
|
|
<BR>
|
|
<B>Campanha padrão do VICIDIAL -</B> Este campo deve ser preenchido com o valor padrão para o campo da campanha quando este ramal abrir o aplicativo astVICIDIAL. Deixe em branco para nenhuma campanha.
|
|
|
|
<BR>
|
|
<A NAME="phones-park_on_extension">
|
|
<BR>
|
|
<B>Exten de Estacionamento -</B> Esta é a extensão de estacionamento padrao para o aplicativo client. Verifique se a extensão funciona antes de alterar..
|
|
|
|
<BR>
|
|
<A NAME="phones-conf_on_extension">
|
|
<BR>
|
|
<B>Exten de Conferência -</B> Esta é a extensão padrao para estacionamento da conferência para o aplicativo client. Verifique se a extensão funciona antes de alterar.
|
|
|
|
<BR>
|
|
<A NAME="phones-VICIDIAL_park_on_extension">
|
|
<BR>
|
|
<B>Extensão de estacionamento do VICIDIAL -</B> Esta é a extensão de estacionamento para o aplicativo client VICIDIAL. Verifique se a extensão funciona antes de alterar.
|
|
|
|
<BR>
|
|
<A NAME="phones-VICIDIAL_park_on_filename">
|
|
<BR>
|
|
<B>Arquivo do VICIDIAL Park -</B> Este é o nome do arquivo padrao para a extensão de estacionamento do VICIDIAL usado pelo aplicativo cliente. Verifique se um arquivo diferente funciona antes de alterar. Limitado a 10 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="phones-monitor_prefix">
|
|
<BR>
|
|
<B>Prefixo do monitor -</B> Este é o prefixo do plano de discagem para monitorar canais automaticamente dentro do aplicativo astGUIclient. Só altere de acordo com os registros de ZapBarge do arquivo extensions.conf.
|
|
|
|
<BR>
|
|
<A NAME="phones-recording_exten">
|
|
<BR>
|
|
<B>Exten de Gravação -</B> Esta é a extensão do plano de discagem que irá entrar na sala de conferências e gravar a conversa. Normalmente dura por volta de uma hora se nao for cancelada. Verifique no arquivo extensions.conf antes de alterar.
|
|
|
|
<BR>
|
|
<A NAME="phones-voicemail_exten">
|
|
<BR>
|
|
<B>Exten principal de VMAIL-</B> Esta é a extensão do plano de discagem que acessa o voicemail. Verifique o arquivo extensions.conf antes de alterar.
|
|
|
|
<BR>
|
|
<A NAME="phones-voicemail_dump_exten">
|
|
<BR>
|
|
<B>Descarga Exten de VMAIL -</B> Esta é a extensão do plano de discagem usada para deixar mensagens no correio de voz.
|
|
|
|
<BR>
|
|
<A NAME="phones-ext_context">
|
|
<BR>
|
|
<B>Contexto do Exten -</B> Este es el contexto del plan de marcado que las solicitudes de agente, como Vicidial, principalmente el uso. Se supone que todos los números marcados por las aplicaciones cliente utilizan este contexto, por lo que es una buena idea para asegurarse de que este es el contexto más amplio posible. verificar con el archivo extensions.conf antes de cambiar. por defecto es por defecto.
|
|
|
|
<BR>
|
|
<A NAME="phones-phone_context">
|
|
<BR>
|
|
<B>Teléfono Contexto -</B> Este es el contexto del plan de marcado que este teléfono se utiliza para marcar. Si está ejecutando un centro de llamadas y usted no desea que sus agentes sean capaces de marcar fuera de la aplicación Vicidial por ejemplo, entonces puedes establecer este campo a un contexto dialplan que no existe, algo como agente nodial. por defecto es por defecto.
|
|
|
|
<BR>
|
|
<A NAME="phones-conf_secret">
|
|
<BR>
|
|
<B>Conf. Archivo Secreto -</B> Este es el secreto o la contraseña, por el teléfono de la SIP IAX o auto-generados conf para este teléfono. Límite es el tablero de 20 caracteres alfanuméricos y de subrayado aceptado. El valor predeterminado es la prueba.
|
|
|
|
<BR>
|
|
<A NAME="phones-dtmf_send_extension">
|
|
<BR>
|
|
<B>Canal de envio de DTMF -</B> Este é canal usado para enviar tons DTMF nas conferencias meetme do aplicativo client. Verifique a exten e o contexto no arquivo extensions.conf.
|
|
|
|
<BR>
|
|
<A NAME="phones-call_out_number_group">
|
|
<BR>
|
|
<B>Grupo de Saída -</B> Este é o grupo de canais em que as chamadas saintes são feitas. Existem algumas rotinas no aplicativo cliente que usam isso. Para canais Zap você deve fazer algo como Zap/g2, para trunks IAX2 voce deve usar o prefixo completo como: IAX2/VICItest1:secret@10.10.10.15:4569. Verifique os trunks no arquivo extensions.conf, normalmente é o que voce definiu na variavel global TRUNK no inicio do arquivo.
|
|
|
|
<BR>
|
|
<A NAME="phones-client_browser">
|
|
<BR>
|
|
<B>Local do Browser -</B> Isto se aplica apenas a clientes UNIX/LINUX, é o caminho absoluto para os browsers Mozilla ou Firefox na maquina. Verifique isso executando-o manualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-install_directory">
|
|
<BR>
|
|
<B>Diretório de Instalação -</B> Este é o local onde os scripts do astGUIclient e astVICIDIAL estão localizados na sua maquina. Para Win32 deve ser algo como: C:\\AST_VICI e para UNIX deve ser algo como /usr/local/perl_TK. Verifique isso manualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-local_web_callerID_URL">
|
|
<BR>
|
|
<B>URL do Identificador -</B>
|
|
|
|
<BR>
|
|
<A NAME="phones-VICIDIAL_web_URL">
|
|
<BR>
|
|
<B>URL default do VICIDIAL -</B> Este é o endereço da página usada para customizar pesquisas do VICIDIAL. O endereço padrão de testes é: htpp://astguiclient.sf.net/test_VICIDIAL_output.php
|
|
|
|
<BR>
|
|
<A NAME="phones-AGI_call_logging_enabled">
|
|
<BR>
|
|
<B>Registro de chamada -</B> Esta configuração terá valor true se o arquivo call_log.agi estiver no arquivo extensions.conf para todas as extensões de saida e de desligamento (hangup). Isso deve sempre estar true pois é obrigado para que muitas funcionalidades do astGUIclient e do VICIDIAL funcionem corretamente.
|
|
|
|
<BR>
|
|
<A NAME="phones-user_switching_enabled">
|
|
<BR>
|
|
<B>Conmutación del usuario -</B> fije para verdad para permitir que el usuario cambie a otra cuenta del usuario. NOTA: Si los interruptores del usuario ellos pueden iniciar la grabación en la conversación de teléfono del nuevo usuario
|
|
|
|
<BR>
|
|
<A NAME="phones-conferencing_enabled">
|
|
<BR>
|
|
<B>Conferencias -</B> Configurado como true, permite o usuário iniciar conferências de até seis telefones externos.
|
|
|
|
<BR>
|
|
<A NAME="phones-admin_hangup_enabled">
|
|
<BR>
|
|
<B>Hangup do Admin -</B> Configurado como true permite que o usuário desligue qualquer linha através do astGUIclient. Uma boa ideia é somente permitir isso para usuários Admin.
|
|
|
|
<BR>
|
|
<A NAME="phones-admin_hijack_enabled">
|
|
<BR>
|
|
<B>Sequestro do Admin -</B> Configure como true para permitir que o usuário consiga pegar qualquer linha e transferir para seu ramal através do astGUIclient. Uma boa ideia é permitir somente para o usuário Admin. Mas é muito útil para gerentes.
|
|
|
|
<BR>
|
|
<A NAME="phones-admin_monitor_enabled">
|
|
<BR>
|
|
<B>Monitoramento Admin -</B> Configure como true para permitir que o usuário consiga pegar qualquer linha e transferir para seu ramal através do astGUIclient. Uma boa ideia é permitir somente para o usuário Admin. Mas é muito útil para gerentes.
|
|
|
|
<BR>
|
|
<A NAME="phones-call_parking_enabled">
|
|
<BR>
|
|
<B>Estacionamento de chamadas -</B> Se configurado como true permite o usuário estacionar as chamadas pelo astGUIclient para que sejam capturadas por outros usuários do sistema. Chamadas ficam estacionadas por até meia hora e depois são desligadas. Normalmente é habilitado para todos.
|
|
|
|
<BR>
|
|
<A NAME="phones-updater_check_enabled">
|
|
<BR>
|
|
<B>Verif. de Updater -</B> Se configurado como true, mostra um aviso em popup que o tempo do atualizador nao mudou em 20 segundos. Útil para usuários Admin.
|
|
|
|
<BR>
|
|
<A NAME="phones-AFLogging_enabled">
|
|
<BR>
|
|
<B>Registro AF -</B> Se configurado como true, grava várias ações do uso do astGUIclient para um arquivo texto no computador do usuário.
|
|
|
|
<BR>
|
|
<A NAME="phones-QUEUE_ACTION_enabled">
|
|
<BR>
|
|
<B>Habilitar Fila -</B> Configure como true para que os aplicativos cliente usem o controle central de Filas do Asterisk. Requerido e recomendado para todos os usuários.
|
|
|
|
<BR>
|
|
<A NAME="phones-CallerID_popup_enabled">
|
|
<BR>
|
|
<B>Popup do CallerID -</B> Configurado como true permite que números configurados no arquivo extensions.conf enviem telas popup de Identificação (CallerID) para os usuários.
|
|
|
|
<BR>
|
|
<A NAME="phones-voicemail_button_enabled">
|
|
<BR>
|
|
<B>Botão do VMail -</B> Configurado como true irá mostrar o botao do VOICEMAIL (correio de voz) e o contador de mensagens no astGUIclient.
|
|
|
|
<BR>
|
|
<A NAME="phones-enable_fast_refresh">
|
|
<BR>
|
|
<B>Atualização Rápida -</B> Configure como true para habilitar uma nova velocidade de atualização das informações sobre a chamada no astGUIclient. A velocidade padrão quando desabilitado é de 1000ms ou 1 segundo. Pode aumentar a carga no sistema se esse tempo for reduzido.
|
|
|
|
<BR>
|
|
<A NAME="phones-fast_refresh_rate">
|
|
<BR>
|
|
<B>Tempo de Atualização Rápida -</B> em milisegundos. Só é usado se a opção "Atualização Rápida" estiver habilitada. O valor padrão desabilitado é 1000ms, 1 segundo. Pode aumentar a carga do sistema se esse valor for reduzido.
|
|
|
|
<BR>
|
|
<A NAME="phones-enable_persistant_mysql">
|
|
<BR>
|
|
<B>MySQL Permanente-</B> Se estiver habilitada, a conexão do astGUIclient permanecerá ativa ao invés de conectar a cada segundo. Útil se você tiver um tempo de atualização curto. Pode aumentar a quantidade de conexões no servidor MySQL.
|
|
|
|
<BR>
|
|
<A NAME="phones-auto_dial_next_number">
|
|
<BR>
|
|
<B>Discar próximo número automaticamente-</B> Se habilitado o aplicativo client do VICIDIAL irá discar o próximo número automaticamente no desligamento de uma chamada, a não ser que o usuário selecione "Parar Discagem" na tela de finalização da chamada.
|
|
|
|
<BR>
|
|
<A NAME="phones-VDstop_rec_after_each_call">
|
|
<BR>
|
|
<B>Parar gravação após cada chamada-</B> Se habilitado o client do VICIDIAL irá parar de gravar após o final de cada chamada. Útil se você está fazendo muitas gravações ou se está usando o formulário web para acionar a gravação.
|
|
|
|
<BR>
|
|
<A NAME="phones-enable_sipsak_messages">
|
|
<BR>
|
|
<B>Habilitar Mensagens SIPSAK -</B> Se habilitado, o servidor irá mandar mensagens para o fone SIP mostrar no display quando logado no VICIDIAL. Este recurso só funciona com telefones SIP e requer o aplicativo sipsak instalado no servidor web. Padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBX_server">
|
|
<BR>
|
|
<B>Servidor DBX -</B> O servidor de banco de dados que este usuário deve se conectar.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBX_database">
|
|
<BR>
|
|
<B>Base de dados DBX -</B> A base de dados MySQL que o usuário deve se conectar. Padrão é asterisk.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBX_user">
|
|
<BR>
|
|
<B>Usuário do DBX -</B> O login de usuário do MySQL que esse usuário deve usar para conectar. Default é cron.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBX_pass">
|
|
<BR>
|
|
<B>Senha do DBX -</B> Senha do usuário de conexão do MySQL. Padrão é 1234.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBX_port">
|
|
<BR>
|
|
<B>Porta DBX -</B> A porta TCP de conexão com o MySQL que o usuário deve usar para conectar. Padrão é 3306.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBY_server">
|
|
<BR>
|
|
<B>Servidor DBY -</B> O servidor de banco de dados que este usuário deve se conectar. Secundário server, não utilizado atualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBY_database">
|
|
<BR>
|
|
<B>Base de dados DBY -</B> A base de dados MySQL que o usuário deve se conectar. Padrão é asterisk. Secundário server, não utilizado atualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBY_user">
|
|
<BR>
|
|
<B>Usuário do DBY -</B> O login de usuário do MySQL que esse usuário deve usar para conectar. Default é cron. Secundário server, não utilizado atualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBY_pass">
|
|
<BR>
|
|
<B>Senha do DBY -</B> Senha do usuário de conexão do MySQL. Padrao é 1234. Secundário server, não utilizado atualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-DBY_port">
|
|
<BR>
|
|
<B>Porta DBY -</B> A porta TCP de conexão com o MySQL que o usuário deve usar para conectar. Padrao é 3306. Secundário server, não utilizado atualmente.
|
|
|
|
<BR>
|
|
<A NAME="phones-alias_id">
|
|
<BR>
|
|
<B>ID do Alias - </B> O ID do alias usado para permitir balanceamento de carga entre ramais. Não é permitido espacos ou caracteres especiais. Deve ter entre 2 e 20 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="phones-alias_name">
|
|
<BR>
|
|
<B>Nome do Alias - </B> O nome usado para descrever o alias do ramal, deve ter entre 2 e 50 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="phones-logins_list">
|
|
<BR>
|
|
<B>Lista de Logins de Ramais - </B> Uma lista, separada por vírgulas, logins de ramais usados quando o agente está usando ramais do balanceamento de carga. O aplicativo agente irá encontrar o servidor ativo com a menor quantidade de agentes logados e fazer a chamada a partir daquele servidor para o agente no login.
|
|
|
|
<BR>
|
|
<A NAME="phones-template_id">
|
|
<BR>
|
|
<B>ID do Template - </B> Este é o ID do Template de arquivo conf que este ramal irá usar para as configurações do Asterisk. O padrão é --NONE--.
|
|
|
|
<BR>
|
|
<A NAME="phones-conf_override">
|
|
<BR>
|
|
<B>Conf Override Settings -</B> If populated, and the ID do Template is set to --NONE-- then the contents of this field are used as the conf file entries for this phone. generate_vicidial_conf for this phones server must be set to Y for this to work. This field should NOT contain the [extension] line, that will be automatically generated.
|
|
|
|
<BR>
|
|
<A NAME="phones-group_alias_id">
|
|
<BR>
|
|
<B>ID do Alias de Grupo -</B> É o ID do alias de grupo usado por agentes do sistema para realizar chamadas pela interface do VICIDIAL com CallerIDs diferentes. Não é permitido uso de caracteres especiais ou espaços. Deve ter entre 2 e 20 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="phones-group_alias_name">
|
|
<BR>
|
|
<B>Nome do Alias de Grupo - </B> O nome usado para descrever um alias de grupo, Deve ter entre 2 e 20 caracteres de comprimento.
|
|
|
|
<BR>
|
|
<A NAME="phones-caller_id_number">
|
|
<BR>
|
|
<B>Número do CallerID - </B> O Número do Caller ID usado para este alias de grupo. Deve ter apenas dígitos.
|
|
|
|
<BR>
|
|
<A NAME="phones-caller_id_name">
|
|
<BR>
|
|
<B>Nome do CallerID - </B> O Nome do Caller ID que é enviado com esse Alias de Grupo. Até onde sabemos isso só funciona nos circuitos PRI do Canadá e usando trunk IAX com Asterisk.
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>TABELA DOS SERVIDORES</FONT></B><BR><BR>
|
|
<A NAME="servers-server_id">
|
|
<BR>
|
|
<B>ID do Servidor -</B> Este campo é onde você configura o nome dos servidores Asterisk, nao precisa ser o domínio oficial, apenas um apelido para identificar o servidor para usuários Admin.
|
|
|
|
<BR>
|
|
<A NAME="servers-server_description">
|
|
<BR>
|
|
<B>Descrição do Servidor -</B> O campo onde você usa uma pequena descrição para o servidor Asterisk.
|
|
|
|
<BR>
|
|
<A NAME="servers-server_ip">
|
|
<BR>
|
|
<B>Endereço IP do Servidor -</B> O campo onde você configura o endereço IP do servidor Asterisk.
|
|
|
|
<BR>
|
|
<A NAME="servers-active">
|
|
<BR>
|
|
<B>Ativo -</B> Configure se o servidor está ativo ou não.
|
|
|
|
<BR>
|
|
<A NAME="servers-sysload">
|
|
<BR>
|
|
<B>Carga do Sistema -</B> Estas duas estatísticas mostram a média de carga de um sistema vezes 100 e o percentual de uso de CPU do servidor, atualizados a cada minuto. A média de carga deve ser em média menor que 100 multiplicado pelo número de núcleos de CPU que seu sistema tem, para melhor performance. O percentual de uso do CPU deve ficar abaixo de 50 para melhor performance.
|
|
|
|
<BR>
|
|
<A NAME="servers-channels_total">
|
|
<BR>
|
|
<B>Canais Falando -</B> Este campo mostra o número atual de canais ativos no Asterisk que estão falando neste momento. É importante perceber que o número de canais do Asterisk é normalmente muito mais alto do que as chamadas atuais do sistema. Este campo é atualizado a cada minuto.
|
|
|
|
<BR>
|
|
<A NAME="servers-disk_usage">
|
|
<BR>
|
|
<B>Uso do HD -</B> Este campo irá mostrar o uso de disco para cada partição neste servidor. Este campo é atualizado a cada minuto.
|
|
|
|
<BR>
|
|
<A NAME="servers-asterisk_version">
|
|
<BR>
|
|
<B>Versão do Asterisk -</B> Configure a versão do Asterisk que está instalada no servidor. Exemplos: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... Isto é necessário pois as versões 1.0.8 e 1.0.9 tem metodos diferentes de controlar canais Local, um erro foi arrumado na CVS v1.0, e precisa ser tratado de forma diferente quando usamos os canais "Local". Também, a versão atual CVS_HEAD e a 1.2 usam managers diferentes e os resultados dos comandos devem ser tratados de forma diferente.
|
|
|
|
<BR>
|
|
<A NAME="servers-max_vicidial_trunks">
|
|
<BR>
|
|
<B>Qtd máxima de trunks VICIDIAL -</B> Este campo determina o número máximo de linhas que o discador automático do VICIDIAL irá usar para chamar esse servidor. Se você quer dedicar dois canais E1 para discagem automática do VICIDIAL nesse servidor, entao você deve configurar como 60. O valor padrão é 96.
|
|
|
|
<BR>
|
|
<A NAME="servers-outbound_calls_per_second">
|
|
<BR>
|
|
<B>Máx. de Chamadas por Segundo -</B> Esta configuração determina o número máximo de chamadas que podem ser feitas pelo script de discagem automática neste servidor por segundo. Deve ser de 1 a 100. O padrão é 20
|
|
|
|
<BR>
|
|
<A NAME="servers-telnet_host">
|
|
<BR>
|
|
<B>Host Telnet -</B> Este é o endereço ou nome do servidor Asterisk e é como os aplicativos de gerenciamento se conectam a ele. Se os aplicativos de gerenciamento estiverem sendo executados no próprio servidor Asterisk, então 'localhost' está correto.
|
|
|
|
<BR>
|
|
<A NAME="servers-telnet_port">
|
|
<BR>
|
|
<B>Porta Telnet -</B> Esta é a porta para conexão com o Manager do servidor Asterisk e é como os aplicativos de gerenciamento se conectam a ele. A porta padrão é '5038' e funciona normalmente com a instalação padrão.
|
|
|
|
<BR>
|
|
<A NAME="servers-ASTmgrUSERNAME">
|
|
<BR>
|
|
<B>Usuário do Manager -</B> O nome do usuário (login) usado para conectar genericamente ao serviço do Manager do Asterisk. O padrão é 'cron'
|
|
|
|
<BR>
|
|
<A NAME="servers-ASTmgrSECRET">
|
|
<BR>
|
|
<B>Senha do Manager -</B> A senha usada para a conexão com o serviço do Manager do Asterisk. O padrão é '1234'
|
|
|
|
<BR>
|
|
<A NAME="servers-ASTmgrUSERNAMEupdate">
|
|
<BR>
|
|
<B>Usuário de atualização do Manager -</B>O nome do usuário (login) otimizado para atualizações, para se conectar ao serviço do Manager do Asterisk. O padrão é 'updatecron' e asume que a senha é a mesma do usuário genérico.
|
|
|
|
<BR>
|
|
<A NAME="servers-ASTmgrUSERNAMElisten">
|
|
<BR>
|
|
<B>Usuário de Escuta do Manager -</B> O nome de usuário (login) otimizado para escutar eventos de saída, usado para conectar ao serviço de Manager do Asterisk. Padrão é 'listencron' e assume que a senha é a mesma do usuário genérico.
|
|
|
|
<BR>
|
|
<A NAME="servers-ASTmgrUSERNAMEsend">
|
|
<BR>
|
|
<B>Usuário de envio do Manager -</B> O nome de usuário (login) otimizado para enviar Ações para o manager, para se conectar ao serviço do Manager do Asterisk. O Valor padrão é 'sendcron' e assume que a senha é a mesma do usuário genérico.
|
|
|
|
<BR>
|
|
<A NAME="servers-conf_secret">
|
|
<BR>
|
|
<B>Conf. Archivo Secreto -</B> Este es el secreto, o la contraseña, para que el servidor en el auto iax generado conf para este servidor en otros servidores. Límite es el tablero de 20 caracteres alfanuméricos y de subrayado aceptado. El valor predeterminado es la prueba.
|
|
|
|
<BR>
|
|
<A NAME="servers-local_gmt">
|
|
<BR>
|
|
<B>Diferença GMT do Servidor-</B> A diferença em horas a partir do horário GMT de onde se encontra o servidor, nao ajustada para o horário de verão. O padrão é '-5'
|
|
|
|
<BR>
|
|
<A NAME="servers-voicemail_dump_exten">
|
|
<BR>
|
|
<B>Exten de descarga de Correio de Voz -</B> É o prefixo de exten usado neste servidor para enviar chamadas diretamente pelo agc para uma caixa postal específica. O padrão é '85026666666666'
|
|
|
|
<BR>
|
|
<A NAME="servers-answer_transfer_agent">
|
|
<BR>
|
|
<B>Exten DA do Vicidial -</B> A extensão padrão caso não haja nenhuma na campanha para enviar chamadas do Discador Automático VICIDIAL. Valor Padrão é '8365'
|
|
|
|
<BR>
|
|
<A NAME="servers-ext_context">
|
|
<BR>
|
|
<B>Contexto Padrão -</B> O contexto padrão usado para scripts que operam nesse servidor. O valor padrão é 'default'
|
|
|
|
<BR>
|
|
<A NAME="servers-sys_perf_log">
|
|
<BR>
|
|
<B>Performance do Sistema -</B> Configurar esta opção como Y irá habilitar a gravação de log de estatísticas de performance do sistema para o servidor, processos do sistema e canais em uso no Asterisk. O padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="servers-vd_server_logs">
|
|
<BR>
|
|
<B>Logs do Servidor -</B> Configurando esta opção como Y irá habilitar a gravação de log de todos os scripts do VICIDIAL em arquivos texto. Configurando como N irá parar de escrever logs para os arquivos desses processos, também a gravação de log do Asterisk estará desabilitada se estiver configurada como N quando o Asterisk iniciar. O padrão é Y .
|
|
|
|
<BR>
|
|
<A NAME="servers-agi_output">
|
|
<BR>
|
|
<B>Saída AGI -</B> Configurando esta opção como NONE irá desabilitar a saída de todos os scripts AGI do VICIDIAL. Configurando como STDERR irá enviar a saída do AGI para a CLI do Asterisk. Configurando como FILE irá enviar a saída para um arquivo no diretório de log. Configurando como BOTH irá enviar a saída para ambos CLI e o arquivo de log. O padrão é FILE.
|
|
|
|
<BR>
|
|
<A NAME="servers-vicidial_balance_active">
|
|
<BR>
|
|
<B>Discagem Balanceada -</B> Se configurado como Y irá permitir que o servidor faça chamadas balanceadas para as campanhas do VICIDIAL de forma que o nível de chamadas do servidor possa ser alcançado mesmo que nao haja agentes logados nas campanhas deste servidor. Padrão é N.
|
|
|
|
<BR>
|
|
<A NAME="servers-vicidial_balance_rank">
|
|
<BR>
|
|
<B>Balance Vicidial Rank -</B> Este campo le permite establecer el orden en que este servidor se va a utilizar para la marcación de equilibrio, si está activada la marcación de equilibrio. El servidor con el rango más alto será usado primero en la colocación de Balance llenar las llamadas. Por defecto es 0.
|
|
|
|
<BR>
|
|
<A NAME="servers-balance_trunks_offlimits">
|
|
<BR>
|
|
<B>Limites de Balanceamento do VICIDIAL -</B> Esta configuração define o número de trunks não disponíveis ao uso balanceado do VICIDIAL. Por exemplo, se você tem 40 trunks máximos e o limite de balanceamento for 10, você só poderá usar 30 linhas do trunk para balanceamento VICIDIAL. Padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="servers-recording_web_link">
|
|
<BR>
|
|
<B>Link Web de Gravação - </B> Esta configuração permite que você altere o padrão do link apresentado na tela de gravação no site admin. O padrão é SERVER_IP.
|
|
|
|
<BR>
|
|
<A NAME="servers-alt_server_ip">
|
|
<BR>
|
|
<B>IP do Serv. Altern. de Gravação- </B> Esta configuração é onde você pode colocar um IP do servidor ou outro nome de máquina que pode ser usado para colocar no lugar do server_ip nos links de gravação nas páginas do site admin. O padrão é vazio.
|
|
|
|
<BR>
|
|
<A NAME="servers-active_asterisk_server">
|
|
<BR>
|
|
<B>Servidor Asterisk Ativo - </B> Se o Asterisk não estiver rodando neste servidor, ou se o VICIDIAL não deveria estar usando este servidor, ou se estiver usando este servidor para outros scripts como o de carregamento de hopper, você deve configurar para N. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="servers-active_agent_login_server">
|
|
<BR>
|
|
<B>Ativo Server Agent -</B> Al establecer esta opción a N de impedir que los agentes de poder acceder a este servidor a través de la pantalla del agente Vicidial. Esto es muy útil cuando se utiliza una carga de inicio de sesión de instalación del teléfono equilibrada. Por defecto es Y.
|
|
|
|
<BR>
|
|
<A NAME="servers-generate_vicidial_conf">
|
|
<BR>
|
|
<B>Gerar Arquivos Conf - </B> Se você deseja que o sistema gere automaticamente os arquivos conf do asterisk baseados nas configurações de ramal, operadoras, e balanceamento de carga no VICIDIAL então configure como Y. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="servers-rebuild_conf_files">
|
|
<BR>
|
|
<B>Reconstruir Arquivos Conf - </B> Se você quer forçar a reconstrução dos arquivos conf do Asterisk ou se qualquer um dos ramais ou operadoras foi alterado então isso deve ser Y. Após os aquivos conf terem sido criados e o Asterisk ter sido recarregado, então isso será alterado para N. O padrão é Y.
|
|
|
|
<BR>
|
|
<A NAME="servers-rebuild_music_on_hold">
|
|
<BR>
|
|
<B>Volver a generar música en espera -</B> Si desea forzar una reconstrucción de la música en los archivos de la bodega o si la música en las entradas de espera ni entradas de servidor han cambiado entonces esto debe establecerse en Y. Después de la música en espera los archivos se han sincronizado y volver a cargar entonces esto va a ser cambiado a N. defecto es Y.
|
|
|
|
<BR>
|
|
<A NAME="servers-sounds_update">
|
|
<BR>
|
|
<B>Actualización de los sonidos -</B> Si desea forzar una comprobación de los archivos de sonido en este servidor, y el almacén central de audio está activado como una configuración del sistema, este campo permitirán a los sonidos de actualización para ejecutar en la parte superior de la siguiente minuto. Toda vez que un archivo de audio se carga desde la interfaz web de este se ajusta automáticamente a Y para todos los servidores que tienen activos de Asterisk. Por defecto es n.
|
|
|
|
<BR>
|
|
<A NAME="servers-vicidial_recording_limit">
|
|
<BR>
|
|
<B>Grabación Vicidial Límite -</B> Este campo es donde se define el número máximo de minutos que una grabación de la llamada iniciada por Vicidial puede ser. Por defecto es de 60 minutos.
|
|
|
|
<BR>
|
|
<A NAME="servers-carrier_logging_active">
|
|
<BR>
|
|
<B>Portador de registro activo -</B> Esta configuración le permite registrar todos los códigos de retorno para colgar cualquier lista de marcación saliente llamadas que están haciendo. Por defecto es N.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>vicidial_conf_templates TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_conf_templates-template_id">
|
|
<BR>
|
|
<B>ID da Template - </B> Este campo precisa ter pelo menos 2 caracteres de comprimento e não mais que 15 caracteres, sem espaços. Este é o ID que irá ser usado para identificar o template de conf no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_conf_templates-template_name">
|
|
<BR>
|
|
<B>Nome da Template - </B> Este é o nome descritivo da configuração da template.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_conf_templates-template_contents">
|
|
<BR>
|
|
<B>Conteúdo da Template - </B> Este campo é onde você pode configurar itens específicos para serem usados por todos os ramais e/ou todas as operadoras que estão configuradas para usar este template. Campos que NÃO devem ser incluídos nesse ítem são: secret, accountcode, account, username e mailbox.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>vicidial_server_carriers TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_server_carriers-carrier_id">
|
|
<BR>
|
|
<B>ID da Operadora - </B> Este campo precisa ter entre 2 e 15 caracteres de comprimento, sem espaços. Este é o ID que irá ser usado para identificar a operadora no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-carrier_name">
|
|
<BR>
|
|
<B>Nome da Operadora - </B> Este é o nome descritivo da operadora no sistema.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-carrier_description">
|
|
<BR>
|
|
<B>Descripción Carrier -</B> Éste se coloca en los comentarios de los archivos de conf asterisco encima del dialplan y anotaciones en cuenta. Máximo 255 caracteres.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-registration_string">
|
|
<BR>
|
|
<B>String de Registro - </B> Este campo é onde você coloca a string necessária na configuração do IAX ou SIP para registrar a operadora. Opcional mas altamente recomendado se sua operadora permite registro .
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-template_id">
|
|
<BR>
|
|
<B>ID do Template - </B> Este campo opcional permite você escolha um template para esta configuração de operadora.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-account_entry">
|
|
<BR>
|
|
<B>Dados da Conta - </B> Este campo é usado se você não selecionou um template para ser usado, e é onde você pode entrar com configurações específicas para serem usadas para esta operadora. Se você receberá chamadas entrantes desta operadora, você deve configurar o context=trunkinbound neste campo para que possa ser usado o processo de controle de DDR do VICIDIAL.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-protocol">
|
|
<BR>
|
|
<B>Protocolo - </B> Este campo permite que você defina o protocolo a ser usado para esta configuração de operadora. Atualmente somente IAX e SIP são suportados.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-globals_string">
|
|
<BR>
|
|
<B>String Global- </B> Este campo opcional permite definir uma variável global para uso desta operadora no plano de discagem.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-dialplan_entry">
|
|
<BR>
|
|
<B>Plano de Discagem- </B> Este campo opcional permite definir um conjunto de entradas no plano de discagem para serem usados com esta operadora.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-server_ip">
|
|
<BR>
|
|
<B>IP do Servidor - </B> Este é o servidor que este registro de operadora está configurado.
|
|
|
|
<BR>
|
|
<A NAME="vicidial_server_carriers-active">
|
|
<BR>
|
|
<B>Ativo - </B> Isto define se a operadora irá ser incluída nos arquivos conf gerados automáticamente ou não.
|
|
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>TABELA DE CONFERÊNCIAS</FONT></B><BR><BR>
|
|
<A NAME="conferences-conf_exten">
|
|
<BR>
|
|
<B>Número da Conferência -</B> Este é o campo onde deve ser colocado o número do plano de discagem da conferência. Também é recomendado que o número da conferência esteja também no arquivo meetme.conf. É usado para as conferências do astGUIclient e para funcionalidade de chamada a três no VICIDIAL.
|
|
|
|
<BR>
|
|
<A NAME="conferences-server_ip">
|
|
<BR>
|
|
<B>IP do Servidor -</B> Deve ser selecionado qual servidor Asterisk esta conferência está configurada.
|
|
|
|
|
|
|
|
|
|
<?php
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
?>
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_SERVER_TRUNKS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_server_trunks">
|
|
<BR>
|
|
<B>Trunks do Servidor VICIDIAL permitem que você limite as linhas que são usadas para saída neste servidor para discagem de campanhas ou por cada campanha. Você tem a opção de reservar um número específico de linhas a serem usadas por apenas uma campanha assim como permitir que esta campanha rode nas linhas garantidas a ela e usar linhas que estão abertas, somente se a quantidade total de linhas usadas for menor que a configuração de máximo. Não havendo nenhuma dessas configurações irá permitir que a campanha que discar primeiro, ter quantas linhas ela puder pegar até a quantidade máxima configurada.</B>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>SYSTEM_SETTINGS TABELA</FONT></B><BR><BR>
|
|
<A NAME="settings-use_non_latin">
|
|
<BR>
|
|
<B>Uso Não-Latino -</B> Esta opção permite configurar o padrão de visualização para usar caracteres UTF8 e não filtrar com expressões regulares os caracteres da família dos latinos ou mostrar formatação. Padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-webroot_writable">
|
|
<BR>
|
|
<B>Raiz Web Gravável -</B> Esta configuração permite que você define se os arquivos temporários e de autenticação devem ser gravados na raiz do website ou do servidor web. Padrão é 1.
|
|
|
|
<BR>
|
|
<A NAME="settings-vicidial_agent_disable">
|
|
<BR>
|
|
<B>Mostrar Bloqueio ao Agente VICIDIAL -</B> Este campo é usado para selecionar quando mostrar para um agente que sua sessão foi bloqueada pelo sistema, ação do gerente ou ocorrência externa. A configuração NOT_ACTIVE irá desabilitar a mensagem na tela do agente. A configuração LIVE_AGENTE só irá mostrar a mensagem de bloqueio quando o registro da vicidial_auto_calls for removido, nas situações de logout forçado ou logout de emergência.
|
|
|
|
<BR>
|
|
<A NAME="settings-allow_sipsak_messages">
|
|
<BR>
|
|
<B>Permitir Mensagens SIPSAK -</B> Se configurada como 1, irá permitir que a configuração da tabela de ramais funcione corretamente, o servidor irá enviar mensagens para o telefone SIP mostrar no Mostrar LCD quando logado no VICIDIAL. Este recurso só funciona em telefones SIP e requer o aplicativo sipsak instalado no servidor web. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-vdc_agent_api_active">
|
|
<BR>
|
|
<B>API do Agente Ativa - </B> Se configurado como 1, irá permitir que a interface API do agente Funcione. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-admin_home_url">
|
|
<BR>
|
|
<B>URL Home do Admin -</B> É a URL do site que você irá se clicar no link HOME no topo da página admin.php.
|
|
|
|
<BR>
|
|
<A NAME="settings-enable_agc_xfer_log">
|
|
<BR>
|
|
<B>Habilitar Log de Transf.-</B> Esta opção irá gravar um regsitro de ocorrências em um arquivo no servidor web cada vez que uma chamada for transferida para um agente. O padrão é 0, desabilitado.
|
|
|
|
<BR>
|
|
<A NAME="settings-timeclock_end_of_day">
|
|
<BR>
|
|
<B>Fim do dia - </B> Esta configuração define quando os usuários devem ser retirados do sistema de ponto automaticamente. Só roda uma vez por dia. Deve ter somente 4 caracteres, 2 para hora e 2 para os minutos no formato 24 horas. O padrão é 0000.
|
|
|
|
<BR>
|
|
<A NAME="settings-timeclock_last_reset_date">
|
|
<BR>
|
|
<B>Último Sair Automático do Ponto - </B> Este campo mostra a data do último logout automático -.
|
|
|
|
<BR>
|
|
<A NAME="settings-vdc_header_date_format">
|
|
<BR>
|
|
<B>Formato da data do cabeçalho da tela do agente - </B> Este menu permite você escolher o formato da data que é mostrada na parte de cima da tela do agente. As opções para esta configuração são: o padrão é MS_DASH_24HR<BR>
|
|
MS_DASH_24HR 2008-06-24 23:59:59 - Formato de data Padrão com ano mês dia seguido por horário 24 horas<BR>
|
|
US_SLASH_24HR 06/24/2008 23:59:59 - Formato de data dos EUA com mês dia ano seguido por horário 24 horas<BR>
|
|
EU_SLASH_24HR 24/06/2008 23:59:59 - Formato de data Europeu com dia mês ano seguido por horário 24 horas<BR>
|
|
AL_TEXT_24HR JUN 24 23:59:59 - Formato de data abreviada em texto com mes e dia seguido por horário 24 horas<BR>
|
|
MS_DASH_AMPM 2008-06-24 11:59:59 PM - Formato de data Padrão com ano mês dia seguido por horário 12 horas<BR>
|
|
US_SLASH_AMPM 06/24/2008 11:59:59 PM - Formato de data dos EUA com mês dia ano seguido por horário 12 horas<BR>
|
|
EU_SLASH_AMPM 24/06/2008 11:59:59 PM - Formato de data Europeu com dia mês ano seguido por horário 12 horas<BR>
|
|
AL_TEXT_AMPM JUN 24 11:59:59 PM - Formato de data abreviada em texto com mes e dia seguido por horário 12 horas<BR>
|
|
|
|
<BR>
|
|
<A NAME="settings-vdc_customer_date_format">
|
|
<BR>
|
|
<B>Formato da data do cliente na tela do agente - </B> Este menú permite você selecionar o formato para a data no fuso horário do cliente que aparece no topo das informações sobre o cliente na tela do agente. As opções para esta configuração são: o padrão é AL_TEXT_AMPM<BR>
|
|
MS_DASH_24HR 2008-06-24 23:59:59 - Formato de data Padrão com ano mês dia seguido por horário 24 horas<BR>
|
|
US_SLASH_24HR 06/24/2008 23:59:59 - Formato de data dos EUA com mês dia ano seguido por horário 24 horas<BR>
|
|
EU_SLASH_24HR 24/06/2008 23:59:59 - Formato de data Europeu com dia mês ano seguido por horário 24 horas<BR>
|
|
AL_TEXT_24HR JUN 24 23:59:59 - Formato de data abreviada em texto com mes e dia seguido por horário 24 horas<BR>
|
|
MS_DASH_AMPM 2008-06-24 11:59:59 PM - Formato de data Padrão com ano mês dia seguido por horário 12 horas<BR>
|
|
US_SLASH_AMPM 06/24/2008 11:59:59 PM - Formato de data dos EUA com mês dia ano seguido por horário 12 horas<BR>
|
|
EU_SLASH_AMPM 24/06/2008 11:59:59 PM - Formato de data Europeu com dia mês ano seguido por horário 12 horas<BR>
|
|
AL_TEXT_AMPM JUN 24 11:59:59 PM - Formato de data abreviada em texto com mes e dia seguido por horário 12 horas<BR>
|
|
|
|
<BR>
|
|
<A NAME="settings-vdc_header_phone_format">
|
|
<BR>
|
|
<B>Formato do Telefone do Cliente na Tela do Agente - </B> Este menú permite escolher o formato do telefone do cliente que é mostrado na seção de status da tela do agente. As opções são: o padrão é US_PARN<BR>
|
|
US_DASH 000-000-0000 - USA número separado por traço<BR>
|
|
US_PARN (000)000-0000 - USA número separado por traço, ddd entre parentesis<BR>
|
|
MS_NODS 0000000000 - Sem Formatação<BR>
|
|
UK_DASH 00 0000-0000 - UK número separado por traço com espaço após o código da cidade<BR>
|
|
AU_SPAC 000 000 000 - Australia número separado por espaços<BR>
|
|
IT_DASH 0000-000-000 - Italy número separado por traço<BR>
|
|
FR_SPAC 00 00 00 00 00 - France número separado por espaços<BR>
|
|
|
|
<BR>
|
|
<A NAME="settings-vdc_agent_api_active">
|
|
<BR>
|
|
<B>Agent interface API Access Ativo -</B> This option allows you to enable or disable the agent interface API. Default is 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-agentonly_callback_campaign_lock">
|
|
<BR>
|
|
<B>Trava para Agendamento Vinculado -</B> Esta opção define se Agendamento Vinculado(AGENTONLY) serão travados para a campanha que o a gente originalmente agendou. Configurando como 1 significa que o agente somente pode discar para eles a partir da campanha que os configurou, 0 significa que o agente pode acessar os agendamentos não importando a campanha que eles foram criados. O padrão é 1.
|
|
|
|
<BR>
|
|
<A NAME="settings-sounds_central_control_active">
|
|
<BR>
|
|
<B>Controle Central de Audio Ativado -</B> Esta opção define se o sistema de sincronia de som está ativado entre todos os servidores. O padrão é 0 para inativo.
|
|
|
|
<BR>
|
|
<A NAME="settings-sounds_web_server">
|
|
<BR>
|
|
<B>Servidor Web de Sons -</B> Este é o nome do servidor ou endereço IP para o servidor web que estará controlando os arquivos de audio no sistema, isto deve combinar com o nome do servidor ou endereço IP no qual você está tentando acessar a página audio_store.php. O padrão é 127.0.0.1.
|
|
|
|
<BR>
|
|
<A NAME="settings-sounds_web_directory">
|
|
<BR>
|
|
<B>Diretório Web de Sons -</B> Esta auto-generado nombre del directorio es creado al azar por el sistema como el lugar que la tienda de audio se mantendrá. Todos los archivos de audio residir en este directorio.
|
|
|
|
<BR>
|
|
<A NAME="settings-active_voicemail_server">
|
|
<BR>
|
|
<B>Servidor de correo de voz activo -</B> En sistemas multi-servidor, este es el servidor que se encargará de todas las casillas de correo de voz. Este servidor es también donde la línea telefónica en mensajes generados se cargan desde el 8168 grabaciones.
|
|
|
|
<BR>
|
|
<A NAME="settings-outbound_autodial_active">
|
|
<BR>
|
|
<B>Discagem Automática Ativa- </B> Esta opção permite você habilitar ou desabilitar a discagem automática de saída do VICIDIAL, configurando este campo como 0 irá remover as seções de LISTAS e FILTROS e vários campos das telas de configuração de Campanha. Discagem Manual ainda será permitida pela tela do agente, mas a discagem por listas não será possível. O padrão é 1 para ativo.
|
|
|
|
<BR>
|
|
<A NAME="settings-auto_dial_limit">
|
|
<BR>
|
|
<B>Ratio Dial Limit -</B> Este es el límite máximo de la escala de marcación automática en la pantalla de la campaña.
|
|
|
|
<BR>
|
|
<A NAME="settings-outbound_calls_per_second">
|
|
<BR>
|
|
<B>Máx. de Cham. Trasnf. por Segundo -</B> Esta configuração determina o número máximo de chamadas que podem ser feitas pelo discador automático de saída para todos os servidores, por segundo. Deve ter entre 1 e 200 caracteres. O padrão é 40.
|
|
|
|
<BR>
|
|
<A NAME="settings-allow_custom_dialplan">
|
|
<BR>
|
|
<B>Permitir Custom Dialplan entradas -</B> Esta opción le permite introducir líneas personalizadas dialplan en llamadas menús. El valor predeterminado es 0 para los inactivos.
|
|
|
|
<BR>
|
|
<A NAME="settings-user_territories_active">
|
|
<BR>
|
|
<B>Territorios de usuario de Ativo -</B> Esta configuración le permite habilitar la setttings territorios de usuario desde la pantalla de modificación del usuario. Esta característica se agregó para permitir una mayor integración con una instalación personalizada Vtiger pero puede tener aplicaciones en un sistema de Vicidial pura también. Por defecto es 0 para discapacitados.
|
|
|
|
<BR>
|
|
<A NAME="settings-enable_second_webform">
|
|
<BR>
|
|
<B>Formulario de Asistencia Segunda Habilitar -</B> This setting allows you to have a second web form for campaigns and in-groups in the agent interface. Default is 0 for disabled.
|
|
|
|
<BR>
|
|
<A NAME="settings-enable_tts_integration">
|
|
<BR>
|
|
<B>Habilitar TTS Integración -</B> Esta configuración le permite habilitar Texto a la integración de voz con Cepstral. Esto sólo está disponible actualmente para las campañas de tipo de encuesta de salida. Por defecto es 0 para discapacitados.
|
|
|
|
<BR>
|
|
<A NAME="settings-qc_features_active">
|
|
<BR>
|
|
<B>Recursos de CQ Ativos - </B> Esta opção permite habilitar ou desabilitar os recursos de CQ ou Controle de Qualidade. O padrão é 0 para Inativo.
|
|
|
|
<BR>
|
|
<A NAME="settings-enable_queuemetrics_logging">
|
|
<BR>
|
|
<B>Habilitar Log para o QueueMetrics -</B> Esta configuração permite que você defina se o VICIDIAL irá enviar registros de log para a base de dados queue_log conforme a atividade de Queues do Asterisk faz. QueueMetrics é um programa de fonte fechado para analise estatística. Você deve ter o QueueMetrics instalado e configurado antes de habilitar este recurso. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_server_ip">
|
|
<BR>
|
|
<B>IP do servidor do QueueMetrics -</B> É o IP do servidor do QueueMetrics.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_dbname">
|
|
<BR>
|
|
<B>Nome do BD do QueueMetrics -</B> É o nome do banco de Dados do QueueMetrics.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_login">
|
|
<BR>
|
|
<B>Login do BD do QueueMetrics -</B> éste es el nombre delusuario usado para abrirse una sesión a su base de datos deQueueMetrics.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_pass">
|
|
<BR>
|
|
<B>Senha do BD do QueueMetrics -</B> É a senha a ser usada para logar no DB do QueueMetrics.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_url">
|
|
<BR>
|
|
<B>URL do QueueMetrics -</B> É a URL ou endereço do site usado para entrar na sua instalação do QueueMetrics.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_log_id">
|
|
<BR>
|
|
<B>ID do Log do QueueMetrics -</B> É o ID do servidor que o VICIDIAL coloca no BD do QueueMetrics para identificação de cada registro.
|
|
|
|
<BR>
|
|
<A NAME="settings-queuemetrics_eq_prepend">
|
|
<BR>
|
|
<B>Prefixo QueueMetrics EnterQueue -</B> Este campo é usado para permitir prefixar um dos campos da tabela vicidial_list na frente do número do telefone do cliente para relatórios customizados no QueueMetrics. O padrão é NONE para não colocar nada.
|
|
|
|
<BR>
|
|
<A NAME="settings-enable_vtiger_integration">
|
|
<BR>
|
|
<B>Habilitar Integração com Vtiger - </B> Esta configuração permite que seja habilitada a integração entre VICIDIAL e VTIGER. Atualmente o único tipo de integração disponível são links para o site de administração, pesquisa e replicação do cadastro de usuários. O padrão é 0.
|
|
|
|
<BR>
|
|
<A NAME="settings-vtiger_server_ip">
|
|
<BR>
|
|
<B>IP do Serv. BD Vtiger - </B> É o endereço IP do servidor de banco de dados da instalação do Vtiger.
|
|
|
|
<BR>
|
|
<A NAME="settings-vtiger_dbname">
|
|
<BR>
|
|
<B>Base de Dados Vtiger - </B> Este é o nome da base de dados para o Vtiger.
|
|
|
|
<BR>
|
|
<A NAME="settings-vtiger_login">
|
|
<BR>
|
|
<B>Login do BD do Vtiger - </B> É o nome do usuário usado para acessar o BD do Vtiger.
|
|
|
|
<BR>
|
|
<A NAME="settings-vtiger_pass">
|
|
<BR>
|
|
<B>Senha do BD Vtiger - </B> É a senha usada para acessar o BD do Vtiger.
|
|
|
|
<BR>
|
|
<A NAME="settings-vtiger_url">
|
|
<BR>
|
|
<B>URL do Vtiger - </B> Esta é a URL ou endereço do site usado para acessar o Vtiger.
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_STATUS TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_statuses">
|
|
<BR>
|
|
<B>Com o uso do status do sistema, você pode ter status que existem para campanhas e grupos de entrada. O Status deve ter entre 1 e 6 caracteres de comprimento, a descrição deve ter entre 2 e 30 caracteres de comprimento e Selecionável define se será mostrado no VICIDIAL na finalização da chamada. O campo human_answered é usado para calcular o percentual de drop, ou índice de abandono. Configurando human_answered para Y irá usar este status quando contando as chamadas atendidas por humanos. A opção de Categoria permite agrupar vários status em uma categoria que pode ser usada para análise estatística. Existem também 5 configurações adicionais que irão definir o tipo do status: sale, dnc, customer contact, not interested, unworkable.</B>
|
|
|
|
|
|
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>VICIDIAL_STATUS_CATEGORIES TABELA</FONT></B><BR><BR>
|
|
<A NAME="vicidial_status_categories">
|
|
<BR>
|
|
<B>Através do uso de categoria de status de sistema, você pode agrupar status para permitir análise estatística em um grupo de status. O ID da categoria deve ter entre 2 e 20 caracteres sem espaços, o nome deve ter entre 2 e 50 caracteres, a descrição é opicional e o Mostrar TimeonVDAD define se o status deve ser um dos 4 status que podem ser calculados e mostrados no relatório em tempo real Time On VDAD .</B> A Categoria de Venda e a Categoria Registro Ruim são ambas usadas pelo sistema de Sugestão de Listas quando analisando as estatisticas da lista.
|
|
|
|
|
|
<?php
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
?>
|
|
<BR><BR><BR><BR>
|
|
|
|
<B><FONT SIZE=3>CÓDIGOS DE STATUS DE CONTROLE DE QUALIDADE</FONT></B><BR><BR>
|
|
<A NAME="vicidial_qc_status_codes">
|
|
<BR>
|
|
<B>O sistema de Controle de Qualidade do VICIDIAL tem seu conjunto de status separados daqueles usados na finalização de chamadas do VICIDIAL. Os códigos de CQ devem ter entre 2 e 8 caracteres de comprimento e não podem conter caracteres especiais como espaços ou virgulas. A descrição do código de status de CQ deve ter entre 2 e 30 caracteres</B>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
<BR><BR><BR><BR><BR><BR><BR><BR>
|
|
<BR><BR><BR><BR><BR><BR><BR><BR>
|
|
FIM
|
|
</TD></TR></TABLE></BODY></HTML>
|
|
<?php
|
|
exit;
|
|
|
|
#### END AJUDA SCREENS
|
|
}
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 7 series, filter count preview and script preview
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=73 view dialable leads from a filter and a campaign
|
|
######################
|
|
|
|
if ($ADD==73)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "</title>\n";
|
|
echo "</head>\n";
|
|
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT dial_statuses,local_call_time,lead_filter_id,drop_lockout_time from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$dial_statuses = $row[0];
|
|
$local_call_time = $row[1];
|
|
$drop_lockout_time = $row[3];
|
|
if ($lead_filter_id=='')
|
|
{
|
|
$lead_filter_id = $row[2];
|
|
if ($lead_filter_id=='')
|
|
{
|
|
$lead_filter_id='NONE';
|
|
}
|
|
}
|
|
|
|
$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
$camp_lists='';
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$o++;
|
|
if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";}
|
|
}
|
|
$camp_lists = eregi_replace(".$","",$camp_lists);
|
|
|
|
$filterSQL = $filtersql_list[$lead_filter_id];
|
|
$filterSQL = preg_replace("/\\\\/","",$filterSQL);
|
|
$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL);
|
|
if (strlen($filterSQL)>4)
|
|
{$fSQL = "and $filterSQL";}
|
|
else
|
|
{$fSQL = '';}
|
|
|
|
|
|
echo "<BR><BR>\n";
|
|
echo "<B>Mostrar Quantidade de Registros Discáveis</B> -<BR><BR>\n";
|
|
echo "<B>CAMPANHA:</B> $campaign_id<BR>\n";
|
|
echo "<B>LISTAS:</B> $camp_lists<BR>\n";
|
|
echo "<B>STATUS:</B> $dial_statuses<BR>\n";
|
|
echo "<B>FILTER:</B> $lead_filter_id<BR>\n";
|
|
echo "<B>CALL TIME:</B> $local_call_time<BR><BR>\n";
|
|
|
|
### call function to calculate and print dialable leads
|
|
dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL);
|
|
|
|
echo "<BR><BR>\n";
|
|
echo "</BODY></HTML>\n";
|
|
|
|
exit;
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=7111111 view sample script with test variables
|
|
######################
|
|
|
|
if ($ADD==7111111)
|
|
{
|
|
##### TEST VARIABLES #####
|
|
$vendor_lead_code = 'VENDOR:LEAD;CODE';
|
|
$list_id = 'LISTID';
|
|
$gmt_offset_now = 'GMTOFFSET';
|
|
$phone_code = '1';
|
|
$phone_number = '7275551212';
|
|
$title = 'Mr.';
|
|
$first_name = 'JOHN';
|
|
$middle_initial = 'Q';
|
|
$last_name = 'PUBLIC';
|
|
$address1 = '1234 Main St.';
|
|
$address2 = 'Apt. 3';
|
|
$address3 = 'ADDRESS3';
|
|
$city = 'CHICAGO';
|
|
$state = 'IL';
|
|
$province = 'PROVINCE';
|
|
$postal_code = '33760';
|
|
$country_code = 'USA';
|
|
$gender = 'M';
|
|
$date_of_birth = '1970-01-01';
|
|
$alt_phone = '3125551111';
|
|
$email = 'test@test.com';
|
|
$security_phrase = 'SECUTIRY';
|
|
$comments = 'COMMENTS FIELD';
|
|
$RGfullname = 'JOE AGENT';
|
|
$RGuser = '6666';
|
|
$RGlead_id = '1234';
|
|
$RGcampaign = 'TESTCAMP';
|
|
$RGphone_login = 'gs102';
|
|
$RGgroup = 'TESTCAMP';
|
|
$RGchannel_group = 'TESTCAMP';
|
|
$RGSQLdate = date("Y-m-d H:i:s");
|
|
$RGepoch = date("U");
|
|
$RGuniqueid = '1163095830.4136';
|
|
$RGcustomer_zap_channel = 'Zap/1-1';
|
|
$RGserver_ip = '10.10.10.15';
|
|
$RGSIPexten = 'SIP/gs102';
|
|
$RGsession_id = '8600051';
|
|
$RGdialed_number = '3125551111';
|
|
$RGdialed_label = 'ALT';
|
|
$RGrank = '99';
|
|
$RGowner = '6666';
|
|
$RGcamp_script = 'TESTSCRIPT';
|
|
$RGin_script = '';
|
|
$script_width = '600';
|
|
$script_height = '400';
|
|
$recording_filename = '20091204-1639_6666_7275551212';
|
|
$recording_id = '1235';
|
|
$user_custom_one = 'custom one';
|
|
$user_custom_two = 'custom two';
|
|
$user_custom_three = 'custom three';
|
|
$user_custom_four = 'custom four';
|
|
$user_custom_five = 'custom five';
|
|
$preset_number_a = 'preset_a';
|
|
$preset_number_b = 'preset_b';
|
|
$preset_number_c = 'preset_c';
|
|
$preset_number_d = 'preset_d';
|
|
$preset_number_e = 'preset_e';
|
|
$preset_number_f = 'preset_f';
|
|
$preset_dtmf_a = 'preset_dtmf_a';
|
|
$preset_dtmf_b = 'preset_dtmf_b';
|
|
|
|
echo "</title>\n";
|
|
echo "</head>\n";
|
|
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT script_id,script_name,script_comments,script_text,active from vicidial_scripts where script_id='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$script_name = $row[1];
|
|
$script_text = stripslashes($row[3]);
|
|
|
|
if (eregi("iframe src",$script_text))
|
|
{
|
|
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
|
|
$list_id = eregi_replace(' ','+',$list_id);
|
|
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
|
|
$phone_code = eregi_replace(' ','+',$phone_code);
|
|
$phone_number = eregi_replace(' ','+',$phone_number);
|
|
$title = eregi_replace(' ','+',$title);
|
|
$first_name = eregi_replace(' ','+',$first_name);
|
|
$middle_initial = eregi_replace(' ','+',$middle_initial);
|
|
$last_name = eregi_replace(' ','+',$last_name);
|
|
$address1 = eregi_replace(' ','+',$address1);
|
|
$address2 = eregi_replace(' ','+',$address2);
|
|
$address3 = eregi_replace(' ','+',$address2);
|
|
$city = eregi_replace(' ','+',$city);
|
|
$state = eregi_replace(' ','+',$state);
|
|
$province = eregi_replace(' ','+',$province);
|
|
$postal_code = eregi_replace(' ','+',$postal_code);
|
|
$country_code = eregi_replace(' ','+',$country_code);
|
|
$gender = eregi_replace(' ','+',$gender);
|
|
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
|
|
$alt_phone = eregi_replace(' ','+',$alt_phone);
|
|
$email = eregi_replace(' ','+',$email);
|
|
$security_phrase = eregi_replace(' ','+',$security_phrase);
|
|
$comments = eregi_replace(' ','+',$comments);
|
|
$RGfullname = eregi_replace(' ','+',$RGfullname);
|
|
$RGuser = eregi_replace(' ','+',$RGuser);
|
|
$RGlead_id = eregi_replace(' ','+',$RGlead_id);
|
|
$RGcampaign = eregi_replace(' ','+',$RGcampaign);
|
|
$RGphone_login = eregi_replace(' ','+',$RGphone_login);
|
|
$RGgroup = eregi_replace(' ','+',$RGgroup);
|
|
$RGchannel_group = eregi_replace(' ','+',$RGchannel_group);
|
|
$RGSQLdate = eregi_replace(' ','+',$RGSQLdate);
|
|
$RGepoch = eregi_replace(' ','+',$RGepoch);
|
|
$RGuniqueid = eregi_replace(' ','+',$RGuniqueid);
|
|
$RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel);
|
|
$RGserver_ip = eregi_replace(' ','+',$RGserver_ip);
|
|
$RGSIPexten = eregi_replace(' ','+',$RGSIPexten);
|
|
$RGsession_id = eregi_replace(' ','+',$RGsession_id);
|
|
$RGdialed_number = eregi_replace(' ','+',$RGdialed_number);
|
|
$RGdialed_label = eregi_replace(' ','+',$RGdialed_label);
|
|
$RGrank = eregi_replace(' ','+',$RGrank);
|
|
$RGowner = eregi_replace(' ','+',$RGowner);
|
|
$RGcamp_script = eregi_replace(' ','+',$RGcamp_script);
|
|
$RGin_script = eregi_replace(' ','+',$RGin_script);
|
|
$script_width = eregi_replace(' ','+',$script_width);
|
|
$script_height = eregi_replace(' ','+',$script_height);
|
|
$recording_filename = eregi_replace(' ','+',$recording_filename);
|
|
$recording_id = eregi_replace(' ','+',$recording_id);
|
|
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
|
|
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
|
|
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
|
|
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
|
|
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
|
|
$preset_number_a = eregi_replace(' ','+',$preset_number_a);
|
|
$preset_number_b = eregi_replace(' ','+',$preset_number_b);
|
|
$preset_number_c = eregi_replace(' ','+',$preset_number_c);
|
|
$preset_number_d = eregi_replace(' ','+',$preset_number_d);
|
|
$preset_number_e = eregi_replace(' ','+',$preset_number_e);
|
|
$preset_number_f = eregi_replace(' ','+',$preset_number_f);
|
|
$preset_dtmf_a = eregi_replace(' ','+',$preset_dtmf_a);
|
|
$preset_dtmf_b = eregi_replace(' ','+',$preset_dtmf_b);
|
|
}
|
|
|
|
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
|
|
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
|
|
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
|
|
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
|
|
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
|
|
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
|
|
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
|
|
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
|
|
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
|
|
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
|
|
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
|
|
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
|
|
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
|
|
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
|
|
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
|
|
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
|
|
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
|
|
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
|
|
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
|
|
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
|
|
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
|
|
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
|
|
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
|
|
$script_text = eregi_replace('--A--fullname--B--',"$RGfullname",$script_text);
|
|
$script_text = eregi_replace('--A--fronter--B--',"$RGuser",$script_text);
|
|
$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text);
|
|
$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text);
|
|
$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text);
|
|
$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text);
|
|
$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text);
|
|
$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text);
|
|
$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text);
|
|
$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text);
|
|
$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text);
|
|
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text);
|
|
$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text);
|
|
$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text);
|
|
$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$script_text);
|
|
$script_text = eregi_replace('--A--dialed_number--B--',"$RGdialed_number",$script_text);
|
|
$script_text = eregi_replace('--A--dialed_label--B--',"$RGdialed_label",$script_text);
|
|
$script_text = eregi_replace('--A--rank--B--',"$RGrank",$script_text);
|
|
$script_text = eregi_replace('--A--owner--B--',"$RGowner",$script_text);
|
|
$script_text = eregi_replace('--A--camp_script--B--',"$RGcamp_script",$script_text);
|
|
$script_text = eregi_replace('--A--in_script--B--',"$RGin_script",$script_text);
|
|
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
|
|
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
|
|
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
|
|
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
|
|
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
|
|
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
|
|
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
|
|
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
|
|
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_a--B--',"$preset_number_a",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_b--B--',"$preset_number_b",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_c--B--',"$preset_number_c",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_d--B--',"$preset_number_d",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_e--B--',"$preset_number_e",$script_text);
|
|
$script_text = eregi_replace('--A--preset_number_f--B--',"$preset_number_f",$script_text);
|
|
$script_text = eregi_replace('--A--preset_dtmf_a--B--',"$preset_dtmf_a",$script_text);
|
|
$script_text = eregi_replace('--A--preset_dtmf_b--B--',"$preset_dtmf_b",$script_text);
|
|
$script_text = eregi_replace("\n","<BR>",$script_text);
|
|
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "Pré-Visualizar Script: $script_id<BR>\n";
|
|
echo "<TABLE WIDTH=600><TR><TD>\n";
|
|
echo "<center><B>$script_name</B><BR></center>\n";
|
|
echo "$script_text\n";
|
|
echo "</TD></TR></TABLE></center>\n";
|
|
|
|
echo "</BODY></HTML>\n";
|
|
|
|
exit;
|
|
}
|
|
|
|
|
|
$ADMIN=$PHP_SELF;
|
|
require("admin_header.php");
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 1 series, ADD NEW forms for inserting new records into the database
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
######################
|
|
# ADD=1 display the ADD NEW USER FORM SCREEN
|
|
######################
|
|
|
|
if ($ADD=="1")
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR USUÁRIO<form action=$PHP_SELF method=POST name=userform id=userform>\n";
|
|
echo "<input type=hidden name=ADD value=2>\n";
|
|
echo "<input type=hidden name=user_toggle id=user_toggle value=0>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left>Auto-Generated <input type=hidden name=user id=user value=\"99999\">$NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left><input type=text name=user id=user size=20 maxlength=20> <input type=button name=auto_user value=\"AUTO-GENERATE\" onClick=\"user_auto()\"> $NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=20 maxlength=20>$NWB#vicidial_users-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=full_name size=20 maxlength=100>$NWB#vicidial_users-full_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nível do Usuário: </td><td align=left><select size=1 name=user_level>";
|
|
$h=1;
|
|
while ($h<=$LOGuser_level)
|
|
{
|
|
echo "<option>$h</option>";
|
|
$h++;
|
|
}
|
|
echo "</select>$NWB#vicidial_users-user_level$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo do Usuário: </td><td align=left><select size=1 name=user_group>\n";
|
|
|
|
$stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Ugroups_to_print = mysql_num_rows($rslt);
|
|
$Ugroups_list='';
|
|
|
|
$o=0;
|
|
while ($Ugroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Ugroups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$Ugroups_list";
|
|
echo "<option SELECTED>$user_group</option>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Login do Ramal: </td><td align=left><input type=text name=phone_login size=20 maxlength=20>$NWB#vicidial_users-phone_login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do Ramal: </td><td align=left><input type=text name=phone_pass size=20 maxlength=20>$NWB#vicidial_users-phone_pass$NWE</td></tr>\n";
|
|
echo "</select>$NWB#vicidial_users-user_group$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=button name=ENVIAR value=ENVIAR onClick=\"user_submit()\"></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1A display the COPY USER FORM SCREEN
|
|
######################
|
|
|
|
if ($ADD=="1A")
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>COPIAR USUÁRIO<form action=$PHP_SELF method=POST name=userform id=userform>\n";
|
|
echo "<input type=hidden name=ADD value=2A>\n";
|
|
echo "<input type=hidden name=user_toggle id=user_toggle value=0>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left>Auto-Generated <input type=hidden name=user id=user value=\"99999\">$NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left><input type=text name=user id=user size=20 maxlength=20> <input type=button name=auto_user value=\"AUTO-GENERATE\" onClick=\"user_auto()\"> $NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=20 maxlength=20>$NWB#vicidial_users-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=full_name size=20 maxlength=100>$NWB#vicidial_users-full_name$NWE</td></tr>\n";
|
|
|
|
if ($LOGuser_level==9) {$levelMAX=10;}
|
|
else {$levelMAX=$LOGuser_level;}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Source Usuário: </td><td align=left><select size=1 name=source_user_id>\n";
|
|
|
|
$stmt="SELECT user,full_name from vicidial_users where user_level < $levelMAX order by full_name;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Uusers_to_print = mysql_num_rows($rslt);
|
|
$Uusers_list='';
|
|
|
|
$o=0;
|
|
while ($Uusers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Uusers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$Uusers_list";
|
|
echo "</select>$NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=button name=ENVIAR value=ENVIAR onClick=\"user_submit()\"></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN
|
|
######################
|
|
|
|
if ($ADD==11)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVA CAMPANHA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=21>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left>Auto-Generated $NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left><input type=text name=campaign_id size=10 maxlength=8>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Campanha: </td><td align=left><input type=text name=campaign_name size=30 maxlength=30>$NWB#vicidial_campaigns-campaign_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição da Campanha: </td><td align=left><input type=text name=campaign_description size=30 maxlength=255>$NWB#vicidial_campaigns-campaign_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option></select>$NWB#vicidial_campaigns-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão de Estacionamento: </td><td align=left><input type=text name=park_ext size=10 maxlength=10>$NWB#vicidial_campaigns-park_ext$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do arquivo de Estacionamento: </td><td align=left><input type=text name=park_file_name size=10 maxlength=10>$NWB#vicidial_campaigns-park_file_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web: </td><td align=left><input type=text name=web_form_address size=70 maxlength=1055>$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Finalizadores (Closers): </td><td align=left><select size=1 name=allow_closers><option>Y</option><option>N</option></select>$NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Nível do Hopper: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>20</option><option>50</option><option>100</option><option>200</option><option>500</option><option>1000</option><option>2000</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nível de Discagem Automática: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
|
$adl=0;
|
|
while($adl <= $SSauto_dial_limit)
|
|
{
|
|
echo "<option>$adl</option>\n";
|
|
if ($adl < 1)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 3)
|
|
{$adl = ($adl + 0.1);}
|
|
else
|
|
{
|
|
if ($adl < 4)
|
|
{$adl = ($adl + 0.25);}
|
|
else
|
|
{
|
|
if ($adl < 5)
|
|
{$adl = ($adl + 0.5);}
|
|
else
|
|
{
|
|
if ($adl < 10)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 20)
|
|
{$adl = ($adl + 2);}
|
|
else
|
|
{
|
|
if ($adl < 40)
|
|
{$adl = ($adl + 5);}
|
|
else
|
|
{
|
|
if ($adl < 200)
|
|
{$adl = ($adl + 10);}
|
|
else
|
|
{
|
|
if ($adl < 400)
|
|
{$adl = ($adl + 50);}
|
|
else
|
|
{
|
|
if ($adl < 1000)
|
|
{$adl = ($adl + 100);}
|
|
else
|
|
{$adl = ($adl + 1);}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Próximo Agente a chamar: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option><option>longest_wait_time</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Horário Local da Chamada: </td><td align=left><select size=1 name=local_call_time>";
|
|
echo "$call_times_list";
|
|
echo "</select>$NWB#vicidial_campaigns-local_call_time$NWE</td></tr>\n";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Correio de Voz: </td><td align=left><input type=text name=voicemail_ext size=10 maxlength=10 value=\"$voicemail_ext\">$NWB#vicidial_campaigns-voicemail_ext$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Script: </td><td align=left><select size=1 name=script_id>\n";
|
|
echo "$scripts_list";
|
|
echo "</select>$NWB#vicidial_campaigns-campaign_script$NWE</td></tr>\n";
|
|
|
|
$eswHTML='';
|
|
if ($SSenable_second_webform > 0)
|
|
{$eswHTML = '<option>WEBFORMTWO</option>';}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pegar lançamento da chamada: </td><td align=left><select size=1 name=get_call_launch><option selected>NONE</option><option>SCRIPT</option><option>WEBFORM</option>$eswHTML</select>$NWB#vicidial_campaigns-get_call_launch$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=12 display the COPY CAMPAIGN FORM SCREEN
|
|
######################
|
|
|
|
if ($ADD==12)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>COPIAR CAMPANHA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=20>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left>Auto-Generated $NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left><input type=text name=campaign_id size=10 maxlength=8>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Campanha: </td><td align=left><input type=text name=campaign_name size=30 maxlength=30>$NWB#vicidial_campaigns-campaign_name$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Origem:</td><td align=left><select size=1 name=source_campaign_id>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$campaigns_list";
|
|
echo "</select>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>ATENÇÃO: Copiar uma campanha irá copiar todas as configurações da campanha que você escolher, mas não irá copiar a lista de bloqueio específica da campanha que você selecionar.</td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=111 display the ADD NEW LIST FORM SCREEN
|
|
######################
|
|
|
|
if ($ADD==111)
|
|
{
|
|
if ($LOGmodify_lists==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_lists' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD A NEW LIST<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=211>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Lista: </td><td align=left>Auto-Generated $NWB#vicidial_lists-list_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Lista: </td><td align=left><input type=text name=list_id size=8 maxlength=8> (somente dígitos)$NWB#vicidial_lists-list_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Lista: </td><td align=left><input type=text name=list_name size=20 maxlength=20>$NWB#vicidial_lists-list_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição da Lista: </td><td align=left><input type=text name=list_description size=30 maxlength=255>$NWB#vicidial_lists-list_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha: </td><td align=left><select size=1 name=campaign_id>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$campaigns_list";
|
|
echo "<option SELECTED>$campaign_id</option>\n";
|
|
echo "</select>$NWB#vicidial_lists-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_lists-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number
|
|
######################
|
|
|
|
if ($ADD==121)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$campaigns_list = "<option SELECTED value=\"SYSTEM_INTERNAL\">SYSTEM_INTERNAL - INTERNAL VICIDIAL DNC LIST</option>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where use_campaign_dnc IN('Y','AREACODE') order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
if (strlen($phone_numbers) > 2)
|
|
{
|
|
$PN = explode("\n",$phone_numbers);
|
|
$PNct = count($PN);
|
|
$p=0;
|
|
while ($p < $PNct)
|
|
{
|
|
if ( (ereg('delete',$stage)) and ($LOGdelete_from_dnc > 0) )
|
|
{
|
|
##### BEGIN DELETE FROM DNC #####
|
|
if (ereg('SYSTEM_INTERNAL',$campaign_id))
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_dnc where phone_number='$PN[$p]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{echo "<br>BLOQUEIO NÃO REMOVIDO - Este número de telefone não está na lista de bloqueio: $PN[$p]\n";}
|
|
else
|
|
{
|
|
$stmt="DELETE FROM vicidial_dnc where phone_number='$PN[$p]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>BLOQUEIO REMOVIDO: $PN[$p]</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM DNC LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{echo "<br>BLOQUEIO NÃO REMOVIDO - Este número de telefone não está na lista de bloqueio: $PN[$p] $campaign_id\n";}
|
|
else
|
|
{
|
|
$stmt="DELETE FROM vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>BLOQUEIO REMOVIDO: $PN[$p] $campaign_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM CAMPANHA DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
##### END DELETE FROM DNC #####
|
|
}
|
|
else
|
|
{
|
|
##### BEGIN ADD TO DNC #####
|
|
if (ereg('SYSTEM_INTERNAL',$campaign_id))
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_dnc where phone_number='$PN[$p]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>Bloqueio não Cadastrado - Este número já existe na lista de bloqueio: $PN[$p]\n";}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_dnc (phone_number) values('$PN[$p]');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>Bloqueio Adicionado: $PN[$p]</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN INCLUIR NÚMERO AO BLOQUEIO LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>Bloqueio não Cadastrado - Este número já existe na lista de bloqueio: $PN[$p] $campaign_id\n";}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$PN[$p]','$campaign_id');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>Bloqueio Adicionado: $PN[$p] $campaign_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO CAMPANHA DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
##### END ADD TO DNC #####
|
|
}
|
|
$p++;
|
|
}
|
|
}
|
|
|
|
if ($LOGdelete_from_dnc > 0)
|
|
{echo "<br>INCLUIR OU REMOVER TELEFONES DA LISTA DE BLOQUEIO<form action=$PHP_SELF method=POST>\n";}
|
|
else
|
|
{echo "<br>INCLUIR NÚMEROS PARA LISTA DE BLOQUEIO<form action=$PHP_SELF method=POST>\n";}
|
|
echo "<input type=hidden name=ADD value=121>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>List: </td><td align=left><select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list";
|
|
echo "</select></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Números de Telefone:<BR><BR> (somente um telefone por linha)<BR>$NWB#vicidial_list-dnc$NWE</td><td align=left><TEXTAREA name=phone_numbers ROWS=20 COLS=20></TEXTAREA></td></tr>\n";
|
|
if ($LOGdelete_from_dnc > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Incluir ou Remover: </td><td align=left><select size=1 name=stage><option SELECTED>add</option><option>delete</option></select></td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1111 display the ADD NEW INBOUND GROUP SCREEN
|
|
######################
|
|
|
|
if ($ADD==1111)
|
|
{
|
|
if ($LOGmodify_ingroups==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVO GRUPO DE ENTRADA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Grupo: </td><td align=left>Auto-Generated $NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Grupo: </td><td align=left><input type=text name=group_id size=20 maxlength=20> (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Grupo: </td><td align=left><input type=text name=group_name size=30 maxlength=30>$NWB#vicidial_inbound_groups-group_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Cor do Grupo: </td><td align=left id=\"group_color_td\"><input type=text name=group_color size=7 maxlength=7>$NWB#vicidial_inbound_groups-group_color$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web: </td><td align=left><input type=text name=web_form_address size=70 maxlength=1055 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Correio de Voz: </td><td align=left><input type=text name=voicemail_ext size=10 maxlength=10 value=\"$voicemail_ext\">$NWB#vicidial_inbound_groups-voicemail_ext$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Próximo Agente a chamar: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option>longest_wait_time</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mostrar Fronter: </td><td align=left><select size=1 name=fronter_display><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Script: </td><td align=left><select size=1 name=script_id>\n";
|
|
echo "$scripts_list";
|
|
echo "</select>$NWB#vicidial_inbound_groups-ingroup_script$NWE</td></tr>\n";
|
|
$eswHTML='';
|
|
if ($SSenable_second_webform > 0)
|
|
{$eswHTML = '<option>WEBFORMTWO</option>';}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pegar lançamento da chamada: </td><td align=left><select size=1 name=get_call_launch><option selected>NONE</option><option>SCRIPT</option><option>WEBFORM</option>$eswHTML</select>$NWB#vicidial_inbound_groups-get_call_launch$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1211 display the COPY INBOUND GROUP SCREEN
|
|
######################
|
|
|
|
if ($ADD==1211)
|
|
{
|
|
if ($LOGmodify_ingroups==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>COPIAR GRUPO DE ENTRADA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2011>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Grupo: </td><td align=left>Auto-Generated $NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Grupo: </td><td align=left><input type=text name=group_id size=20 maxlength=20> (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Grupo: </td><td align=left><input type=text name=group_name size=30 maxlength=30>$NWB#vicidial_inbound_groups-group_name$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Source ID do Grupo: </td><td align=left><select size=1 name=source_group_id>\n";
|
|
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$groups_to_print = mysql_num_rows($rslt);
|
|
$groups_list='';
|
|
|
|
$o=0;
|
|
while ($groups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$groups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$groups_list";
|
|
echo "</select>$NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1311 display the ADD NEW DID SCREEN
|
|
######################
|
|
|
|
if ($ADD==1311)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR DDR<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2311>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão DDR:</td><td align=left><input type=text name=did_pattern size=20 maxlength=50> (no spaces or dashes)$NWB#vicidial_inbound_dids-did_pattern$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição DDR:</td><td align=left><input type=text name=did_description size=40 maxlength=50>$NWB#vicidial_inbound_dids-did_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1411 display the COPY DID SCREEN
|
|
######################
|
|
|
|
if ($ADD==1411)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>COPIAR DDR<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2411>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão DDR:</td><td align=left><input type=text name=did_pattern size=20 maxlength=50> (no spaces or dashes)$NWB#vicidial_inbound_dids-did_pattern$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição DDR:</td><td align=left><input type=text name=did_description size=40 maxlength=50>$NWB#vicidial_inbound_dids-did_description$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>DDR Origem:</td><td align=left><select size=1 name=source_did>\n";
|
|
|
|
$stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids order by did_pattern";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$dids_to_print = mysql_num_rows($rslt);
|
|
$dids_list='';
|
|
|
|
$o=0;
|
|
while ($dids_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$dids_list .= "<option value=\"$rowx[0]\">$rowx[1] - $rowx[2]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$dids_list";
|
|
echo "</select>$NWB#vicidial_inbound_dids-did_pattern$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1511 display the ADD NEW CALL MENU SCREEN
|
|
######################
|
|
|
|
if ($ADD==1511)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR UM MENU<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2511>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Menu: </td><td align=left>Auto-Generated $NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Menu: </td><td align=left><input type=text name=menu_id size=40 maxlength=50> (no spaces or special characters)$NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Menu: </td><td align=left><input type=text name=menu_name size=50 maxlength=100>$NWB#vicidial_call_menu-menu_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1611 display the COPY CALL MENU SCREEN
|
|
######################
|
|
|
|
if ($ADD==1611)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>COPIAR UM MENU<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2611>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Menu: </td><td align=left>Auto-Generated $NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Menu: </td><td align=left><input type=text name=menu_id size=40 maxlength=50> (no spaces or special characters)$NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Menu: </td><td align=left><input type=text name=menu_name size=50 maxlength=100>$NWB#vicidial_call_menu-menu_name$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Menu Origem: </td><td align=left><select size=1 name=source_menu>\n";
|
|
|
|
$stmt="SELECT menu_id,menu_name from vicidial_call_menu order by menu_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$menus_to_print = mysql_num_rows($rslt);
|
|
$menus_list='';
|
|
|
|
$o=0;
|
|
while ($menus_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$menus_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$menus_list";
|
|
echo "</select>$NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN
|
|
######################
|
|
|
|
if ($ADD==11111)
|
|
{
|
|
if ($LOGmodify_remoteagents==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVO AGENTE REMOTO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=21111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início do ID do Usuário: </td><td align=left><input type=text name=user_start size=6 maxlength=6> (somente números, incremented)$NWB#vicidial_remote_agents-user_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número de linhas: </td><td align=left><input type=text name=number_of_lines size=3 maxlength=3> (somente números)$NWB#vicidial_remote_agents-number_of_lines$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
echo "$servers_list";
|
|
echo "</select>$NWB#vicidial_remote_agents-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão Externa: </td><td align=left><input type=text name=conf_exten size=20 maxlength=20> (número do plano de discagem para ligar para agentes)$NWB#vicidial_remote_agents-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option>ATIVO</option><option SELECTED>INACTIVE</option></select>$NWB#vicidial_remote_agents-status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha: </td><td align=left><select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list";
|
|
echo "</select>$NWB#vicidial_remote_agents-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupos de Entrada: </td><td align=left>\n";
|
|
echo "$groups_list";
|
|
echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
echo "AVISO: Pode demorar até 30 segundos para que as alterações enviadas por essa tela se tornem ativas\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=111111 display the ADD NEW USERS GROUP SCREEN
|
|
######################
|
|
|
|
if ($ADD==111111)
|
|
{
|
|
if ($LOGmodify_usergroups==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_user_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVO GRUPO DE USUÁRIOS<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=211111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo: </td><td align=left>Auto-Generated $NWB#vicidial_user_groups-user_group$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo: </td><td align=left><input type=text name=user_group size=15 maxlength=20> (sem espaços ou pontos)$NWB#vicidial_user_groups-user_group$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição: </td><td align=left><input type=text name=group_name size=40 maxlength=40> (descrição do grupo)$NWB#vicidial_user_groups-group_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1111111 display the ADD NEW SCRIPT SCREEN
|
|
######################
|
|
|
|
if ($ADD==1111111)
|
|
{
|
|
if ($LOGmodify_scripts==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_scripts' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD NEW SCRIPT<form name=scriptForm action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Script: </td><td align=left>Auto-Generated $NWB#vicidial_scripts-script_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Script: </td><td align=left><input type=text name=script_id size=12 maxlength=10> (sem espaços ou pontos)$NWB#vicidial_scripts-script_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Script: </td><td align=left><input type=text name=script_name size=40 maxlength=50> (título do script)$NWB#vicidial_scripts-script_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do Script: </td><td align=left><input type=text name=script_comments size=50 maxlength=255> $NWB#vicidial_scripts-script_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_scripts-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Texto do Script: </td><td align=left>";
|
|
# BEGIN Insert Field
|
|
echo "<select id=\"selectedField\" name=\"selectedField\">";
|
|
echo "<option>vendor_lead_code</option>";
|
|
echo "<option>source_id</option>";
|
|
echo "<option>list_id</option>";
|
|
echo "<option>gmt_offset_now</option>";
|
|
echo "<option>called_since_last_reset</option>";
|
|
echo "<option>phone_code</option>";
|
|
echo "<option>phone_number</option>";
|
|
echo "<option>title</option>";
|
|
echo "<option>first_name</option>";
|
|
echo "<option>middle_initial</option>";
|
|
echo "<option>last_name</option>";
|
|
echo "<option>address1</option>";
|
|
echo "<option>address2</option>";
|
|
echo "<option>address3</option>";
|
|
echo "<option>city</option>";
|
|
echo "<option>state</option>";
|
|
echo "<option>province</option>";
|
|
echo "<option>postal_code</option>";
|
|
echo "<option>country_code</option>";
|
|
echo "<option>gender</option>";
|
|
echo "<option>date_of_birth</option>";
|
|
echo "<option>alt_phone</option>";
|
|
echo "<option>email</option>";
|
|
echo "<option>security_phrase</option>";
|
|
echo "<option>comments</option>";
|
|
echo "<option>lead_id</option>";
|
|
echo "<option>campaign</option>";
|
|
echo "<option>phone_login</option>";
|
|
echo "<option>group</option>";
|
|
echo "<option>channel_group</option>";
|
|
echo "<option>SQLdate</option>";
|
|
echo "<option>epoch</option>";
|
|
echo "<option>uniqueid</option>";
|
|
echo "<option>customer_zap_channel</option>";
|
|
echo "<option>server_ip</option>";
|
|
echo "<option>SIPexten</option>";
|
|
echo "<option>session_id</option>";
|
|
echo "<option>dialed_number</option>";
|
|
echo "<option>dialed_label</option>";
|
|
echo "<option>rank</option>";
|
|
echo "<option>owner</option>";
|
|
echo "<option>camp_script</option>";
|
|
echo "<option>in_script</option>";
|
|
echo "<option>script_width</option>";
|
|
echo "<option>script_height</option>";
|
|
echo "<option>recording_filename</option>";
|
|
echo "<option>recording_id</option>";
|
|
echo "<option>user_custom_one</option>";
|
|
echo "<option>user_custom_two</option>";
|
|
echo "<option>user_custom_three</option>";
|
|
echo "<option>user_custom_four</option>";
|
|
echo "<option>user_custom_five</option>";
|
|
echo "<option>preset_number_a</option>";
|
|
echo "<option>preset_number_b</option>";
|
|
echo "<option>preset_number_c</option>";
|
|
echo "<option>preset_number_d</option>";
|
|
echo "<option>preset_number_e</option>";
|
|
echo "<option>preset_number_f</option>";
|
|
echo "<option>preset_dtmf_a</option>";
|
|
echo "<option>preset_dtmf_b</option>";
|
|
echo "</select>";
|
|
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
|
|
# END Insert Field
|
|
echo "<TEXTAREA NAME=script_text ROWS=20 COLS=50 value=\"\"></TEXTAREA> $NWB#vicidial_scripts-script_text$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=11111111 display the ADD NEW FILTER SCREEN
|
|
######################
|
|
|
|
if ($ADD==11111111)
|
|
{
|
|
if ($LOGmodify_filters==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='vicidial_lead_filters' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR NOVO FILTRO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=21111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Filtro:</td><td align=left>Auto-Generated $NWB#vicidial_lead_filters-lead_filter_id$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Filtro:</td><td align=left><input type=text name=lead_filter_id size=12 maxlength=10> (sem espaços ou pontos)$NWB#vicidial_lead_filters-lead_filter_id$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Filtro:</td><td align=left><input type=text name=lead_filter_name size=30 maxlength=30> (descrição simples do filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do filtro: </td><td align=left><input type=text name=lead_filter_comments size=50 maxlength=255> $NWB#vicidial_lead_filters-lead_filter_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filtro SQL: </td><td align=left><TEXTAREA NAME=lead_filter_sql ROWS=20 COLS=50 value=\"\"></TEXTAREA> $NWB#vicidial_lead_filters-lead_filter_sql$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=111111111 display the ADD NEW CALL TIME SCREEN
|
|
######################
|
|
|
|
if ($ADD==111111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVO HORÁRIO DE CHAM.<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=211111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Horário de Cham.: </td><td align=left><input type=text name=call_time_id size=12 maxlength=10> (sem espaços ou pontos)$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Horário de Cham.: </td><td align=left><input type=text name=call_time_name size=30 maxlength=30> (descrição curta do horário de chamada)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do Horário de cham.: </td><td align=left><input type=text name=call_time_comments size=50 maxlength=255> $NWB#vicidial_call_times-call_time_comments$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>Opções de dia e hora irão aparecer assim que você crie definições de Horário de Chamada</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN
|
|
######################
|
|
|
|
if ($ADD==1111111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>NOVO HORÁRIO DE CHAM. POR ESTADO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do horário de chamada por estado: </td><td align=left><input type=text name=call_time_id size=12 maxlength=10> (sem espaços ou pontos)$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>State Call Time State: </td><td align=left><input type=text name=state_call_time_state size=4 maxlength=2> (sem espaços ou pontos)$NWB#vicidial_call_times-state_call_time_state$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do horário de chamada por estado: </td><td align=left><input type=text name=call_time_name size=30 maxlength=30> (descrição curta do horário de chamada)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do horário de chamada por estado: </td><td align=left><input type=text name=call_time_comments size=50 maxlength=255> $NWB#vicidial_call_times-call_time_comments$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>Opções de dia e hora irão aparecer assim que você crie definições de Horário de Chamada</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=131111111 display the ADD NEW SHIFT SCREEN
|
|
######################
|
|
|
|
if ($ADD==131111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD NEW SHIFT<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=231111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Turno:</td><td align=left><input type=text name=shift_id size=22 maxlength=20> (sem espaços ou pontos)$NWB#vicidial_shifts-shift_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Turno:</td><td align=left><input type=text name=shift_name size=50 maxlength=50> (descrição curta do turno)$NWB#vicidial_shifts-shift_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início do Turno:</td><td align=left><input type=text name=shift_start_time size=5 maxlength=4 id=shift_start_time>\n";
|
|
echo " Final do Turno:<input type=text name=shift_end_time size=5 maxlength=4 id=shift_end_time>\n";
|
|
echo "<input type=button name=shift_calc value=\"Calculate Duração do Turno\" onClick=\"shift_time();\"> $NWB#vicidial_shifts-shift_start_time$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Duração do Turno: </td><td align=left><input type=text name=shift_length id=shift_length size=6 maxlength=5> $NWB#vicidial_shifts-shift_length$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dias do Turno:<BR>$NWB#vicidial_shifts-shift_weekdays$NWE</td><td align=left>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"0\">Domingo<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"1\">Segunda<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"2\">Terça<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"3\">Quarta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"4\">Quinta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"5\">Sexta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"6\">Sábado<BR>\n";
|
|
echo "</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=11111111111 display the ADD NEW PHONE SCREEN
|
|
######################
|
|
|
|
if ($ADD==11111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT count(*) FROM vicidial_override_ids where id_table='phones' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$voi_count = "$row[0]";
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR RAMAL<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=21111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
if ($voi_count > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão do Ramal: </td><td align=left>Auto-Generated $NWB#phones-extension$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão do Ramal: </td><td align=left><input type=text name=extension size=20 maxlength=100 value=\"\">$NWB#phones-extension$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número no Plano de Discagem: </td><td align=left><input type=text name=dialplan_number size=15 maxlength=20> (somente dígitos)$NWB#phones-dialplan_number$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Caixa do Correio de Voz:</td><td align=left><input type=text name=voicemail_id size=10 maxlength=10> (somente dígitos)$NWB#phones-voicemail_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>CallerID de Saída: </td><td align=left><input type=text name=outbound_cid size=10 maxlength=20> (somente dígitos)$NWB#phones-outbound_cid$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Ramal: </td><td align=left><input type=text name=phone_ip size=20 maxlength=15> (optional)$NWB#phones-phone_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Computador: </td><td align=left><input type=text name=computer_ip size=20 maxlength=15> (optional)$NWB#phones-computer_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$row[5]</option>\n";
|
|
echo "</select>$NWB#phones-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Login: </td><td align=left><input type=text name=login size=10 maxlength=10>$NWB#phones-login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=10 maxlength=10>$NWB#phones-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option SELECTED>ATIVO</option><option>SUSPENDED</option><option>CLOSED</option><option>PENDING</option><option>ADMIN</option></select>$NWB#phones-status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conta Ativa: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option></select>$NWB#phones-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tipo de Ramal: </td><td align=left><input type=text name=phone_type size=20 maxlength=50>$NWB#phones-phone_type$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=fullname size=20 maxlength=50>$NWB#phones-fullname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Empresa: </td><td align=left><input type=text name=company size=10 maxlength=10>$NWB#phones-company$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Foto: </td><td align=left><input type=text name=picture size=20 maxlength=19>$NWB#phones-picture$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Protocolo do Cliente: </td><td align=left><select size=1 name=protocol><option SELECTED>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select>$NWB#phones-protocol$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>GMT Local: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option SELECTED>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option></select> (NÃO ajuste para o horário de verão)$NWB#phones-local_gmt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=12111111111 display the ADD NEW PHONE ALIAS SCREEN
|
|
######################
|
|
|
|
if ($ADD==12111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR ALIAS DE RAMAL<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=22111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Alias:</td><td align=left><input type=text name=alias_id size=20 maxlength=20 value=\"\">$NWB#phones-alias_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Alias: </td><td align=left><input type=text name=alias_name size=30 maxlength=50> $NWB#phones-alias_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Lista de Logins de Ramal:</td><td align=left><input type=text name=logins_list size=50 maxlength=255> (comma separated)$NWB#phones-logins_list$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=13111111111 display the ADD NEW GROUP ALIAS SCREEN
|
|
######################
|
|
|
|
if ($ADD==13111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR NOVO ALIAS DE GRUPO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=23111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Alias: </td><td align=left><input type=text name=group_alias_id size=30 maxlength=30 value=\"\">$NWB#phones-group_alias_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Alias: </td><td align=left><input type=text name=group_alias_name size=30 maxlength=50> $NWB#phones-group_alias_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número CallerID: </td><td align=left><input type=text name=caller_id_number size=20 maxlength=20> $NWB#phones-caller_id_number$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome CallerID: </td><td align=left><input type=text name=caller_id_name size=20 maxlength=20> $NWB#phones-caller_id_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option selected>N</option></select></td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=111111111111 display the ADD NEW SERVER SCREEN
|
|
######################
|
|
|
|
if ($ADD==111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR SERVIDOR<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=211111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Servidor: </td><td align=left><input type=text name=server_id size=10 maxlength=10>$NWB#servers-server_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição do Servidor: </td><td align=left><input type=text name=server_description size=30 maxlength=255>$NWB#servers-server_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Servidor: </td><td align=left><input type=text name=server_ip size=20 maxlength=15>$NWB#servers-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option></select>$NWB#servers-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Versão do Asterisk: </td><td align=left><input type=text name=asterisk_version size=20 maxlength=20>$NWB#servers-asterisk_version$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=131111111111 display the ADD NEW CONF TEMPLATE SCREEN
|
|
######################
|
|
|
|
if ($ADD==131111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR TEMPLATE CONF<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=231111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Template: </td><td align=left><input type=text name=template_id size=15 maxlength=15>$NWB#vicidial_conf_templates-template_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Template: </td><td align=left><input type=text name=template_name size=40 maxlength=50>$NWB#vicidial_conf_templates-template_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conteúdo do Template: </td><td align=left><TEXTAREA NAME=template_contents ROWS=10 COLS=70></TEXTAREA> $NWB#vicidial_conf_templates-template_contents$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=141111111111 display the ADD NEW CARRIER SCREEN
|
|
######################
|
|
|
|
if ($ADD==141111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>Incluir Operadora<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=241111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Operadora: </td><td align=left><input type=text name=carrier_id size=15 maxlength=15>$NWB#vicidial_server_carriers-carrier_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Operadora: </td><td align=left><input type=text name=carrier_name size=40 maxlength=50>$NWB#vicidial_server_carriers-carrier_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descripción Carrier: </td><td align=left><input type=text name=carrier_description size=70 maxlength=255>$NWB#vicidial_server_carriers-carrier_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>String de Registro: </td><td align=left><input type=text name=registration_string size=50 maxlength=255>$NWB#vicidial_server_carriers-registration_string$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Template: </td><td align=left><select size=1 name=template_id>\n";
|
|
$stmt="SELECT template_id,template_name from vicidial_conf_templates order by template_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$templates_to_print = mysql_num_rows($rslt);
|
|
$templates_list='<option SELECTED>--NONE--</option>';
|
|
$o=0;
|
|
while ($templates_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$templates_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$templates_list";
|
|
echo "</select>$NWB#vicidial_server_carriers-template_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dados da Conta: </td><td align=left><TEXTAREA NAME=account_entry ROWS=10 COLS=70></TEXTAREA> $NWB#vicidial_server_carriers-account_entry$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Protocolo: </td><td align=left><select size=1 name=protocol><option SELECTED>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select>$NWB#vicidial_server_carriers-protocol$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>String Global: </td><td align=left><input type=text name=globals_string size=50 maxlength=255>$NWB#vicidial_server_carriers-globals_string$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Plano de Discagem: </td><td align=left><TEXTAREA NAME=dialplan_entry ROWS=10 COLS=70></TEXTAREA> $NWB#vicidial_server_carriers-dialplan_entry$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
##### get server listing for dynamic pulldown
|
|
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rsltx);
|
|
$servers_list='';
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "$servers_list";
|
|
echo "</select>$NWB#vicidial_server_carriers-server_ip$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=151111111111 display the ADD NEW TTS ENTRY SCREEN
|
|
######################
|
|
|
|
if ($ADD==151111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD NEW TTS ENTRADA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=251111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>TTS ID: </td><td align=left><input type=text name=tts_id size=30 maxlength=50>$NWB#vicidial_tts_prompts-tts_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nombre TTS: </td><td align=left><input type=text name=tts_name size=50 maxlength=100>$NWB#vicidial_tts_prompts-tts_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>N</option><option>Y</option>$NWB#vicidial_tts_prompts-active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=161111111111 display the ADD NEW MUSIC ON HOLD ENTRY SCREEN
|
|
######################
|
|
|
|
if ($ADD==161111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD NEW MUSIC EN ESPERA DE ENTRADA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=261111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Música en espera de identificación: </td><td align=left><input type=text name=moh_id size=50 maxlength=100>$NWB#vicidial_music_on_hold-moh_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Música en espera Nombre: </td><td align=left><input type=text name=moh_name size=70 maxlength=255>$NWB#vicidial_music_on_hold-moh_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Orden aleatorio: </td><td align=left><select size=1 name=random><option>N</option><option>Y</option>$NWB#vicidial_music_on_hold-random$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=171111111111 display the ADD NEW VOICEMAIL BOX SCREEN
|
|
######################
|
|
|
|
if ($ADD==171111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD NEW contestador<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=271111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID de correo de voz: </td><td align=left><input type=text name=voicemail_id size=12 maxlength=10>$NWB#vicidial_voicemail-voicemail_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pass: </td><td align=left><input type=text name=pass size=10 maxlength=10>$NWB#vicidial_voicemail-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Name: </td><td align=left><input type=text name=fullname size=50 maxlength=100>$NWB#vicidial_voicemail-fullname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>N</option><option>Y</option>$NWB#vicidial_voicemail-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Email:</td><td align=left><input type=text name=email size=50 maxlength=100>$NWB#vicidial_voicemail-email$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN
|
|
######################
|
|
|
|
if ($ADD==1111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>INCLUIR CONFERÊNCIA<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=2111111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número da Conferência: </td><td align=left><input type=text name=conf_exten size=8 maxlength=7> (somente dígitos)$NWB#conferences-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$server_ip</option>\n";
|
|
echo "</select>$NWB#conferences-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN
|
|
######################
|
|
|
|
if ($ADD==11111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ADD A NEW VICIDIAL CONFERENCE<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=21111111111111>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número da Conferência: </td><td align=left><input type=text name=conf_exten size=8 maxlength=7> (somente dígitos)$NWB#conferences-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$server_ip</option>\n";
|
|
echo "</select>$NWB#conferences-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 2 series, validates form data and inserts the new record into the database
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
######################
|
|
# ADD=2 adds the new user to the system
|
|
######################
|
|
|
|
if ($ADD=="2")
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$user = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$user' where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_users where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>USUÁRIO NÃO ADICIONADO - já existe um usuário no sistema com esse número\n";}
|
|
else
|
|
{
|
|
if (ereg('AUTOGENERA',$user))
|
|
{
|
|
$user = 'AUTOGENERA';
|
|
}
|
|
if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (strlen($user) > 20) and (!ereg('AUTOGENERA',$user)) ) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO ADICIONADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>user id must be between 2 and 20 characters long\n";
|
|
echo "<br>nome completo e senha devem ter pelo menos 2 caracteres de comprimento\n";
|
|
echo "<br>usted debe seleccionar un grupo de usuarios\n";
|
|
}
|
|
else
|
|
{
|
|
if (ereg('AUTOGENERA',$user))
|
|
{
|
|
$new_user=0;
|
|
$auto_user_add_value=0;
|
|
while ($new_user < 2)
|
|
{
|
|
if ($new_user < 1)
|
|
{
|
|
$stmt = "SELECT auto_user_add_value FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ss_auav_ct = mysql_num_rows($rslt);
|
|
if ($ss_auav_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$auto_user_add_value = $row[0];
|
|
}
|
|
$new_user++;
|
|
}
|
|
$stmt = "SELECT count(*) FROM vicidial_users where user='$auto_user_add_value';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{
|
|
$new_user++;
|
|
}
|
|
else
|
|
{
|
|
echo "<!-- AG: $auto_user_add_value -->\n";
|
|
$auto_user_add_value = ($auto_user_add_value + 7);
|
|
}
|
|
}
|
|
$user = $auto_user_add_value;
|
|
echo "<br><B>user_id has been auto-generated: $user</B><br>\n";
|
|
|
|
$stmt="UPDATE system_settings SET auto_user_add_value='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
echo "<br><B>USUÁRIO ADICIONADO: $user</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='ADD', record_id='$user', event_code='ADMIN ADD USER', event_sql=\"$SQL_log\", event_notes='user: $user';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
$user_name = $user;
|
|
$user_password = $pass;
|
|
$last_name = $full_name;
|
|
$is_admin = 'off';
|
|
$roleid = 'H5';
|
|
$status = 'Ativo';
|
|
$groupid = '1';
|
|
if ($user_level >= 7) {$roleid = 'H3';}
|
|
if ($user_level >= 8) {$roleid = 'H4';}
|
|
if ($user_level >= 9) {$roleid = 'H2';}
|
|
if ($user_level >= 9) {$is_admin = 'on';}
|
|
$salt = substr($user_name, 0, 2);
|
|
$salt = '$1$' . $salt . '$';
|
|
$encrypted_password = crypt($user_password, $salt);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
|
|
######################################
|
|
##### BEGIN Add/Update user info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$found_count = $row[0];
|
|
|
|
### user exists in vtiger, update it
|
|
if ($found_count > 0)
|
|
{
|
|
$stmt="SELECT id from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$userid = $row[0];
|
|
|
|
$stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$usergroupcount = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
if ($usergroupcount < 1)
|
|
{
|
|
$stmt="SELECT user_group FROM vicidial_user_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$VD_groups_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
$VD_groups_list='';
|
|
while ($k < $VD_groups_ct)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VD_groups_list .= "'$row[0]',";
|
|
$k++;
|
|
}
|
|
$VD_groups_list = preg_replace("/.$/",'',$VD_groups_list);
|
|
|
|
$stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW USER RECORD IN VTIGER
|
|
$stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$userid = mysql_insert_id($linkV);
|
|
|
|
$stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "UPDATE vtiger_users_seq SET id='$userid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW USER RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update user info in Vtiger
|
|
######################################
|
|
}
|
|
### END vtiger integration
|
|
}
|
|
}
|
|
|
|
$ADD=3;
|
|
}
|
|
|
|
######################
|
|
# ADD=2A adds the copied new user to the system
|
|
######################
|
|
|
|
if ($ADD=="2A")
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$user = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$user' where id_table='vicidial_users' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_users where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>USUÁRIO NÃO ADICIONADO - já existe um usuário no sistema com esse número\n";}
|
|
else
|
|
{
|
|
if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 20) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO ADICIONADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>user id must be between 2 and 20 characters long\n";
|
|
echo "<br>nome completo e senha devem ter pelo menos 2 caracteres de comprimento\n";
|
|
echo "<!-- |$user|$pass|$full_name| -->\n";
|
|
}
|
|
else
|
|
{
|
|
if (ereg('AUTOGEN',$user))
|
|
{
|
|
$new_user=0;
|
|
$auto_user_add_value=0;
|
|
while ($new_user < 2)
|
|
{
|
|
if ($new_user < 1)
|
|
{
|
|
$stmt = "SELECT auto_user_add_value FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ss_auav_ct = mysql_num_rows($rslt);
|
|
if ($ss_auav_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$auto_user_add_value = $row[0];
|
|
}
|
|
$new_user++;
|
|
}
|
|
$stmt = "SELECT count(*) FROM vicidial_users where user='$auto_user_add_value';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{
|
|
$new_user++;
|
|
}
|
|
else
|
|
{
|
|
echo "<!-- AG: $auto_user_add_value -->\n";
|
|
$auto_user_add_value = ($auto_user_add_value + 7);
|
|
}
|
|
}
|
|
$user = $auto_user_add_value;
|
|
echo "<br><B>user_id has been auto-generated: $user</B><br>\n";
|
|
|
|
$stmt="UPDATE system_settings SET auto_user_add_value='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
$stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user=\"$source_user_id\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) SELECT \"$user\",campaign_id,campaign_rank,campaign_weight,\"0\" from vicidial_campaign_agents where user=\"$source_user_id\";";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='COPY', record_id='$user', event_code='ADMIN COPIAR USUÁRIO', event_sql=\"$SQL_log\", event_notes='user: $user';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
$user_name = $user;
|
|
$user_password = $pass;
|
|
$last_name = $full_name;
|
|
$is_admin = 'off';
|
|
$roleid = 'H5';
|
|
$status = 'Ativo';
|
|
$groupid = '1';
|
|
if ($user_level >= 7) {$roleid = 'H3';}
|
|
if ($user_level >= 8) {$roleid = 'H4';}
|
|
if ($user_level >= 9) {$roleid = 'H2';}
|
|
if ($user_level >= 9) {$is_admin = 'on';}
|
|
$salt = substr($user_name, 0, 2);
|
|
$salt = '$1$' . $salt . '$';
|
|
$encrypted_password = crypt($user_password, $salt);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
|
|
######################################
|
|
##### BEGIN Add/Update user info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$found_count = $row[0];
|
|
|
|
### user exists in vtiger, update it
|
|
if ($found_count > 0)
|
|
{
|
|
$stmt="SELECT id from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$userid = $row[0];
|
|
|
|
$stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$usergroupcount = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
if ($usergroupcount < 1)
|
|
{
|
|
$stmt="SELECT user_group FROM vicidial_user_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$VD_groups_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
$VD_groups_list='';
|
|
while ($k < $VD_groups_ct)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VD_groups_list .= "'$row[0]',";
|
|
$k++;
|
|
}
|
|
$VD_groups_list = preg_replace("/.$/",'',$VD_groups_list);
|
|
|
|
$stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW USER RECORD IN VTIGER
|
|
$stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$userid = mysql_insert_id($linkV);
|
|
|
|
$stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "UPDATE vtiger_users_seq SET id='$userid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW USER RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update user info in Vtiger
|
|
######################################
|
|
}
|
|
### END vtiger integration
|
|
|
|
echo "<br><B>USER COPIED: $user copied from $source_user_id</B>\n";
|
|
echo "<br><br>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=3&user=$user\">Click here to go to the user record</a>\n";
|
|
echo "<br><br>\n";
|
|
|
|
}
|
|
}
|
|
exit;
|
|
}
|
|
|
|
######################
|
|
# ADD=21 adds the new campaign to the system
|
|
######################
|
|
|
|
if ($ADD==21)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaign_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$campaign_id' where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CAMPANHA NÃO ADICIONADA - já existe uma campanha com esse ID no sistema\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CAMPANHA NOT ADDED - there is already an inbound group in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO ADICIONADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>ID da campanha deve ter entre 2 e 8 caracteres de comprimento\n";
|
|
echo "<br>o nome da campanha deve ter entre 6 e 40 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA ADICIONADA: $campaign_id</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,campaign_description,active,dial_status_a,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,campaign_script,get_call_launch,campaign_changedate,campaign_stats_refresh,list_order_mix,web_form_address_two,start_call_url,dispo_call_url) values('$campaign_id','$campaign_name','$campaign_description','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch','$SQLdate','Y','DISABLED','','','');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=31;
|
|
}
|
|
|
|
######################
|
|
# ADD=20 adds copied new campaign to the system
|
|
######################
|
|
|
|
if ($ADD==20)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaign_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$campaign_id' where id_table='vicidial_campaigns' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CAMPANHA NÃO ADICIONADA - já existe uma campanha com esse ID no sistema\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CAMPANHA NOT ADDED - there is already an inbound group in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 2) or (strlen($source_campaign_id) < 2) or (strlen($source_campaign_id) > 8) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO ADICIONADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>ID da campanha deve ter entre 2 e 8 caracteres de comprimento\n";
|
|
echo "<br>source ID da campanha deve ter entre 2 e 8 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA COPIED: $campaign_id copied from $source_campaign_id</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$source_campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable) SELECT status,status_name,selectable,\"$campaign_id\",human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$source_campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_hotkeys (status,hotkey,status_name,selectable,campaign_id) SELECT status,hotkey,status_name,selectable,\"$campaign_id\" from vicidial_campaign_hotkeys where campaign_id='$source_campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_lead_recycle (status,attempt_delay,attempt_maximum,active,campaign_id) SELECT status,attempt_delay,attempt_maximum,active,\"$campaign_id\" from vicidial_lead_recycle where campaign_id='$source_campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_pause_codes (pause_code,pause_code_name,billable,campaign_id) SELECT pause_code,pause_code_name,billable,\"$campaign_id\" from vicidial_pause_codes where campaign_id='$source_campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='COPY', record_id='$campaign_id', event_code='ADMIN COPY CAMPANHA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=31;
|
|
}
|
|
|
|
######################
|
|
# ADD=22 adds the new campaign status to the system
|
|
######################
|
|
|
|
if ($ADD==22)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE CAMPANHA NAO ADICIONADO - já existe um status/campanha no sistema com esse nome\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_statuses where status='$status_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE CAMPANHA NÃO ADICIONADO - já existe um status global do sistema com esse nome\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status_id) < 1) or (strlen($status_name) < 2) )
|
|
{
|
|
echo "<br>STATUS DE CAMPANHA NÃO ADICIONADO- Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 8 caracteres de comprimento\n";
|
|
echo "<br>nome do status deve ter entre 2 e 30 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE CAMPANHA ADICIONADO: $campaign_id - $status_id</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable) values('$status_id','$status_name','$selectable','$campaign_id','$human_answered','$category','$sale','$dnc','$customer_contact','$not_interested','$unworkable');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_STATUS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$SUB=22;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=23 adds the new campaign hotkey to the system
|
|
######################
|
|
|
|
if ($ADD==23)
|
|
{
|
|
$HKstatus_data = explode('-----',$HKstatus);
|
|
$status = $HKstatus_data[0];
|
|
$status_name = $HKstatus_data[1];
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CAMPANHA HOT KEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) )
|
|
{
|
|
echo "<br>TECLA DE ATALHO DA CAMPANHA NÃO ADICIONADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>hotkey must be a single character between 1 and 9 \n";
|
|
echo "<br>status deve ter entre 1 e 8 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>ATALHO DA CAMPANHA ADICIONADO: $campaign_id - $status - $hotkey</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_campaign_hotkeys values('$status','$hotkey','$status_name','$selectable','$campaign_id');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_HOTKEY', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$SUB=23;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=25 adds the new campaign lead recycle entry to the system
|
|
######################
|
|
|
|
if ($ADD==25)
|
|
{
|
|
$status = eregi_replace("-----.*",'',$status);
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>RECICLAGEM DE REGISTROS DA CAMPANHA NÃO ADICIONADO - já existe um registro de reciclagem nessa campanha para esse status\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) )
|
|
{
|
|
echo "<br>CAMPANHA LEAD RECYCLE NOT ADDED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
echo "<br>tempo de tentativa deve ter pelo menos 120 segundos e menos de 43200 segundos ou 12 horas\n";
|
|
echo "<br>quantidade máxima de tentativas deve ser entre 1 e 10\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>RECICLAGEM DE REGISTROS DA CAMPANHA ADICIONADO: $campaign_id - $status - $attempt_delay</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_lead_recycle(campaign_id,status,attempt_delay,attempt_maximum,active) values('$campaign_id','$status','$attempt_delay','$attempt_maximum','$active');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_RECYCLE', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$SUB=25;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=26 adds the new auto alt dial status to the campaign
|
|
######################
|
|
|
|
if ($ADD==26)
|
|
{
|
|
$status = eregi_replace("-----.*",'',$status);
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE DISCAGEM DE NÚM. ALT. NÃO INCLUÍDO - já existe uma entrada para esta campanha com este status\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>STATUS DE DISCAGEM DE NÚM. ALT. NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE DISCAGEM PARA NÚM. ALT. INCLUÍDO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
if (strlen($row[0])<2) {$row[0] = ' -';}
|
|
$auto_alt_dial_statuses = " $status$row[0]";
|
|
$stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_ALTDIAL', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA ALT DIAL', event_sql=\"$SQL_log\", event_notes='Status: $auto_alt_dial_statuses';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$SUB=26;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=27 adds the new campaign agent pause code entry to the system
|
|
######################
|
|
|
|
if ($ADD==27)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CÓDIGO DE PAUSA NAO INCLUÍDO - já existe uma entrada para esta campanha e este código de pausa\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) )
|
|
{
|
|
echo "<br>CÓDIGO DE PAUSA NAO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>pause code must be between 1 and 6 characters in length\n";
|
|
echo "<br>pause nome do código deve ter entre 2 e 30 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CÓDIGO DE PAUSA INCLUÍDO: $campaign_id - $pause_code - $pause_code_name</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_PAUSECODE', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA PAUSE CODE', event_sql=\"$SQL_log\", event_notes='Código de Pausa: $pause_code';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$SUB=27;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=28 adds new status to the campaign dial statuses
|
|
######################
|
|
|
|
if ($ADD==28)
|
|
{
|
|
$status = eregi_replace("-----.*",'',$status);
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE DISCAGEM NÃO INCLUÍDO - já existe uma entrada para esta campanha com este status\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>STATUS DE DISCAGEM NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE DISCAGEM INCLUÍDO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
if (strlen($row[0])<2) {$row[0] = ' -';}
|
|
$dial_statuses = " $status$row[0]";
|
|
$stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_DIALSTATUS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA DIAL STATUS', event_sql=\"$SQL_log\", event_notes='Status: $statuses';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
#$SUB=28;
|
|
$ADD=31;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=211 adds the new list to the system
|
|
######################
|
|
|
|
if ($ADD==211)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_lists' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$list_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$list_id' where id_table='vicidial_lists' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>LISTA NÃO ADICIONADA - já existe uma lista no sistema com essa ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or ($list_id < 100) or (strlen($list_id) > 8) )
|
|
{
|
|
echo "<br>LISTA NÃO ADICIONADA - por favor volte e verifique os dados digitados\n";
|
|
echo "<br>A ID da lista deve ter entre 2 e 8 caracteres de comprimento\n";
|
|
echo "<br>O Nome da Lista deve ter até 2 caracteres de comprimento\n";
|
|
echo "<br>ID da Lista must be greater than 100\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>LISTA ADICIONADA: $list_id</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='ADD', record_id='$list_id', event_code='ADMIN ADD LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=311;
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=2111 adds the new inbound group to the system
|
|
######################
|
|
|
|
if ($ADD==2111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$group_id' where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>GRUPO NÃO ADICIONADO - já existe um grupo com essa ID no sistema\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>GROUP NOT ADDED - there is already a campaign in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) )
|
|
{
|
|
echo "<br>GRUPO NÃO ADICIONADO - por favor volte e verifique os dados digitados\n";
|
|
echo "<br>A ID do grupo deve ter entre 2 e 20 caracteres de comprimento ' -+'.\n";
|
|
echo "<br>O nome e a cor do grupo devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,web_form_address_two,start_call_url,dispo_call_url) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch','','','');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br><B>GRUPO ADICIONADO: $group_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='ADD', record_id='$group_id', event_code='ADMIN ADD ENTRANTE GROUP', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=3111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2011 adds copied inbound group to the system
|
|
######################
|
|
|
|
if ($ADD==2011)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$group_id' where id_table='vicidial_inbound_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>GRUPO NÃO ADICIONADO - já existe um grupo com essa ID no sistema\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>GROUP NOT ADDED - there is already a campaign in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) )
|
|
{
|
|
echo "<br>GRUPO NÃO ADICIONADO - por favor volte e verifique os dados digitados\n";
|
|
echo "<br>A ID do grupo deve ter entre 2 e 20 caracteres de comprimento ' -+'.\n";
|
|
echo "<br>O nome e a cor do grupo devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id=\"$source_group_id\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>GRUPO ADICIONADO: $group_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='COPY', record_id='$group_id', event_code='ADMIN COPIAR GRUPO DE ENTRADA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=3111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2311 adds the new did to the system
|
|
######################
|
|
|
|
if ($ADD==2311)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>DDR NÃO INCLUÍDO - já existe um DDR com este ID no sistema\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>DDR NÃO INCLUÍDO - já existe um DDR com esta extensão no sistema\n";}
|
|
else
|
|
{
|
|
if ( (strlen($did_pattern) < 2) or (eregi(' ',$did_pattern)) or (eregi('-',$did_pattern)) or (eregi("\+",$did_pattern)) )
|
|
{
|
|
echo "<br>DDR NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description) values('$did_pattern','$did_description');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$did_id = $row[0];
|
|
|
|
echo "<br><B>DID ADDED: $did_pattern $did_description - $did_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='ADD', record_id='$did_id', event_code='ADMIN ADD DID', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=3311;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2411 adds copied did to the system
|
|
######################
|
|
|
|
if ($ADD==2411)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>DDR NÃO INCLUÍDO - já existe um DDR com esta extensão no sistema\n";}
|
|
else
|
|
{
|
|
if ( (strlen($source_did) < 1) or (strlen($did_pattern) < 1) or (eregi(' ',$source_did)) or (eregi(' ',$did_pattern)) or (eregi("\+",$source_did)) )
|
|
{
|
|
echo "<br>DDR NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id) SELECT \"$did_pattern\",\"$did_description\",did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id from vicidial_inbound_dids where did_id=\"$source_did\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$did_id = $row[0];
|
|
|
|
echo "<br><B>DID ADDED: $did_pattern - $did_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='COPY', record_id='$did_id', event_code='ADMIN COPIAR DDR', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=3311;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2511 adds the new call menu to the system
|
|
######################
|
|
|
|
if ($ADD==2511)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$menu_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$menu_id' where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_call_menu where menu_id='$menu_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>MENU NÃO INCLUÍDO - there is already a CALL MENU in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) )
|
|
{
|
|
echo "<br>MENU NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>O ID do menu deve ter entre 2 e 50 caracteres de comprimento e nao conter ' '.\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name) values('$menu_id','$menu_name');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MENU INCLUÍDO: $menu_id $menu_name</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='ADD', record_id='$menu_id', event_code='ADMIN ADD CALL MENU', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=3511;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2611 adds copied call menu to the system
|
|
######################
|
|
|
|
if ($ADD==2611)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$menu_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$menu_id' where id_table='vicidial_call_menu' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_call_menu where menu_id='$menu_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>MENU NÃO INCLUÍDO - there is already a CALL MENU in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) or (strlen($source_menu) < 2) or (eregi(' ',$source_menu)) )
|
|
{
|
|
echo "<br>MENU NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>O ID do menu deve ter entre 2 e 50 caracteres de comprimento e nao conter ' '.\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group from vicidial_call_menu where menu_id=\"$source_menu\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="INSERT INTO vicidial_call_menu_options (menu_id,option_value,option_description,option_route,option_route_value,option_route_value_context) SELECT \"$menu_id\",option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$source_menu';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br><B>MENU INCLUÍDO: $menu_id - $menu_name</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtA";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='COPY', record_id='$menu_id', event_code='ADMIN COPY MENU', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=3511;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=21111 adds new remote agents to the system
|
|
######################
|
|
|
|
if ($ADD==21111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>AGENTES REMOTOS NÃO ADICIONADOS - já existe um usuário remoto com esse ID no sistema\n";}
|
|
else
|
|
{
|
|
if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) )
|
|
{
|
|
echo "<br>AGENTES REMOTOS NÃO ADICIONADOS - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Início da ID e extensão externa devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>AGENTES REMOTOS ADICIONADOS: $user_start</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='REMOTEAGENTS', event_type='ADD', record_id='$user_start', event_code='ADMIN ADD REMOTE AGENT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=10000;
|
|
}
|
|
|
|
######################
|
|
# ADD=211111 adds new user group to the system
|
|
######################
|
|
|
|
if ($ADD==211111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_user_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$user_group = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$user_group' where id_table='vicidial_user_groups' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>GRUPO DE USUÁRIO NÃO ADICIONADO - já existe um grupo de usuários com este nome\n";}
|
|
else
|
|
{
|
|
if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) )
|
|
{
|
|
echo "<br>GRUPO DE USUÁRIOS NÃO ADICIONADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Nome e descrição do grupo devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_user_groups(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPANHAS-');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>GRUPO DE USUÁRIOS ADICIONADOS: $user_group</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERGROUPS', event_type='ADD', record_id='$user_group', event_code='ADMIN NOVO GRUPO DE USUÁRIO', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
}
|
|
}
|
|
}
|
|
$ADD=100000;
|
|
}
|
|
|
|
######################
|
|
# ADD=2111111 adds new script to the system
|
|
######################
|
|
|
|
if ($ADD==2111111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_scripts' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$script_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$script_id' where id_table='vicidial_scripts' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>SCRIPT NÃO ADICIONADO - já existe um script com este nome no sistema\n";}
|
|
else
|
|
{
|
|
if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) )
|
|
{
|
|
echo "<br>SCRIPT NÃO ADICIONADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Nome do script, descrição e texto devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB > 0) {echo "|$stmt|";}
|
|
echo "<br><B>SCRIPT ADICIONADO: $script_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SCRIPTS', event_type='ADD', record_id='$script_id', event_code='ADMIN INCLUIR SCRIPT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=1000000;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=21111111 adds new filter to the system
|
|
######################
|
|
|
|
if ($ADD==21111111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_lead_filters' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$lead_filter_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$lead_filter_id' where id_table='vicidial_lead_filters' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>FILTRO NÃO ADICIONADO - já existe um filtro com esse ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) )
|
|
{
|
|
echo "<br>FILTRO NAO ADICIONADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Filtro, nome e SQL devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if ($DB > 0) {echo "|$stmt|";}
|
|
echo "<br><B>FILTRO CRIADO: $lead_filter_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTROS', event_type='ADD', record_id='$lead_filter_id', event_code='ADMIN INCLUIR FILTRO', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=10000000;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=211111111 adds new call time definition to the system
|
|
######################
|
|
|
|
if ($ADD==211111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CONFIGURAÇÃO DE HORÁRIO DE CHAMADA NAO INCLUÍDO - já existe uma entrada de Horário para este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) )
|
|
{
|
|
echo "<br>CONFIGURAÇÃO DE HORÁRIO DE CHAMADA NAO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID e nome do Horário de Chamada deve ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB > 0) {echo "|$stmt|";}
|
|
|
|
echo "<br><B>HORÁRIO DE CHAMADA ADICIONADA: $call_time_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='ADD', record_id='$call_time_id', event_code='ADMIN ADD CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=311111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2111111111 adds new state call time definition to the system
|
|
######################
|
|
|
|
if ($ADD==2111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CONFIGURAÇÃO DO HORÁRIO DE CHAMADA POR ESTADO NAO ADICIONADA - já existe uma entrada de Horário para este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) )
|
|
{
|
|
echo "<br>CONFIGURAÇÃO DO HORÁRIO DE CHAMADA POR ESTADO NAO ADICIONADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID da configuração de chamada por estado, nome e estado devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB > 0) {echo "|$stmt|";}
|
|
|
|
echo "<br><B>HORÁRIO DE CHAMADA POR ESTADO ADICIONADA: $call_time_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES_STATE', event_type='ADD', record_id='$call_time_id', event_code='ADMIN ADD STATE CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=3111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=231111111 adds new shift definition to the system
|
|
######################
|
|
|
|
if ($ADD==231111111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='vicidial_shifts' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$shift_id = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$shift_id' where id_table='vicidial_shifts' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_shifts where shift_id='$shift_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CONFIGURAÇÃO DE TURNO NÃO INCLUÍDA - já existe uma entrada de turno com este ID\n";}
|
|
else
|
|
{
|
|
$shift_length_test = eregi_replace(':','',$shift_length);
|
|
if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) )
|
|
{
|
|
echo "<br>CONFIGURAÇÃO DE TURNO NÃO INCLUÍDA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID e Nome do turno devem ter pelo menos 2 caracteres\n";
|
|
echo "<br>Horário de início deve ter 4 caracteres e ser um horário válido\n";
|
|
echo "<br>Duração do Turno deve ter 5 caracteres e 24 horas ou menos\n";
|
|
}
|
|
else
|
|
{
|
|
$p=0;
|
|
$shift_weekdays_ct = count($shift_weekdays);
|
|
while ($p <= $shift_weekdays_ct)
|
|
{
|
|
$SHIFT_weekdays .= "$shift_weekdays[$p]";
|
|
$p++;
|
|
}
|
|
$stmt="INSERT INTO vicidial_shifts SET shift_id='$shift_id',shift_name='$shift_name',shift_start_time='$shift_start_time',shift_length='$shift_length',shift_weekdays='$SHIFT_weekdays';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB > 0) {echo "|$stmt|";}
|
|
|
|
echo "<br><B>TURNO INCLUÍDO:$shift_id</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SHIFTS', event_type='ADD', record_id='$shift_id', event_code='ADMIN ADD SHIFT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=331111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=21111111111 adds new phone to the system
|
|
######################
|
|
|
|
if ($ADD==21111111111)
|
|
{
|
|
##### BEGIN ID override optional section, if enabled it increments user by 1 ignoring entered value #####
|
|
$stmt = "SELECT value FROM vicidial_override_ids where id_table='phones' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$voi_ct = mysql_num_rows($rslt);
|
|
if ($voi_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$extension = ($row[0] + 1);
|
|
|
|
$stmt="UPDATE vicidial_override_ids SET value='$extension' where id_table='phones' and active='1';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
##### END ID override optional section #####
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>RAMAL NÃO ADICIONADO - já existe um Ramal no sistema com essa extensão\/servidor\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from phones where login='$login';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>PHONE NOT ADDED - já existe um Ramal no sistema com este login\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from phones_alias where alias_id='$login';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>PHONE NOT ADDED - já existe um alias de Ramal no sistema com esse login\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>PHONE NOT ADDED - there is already a ID de correo de voz in the system with this ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1))
|
|
{
|
|
echo "<BR>RAMAL NÃO ADICIONADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<BR>Los siguientes campos deben disponer de datos: extension, server_ip, dialplan_number, voicemail_id, login, pass\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br>RAMAL ADICIONADO\n";
|
|
|
|
$stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='ADD', record_id='$extension', event_code='ADMIN ADD PHONE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$ADD=31111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=22111111111 adds new phone alias to the system
|
|
######################
|
|
|
|
if ($ADD==22111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>ALIAS DE RAMAL NÃO INCLUIDO - já existe um Alias de Ramal no sistema com esse ID\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from phones where login='$alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>ALIAS DE RAMAL NÃO INCLUIDO - ja existe um Login no sistema com esse ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) )
|
|
{echo "<br>ALIAS DE RAMAL NÃO INCLUIDO - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>ALIAS DE RAMAL INCLUÍDO\n";
|
|
|
|
$stmt="INSERT INTO phones_alias (alias_id,alias_name,logins_list) values('$alias_id','$alias_name','$logins_list');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONEALIASES', event_type='ADD', record_id='$alias_id', event_code='ADMIN ADD ALIAS DE RAMAL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=32111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=23111111111 adds new group alias to the system
|
|
######################
|
|
|
|
if ($ADD==23111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>ALIAS DE GRUPO NÃO INCLUÍDO - já existe um Alias de Ramal no sistema com esse ID\n";}
|
|
else
|
|
{
|
|
if (preg_match("/AGENT_PHONE|CUSTOMER|CAMPANHA|NONE/",$group_alias_id))
|
|
{echo "<br>ALIAS DE GRUPO NÃO INCLUÍDO - não pode ser usado palavras reservadas neste alias de grupo\n";}
|
|
else
|
|
{
|
|
if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) )
|
|
{echo "<br>ALIAS DE GRUPO NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>ALIAS DE GRUPO INCLUÍDO\n";
|
|
|
|
$stmt="INSERT INTO groups_alias (group_alias_id,group_alias_name,caller_id_number,caller_id_name,active) values('$group_alias_id','$group_alias_name','$caller_id_number','$caller_id_name','$active');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='GROUPALIASES', event_type='ADD', record_id='$group_alias_id', event_code='ADMIN ADD GROUP ALIAS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=33111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=211111111111 adds new server to the system
|
|
######################
|
|
|
|
if ($ADD==211111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from servers where server_id='$server_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>SERVIDOR NÃO ADICIONADO - já existe um servidor no sistema com essa ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>SERVIDOR NÃO ADICIONADO - por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>SERVIDOR ADICIONADO\n";
|
|
|
|
$stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version) values('$server_id','$server_description','$server_ip','$active','$asterisk_version');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y',rebuild_music_on_hold='Y',sounds_update='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERS', event_type='ADD', record_id='$server_id', event_code='ADMIN ADD SERVER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=311111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=221111111111 adds the new vicidial server trunk record to the system
|
|
######################
|
|
|
|
if ($ADD==221111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$MAXvicidial_trunks = $rowx[0];
|
|
|
|
$stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks);
|
|
|
|
if ($SUMvicidial_trunks > $MAXvicidial_trunks)
|
|
{
|
|
echo "<br>REGISTRO DE TRUNK VICIDIAL NÃO ADICIONADO - o número de trunk vicidial é muito alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>REGISTRO DE TRUNK VICIDIAL NÃO ADICIONADO - já existe um registro de trunk para esta campanha\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) )
|
|
{
|
|
echo "<br>REGISTRO DE TRUNK VICIDIAL NÃO ADICIONADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>campanha deve ter entre 3 e 8 caracteres de comprimento\n";
|
|
echo "<br>delay do IP do servidor deve ser pelo menos 7 caracteres\n";
|
|
echo "<br>trunks devem ter um digito entre 0 e 9999\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>REGISTRO DE TRUNK VICIDIAL INCLUÍDO: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERS_TRUNK', event_type='ADD', record_id='$server_ip', event_code='ADMIN ADD SERVIDOR TRUNK', event_sql=\"$SQL_log\", event_notes='campaign: $campaign_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=311111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=231111111111 adds new conf template to the system
|
|
######################
|
|
|
|
if ($ADD==231111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_conf_templates where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>TEMPLATE DE CONF NÃO INCLUÍDA - já existe um template no sistema com esse ID\n";}
|
|
else
|
|
{
|
|
if (strlen($template_id) < 2)
|
|
{echo "<br>TEMPLATE DE CONF NÃO INCLUÍDA - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>TEMPLATE DE CONF INCLUÍDO\n";
|
|
|
|
$stmt="INSERT INTO vicidial_conf_templates (template_id,template_name,template_contents) values('$template_id','$template_name','$template_contents');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CONFTEMPLATES', event_type='ADD', record_id='$template_id', event_code='ADMIN ADD CONF TEMPLATE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=331111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=241111111111 adds new server carrier to the system
|
|
######################
|
|
|
|
if ($ADD==241111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_server_carriers where carrier_id='$carrier_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>OPERADORA NÃO INCLUÍDA - já existe uma operadora no sistema com este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($carrier_id) < 2) or (strlen($server_ip) < 7) )
|
|
{echo "<br>OPERADORA NÃO INCLUÍDA - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>CARRIER ADDED\n";
|
|
|
|
$stmt="INSERT INTO vicidial_server_carriers (carrier_id,carrier_name,registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,server_ip,active,carrier_description) values('$carrier_id','$carrier_name','$registration_string','$template_id','$account_entry','$protocol','$globals_string','$dialplan_entry','$server_ip','N','$carrier_description');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CARRIERS', event_type='ADD', record_id='$carrier_id', event_code='ADMIN ADD CARRIER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=341111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=251111111111 adds new tts entry to the system
|
|
######################
|
|
|
|
if ($ADD==251111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_tts_prompts where tts_id='$tts_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>TTS entrada no AGREGADOS - ya hay una entrada de TTS en el sistema con este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 3) )
|
|
{echo "<br>TTS entrada no AGREGADOS - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>TTS añadido la entrada de\n";
|
|
|
|
$stmt="INSERT INTO vicidial_tts_prompts SET tts_id='$tts_id',tts_name='$tts_name',active='$active';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TTS', event_type='ADD', record_id='$tts_id', event_code='ADMIN ADD TTS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=351111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=261111111111 adds new music on hold entry to the system
|
|
######################
|
|
|
|
if ($ADD==261111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_music_on_hold where moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>MÚSICA EN ESPERA entrada no AGREGADOS - ya hay una entrada en el Ministerio de Salud en el sistema con este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($moh_id) < 2) or (strlen($moh_name) < 3) or ($moh_id=='sounds') or ($moh_id=='agi-bin') or ($moh_id=='astdb') or ($moh_id=='keys') )
|
|
{echo "<br>MÚSICA EN ESPERA entrada no AGREGADOS - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>MÚSICA EN ESPERA añadido la entrada de\n";
|
|
|
|
$stmt="INSERT INTO vicidial_music_on_hold SET moh_id='$moh_id',moh_name='$moh_name',random='$random';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='MOH', event_type='ADD', record_id='$moh_id', event_code='ADMIN ADD MOH', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=361111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=271111111111 adds new voicemail box to the system
|
|
######################
|
|
|
|
if ($ADD==271111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>Contestador NO AGREGADOS - ya existe un buzón de voz en el sistema con este ID\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from phones where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>Contestador NO AGREGADOS - ya hay un teléfono en el sistema de correo de voz con este ID\n";}
|
|
else
|
|
{
|
|
if ( (strlen($voicemail_id) < 2) or (strlen($pass) < 2) or (strlen($fullname) < 3) )
|
|
{echo "<br>Contestador NO AGREGADOS - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>Contestador AGREGADOS\n";
|
|
|
|
$stmt="INSERT INTO vicidial_voicemail SET voicemail_id='$voicemail_id',pass='$pass',email='$email',fullname='$fullname',active='$active';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="SELECT active_voicemail_server from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$active_voicemail_server = $row[0];
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='ADD', record_id='$voicemail_id', event_code='ADMIN ADD VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=371111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=2111111111111 adds new conference to the system
|
|
######################
|
|
|
|
if ($ADD==2111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CONFERÊNCIA NÃO ADICIONADA - já existe no sistema uma conferência com este ID e servidor\n";}
|
|
else
|
|
{
|
|
if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>CONFERÊNCIA NÃO ADICIONADA - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>CONFERÊNCIA ADICIONADA\n";
|
|
|
|
$stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=3111111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=21111111111111 adds new vicidial conference to the system
|
|
######################
|
|
|
|
if ($ADD==21111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";}
|
|
else
|
|
{
|
|
if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>VICIDIAL CONFERÊNCIA NÃO ADICIONADA - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>VICIDIAL CONFERÊNCIA ADICIONADA\n";
|
|
|
|
$stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=31111111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=221111111111111 adds the new system status to the system
|
|
######################
|
|
|
|
if ($ADD==221111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaign_statuses where status='$status_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE SISTEMA NÃO INCLUÍDO - there is already a campaign-status in the system with this name: $row[0]\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_statuses where status='$status_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>STATUS DE SISTEMA NÃO INCLUÍDO - there is already a global-status in the system with this name\n";}
|
|
else
|
|
{
|
|
if ( (strlen($status_id) < 1) or (strlen($status_name) < 2) )
|
|
{
|
|
echo "<br>STATUS DE SISTEMA NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 8 caracteres de comprimento\n";
|
|
echo "<br>nome do status deve ter entre 2 e 30 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE SISTEMA INCLUÍDO: $status_name - $status_id</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable) values('$status_id','$status_name','$selectable','$human_answered','$category','$sale','$dnc','$customer_contact','$not_interested','$unworkable');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSTATUS', event_type='ADD', record_id='$status_id', event_code='ADMIN ADD SYSTEM STATUS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
$ADD=321111111111111;
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=231111111111111 adds the new status category to the system
|
|
######################
|
|
|
|
if ($ADD==231111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_status_categories where vsc_id='$vsc_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CATEGORIA NÃO INCLUIDA - já existe uma categoria de status com esse ID no sistema: $row[0]\n";}
|
|
else
|
|
{
|
|
if ( (strlen($vsc_id) < 2) or (strlen($vsc_id) > 20) or (strlen($vsc_name) < 2) )
|
|
{
|
|
echo "<br>CATEGORIA NÃO INCLUIDA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID deve ter entre 2 e 20 caracteres \n";
|
|
echo "<br>o nome deve ter entre 2 e 50 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS CATEGORIA ADDED: $vsc_id - $vsc_name</B>\n";
|
|
|
|
$stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) )
|
|
{
|
|
$tovdad_display = 'N';
|
|
echo "<br><B>ERRO: Já existem 4 Categorias de Status no Relatório TimeOnVDAD</B>\n";
|
|
}
|
|
|
|
$stmt="INSERT INTO vicidial_status_categories (vsc_id,vsc_name,vsc_description,tovdad_display,sale_category,dead_lead_category) values('$vsc_id','$vsc_name','$vsc_description','$tovdad_display','$sale_category','$dead_lead_category');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='STATUSCATEGORIES', event_type='ADD', record_id='$vsc_id', event_code='ADMIN ADD STATUS CATEGORIA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=331111111111111;
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=241111111111111 adds the new qc status code to the system
|
|
######################
|
|
|
|
if ($ADD==241111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_qc_codes where code='$code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{echo "<br>CÓDIGO DE STATUS CQ NÃO INCLUÍDO- já existe um código de status cq no sistema com esse nome: $row[0]\n";}
|
|
else
|
|
{
|
|
if ( (strlen($code) < 1) or (strlen($code_name) < 2) )
|
|
{
|
|
echo "<br>CÓDIGO DE STATUS CQ NÃO INCLUÍDO- Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>código deve ter entre 1 e 8 caracteres de comprimento\n";
|
|
echo "<br>nome do código deve ter entre 2 e 30 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CÓDIGO DE STATUS CQ ADICIONADO:$code_name - $code</B>\n";
|
|
|
|
$stmt="INSERT INTO vicidial_qc_codes (code,code_name) values('$code','$code_name');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCSTATUS', event_type='ADD', record_id='$code', event_code='ADMIN ADD QC STATUS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
$ADD=341111111111111;
|
|
}
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 4 series, record modifications submitted and DB is modified, then on to 3 series forms below
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
|
|
######################
|
|
# ADD=4A submit user modifications to the system - ADMIN
|
|
######################
|
|
|
|
if ($ADD=="4A")
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Senha e Nome Completo devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
$closer_default_blended = '0';
|
|
$delete_filters = '0';
|
|
$load_leads = '0';
|
|
}
|
|
echo "<br><B>USUÁRIO ALTERADO - ADMIN: $user</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five' where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmt_grp_values|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
$user_name = $user;
|
|
$user_password = $pass;
|
|
$last_name = $full_name;
|
|
$is_admin = 'off';
|
|
$roleid = 'H5';
|
|
$status = 'Ativo';
|
|
$groupid = '1';
|
|
if ($user_level >= 7) {$roleid = 'H3';}
|
|
if ($user_level >= 8) {$roleid = 'H4';}
|
|
if ($user_level >= 9) {$roleid = 'H2';}
|
|
if ($user_level >= 9) {$is_admin = 'on';}
|
|
$salt = substr($user_name, 0, 2);
|
|
$salt = '$1$' . $salt . '$';
|
|
$encrypted_password = crypt($user_password, $salt);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
|
|
######################################
|
|
##### BEGIN Add/Update user info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$found_count = $row[0];
|
|
|
|
### user exists in vtiger, update it
|
|
if ($found_count > 0)
|
|
{
|
|
$stmt="SELECT id from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$userid = $row[0];
|
|
|
|
$stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$usergroupcount = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
if ($usergroupcount < 1)
|
|
{
|
|
$stmt="SELECT user_group FROM vicidial_user_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$VD_groups_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
$VD_groups_list='';
|
|
while ($k < $VD_groups_ct)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VD_groups_list .= "'$row[0]',";
|
|
$k++;
|
|
}
|
|
$VD_groups_list = preg_replace("/.$/",'',$VD_groups_list);
|
|
|
|
$stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW USER RECORD IN VTIGER
|
|
$stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$userid = mysql_insert_id($linkV);
|
|
|
|
$stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "UPDATE vtiger_users_seq SET id='$userid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW USER RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update user info in Vtiger
|
|
######################################
|
|
}
|
|
### END vtiger integration
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3; # go to user modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4B submit user modifications to the system - ADMIN
|
|
######################
|
|
|
|
if ($ADD=="4B")
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Senha e Nome Completo devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
$closer_default_blended = '0';
|
|
$delete_filters = '0';
|
|
$load_leads = '0';
|
|
}
|
|
echo "<br><B>USUÁRIO ALTERADO - ADMIN: $user</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five' where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
$user_name = $user;
|
|
$user_password = $pass;
|
|
$last_name = $full_name;
|
|
$is_admin = 'off';
|
|
$roleid = 'H5';
|
|
$status = 'Ativo';
|
|
$groupid = '1';
|
|
if ($user_level >= 7) {$roleid = 'H3';}
|
|
if ($user_level >= 8) {$roleid = 'H4';}
|
|
if ($user_level >= 9) {$roleid = 'H2';}
|
|
if ($user_level >= 9) {$is_admin = 'on';}
|
|
$salt = substr($user_name, 0, 2);
|
|
$salt = '$1$' . $salt . '$';
|
|
$encrypted_password = crypt($user_password, $salt);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
|
|
######################################
|
|
##### BEGIN Add/Update user info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$found_count = $row[0];
|
|
|
|
### user exists in vtiger, update it
|
|
if ($found_count > 0)
|
|
{
|
|
$stmt="SELECT id from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$userid = $row[0];
|
|
|
|
$stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$usergroupcount = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
if ($usergroupcount < 1)
|
|
{
|
|
$stmt="SELECT user_group FROM vicidial_user_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$VD_groups_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
$VD_groups_list='';
|
|
while ($k < $VD_groups_ct)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VD_groups_list .= "'$row[0]',";
|
|
$k++;
|
|
}
|
|
$VD_groups_list = preg_replace("/.$/",'',$VD_groups_list);
|
|
|
|
$stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW USER RECORD IN VTIGER
|
|
$stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$userid = mysql_insert_id($linkV);
|
|
|
|
$stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "UPDATE vtiger_users_seq SET id='$userid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW USER RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update user info in Vtiger
|
|
######################################
|
|
}
|
|
### END vtiger integration
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3; # go to user modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4 submit user modifications to the system
|
|
######################
|
|
|
|
if ($ADD==4)
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Senha e Nome Completo devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>USUÁRIO ALTERADO: $user</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',active='$active',email='$email',user_code='$user_code',territory='$territory' where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
$user_name = $user;
|
|
$user_password = $pass;
|
|
$last_name = $full_name;
|
|
$is_admin = 'off';
|
|
$roleid = 'H5';
|
|
$status = 'Ativo';
|
|
$groupid = '1';
|
|
if ($user_level >= 7) {$roleid = 'H3';}
|
|
if ($user_level >= 8) {$roleid = 'H4';}
|
|
if ($user_level >= 9) {$roleid = 'H2';}
|
|
if ($user_level >= 9) {$is_admin = 'on';}
|
|
$salt = substr($user_name, 0, 2);
|
|
$salt = '$1$' . $salt . '$';
|
|
$encrypted_password = crypt($user_password, $salt);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
|
|
######################################
|
|
##### BEGIN Add/Update user info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$found_count = $row[0];
|
|
|
|
### user exists in vtiger, update it
|
|
if ($found_count > 0)
|
|
{
|
|
$stmt="SELECT id from vtiger_users where user_name='$user_name';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$userid = $row[0];
|
|
|
|
$stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$usergroupcount = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
if ($usergroupcount < 1)
|
|
{
|
|
$stmt="SELECT user_group FROM vicidial_user_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$VD_groups_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
$VD_groups_list='';
|
|
while ($k < $VD_groups_ct)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VD_groups_list .= "'$row[0]',";
|
|
$k++;
|
|
}
|
|
$VD_groups_list = preg_replace("/.$/",'',$VD_groups_list);
|
|
|
|
$stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW USER RECORD IN VTIGER
|
|
$stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$userid = mysql_insert_id($linkV);
|
|
|
|
$stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';";
|
|
if ($DB) {echo "|$stmtB|\n";}
|
|
$rslt=mysql_query($stmtB, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtC|\n";}
|
|
$rslt=mysql_query($stmtC, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtD = "UPDATE vtiger_users_seq SET id='$userid';";
|
|
if ($DB) {echo "|$stmtD|\n";}
|
|
$rslt=mysql_query($stmtD, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW USER RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update user info in Vtiger
|
|
######################################
|
|
}
|
|
### END vtiger integration
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3; # go to user modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=41 submit campaign modifications to the system - DETAIL
|
|
######################
|
|
|
|
if ($ADD==41)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
$adaptive_dl_diff_target = '0';
|
|
$adaptive_dropped_percentage = '99';
|
|
$adaptive_intensity = '0';
|
|
$adaptive_latest_server_time = '2359';
|
|
$adaptive_maximum_level = '1.0';
|
|
$agent_extended_alt_dial = 'N';
|
|
$alt_number_dialing = 'N';
|
|
$am_message_exten = '8320';
|
|
$amd_send_to_vmx = 'N';
|
|
$auto_alt_dial = 'N';
|
|
$auto_dial_level = '1.0';
|
|
$available_only_ratio_tally = 'Y';
|
|
$campaign_allow_inbound = 'Y';
|
|
$campaign_vdad_exten = '8368';
|
|
$concurrent_transfers = 'AUTO';
|
|
$dial_method = 'RATIO';
|
|
$dial_status = '';
|
|
$dial_timeout = '60';
|
|
$drop_action = 'HANGUP';
|
|
$drop_call_seconds = '5';
|
|
$drop_inbound_group = '---NONE---';
|
|
$force_reset_hopper = 'N';
|
|
$hopper_level = '5';
|
|
$lead_filter_id = 'NONE';
|
|
$lead_order = 'DOWN';
|
|
$list_order_mix = 'DISABLED';
|
|
$no_hopper_leads_logins = 'Y';
|
|
$queue_priority = '50';
|
|
$safe_harbor_exten = '8300';
|
|
$survey_camp_record_dir = '/home/survey';
|
|
$survey_dtmf_digits = '1238';
|
|
$survey_first_audio_file = 'US_pol_survey_hello';
|
|
$survey_method = 'AGENT_XFER';
|
|
$survey_ni_audio_file = '';
|
|
$survey_ni_digit = '8';
|
|
$survey_ni_status = 'NI';
|
|
$survey_no_response_action = 'OPTIN';
|
|
$survey_opt_in_audio_file = 'US_pol_survey_transfer';
|
|
$survey_response_digit_map = '1-DEMOCRAT|2-REPUBLICAN|3-INDEPENDANT|8-OPTOUT|X-NO RESPONSE|';
|
|
$survey_xfer_exten = '8300';
|
|
$voicemail_ext = '';
|
|
$cpd_amd_action = 'DISABLED';
|
|
$drop_lockout_time = '0';
|
|
}
|
|
if (ereg('list_activation',$stage))
|
|
{
|
|
$p=0;
|
|
echo "<BR>LISTAS ATIVAS ALTERADAS";
|
|
$list_active_change_ct = count($list_active_change);
|
|
while ($p < $list_active_change_ct)
|
|
{
|
|
$LIST_ACTIVATE .= "'$list_active_change[$p]',";
|
|
$p++;
|
|
}
|
|
|
|
$stmt = "UPDATE vicidial_lists SET active='Y' where list_id IN($LIST_ACTIVATE'') and campaign_id='$campaign_id';";
|
|
$stmtB = "UPDATE vicidial_lists SET active='N' where list_id NOT IN($LIST_ACTIVATE'') and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rslt=mysql_query($stmtB, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtB|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA ACTIVE LISTAS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if ($DB > 0) {echo "|$stmt|\n|$stmtB|\n";}
|
|
}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO ALTERADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>o nome da campanha precisa ter no mínimo 6 caracteres de comprimento\n";
|
|
echo "<br>|$campaign_name|$active|\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA ALTERADA: $campaign_id</B>\n";
|
|
|
|
if ( ($dial_method != 'MANUAL') and ($dial_method != 'ENTRANTE_MAN') )
|
|
{
|
|
$no_hopper_dialing='N';
|
|
$agent_dial_owner_only='NONE';
|
|
}
|
|
if ($no_hopper_dialing == 'Y')
|
|
{
|
|
$auto_alt_dial='NONE';
|
|
$list_order_mix='DISABLED';
|
|
}
|
|
if ($dial_method == 'MANUAL')
|
|
{
|
|
$auto_dial_level='0';
|
|
$adlSQL = "auto_dial_level='0',";
|
|
$campaign_allow_inbound='N';
|
|
}
|
|
else
|
|
{
|
|
if ($dial_level_override > 0)
|
|
{
|
|
$adlSQL = "auto_dial_level='$auto_dial_level',";
|
|
}
|
|
else
|
|
{
|
|
if ($dial_method == 'RATIO')
|
|
{
|
|
if ($auto_dial_level < 1) {$auto_dial_level = "1.0";}
|
|
$adlSQL = "auto_dial_level='$auto_dial_level',";
|
|
}
|
|
else
|
|
{
|
|
$adlSQL = "";
|
|
if ($auto_dial_level < 1)
|
|
{
|
|
$auto_dial_level = "1.0";
|
|
$adlSQL = "auto_dial_level='$auto_dial_level',";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
|
|
{$hopper_level='100';}
|
|
|
|
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
if ($reset_hopper == 'Y')
|
|
{
|
|
echo "<br>REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA\n";
|
|
echo "<br> - Aguarde 1 minuto antes de discar o próximo número\n";
|
|
$stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','QUEUE','DONE');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPANHA LEAD HOPPER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=42 modify/delete campaign status in the system
|
|
######################
|
|
|
|
if ($ADD==42)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>STATUS DA CAMPANHA NÃO ALTERADO - Por favor retorne e verifique os dados digitados\n";
|
|
echo "<br>o id da campanha precisa ter no mínimo 2 caracteres de comprimento\n";
|
|
echo "<br>o status da campanha precisa ter no mínimo 1 caracter de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
if (ereg('delete',$stage))
|
|
{
|
|
echo "<br><B>STATUS CUSTOMIZADO DA CAMPANHA REMOVIDO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_STATUS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if (ereg('modify',$stage))
|
|
{
|
|
echo "<br><B>STATUS CUSTOMIZADO ALTERADO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_campaign_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category',sale='$sale',dnc='$dnc',customer_contact='$customer_contact',not_interested='$not_interested',unworkable='$unworkable' where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_STATUS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=22;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=43 delete campaign hotkey in the system
|
|
######################
|
|
|
|
if ($ADD==43)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) )
|
|
{
|
|
echo "<br>ATALHO DE TECLADO DA CAMPANHA NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>o id da campanha precisa ter no mínimo 2 caracteres de comprimento\n";
|
|
echo "<br>o status da campanha precisa ter no mínimo 1 caracter de comprimento\n";
|
|
echo "<br>the campaign hotkey needs to be at least 1 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>ATALHO DE TECLADO DA CAMPANHA REMOVIDO: $campaign_id - $status - $hotkey</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_HOTKEY', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=23;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=44 submit campaign modifications to the system - Basic View
|
|
######################
|
|
|
|
if ($ADD==44)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
$adaptive_dl_diff_target = '0';
|
|
$adaptive_dropped_percentage = '99';
|
|
$adaptive_intensity = '0';
|
|
$adaptive_latest_server_time = '2359';
|
|
$adaptive_maximum_level = '1.0';
|
|
$agent_extended_alt_dial = 'N';
|
|
$alt_number_dialing = 'N';
|
|
$am_message_exten = '8320';
|
|
$amd_send_to_vmx = 'N';
|
|
$auto_alt_dial = 'N';
|
|
$auto_dial_level = '1.0';
|
|
$available_only_ratio_tally = 'Y';
|
|
$campaign_allow_inbound = 'Y';
|
|
$campaign_vdad_exten = '8368';
|
|
$concurrent_transfers = 'AUTO';
|
|
$dial_method = 'RATIO';
|
|
$dial_status = '';
|
|
$dial_timeout = '60';
|
|
$drop_action = 'HANGUP';
|
|
$drop_call_seconds = '5';
|
|
$drop_inbound_group = '---NONE---';
|
|
$force_reset_hopper = 'N';
|
|
$hopper_level = '5';
|
|
$lead_filter_id = 'NONE';
|
|
$lead_order = 'DOWN';
|
|
$list_order_mix = 'DISABLED';
|
|
$no_hopper_leads_logins = 'Y';
|
|
$queue_priority = '50';
|
|
$safe_harbor_exten = '8300';
|
|
$voicemail_ext = '';
|
|
}
|
|
if (ereg('list_activation',$stage))
|
|
{
|
|
$p=0;
|
|
echo "<BR>LISTAS ATIVAS ALTERADAS";
|
|
$list_active_change_ct = count($list_active_change);
|
|
while ($p < $list_active_change_ct)
|
|
{
|
|
$LIST_ACTIVATE .= "'$list_active_change[$p]',";
|
|
$p++;
|
|
}
|
|
|
|
$stmt = "UPDATE vicidial_lists SET active='Y' where list_id IN($LIST_ACTIVATE'') and campaign_id='$campaign_id';";
|
|
$stmtB = "UPDATE vicidial_lists SET active='N' where list_id NOT IN($LIST_ACTIVATE'') and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rslt=mysql_query($stmtB, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtB|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA ACTIVE LISTAS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if ($DB > 0) {echo "|$stmt|\n|$stmtB|\n";}
|
|
}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO ALTERADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>o nome da campanha precisa ter no mínimo 6 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA ALTERADA: $campaign_id</B>\n";
|
|
|
|
if ($dial_method == 'RATIO')
|
|
{
|
|
if ($auto_dial_level < 1) {$auto_dial_level = "1.0";}
|
|
$adlSQL = "auto_dial_level='$auto_dial_level',";
|
|
}
|
|
else
|
|
{
|
|
if ($dial_method == 'MANUAL')
|
|
{
|
|
$auto_dial_level='0';
|
|
$adlSQL = "auto_dial_level='0',";
|
|
}
|
|
else
|
|
{
|
|
$adlSQL = "";
|
|
if ($auto_dial_level < 1)
|
|
{
|
|
$auto_dial_level = "1.0";
|
|
$adlSQL = "auto_dial_level='$auto_dial_level',";
|
|
}
|
|
}
|
|
}
|
|
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
|
|
{$hopper_level='100';}
|
|
|
|
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',hopper_level='$hopper_level', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_changedate='$SQLdate',list_order_mix='$list_order_mix' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if ($reset_hopper == 'Y')
|
|
{
|
|
echo "<br>REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA\n";
|
|
echo "<br> - Aguarde 1 minuto antes de discar o próximo número\n";
|
|
$stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','QUEUE','DONE');;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPANHA LEAD HOPPER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=34; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=45 modify campaign lead recycle in the system
|
|
######################
|
|
|
|
if ($ADD==45)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) )
|
|
{
|
|
echo "<br>CAMPANHA LEAD RECYCLE NOT MODIFIED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
echo "<br>tempo de tentativa deve ter pelo menos 120 segundos e menos de 43200 segundos ou 12 horas\n";
|
|
echo "<br>quantidade máxima de tentativas deve ser entre 1 e 10\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA LEAD MODIFIED: $campaign_id - $status - $attempt_delay</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_RECYCLE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=25;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=47 modify agent pause code in the system
|
|
######################
|
|
|
|
if ($ADD==47)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) )
|
|
{
|
|
echo "<br>CÓDIGO DE PAUSA NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>pause_code must be between 1 and 6 characters in length\n";
|
|
echo "<br>pause_nome do código deve ter entre 2 e 30 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>AGENTE PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_PAUSECODE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA PAUSE CODE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=27;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=48 modify campaign QC settings in the system
|
|
######################
|
|
if ($ADD==48)
|
|
{
|
|
if ( ($LOGmodify_campaigns==1) and ($SSqc_features_active) )
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>CONFIG. DE CQ NÃO ALTERADAS - Por favor, volte e verifique os dados digitados\n";
|
|
}
|
|
else
|
|
{
|
|
$p=0;
|
|
$qc_statuses_ct = count($qc_statuses);
|
|
while ($p < $qc_statuses_ct)
|
|
{
|
|
$QC_statuses .= " $qc_statuses[$p]";
|
|
$p++;
|
|
}
|
|
$p=0;
|
|
$qc_lists_ct = count($qc_lists);
|
|
while ($p < $qc_lists_ct)
|
|
{
|
|
$QC_lists .= " $qc_lists[$p]";
|
|
$p++;
|
|
}
|
|
|
|
if (strlen($QC_statuses)>0) {$QC_statuses .= " -";}
|
|
if (strlen($QC_lists)>0) {$QC_lists .= " -";}
|
|
|
|
echo "<br><B>CONFIG. DE CQ ALTERADAS: $campaign_id</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_shift_id='$qc_shift_id' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_QC', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA QC SETTINGS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=28;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=40A modify campaign survey settings in the system
|
|
######################
|
|
|
|
if ($ADD=='40A')
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>CONFIGURAÇÃO DE PESQUISA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIGURAÇÃO DE PESQUISA ALTERADA: $campaign_id</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_campaigns SET survey_first_audio_file='$survey_first_audio_file',survey_dtmf_digits='$survey_dtmf_digits',survey_ni_digit='$survey_ni_digit',survey_opt_in_audio_file='$survey_opt_in_audio_file',survey_ni_audio_file='$survey_ni_audio_file',survey_method='$survey_method',survey_no_response_action='$survey_no_response_action',survey_ni_status='$survey_ni_status',survey_response_digit_map='$survey_response_digit_map',survey_xfer_exten='$survey_xfer_exten',survey_camp_record_dir='$survey_camp_record_dir',voicemail_ext='$voicemail_ext',survey_third_digit='$survey_third_digit',survey_fourth_digit='$survey_fourth_digit',survey_third_audio_file='$survey_third_audio_file',survey_fourth_audio_file='$survey_fourth_audio_file',survey_third_status='$survey_third_status',survey_fourth_status='$survey_fourth_status',survey_third_exten='$survey_third_exten',survey_fourth_exten='$survey_fourth_exten' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_SURVEY', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA SURVEY', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB='20A';
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=49 modify campaign list mix in the system
|
|
######################
|
|
|
|
if ($ADD==49)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
##### MODIFY a list mix container entry #####
|
|
if ($stage=='MODIFY')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$Flist_mix_container = "list_mix_container_$vcl_id";
|
|
$Fmix_method = "mix_method_$vcl_id";
|
|
$Fstatus = "status_$vcl_id";
|
|
$Fvcl_name = "vcl_name_$vcl_id";
|
|
|
|
if (isset($_GET[$Flist_mix_container])) {$list_mix_container=$_GET[$Flist_mix_container];}
|
|
elseif (isset($_POST[$Flist_mix_container])) {$list_mix_container=$_POST[$Flist_mix_container];}
|
|
if (isset($_GET[$Fmix_method])) {$mix_method=$_GET[$Fmix_method];}
|
|
elseif (isset($_POST[$Fmix_method])) {$mix_method=$_POST[$Fmix_method];}
|
|
if (isset($_GET[$Fstatus])) {$status=$_GET[$Fstatus];}
|
|
elseif (isset($_POST[$Fstatus])) {$status=$_POST[$Fstatus];}
|
|
if (isset($_GET[$Fvcl_name])) {$vcl_name=$_GET[$Fvcl_name];}
|
|
elseif (isset($_POST[$Fvcl_name])) {$vcl_name=$_POST[$Fvcl_name];}
|
|
$list_mix_container = preg_replace("/:$/","",$list_mix_container);
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_mix_container) < 6) or (strlen($vcl_name) < 2) )
|
|
{
|
|
echo "<br>MESCLAGEM DE LISTA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
echo "<br>vcl_name name must be between 2 and 30 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns_list_mix SET vcl_name='$vcl_name',mix_method='$mix_method',list_mix_container='$list_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA LIST MIX', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM DE LISTA ALTERADA: $campaign_id - $vcl_id - $vcl_name</B>\n";
|
|
}
|
|
}
|
|
|
|
##### ADD a list mix container entry #####
|
|
if ($stage=='ADD')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) )
|
|
{
|
|
echo "<br>MESCLAGEM DE LISTA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
echo "<br>list_id must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$OLDlist_mix_container = $row[0];
|
|
$NEWlist_mix_container = "$OLDlist_mix_container:$list_id|10|0| -|";
|
|
|
|
$stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA LIST MIX', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM DE LISTA ALTERADA: $campaign_id - $vcl_id - $list_id</B>\n";
|
|
}
|
|
}
|
|
|
|
##### REMOVE a list mix container entry #####
|
|
if ($stage=='REMOVE')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) )
|
|
{
|
|
echo "<br>MESCLAGEM DE LISTA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
echo "<br>list_id must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$MIXentries = $MT;
|
|
$MIXentries = explode(":", $row[0]);
|
|
$Ms_to_print = (count($MIXentries) - 0);
|
|
|
|
if ($Ms_to_print < 2)
|
|
{
|
|
echo "<br><B>MESCLAGEM DE LISTA NÃO ALTERADA: Você não pode apagar a última entrada de lista para uma mesclagem de lista</B>\n";
|
|
}
|
|
else
|
|
{
|
|
$MIXdetailsPCT = explode('|', $MIXentries[$mix_container_item]);
|
|
$MIXpercentPCT = $MIXdetailsPCT[2];
|
|
|
|
$q=0;
|
|
while ($Ms_to_print > $q)
|
|
{
|
|
if ( ($mix_container_item > $q) or ($mix_container_item < $q) )
|
|
{
|
|
if ( ($q==0) and ($mix_container_item > 0) )
|
|
{
|
|
$MIXdetailsONE = explode('|', $MIXentries[$q]);
|
|
$MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT);
|
|
$NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:";
|
|
}
|
|
else
|
|
{
|
|
if ( ($q==1) and ($mix_container_item < 1) )
|
|
{
|
|
$MIXdetailsONE = explode('|', $MIXentries[$q]);
|
|
$MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT);
|
|
$NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:";
|
|
}
|
|
else
|
|
{
|
|
$NEWlist_mix_container .= "$MIXentries[$q]:";
|
|
}
|
|
}
|
|
}
|
|
$q++;
|
|
}
|
|
$NEWlist_mix_container = preg_replace("/.$/",'',$NEWlist_mix_container);
|
|
|
|
$stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA LIST MIX', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM DE LISTA ALTERADA: $campaign_id - $vcl_id - $list_id - $mix_container_item</B>\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
##### ADD a NEW list mix #####
|
|
if ($stage=='NEWMIX')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($vcl_name) < 2) )
|
|
{
|
|
echo "<br>MESCLAGEM NÃO INCLUÍDA- Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
echo "<br>vcl_name must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_campaigns_list_mix where vcl_id='$vcl_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] > 0)
|
|
{
|
|
echo "<br>MESCLAGEM NÃO INCLUÍDA- Já existe uma mesclagem de lista com esse ID no sistema\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="INSERT INTO vicidial_campaigns_list_mix SET list_mix_container='$list_id|1|100| $status -|',campaign_id='$campaign_id',vcl_id='$vcl_id',vcl_name='$vcl_name',mix_method='$mix_method',status='INACTIVE';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='ADD', record_id='$campaign_id', event_code='ADMIN NOVA CAMPANHA LIST MIX', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM INCLUÍDA:$campaign_id - $vcl_id - $vcl_name</B>\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
##### DELETE an existing list mix #####
|
|
if ($stage=='DELMIX')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) )
|
|
{
|
|
echo "<br>MESCLAGEM NÃO REMOVIDA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_campaigns_list_mix where vcl_id='$vcl_id' and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA LIST MIX', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM REMOVIDA:$campaign_id - $vcl_id - $vcl_name</B>\n";
|
|
}
|
|
}
|
|
|
|
##### Set list mix entry to active #####
|
|
if ($stage=='SETACTIVE')
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) )
|
|
{
|
|
echo "<br>MESCLAGEM NÃO ATIVADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>vcl_id must be between 1 and 20 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns_list_mix SET status='INACTIVE' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="UPDATE vicidial_campaigns_list_mix SET status='ACTIVE' where vcl_id='$vcl_id' and campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPANHA LIST MIX ACTIVE', event_sql=\"$SQL_log\", event_notes='Mesclagem de Lista: $vcl_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MESCLAGEM ATIVADA: $campaign_id - $vcl_id - $vcl_name</B>\n";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=29;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=411 submit list modifications to the system
|
|
######################
|
|
|
|
if ($ADD==411)
|
|
{
|
|
if ($LOGmodify_lists==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) )
|
|
{
|
|
echo "<br>LISTA NÃO ALTERADA - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>o nome da lista precisa ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
if (strlen($reset_time) < 4) {$reset_time='';}
|
|
|
|
echo "<br><B>LISTA ALTERADA: $list_id</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number' where list_id='$list_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if ($reset_list == 'Y')
|
|
{
|
|
echo "<br>ZERANDO O STATUS DE CHAMADA DA LISTA\n";
|
|
$stmtB="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';";
|
|
$rslt=mysql_query($stmtB, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='RESET', record_id='$list_id', event_code='ADMIN RESET LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if ($campaign_id != "$old_campaign_id")
|
|
{
|
|
echo "<br>REMOVENDO REGISTROS HOPPERS DO HOPPER DA CAMPANHA ANTIGA ($old_campaign_id)\n";
|
|
$stmtC="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';";
|
|
$rslt=mysql_query($stmtC, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311; # go to list modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4111 modify in-group info in the system
|
|
######################
|
|
|
|
if ($ADD==4111)
|
|
{
|
|
if ($LOGmodify_ingroups==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) )
|
|
{
|
|
echo "<br>GRUPO NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>a cor e o nome do grupo deve ter pelo menos 2 carcteres\n";
|
|
}
|
|
else
|
|
{
|
|
$p=0;
|
|
$qc_statuses_ct = count($qc_statuses);
|
|
while ($p < $qc_statuses_ct)
|
|
{
|
|
$QC_statuses .= " $qc_statuses[$p]";
|
|
$p++;
|
|
}
|
|
$p=0;
|
|
$qc_lists_ct = count($qc_lists);
|
|
while ($p < $qc_lists_ct)
|
|
{
|
|
$QC_lists .= " $qc_lists[$p]";
|
|
$p++;
|
|
}
|
|
|
|
if (strlen($QC_statuses)>0) {$QC_statuses .= " -";}
|
|
if (strlen($QC_lists)>0) {$QC_lists .= " -";}
|
|
|
|
|
|
if ($no_agent_action == "INGROUP")
|
|
{
|
|
if (isset($_GET["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_GET["IGgroup_id_no_agent_action"];}
|
|
elseif (isset($_POST["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_POST["IGgroup_id_no_agent_action"];}
|
|
if (isset($_GET["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_GET["IGhandle_method_no_agent_action"];}
|
|
elseif (isset($_POST["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_POST["IGhandle_method_no_agent_action"];}
|
|
if (isset($_GET["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_GET["IGsearch_method_no_agent_action"];}
|
|
elseif (isset($_POST["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_POST["IGsearch_method_no_agent_action"];}
|
|
if (isset($_GET["IGlist_id_no_agent_action"])) {$IGlist_id=$_GET["IGlist_id_no_agent_action"];}
|
|
elseif (isset($_POST["IGlist_id_no_agent_action"])) {$IGlist_id=$_POST["IGlist_id_no_agent_action"];}
|
|
if (isset($_GET["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_GET["IGcampaign_id_no_agent_action"];}
|
|
elseif (isset($_POST["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_POST["IGcampaign_id_no_agent_action"];}
|
|
if (isset($_GET["IGphone_code_no_agent_action"])) {$IGphone_code=$_GET["IGphone_code_no_agent_action"];}
|
|
elseif (isset($_POST["IGphone_code_no_agent_action"])) {$IGphone_code=$_POST["IGphone_code_no_agent_action"];}
|
|
|
|
$no_agent_action_value = "$IGgroup_id,$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code";
|
|
}
|
|
|
|
if ($no_agent_action == "EXTENSION")
|
|
{
|
|
if (isset($_GET["EXextension_no_agent_action"])) {$EXextension=$_GET["EXextension_no_agent_action"];}
|
|
elseif (isset($_POST["EXextension_no_agent_action"])) {$EXextension=$_POST["EXextension_no_agent_action"];}
|
|
if (isset($_GET["EXcontext_no_agent_action"])) {$EXcontext=$_GET["EXcontext_no_agent_action"];}
|
|
elseif (isset($_POST["EXcontext_no_agent_action"])) {$EXcontext=$_POST["EXcontext_no_agent_action"];}
|
|
|
|
$no_agent_action_value = "$EXextension,$EXcontext";
|
|
}
|
|
|
|
$no_agent_action_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$no_agent_action_value);
|
|
|
|
echo "<br><B>GRUPO ALTERADO: $group_id</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number' where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='MODIFY', record_id='$group_id', event_code='ADMIN MODIFY INGROUP', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3111; # go to in-group modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4311 modify did info in the system
|
|
######################
|
|
|
|
if ($ADD==4311)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) )
|
|
{
|
|
echo "<br>DDR NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>did_extension must be at least 1 character in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>DDR ALTERADO: $did_pattern</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id' where did_id='$did_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='MODIFY', record_id='$did_id', event_code='ADMIN MODIFY DID', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3311; # go to did modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4511 modify call menu info in the system
|
|
######################
|
|
|
|
if ($ADD==4511)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($menu_id) < 1)
|
|
{
|
|
echo "<br>MENU NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>menu_id must be at least 1 character in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>MENU ALTERADO: $menu_id</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry',tracking_group='$tracking_group' where menu_id='$menu_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$h=0;
|
|
$option_value_list='|';
|
|
while ($h <= 18)
|
|
{
|
|
$option_value=''; $option_description=''; $option_route=''; $option_route_value=''; $option_route_value_context='';
|
|
|
|
if (isset($_GET["option_value_$h"])) {$option_value=$_GET["option_value_$h"];}
|
|
elseif (isset($_POST["option_value_$h"])) {$option_value=$_POST["option_value_$h"];}
|
|
if (isset($_GET["option_description_$h"])) {$option_description=$_GET["option_description_$h"];}
|
|
elseif (isset($_POST["option_description_$h"])) {$option_description=$_POST["option_description_$h"];}
|
|
if (isset($_GET["option_route_$h"])) {$option_route=$_GET["option_route_$h"];}
|
|
elseif (isset($_POST["option_route_$h"])) {$option_route=$_POST["option_route_$h"];}
|
|
if (isset($_GET["option_route_value_$h"])) {$option_route_value=$_GET["option_route_value_$h"];}
|
|
elseif (isset($_POST["option_route_value_$h"])) {$option_route_value=$_POST["option_route_value_$h"];}
|
|
if (isset($_GET["option_route_value_context_$h"])) {$option_route_value_context=$_GET["option_route_value_context_$h"];}
|
|
elseif (isset($_POST["option_route_value_context_$h"])) {$option_route_value_context=$_POST["option_route_value_context_$h"];}
|
|
|
|
if ($option_route == "INGROUP")
|
|
{
|
|
if (isset($_GET["IGhandle_method_$h"])) {$IGhandle_method=$_GET["IGhandle_method_$h"];}
|
|
elseif (isset($_POST["IGhandle_method_$h"])) {$IGhandle_method=$_POST["IGhandle_method_$h"];}
|
|
if (isset($_GET["IGsearch_method_$h"])) {$IGsearch_method=$_GET["IGsearch_method_$h"];}
|
|
elseif (isset($_POST["IGsearch_method_$h"])) {$IGsearch_method=$_POST["IGsearch_method_$h"];}
|
|
if (isset($_GET["IGlist_id_$h"])) {$IGlist_id=$_GET["IGlist_id_$h"];}
|
|
elseif (isset($_POST["IGlist_id_$h"])) {$IGlist_id=$_POST["IGlist_id_$h"];}
|
|
if (isset($_GET["IGcampaign_id_$h"])) {$IGcampaign_id=$_GET["IGcampaign_id_$h"];}
|
|
elseif (isset($_POST["IGcampaign_id_$h"])) {$IGcampaign_id=$_POST["IGcampaign_id_$h"];}
|
|
if (isset($_GET["IGphone_code_$h"])) {$IGphone_code=$_GET["IGphone_code_$h"];}
|
|
elseif (isset($_POST["IGphone_code_$h"])) {$IGphone_code=$_POST["IGphone_code_$h"];}
|
|
|
|
$option_route_value_context = "$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code";
|
|
}
|
|
|
|
if ($non_latin < 1)
|
|
{
|
|
$option_value = ereg_replace("[^-\_0-9A-Z]","",$option_value);
|
|
$option_description = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$option_description);
|
|
$option_route = ereg_replace("[^-_0-9a-zA-Z]","",$option_route);
|
|
$option_route_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value);
|
|
$option_route_value_context = ereg_replace("[^,-_0-9a-zA-Z]","",$option_route_value_context);
|
|
}
|
|
|
|
if (strlen($option_route) > 0)
|
|
{
|
|
$stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$option_exists = $row[0];
|
|
|
|
if ($option_exists > 0)
|
|
{
|
|
$stmtA="UPDATE vicidial_call_menu_options SET option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context' where menu_id='$menu_id' and option_value='$option_value';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$stmtAX .= "$stmtA|";
|
|
}
|
|
else
|
|
{
|
|
$stmtA="INSERT INTO vicidial_call_menu_options SET menu_id='$menu_id',option_value='$option_value',option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$stmtAX .= "$stmtA|";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$option_exists_db = $row[0];
|
|
|
|
if ($option_exists_db > 0)
|
|
{
|
|
$stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$stmtAX .= "$stmtA|";
|
|
}
|
|
}
|
|
$option_value_list .= "$option_value|";
|
|
$h++;
|
|
}
|
|
## delete existing database records that were not in the submit
|
|
while ($h <= 18)
|
|
{
|
|
if (!preg_match("/\|$dtmf[$h]\|/i",$option_value_list))
|
|
{
|
|
$stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$option_exists_db = $row[0];
|
|
|
|
if ($option_exists_db > 0)
|
|
{
|
|
$stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$stmtAX .= "$stmtA|";
|
|
}
|
|
}
|
|
$h++;
|
|
}
|
|
|
|
$stmtA="UPDATE servers set rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$stmtAX .= "$stmtA|";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtAX";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='MODIFY', record_id='$menu_id', event_code='ADMIN MODIFY CALL MENU', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3511; # go to call menu modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=41111 modify remote agents info in the system
|
|
######################
|
|
|
|
if ($ADD==41111)
|
|
{
|
|
if ($LOGmodify_remoteagents==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) )
|
|
{
|
|
echo "<br>AGENTES REMOTOS NÃO ALTERADOS - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>O início do ID e a Extensão Externa deve ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>AGENTES REMOTOS ALTERADOS</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='REMOTEAGENTS', event_type='MODIFY', record_id='$remote_agent_id', event_code='ADMIN MODIFY REMOTE AGENT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=31111; # go to remote agents modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=411111 modify user group info in the system
|
|
######################
|
|
|
|
if ($ADD==411111)
|
|
{
|
|
if ($LOGmodify_usergroups==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) )
|
|
{
|
|
echo "<br>GRUPO DE USUÁRIOS NÃO MODIFICADO - Por favor volte e verifique os dados digitados\n";
|
|
echo "<br>Nome e descrição do grupo devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$p=0;
|
|
$GROUP_shifts=' ';
|
|
$group_shifts_ct = count($group_shifts);
|
|
while ($p <= $group_shifts_ct)
|
|
{
|
|
$group_shifts[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$group_shifts[$p]);
|
|
$GROUP_shifts .= "$group_shifts[$p] ";
|
|
$p++;
|
|
}
|
|
$p=0;
|
|
$VGROUP_vgroups=' ';
|
|
$vgroup_vgroups_ct = count($agent_status_viewable_groups);
|
|
while ($p <= $vgroup_vgroups_ct)
|
|
{
|
|
$agent_status_viewable_groups[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$agent_status_viewable_groups[$p]);
|
|
$VGROUP_vgroups .= "$agent_status_viewable_groups[$p] ";
|
|
$p++;
|
|
}
|
|
|
|
$stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name',allowed_campaigns='$campaigns_value',qc_allowed_campaigns='$qc_campaigns_value',qc_allowed_inbound_groups='$qc_groups_value',group_shifts='$GROUP_shifts',forced_timeclock_login='$forced_timeclock_login',shift_enforcement='$shift_enforcement',agent_status_viewable_groups='$VGROUP_vgroups',agent_status_view_time='$agent_status_view_time' where user_group='$OLDuser_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>GRUPO DE USUÁRIOS ALTERADO</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERGROUPS', event_type='MODIFY', record_id='$user_group', event_code='ADMIN MODIFY GRUPO DE USUÁRIOS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
###############################################################
|
|
##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$ss_conf_ct = mysql_num_rows($rslt);
|
|
if ($ss_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration = $row[0];
|
|
$vtiger_server_ip = $row[1];
|
|
$vtiger_dbname = $row[2];
|
|
$vtiger_login = $row[3];
|
|
$vtiger_pass = $row[4];
|
|
$vtiger_url = $row[5];
|
|
}
|
|
##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP #####
|
|
#############################################################
|
|
|
|
if ($enable_vtiger_integration > 0)
|
|
{
|
|
### connect to your vtiger database
|
|
$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
|
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());}
|
|
echo 'Connected successfully';
|
|
mysql_select_db("$vtiger_dbname", $linkV);
|
|
|
|
######################################
|
|
##### BEGIN Add/Update group info in Vtiger
|
|
$stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_found_count = $row[0];
|
|
|
|
### group exists in vtiger, update it
|
|
if ($group_found_count > 0)
|
|
{
|
|
$stmt="SELECT groupid from vtiger_groups where groupname='$user_group';";
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if ($DB) {echo "$stmt\n";}
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = $row[0];
|
|
|
|
$stmtA = "UPDATE vtiger_groups SET description='$group_name' where groupid='$groupid';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
}
|
|
|
|
### user doesn't exist in vtiger, insert it
|
|
else
|
|
{
|
|
#### BEGIN CREATE NEW GROUP RECORD IN VTIGER
|
|
# Get next available id from vtiger_users_seq to use as groupid
|
|
$stmt="SELECT id from vtiger_users_seq;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
$row=mysql_fetch_row($rslt);
|
|
$groupid = ($row[0] + 1);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
# Increase next available groupid with 1 so next record gets proper id
|
|
$stmt="UPDATE vtiger_users_seq SET id = '$groupid';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
$stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';";
|
|
if ($DB) {echo "|$stmtA|\n";}
|
|
$rslt=mysql_query($stmtA, $linkV);
|
|
if (!$rslt) {die('Could not execute: ' . mysql_error());}
|
|
|
|
#### END CREATE NEW GROUP RECORD IN VTIGER
|
|
}
|
|
##### END Add/Update group info in Vtiger
|
|
######################################
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111; # go to user group modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4111111 modify script in the system
|
|
######################
|
|
|
|
if ($ADD==4111111)
|
|
{
|
|
if ($LOGmodify_scripts==1)
|
|
{
|
|
echo "<!-- $script_text -->\n";
|
|
echo "<!--" . mysql_real_escape_string($script_text) . " -->\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) )
|
|
{
|
|
echo "<br>SCRIPT NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Nome do script, descrição e texto devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>SCRIPT ALTERADO</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SCRIPTS', event_type='MODIFY', record_id='$script_id', event_code='ADMIN MODIFY SCRIPT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3111111; # go to script modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=41111111 modify filter in the system
|
|
######################
|
|
|
|
if ($ADD==41111111)
|
|
{
|
|
if ($LOGmodify_filters==1)
|
|
{
|
|
echo "<!-- $lead_filter_sql -->\n";
|
|
echo "<!--" . mysql_real_escape_string($lead_filter_sql) . " -->\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) )
|
|
{
|
|
echo "<br>FILTRO NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Filtro, nome e SQL devem ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "' where lead_filter_id='$lead_filter_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>FILTRO ALTERADO</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTROS', event_type='MODIFY', record_id='$lead_filter_id', event_code='ADMIN MODIFY FILTER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=31111111; # go to filter modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=411111111 modify call time in the system
|
|
######################
|
|
|
|
if ($ADD==411111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAMADA NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID e nome do Horário de Chamada deve ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$ct_default_start = preg_replace('/\D/', '', $ct_default_start);
|
|
$ct_default_stop = preg_replace('/\D/', '', $ct_default_stop);
|
|
$ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start);
|
|
$ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop);
|
|
$ct_monday_start = preg_replace('/\D/', '', $ct_monday_start);
|
|
$ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop);
|
|
$ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start);
|
|
$ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop);
|
|
$ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start);
|
|
$ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop);
|
|
$ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start);
|
|
$ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop);
|
|
$ct_friday_start = preg_replace('/\D/', '', $ct_friday_start);
|
|
$ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop);
|
|
$ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start);
|
|
$ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop);
|
|
$stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>HORÁRIO DE CHAMADA ALTERADO</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111111; # go to call time modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4111111111 modify state call time in the system
|
|
######################
|
|
|
|
if ($ADD==4111111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAMADA POR ESTADO NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID da configuração de chamada por estado, nome e estado devem ter no mínimo 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$ct_default_start = preg_replace('/\D/', '', $ct_default_start);
|
|
$ct_default_stop = preg_replace('/\D/', '', $ct_default_stop);
|
|
$ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start);
|
|
$ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop);
|
|
$ct_monday_start = preg_replace('/\D/', '', $ct_monday_start);
|
|
$ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop);
|
|
$ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start);
|
|
$ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop);
|
|
$ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start);
|
|
$ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop);
|
|
$ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start);
|
|
$ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop);
|
|
$ct_friday_start = preg_replace('/\D/', '', $ct_friday_start);
|
|
$ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop);
|
|
$ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start);
|
|
$ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop);
|
|
$stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>HORÁRIO DE CHAMADA POR ESTADO ALTERADO</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY STATE CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3111111111; # go to state call time modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=431111111 modify shift in the system
|
|
######################
|
|
|
|
if ($ADD==431111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$shift_length_test = eregi_replace(':','',$shift_length);
|
|
if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) )
|
|
{
|
|
echo "<br>SHIFT DEFINITION NOT MODIFIED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID e Nome do turno devem ter pelo menos 2 caracteres\n";
|
|
echo "<br>Horário de início deve ter 4 caracteres e ser um horário válido\n";
|
|
echo "<br>Duração do Turno deve ter 5 caracteres e 24 horas ou menos\n";
|
|
}
|
|
else
|
|
{
|
|
$p=0;
|
|
$shift_weekdays_ct = count($shift_weekdays);
|
|
while ($p <= $shift_weekdays_ct)
|
|
{
|
|
$SHIFT_weekdays .= "$shift_weekdays[$p]";
|
|
$p++;
|
|
}
|
|
$shift_start_time = preg_replace('/\D/', '', $shift_start_time);
|
|
$stmt="UPDATE vicidial_shifts set shift_name='$shift_name', shift_start_time='$shift_start_time', shift_length='$shift_length', shift_weekdays='$SHIFT_weekdays' where shift_id='$shift_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>TURNOS ALTERADOS</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SHIFTS', event_type='MODIFY', record_id='$shift_id', event_code='ADMIN MODIFY SHIFT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=331111111; # go to shift modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=41111111111 modify phone record in the system
|
|
######################
|
|
|
|
if ($ADD==41111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) )
|
|
{echo "<br>RAMAL NÃO MODIFICADO - já existe no sistema um ramal com esta extensão e servidor\n";}
|
|
else
|
|
{
|
|
if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1))
|
|
{echo "<br>RAMAL NÃO MODIFICADO - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>RAMAL ALTERADO: $extension\n";
|
|
|
|
$stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret', delete_vm_after_email='$delete_vm_after_email' where extension='$old_extension' and server_ip='$old_server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='MODIFY', record_id='$extension', event_code='ADMIN ALTERAR RAMAL', event_sql=\"$SQL_log\", event_notes='IP do Servidor: $server_ip';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=31111111111; # go to phone modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=42111111111 modify phone alias record in the system
|
|
######################
|
|
|
|
if ($ADD==42111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) )
|
|
{echo "<br>ALIAS DE RAMAL NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>ALIAS DE RAMAL ALTERADO: $alias_id\n";
|
|
|
|
$stmt="UPDATE phones_alias set alias_name='$alias_name', logins_list='$logins_list' where alias_id='$alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONEALIASES', event_type='MODIFY', record_id='$alias_id', event_code='ADMIN ALTERAR ALIAS DE RAMAL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=32111111111; # go to phone alias modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=43111111111 modify group alias record in the system
|
|
######################
|
|
|
|
if ($ADD==43111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) )
|
|
{echo "<br>ALIAS DE GRUPO NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>ALIAS DE GRUPO ALTERADO: $alias_id\n";
|
|
|
|
$stmt="UPDATE groups_alias set group_alias_name='$group_alias_name', caller_id_number='$caller_id_number', caller_id_name='$caller_id_name', active='$active' where group_alias_id='$group_alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='GROUPALIASES', event_type='MODIFY', record_id='$group_alias_id', event_code='ADMIN ALTERAR ALIAS DE GRUPO', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=33111111111; # go to group alias modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=411111111111 modify server record in the system
|
|
######################
|
|
|
|
if ($ADD==411111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from servers where server_id='$server_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 0) && ($server_id != $old_server_id) )
|
|
{echo "<br>SERVIDOR NOT MODIFIED - there is already a server in the system with this server_id\n";}
|
|
else
|
|
{
|
|
$stmt="SELECT count(*) from servers where server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 0) && ($server_ip != $old_server_ip) )
|
|
{echo "<br>SERVIDOR NÃO ALTERADO - já existe no sistema um servidor com este IP\n";}
|
|
else
|
|
{
|
|
if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>SERVIDOR NÃO ALTERADO - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active',balance_trunks_offlimits='$balance_trunks_offlimits',recording_web_link='$recording_web_link',alt_server_ip='$alt_server_ip',active_asterisk_server='$active_asterisk_server',generate_vicidial_conf='$generate_vicidial_conf',rebuild_conf_files='$rebuild_conf_files',outbound_calls_per_second='$outbound_calls_per_second',sounds_update='$sounds_update',vicidial_recording_limit='$vicidial_recording_limit',carrier_logging_active='$carrier_logging_active',vicidial_balance_rank='$vicidial_balance_rank',rebuild_music_on_hold='$rebuild_music_on_hold',active_agent_login_server='$active_agent_login_server',conf_secret='$conf_secret' where server_id='$old_server_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y',rebuild_music_on_hold='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>SERVIDOR MODIFICADO: $server_ip\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERS', event_type='MODIFY', record_id='$server_id', event_code='ADMIN ALTERAR SERVIDOR', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111111111; # go to server modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=421111111111 modify vicidial server trunks record in the system
|
|
######################
|
|
|
|
if ($ADD==421111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$MAXvicidial_trunks = $rowx[0];
|
|
|
|
$stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks);
|
|
|
|
if ($SUMvicidial_trunks > $MAXvicidial_trunks)
|
|
{
|
|
echo "<br>REGISTRO DE TRUNK VICIDIAL NÃO ADICIONADO - o número de trunk vicidial é muito alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n";
|
|
}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) )
|
|
{
|
|
echo "<br>REGISTRO DE TRUNK VICIDIAL NÃO INCLUÍDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>campanha deve ter entre 3 e 8 caracteres de comprimento\n";
|
|
echo "<br>delay do IP do servidor deve ser pelo menos 7 caracteres\n";
|
|
echo "<br>trunks devem ter um digito entre 0 e 9999\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REGISTRO DE TRUNK VICIDIAL ALTERADO: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction</B>\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERTRUNKS', event_type='MODIFY', record_id='$server_ip', event_code='ADMIN ALTERAR SERVIDOR TRUNK', event_sql=\"$SQL_log\", event_notes='Campanha: $campaign_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111111111; # go to server modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=431111111111 modify conf template record in the system
|
|
###################### '$template_id','$template_name','$template_contents'
|
|
|
|
if ($ADD==431111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($template_id) < 1) or (strlen($template_name) < 1) )
|
|
{echo "<br>TEMPLATE DE CONF NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_conf_templates set template_name='$template_name',template_contents='$template_contents' where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>CONF TEMPLATE MODIFIED: $template_id\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CONFTEMPLATES', event_type='MODIFY', record_id='$template_id', event_code='ADMIN ALTERAR TEMPLATE CONF', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=331111111111; # go to conf template modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=441111111111 modify carrier record in the system
|
|
######################
|
|
|
|
if ($ADD==441111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($carrier_id) < 1) or (strlen($server_ip) < 7) or (strlen($protocol) < 1) )
|
|
{echo "<br>OPERADORA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_server_carriers set carrier_name='$carrier_name',registration_string='$registration_string',template_id='$template_id',account_entry='$account_entry',protocol='$protocol',globals_string='$globals_string',dialplan_entry='$dialplan_entry',server_ip='$server_ip',active='$active',carrier_description='$carrier_description' where carrier_id='$carrier_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>OPERADORA ALTERADA: $carrier_id\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CARRIERS', event_type='MODIFY', record_id='$carrier_id', event_code='ADMIN ALTERAR OPERADORA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=341111111111; # go to carrier modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=451111111111 modify tts record in the system
|
|
######################
|
|
|
|
if ($ADD==451111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 5) )
|
|
{echo "<br>TTS ENTRADA SIN MODIFICAR - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_tts_prompts set tts_name='$tts_name',active='$active',tts_text=\"$tts_text\" where tts_id='$tts_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br>TTS entrada modificada: $tts_id\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TTS', event_type='MODIFY', record_id='$tts_id', event_code='ADMIN MODIFY TTS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=351111111111; # go to tts entry modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=461111111111 modify music on hold record in the system
|
|
######################
|
|
|
|
if ($ADD==461111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ($stage == "FILEDELETE")
|
|
{
|
|
if ( (strlen($moh_id) < 2) or (strlen($filename) < 1) or ($moh_id=='sounds') or ($moh_id=='agi-bin') or ($moh_id=='astdb') or ($moh_id=='keys') )
|
|
{echo "<br>MÚSICA EN ESPERA DE ENTRADA SIN MODIFICAR - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="DELETE FROM vicidial_music_on_hold_files where moh_id='$moh_id' and filename='$filename';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y',rebuild_music_on_hold='Y',sounds_update='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>MÚSICA EN ESPERA entrada modificada: $moh_id - $filename\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='MOH', event_type='MODIFY', record_id='$moh_id', event_code='ADMIN MODIFY MOH', event_sql=\"$SQL_log\", event_notes='FILE DELETE';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if ( (strlen($moh_id) < 2) or (strlen($moh_name) < 5) or ($moh_id=='sounds') or ($moh_id=='agi-bin') or ($moh_id=='astdb') or ($moh_id=='keys') )
|
|
{echo "<br>MÚSICA EN ESPERA DE ENTRADA SIN MODIFICAR - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_music_on_hold set moh_name='$moh_name',active='$active',random='$random' where moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmtLIST = $stmt;
|
|
|
|
$stmt="SELECT filename,rank from vicidial_music_on_hold_files where moh_id='$moh_id' order by rank;";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$mohfiles_to_print = mysql_num_rows($rsltx);
|
|
$ranks = ($mohfiles_to_print + 1);
|
|
$o=0;
|
|
while ($mohfiles_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$mohfiles[$o] = $rowx[0];
|
|
$mohranks[$o] = $rowx[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($mohfiles_to_print > $o)
|
|
{
|
|
$new_rank=0;
|
|
$Ffilename = $mohfiles[$o];
|
|
if (isset($_GET[$Ffilename])) {$new_rank=$_GET[$Ffilename];}
|
|
elseif (isset($_POST[$Ffilename])) {$new_rank=$_POST[$Ffilename];}
|
|
|
|
$stmt="UPDATE vicidial_music_on_hold_files set rank='$new_rank' where moh_id='$moh_id' and filename='$mohfiles[$o]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmtLIST .= "|$stmt";
|
|
$o++;
|
|
}
|
|
|
|
if (strlen($filename) > 0)
|
|
{
|
|
$stmt="INSERT INTO vicidial_music_on_hold_files set filename='$filename',rank='$ranks',moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$stmtLIST .= "|$stmt";
|
|
}
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y',rebuild_music_on_hold='Y',sounds_update='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>MÚSICA EN ESPERA entrada modificada: $moh_id\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtLIST|$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='MOH', event_type='MODIFY', record_id='$moh_id', event_code='ADMIN MODIFY MOH', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=361111111111; # go to music on hold entry modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=471111111111 modify voicemail record in the system
|
|
######################
|
|
|
|
if ($ADD==471111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($voicemail_id) < 2) or (strlen($fullname) < 2) )
|
|
{echo "<br>Contestador SIN MODIFICAR - Por favor, volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_voicemail set fullname='$fullname',active='$active',pass='$pass',email='$email',delete_vm_after_email='$delete_vm_after_email' where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="SELECT active_voicemail_server from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$active_voicemail_server = $row[0];
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
echo "<br>Contestador MODIFICADOS: $voicemail_id\n";
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='MODIFY', record_id='$voicemail_id', event_code='ADMIN MODIFY VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=371111111111; # go to voicemail entry modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=4111111111111 modify conference record in the system
|
|
######################
|
|
|
|
if ($ADD==4111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) )
|
|
{echo "<br>CONFERÊNCIA NÃO ALTERADA - já existe no sistema uma conferência com esta extensão e servidor\n";}
|
|
else
|
|
{
|
|
if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>CONFERÊNCIA NÃO ALTERADA - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>CONFERÊNCIA ALTERADA: $conf_exten\n";
|
|
|
|
$stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=3111111111111; # go to conference modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=41111111111111 modify vicidial conference record in the system
|
|
######################
|
|
|
|
if ($ADD==41111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) )
|
|
{echo "<br>VICIDIAL CONFERÊNCIA NÃO ALTERADA - já existe no sistema uma conferência com esta extensão e servidor\n";}
|
|
else
|
|
{
|
|
if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) )
|
|
{echo "<br>VICIDIAL CONFERÊNCIA NÃO ALTERADA - Por favor volte e verifique os dados digitados\n";}
|
|
else
|
|
{
|
|
echo "<br>VICIDIAL CONFERÊNCIA ALTERADA: $conf_exten\n";
|
|
|
|
$stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=31111111111111; # go to vicidial conference modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=411111111111111 modify vicidial system settings
|
|
######################
|
|
|
|
if ($ADD==411111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>CONFIGURAÇÕES DE SISTEMA ALTERADAS\n";
|
|
|
|
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSETTINGS', event_type='MODIFY', record_id='system_settings', event_code='ADMIN MODIFY SYSTEM SETTINGS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111111111111; # go to vicidial system settings form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=421111111111111 modify/delete system status in the system
|
|
######################
|
|
|
|
if ($ADD==421111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (ereg('delete',$stage))
|
|
{
|
|
if ( (strlen($status) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$status)) )
|
|
{
|
|
echo "<br>STATUS DE SISTEMA NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>el estado de sistema no puede ser un estado reservado:B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n";
|
|
echo "<br>el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>SYSTEM STATUS DELETED: $status</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_statuses where status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="DELETE FROM vicidial_campaign_hotkeys where status='$status';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSTATUS', event_type='DELETE', record_id='$status', event_code='ADMIN DELETE SYSTEM STATUS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
if (ereg('modify',$stage))
|
|
{
|
|
if ( (strlen($status) < 1) or (strlen($status_name) < 2) )
|
|
{
|
|
echo "<br>STATUS DO SISTEMA NÃO ALTERADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud\n";
|
|
echo "<br>o nome do status deve ter pelo menos 1 caractere de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DO SISTEMA ALTERADO: $status</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category',sale='$sale',dnc='$dnc',customer_contact='$customer_contact',not_interested='$not_interested',unworkable='$unworkable' where status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSTATUS', event_type='MODIFY', record_id='$status', event_code='ADMIN MODIFY SYSTEM STATUS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=321111111111111; # go to system settings modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=431111111111111 modify/delete status category in the system
|
|
######################
|
|
|
|
if ($ADD==431111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) )
|
|
{
|
|
echo "<br>CATEGORIA NÃO ALTERADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>a categoria de status não pode ser uma categoria reservada:UNDEFINED\n";
|
|
echo "<br>a categoria de status precisa ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
if (ereg('delete',$stage))
|
|
{
|
|
echo "<br><B>CATEGORIA REMOVIDA: $vsc_id</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_status_categories where vsc_id='$vsc_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='STATUSCATEGORIES', event_type='DELETE', record_id='$vsc_id', event_code='ADMIN DELETE STATUS CATEGORIA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if (ereg('modify',$stage))
|
|
{
|
|
echo "<br><B>CATEGORIA ALTERADA: $vsc_id</B>\n";
|
|
|
|
$stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) )
|
|
{
|
|
$tovdad_display = 'N';
|
|
echo "<br><B>ERRO: Já existem 4 Categorias de Status no Relatório TimeOnVDAD</B>\n";
|
|
}
|
|
|
|
$stmt="UPDATE vicidial_status_categories SET vsc_name='$vsc_name',vsc_description='$vsc_description',tovdad_display='$tovdad_display',sale_category='$sale_category',dead_lead_category='$dead_lead_category' where vsc_id='$vsc_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='STATUSCATEGORIES', event_type='MODIFY', record_id='$vsc_id', event_code='ADMIN MODIFY STATUS CATEGORIA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=331111111111111; # go to system settings modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=441111111111111 modify/delete qc status code in the system
|
|
######################
|
|
|
|
if ($ADD==441111111111111)
|
|
{
|
|
if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) )
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (ereg('delete',$stage))
|
|
{
|
|
if ( (strlen($code) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$code)) )
|
|
{
|
|
echo "<br>CÓDIGO DE STATUS CQ NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>the qc status code cannot be a reserved status: B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n";
|
|
echo "<br>o código de status cq precisa ter pelo menos 1 caracter de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CÓDIGO DE STATUS CQ REMOVIDO:$code</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_qc_codes where code='$code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='DELETE', record_id='$vsc_id', event_code='ADMIN DELETE QC CODES', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
if (ereg('modify',$stage))
|
|
{
|
|
if ( (strlen($code) < 1) or (strlen($code_name) < 2) )
|
|
{
|
|
echo "<br>CÓDIGO DE STATUS CQ NÃO ALTERADO- Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>o código de status cq precisa ter pelo menos 1 caracter de comprimento\n";
|
|
echo "<br>o nome do status cq precisa ter pelo menos 1 caracter de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CÓDIGO DE STATUS CQ ALTERADO:$code</B>\n";
|
|
|
|
$stmt="UPDATE vicidial_qc_codes SET code_name='$code_name' where code='$code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='MODIFY', record_id='$vsc_id', event_code='ADMIN MODIFY QC CODES', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=341111111111111; # go to qc status code modification form below
|
|
}
|
|
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 5 series, delete records confirmation
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
######################
|
|
# ADD=5 confirmation before deletion of user
|
|
######################
|
|
|
|
if ($ADD==5)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($user) < 2) or ($LOGdelete_users < 1) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Usuário be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DO USUÁRIO: $user</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6&user=$user&CoNfIrM=YES\">Clique aqui para apagar o usuário $user</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3'; # go to user modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=51 confirmation before deletion of campaign
|
|
######################
|
|
|
|
if ($ADD==51)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO APAGADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DA CAMPANHA: $campaign_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=61&campaign_id=$campaign_id&CoNfIrM=YES\">Clique aqui para apagar a campanha $campaign_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='31'; # go to campaign modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=52 confirmation before logging all agents out of campaign of campaign
|
|
######################
|
|
|
|
if ($ADD==52)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>AGENTES NÃO DESLIGADOS DA CAMPANHA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE SAÍDA FORÇADA DOS AGENTES: $campaign_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=62&campaign_id=$campaign_id&CoNfIrM=YES&DB=$DB\">Clique aqui para desconectar todos os agentes $campaign_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='31'; # go to campaign modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record
|
|
######################
|
|
|
|
if ($ADD==53)
|
|
{
|
|
if (eregi('IN',$stage))
|
|
{$group_id=$campaign_id;}
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>VDAC NÃO LIMPO PARA CAMPANHA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAR LIMPEZA DO VDAC: $campaign_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=63&campaign_id=$campaign_id&CoNfIrM=YES&&stage=$stage\">Clique aqui para apagar o registro mais velho do VDAC para $campaign_id</a><br><br><br>\n";
|
|
}
|
|
|
|
# go to campaign modification below
|
|
if (eregi('IN',$stage))
|
|
{$ADD='3111';}
|
|
else
|
|
{$ADD='31';}
|
|
}
|
|
|
|
######################
|
|
# ADD=511 confirmation before deletion of list
|
|
######################
|
|
|
|
if ($ADD==511)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) )
|
|
{
|
|
echo "<br>LISTA NÃO APAGADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>List_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>COMFIRMAÇÃO DE REMOÇÃO DA LISTA: $list_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=611&list_id=$list_id&CoNfIrM=YES\">Clique aqui para apagar a lista e todos os seus registros $list_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='311'; # go to campaign modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=5111 confirmation before deletion of in-group
|
|
######################
|
|
|
|
if ($ADD==5111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) )
|
|
{
|
|
echo "<br>GRUPO DE ENTRADA NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Group_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE GRUPO DE ENTRADA: $group_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6111&group_id=$group_id&CoNfIrM=YES\">Clique aqui para apagar este grupo de entrada $group_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3111'; # go to in-group modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=5311 confirmation before deletion of did
|
|
######################
|
|
|
|
if ($ADD==5311)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($did_id) < 1) or ($LOGdelete_dids < 1) )
|
|
{
|
|
echo "<br>DDR NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>did_id be at least 1 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DO DDR: $menu_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6311&did_id=$did_id&CoNfIrM=YES\">Clique aqui para removerDID $did_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3311'; # go to did modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=5511 confirmation before deletion of call menu
|
|
######################
|
|
|
|
if ($ADD==5511)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($menu_id) < 2) or ($LOGdelete_dids < 1) )
|
|
{
|
|
echo "<br>MENU NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>menu_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE MENU: $menu_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6511&menu_id=$menu_id&CoNfIrM=YES\">Clique aqui para remover o MENU $menu_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3511'; # go to call menu modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=51111 confirmation before deletion of remote agent record
|
|
######################
|
|
|
|
if ($ADD==51111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) )
|
|
{
|
|
echo "<br>AGENTE REMOTO NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Remote_agent_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE AGENTE REMOTO: $remote_agent_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=61111&remote_agent_id=$remote_agent_id&CoNfIrM=YES\">Clique aqui para apagar este usuário remoto $remote_agent_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='31111'; # go to remote agent modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=511111 confirmation before deletion of user group record
|
|
######################
|
|
|
|
if ($ADD==511111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) )
|
|
{
|
|
echo "<br>GRUPO DE USUÁRIOS NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Usuário_group be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE GRUPO DE USUÁRIO: $user_group</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=611111&user_group=$user_group&CoNfIrM=YES\">Clique aqui para apagar este grupo de usuários $user_group</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='311111'; # go to user group modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=5111111 confirmation before deletion of script record
|
|
######################
|
|
|
|
if ($ADD==5111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) )
|
|
{
|
|
echo "<br>SCRIPT NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Script_id must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE SCRIPT: $script_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6111111&script_id=$script_id&CoNfIrM=YES\">Clique aqui para apagar o script $script_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3111111'; # go to script modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=51111111 confirmation before deletion of filter record
|
|
######################
|
|
|
|
if ($ADD==51111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) )
|
|
{
|
|
echo "<br>FILTRO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do filtro deve ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>FILTER DELETION CONFIRMATION: $lead_filter_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=61111111&lead_filter_id=$lead_filter_id&CoNfIrM=YES\">Clique aqui para apagar o filtro$lead_filter_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='31111111'; # go to filter modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=511111111 confirmation before deletion of call time record
|
|
######################
|
|
|
|
if ($ADD==511111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAMADA NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do horário de cham. deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DO HORÁRIO DE CHAMADAS: $call_time_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=611111111&call_time_id=$call_time_id&CoNfIrM=YES\">Clique aqui para removercall time $call_time_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='311111111'; # go to call time modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=5111111111 confirmation before deletion of state call time record
|
|
######################
|
|
|
|
if ($ADD==5111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAM. POR ESTADO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do horário de cham. deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DO HORÁRIO DE CHAM. POR ESTADO: $call_time_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6111111111&call_time_id=$call_time_id&CoNfIrM=YES\">Clique aqui para removerstate call time $call_time_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='3111111111'; # go to state call time modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=531111111 confirmation before deletion of shift record
|
|
######################
|
|
|
|
if ($ADD==531111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>TURNO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Shift ID must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE TURNO:$shift_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=631111111&shift_id=$shift_id&CoNfIrM=YES\">Clique aqui para remover o turno $shift_id</a><br><br><br>\n";
|
|
}
|
|
|
|
$ADD='331111111'; # go to call time modification below
|
|
}
|
|
|
|
######################
|
|
# ADD=51111111111 confirmation before deletion of phone record
|
|
######################
|
|
|
|
if ($ADD==51111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>RAMAL NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Extension be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE RAMAL: $extension - $server_ip</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=61111111111&extension=$extension&server_ip=$server_ip&CoNfIrM=YES\">Clique aqui para apagar este ramal $extension - $server_ip</a><br><br><br>\n";
|
|
}
|
|
$ADD='31111111111'; # go to phone modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=52111111111 confirmation before deletion of phone alias record
|
|
######################
|
|
|
|
if ($ADD==52111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($alias_id) < 1) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>ALIAS DE RAMAL NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Alias ID must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE ALIAS: $alias_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=62111111111&alias_id=$alias_id&CoNfIrM=YES\">Clique aqui para remover o alias de ramal $alias_id</a><br><br><br>\n";
|
|
}
|
|
$ADD='32111111111'; # go to phone alias modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=53111111111 confirmation before deletion of group alias record
|
|
######################
|
|
|
|
if ($ADD==53111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($group_alias_id) < 1) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>ALIAS DE GRUPO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Alias must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAÇÃO DE REMOÇÃO DE ALIAS DE GRUPO: $group_alias_id</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=63111111111&group_alias_id=$group_alias_id&CoNfIrM=YES\">Clique aqui para remover alias de grupo $group_alias_id</a><br><br><br>\n";
|
|
}
|
|
$ADD='33111111111'; # go to group alias modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=511111111111 confirmation before deletion of server record
|
|
######################
|
|
|
|
if ($ADD==511111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>SERVIDOR NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Servidor be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>SERVIDOR DELETION CONFIRMATION: $server_id - $server_ip</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=611111111111&server_id=$server_id&server_ip=$server_ip&CoNfIrM=YES\">Clique aqui para apagar este ramal $server_id - $server_ip</a><br><br><br>\n";
|
|
}
|
|
$ADD='311111111111'; # go to server modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=531111111111 confirmation before deletion of conf template record
|
|
######################
|
|
|
|
if ($ADD==531111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($template_id) < 2)
|
|
{
|
|
echo "<br>TEMPLATE DE CONF NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do template deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAR REMOÇÃO DO TEMPLATE DE CONF: $template_id - $template_name</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=631111111111&template_id=$template_id&server_ip=$server_ip&CoNfIrM=YES\">Clique aqui para remover esta template de conf $template_id - $template_name</a><br><br><br>\n";
|
|
}
|
|
$ADD='331111111111'; # go to conf template modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=541111111111 confirmation before deletion of carrier record
|
|
######################
|
|
|
|
if ($ADD==541111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($carrier_id) < 2)
|
|
{
|
|
echo "<br>OPERADORA NÃO REMOVIDA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>O ID da operadora precisa ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFIRMAR REMOÇÃO DA OPERADORA: $carrier_id - $carrier_name</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=641111111111&carrier_id=$carrier_id&CoNfIrM=YES\">Clique aqui para remover a operadora $carrier_id - $carrier_name</a><br><br><br>\n";
|
|
}
|
|
$ADD='341111111111'; # go to carrier modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=551111111111 confirmation before deletion of tts record
|
|
######################
|
|
|
|
if ($ADD==551111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($tts_id) < 2)
|
|
{
|
|
echo "<br>TTS entrada no DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>TTS ID be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>TTS DE ENTRADA SUPRESIÓN DE CONFIRMACIÓN: $tts_id - $tts_name</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=651111111111&tts_id=$tts_id&CoNfIrM=YES\">Haga clic aquí para eliminar TTS entrada $tts_id - $tts_name</a><br><br><br>\n";
|
|
}
|
|
$ADD='351111111111'; # go to tts entry modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=561111111111 confirmation before deletion of music on hold record
|
|
######################
|
|
|
|
if ($ADD==561111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($moh_id) < 2)
|
|
{
|
|
echo "<br>MÚSICA EN ESPERA DE ENTRADA no se eliminan - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>MOH ID be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>MÚSICA EN ESPERA DE ENTRADA SUPRESIÓN DE CONFIRMACIÓN: $moh_id - $moh_name</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=661111111111&moh_id=$moh_id&CoNfIrM=YES\">Haga clic aquí para borrar música en espera de entrada $moh_id - $moh_name</a><br><br><br>\n";
|
|
}
|
|
$ADD='361111111111'; # go to music on hold entry modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=571111111111 confirmation before deletion of voicemail record
|
|
######################
|
|
|
|
if ($ADD==571111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($voicemail_id) < 2)
|
|
{
|
|
echo "<br>Contestador no se eliminan - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID de correo de voz be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>Contestador SUPRESIÓN DE CONFIRMACIÓN: $voicemail_id - $fullname</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=671111111111&voicemail_id=$voicemail_id&CoNfIrM=YES\">Haga clic aquí para eliminar buzón de voz $voicemail_id - $fullname</a><br><br><br>\n";
|
|
}
|
|
$ADD='371111111111'; # go to voicemail entry modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=5111111111111 confirmation before deletion of conference record
|
|
######################
|
|
|
|
if ($ADD==5111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>CONFERENCE NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Conference must be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6111111111111&conf_exten=$conf_exten&server_ip=$server_ip&CoNfIrM=YES\">Clique aqui para apagar este ramal $conf_exten - $server_ip</a><br><br><br>\n";
|
|
}
|
|
$ADD='3111111111111'; # go to conference modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=51111111111111 confirmation before deletion of vicidial conference record
|
|
######################
|
|
|
|
if ($ADD==51111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>VICIDIAL CONFERENCE NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Conference must be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip</B>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=61111111111111&conf_exten=$conf_exten&server_ip=$server_ip&CoNfIrM=YES\">Clique aqui para apagar este ramal $conf_exten - $server_ip</a><br><br><br>\n";
|
|
}
|
|
$ADD='31111111111111'; # go to vicidial conference modification below
|
|
}
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 6 series, delete records
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
######################
|
|
# ADD=6 delete user record
|
|
######################
|
|
|
|
if ($ADD==6)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) )
|
|
{
|
|
echo "<br>USUÁRIO NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Usuário be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmtA="DELETE from vicidial_users where user='$user' limit 1;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_agents where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_inbound_group_agents where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USUÁRIOS', event_type='DELETE', record_id='$user', event_code='ADMIN DELETE USER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO USUÁRIO CONCLUÍDA: $user</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='0'; # go to user list
|
|
}
|
|
|
|
######################
|
|
# ADD=61 delete campaign record
|
|
######################
|
|
|
|
if ($ADD==61)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) )
|
|
{
|
|
echo "<br>CAMPANHA NÃO APAGADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmtA="DELETE from vicidial_campaigns where campaign_id='$campaign_id' limit 1;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_agents where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_statuses where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_hotkeys where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_callbacks where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_stats where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_lead_recycle where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_server_stats where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_server_trunks where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_pause_codes where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaigns_list_mix where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br>REMOVENDO REGISTROS HOPPERS DO HOPPER DA CAMPANHA ANTIGA ($campaign_id)\n";
|
|
$stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DA CAMPANHA CONCLUÍDA: $campaign_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='10'; # go to campaigns list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=62 Logout all agents from a campaign
|
|
######################
|
|
|
|
if ($ADD==62)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>AGENTES NÃO DESLIGADOS DA CAMPANHA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$now_date_epoch = date('U');
|
|
$inactive_epoch = ($now_date_epoch - 60);
|
|
$stmt = "SELECT user,campaign_id,UNIX_TIMESTAMP(last_update_time) from vicidial_live_agents where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$vla_ct = mysql_num_rows($rslt);
|
|
$k=0;
|
|
while ($vla_ct > $k)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VLA_user[$k] = $row[0];
|
|
$VLA_campaign_id[$k] = $row[1];
|
|
$VLA_update_time[$k] = $row[2];
|
|
$k++;
|
|
}
|
|
|
|
$k=0;
|
|
while ($vla_ct > $k)
|
|
{
|
|
if ($VLA_update_time[$k] > $inactive_epoch)
|
|
{
|
|
$lead_active=0;
|
|
$stmt = "SELECT agent_log_id,user,server_ip,event_time,lead_id,campaign_id,pause_epoch,pause_sec,wait_epoch,wait_sec,talk_epoch,talk_sec,dispo_epoch,dispo_sec,status,user_group,comments,sub_status,dead_epoch,dead_sec from vicidial_agent_log where user='$VLA_user[$k]' order by agent_log_id desc LIMIT 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$val_ct = mysql_num_rows($rslt);
|
|
if ($val_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VAL_agent_log_id = $row[0];
|
|
$VAL_user = $row[1];
|
|
$VAL_server_ip = $row[2];
|
|
$VAL_event_time = $row[3];
|
|
$VAL_lead_id = $row[4];
|
|
$VAL_campaign_id = $row[5];
|
|
$VAL_pause_epoch = $row[6];
|
|
$VAL_pause_sec = $row[7];
|
|
$VAL_wait_epoch = $row[8];
|
|
$VAL_wait_sec = $row[9];
|
|
$VAL_talk_epoch = $row[10];
|
|
$VAL_talk_sec = $row[11];
|
|
$VAL_dispo_epoch = $row[12];
|
|
$VAL_dispo_sec = $row[13];
|
|
$VAL_status = $row[14];
|
|
$VAL_user_group = $row[15];
|
|
$VAL_comments = $row[16];
|
|
$VAL_sub_status = $row[17];
|
|
$VAL_dead_epoch = $row[18];
|
|
$VAL_dead_sec = $row[19];
|
|
|
|
if ($DB) {echo "\n<BR>VAL VALUES: $VAL_agent_log_id|$VAL_status|$VAL_lead_id\n";}
|
|
|
|
if ( ($VAL_wait_epoch < 1) || ( ($VAL_status == 'PAUSE') && ($VAL_dispo_epoch < 1) ) )
|
|
{
|
|
$VAL_pause_sec = ( ($now_date_epoch - $VAL_pause_epoch) + $VAL_pause_sec);
|
|
$stmt = "UPDATE vicidial_agent_log SET wait_epoch='$now_date_epoch', pause_sec='$VAL_pause_sec' where agent_log_id='$VAL_agent_log_id';";
|
|
}
|
|
else
|
|
{
|
|
if ($VAL_talk_epoch < 1)
|
|
{
|
|
$VAL_wait_sec = ( ($now_date_epoch - $VAL_wait_epoch) + $VAL_wait_sec);
|
|
$stmt = "UPDATE vicidial_agent_log SET talk_epoch='$now_date_epoch', wait_sec='$VAL_wait_sec' where agent_log_id='$VAL_agent_log_id';";
|
|
}
|
|
else
|
|
{
|
|
$lead_active++;
|
|
$status_update_SQL='';
|
|
if ( ( (strlen($VAL_status) < 1) or ($VAL_status == 'NULL') ) and ($VAL_lead_id > 0) )
|
|
{
|
|
$status_update_SQL = ", status='PU'";
|
|
$stmt="UPDATE vicidial_list SET status='PU' where lead_id='$VAL_lead_id';";
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if ($VAL_dispo_epoch < 1)
|
|
{
|
|
$VAL_talk_sec = ($now_date_epoch - $VAL_talk_epoch);
|
|
$stmt = "UPDATE vicidial_agent_log SET dispo_epoch='$now_date_epoch', talk_sec='$VAL_talk_sec'$status_update_SQL where agent_log_id='$VAL_agent_log_id';";
|
|
}
|
|
else
|
|
{
|
|
if ($VAL_dispo_sec < 1)
|
|
{
|
|
$VAL_dispo_sec = ($now_date_epoch - $VAL_dispo_epoch);
|
|
$stmt = "UPDATE vicidial_agent_log SET dispo_sec='$VAL_dispo_sec' where agent_log_id='$VAL_agent_log_id';";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
|
|
$stmt="DELETE from vicidial_live_agents where user='$VLA_user[$k]';";
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
if (strlen($VAL_user_group) < 1)
|
|
{
|
|
$stmt = "SELECT user_group FROM vicidial_users where user='$VLA_user[$k]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$val_ct = mysql_num_rows($rslt);
|
|
if ($val_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$VAL_user_group = $row[0];
|
|
}
|
|
}
|
|
|
|
$stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VLA_user[$k]','LOGOUT','$VLA_campaign_id[$k]','$NOW_TIME','$now_date_epoch','$VAL_user_group');";
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
|
|
#############################################
|
|
##### START QUEUEMETRICS LOGGING LOOKUP #####
|
|
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "<BR>$stmt\n";}
|
|
$qm_conf_ct = mysql_num_rows($rslt);
|
|
if ($qm_conf_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_queuemetrics_logging = $row[0];
|
|
$queuemetrics_server_ip = $row[1];
|
|
$queuemetrics_dbname = $row[2];
|
|
$queuemetrics_login = $row[3];
|
|
$queuemetrics_pass = $row[4];
|
|
$queuemetrics_log_id = $row[5];
|
|
}
|
|
##### END QUEUEMETRICS LOGGING LOOKUP #####
|
|
###########################################
|
|
if ($enable_queuemetrics_logging > 0)
|
|
{
|
|
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
|
mysql_select_db("$queuemetrics_dbname", $linkB);
|
|
|
|
$agents='@agents';
|
|
$agent_logged_in='';
|
|
$time_logged_in='';
|
|
|
|
$stmtB = "SELECT agent,time_id FROM queue_log where agent='Agent/$VLA_user[$k]' and verb='AGENTLOGIN' order by time_id desc limit 1;";
|
|
$rsltB=mysql_query($stmtB, $linkB);
|
|
if ($DB) {echo "<BR>$stmtB\n";}
|
|
$qml_ct = mysql_num_rows($rsltB);
|
|
if ($qml_ct > 0)
|
|
{
|
|
$row=mysql_fetch_row($rsltB);
|
|
$agent_logged_in = $row[0];
|
|
$time_logged_in = $row[1];
|
|
}
|
|
|
|
$time_logged_in = ($now_date_epoch - $time_logged_in);
|
|
if ($time_logged_in > 1000000) {$time_logged_in=1;}
|
|
|
|
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='NONE',queue='NONE',agent='$agent_logged_in',verb='AGENTLOGOFF',serverid='$queuemetrics_log_id',data1='$VLA_user[$k]$agents',data2='$time_logged_in';";
|
|
if ($DB) {echo "<BR>$stmtB\n";}
|
|
$rsltB=mysql_query($stmtB, $linkB);
|
|
}
|
|
|
|
echo "<!-- Agent $VLA_user[$k] has been emergency logged out, make sure they close their web browser<BR> -->\n";
|
|
|
|
$k++;
|
|
}
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='LOGOUT', record_id='$campaign_id', event_code='ADMIN LOGOUT CAMPANHA AGENTS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>DESCONEXÃO DE AGENTES CONCLUÍDA: $campaign_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD='31'; # go to campaign modification below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=63 Emergency VDAC Jam Clear
|
|
######################
|
|
|
|
if ($ADD==63)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
if (eregi('IN',$stage))
|
|
{$group_id=$campaign_id;}
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if (strlen($campaign_id) < 2)
|
|
{
|
|
echo "<br>VDAC NÃO LIMPO PARA CAMPANHA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Campanha_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHAS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPANHA JAM', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>ÚLTIMO REGISTRO VDAC LIMPO PARA CAMPANHA: $campaign_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
# go to campaign modification below
|
|
if (eregi('IN',$stage))
|
|
{$ADD='3111';}
|
|
else
|
|
{$ADD='31';}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=65 delete campaign lead recycle in the system
|
|
######################
|
|
|
|
if ($ADD==65)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>RECICLAGEM DE REGISTROS DA CAMPANHA NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
echo "<br>tempo de tentativa deve ter pelo menos 120 segundos\n";
|
|
echo "<br>quantidade máxima de tentativas deve ser entre 1 e 10\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>RECICLAGEM DE REGISTROS DA CAMPANHA REMOVIDO: $campaign_id - $status - $attempt_delay</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_RECYCLE', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=25;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=66 delete auto alt dial status from the campaign
|
|
######################
|
|
|
|
if ($ADD==66)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{echo "<br>STATUS DE DISCAGEM PARA NÚM. ALT. NÃO REMOVIDO - este status de discagem do número alt. não está na campanha\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>STATUS DE DISCAGEM PARA NÚM. ALT. NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE DISC. PARA NÚMERO ALT. REMOVIDO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
$auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]);
|
|
$stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_ALTDIALS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA ALT DIAL', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=26;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=67 delete agent pause code in the system
|
|
######################
|
|
|
|
if ($ADD==67)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) )
|
|
{
|
|
echo "<br>CÓDIGO DE PAUSA DA CAMPANHA NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>pause code must be between 1 and 6 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>CAMPANHA PAUSE CODE DELETED: $campaign_id - $pause_code</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_PAUSECODES', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA PAUSE CODE', event_sql=\"$SQL_log\", event_notes='Status: $pause_code';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$SUB=27;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=68 remove campaign dial status
|
|
######################
|
|
|
|
if ($ADD==68)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
$stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if ($row[0] < 1)
|
|
{echo "<br>STATUS DE DISCAGEM NÃO REMOVIDO - esse status de discagem não está selecionado para esta campanha\n";}
|
|
else
|
|
{
|
|
if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) )
|
|
{
|
|
echo "<br>STATUS DE DISCAGEM NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>status deve ter entre 1 e 6 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>STATUS DE DISCAGEM REMOVIDO: $campaign_id - $status</B>\n";
|
|
|
|
$stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
$dial_statuses = eregi_replace(" $status "," ",$row[0]);
|
|
$stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPANHA_DIALSTATUS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPANHA DIAL STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
#$SUB=28;
|
|
$ADD=31; # go to campaign modification form below
|
|
}
|
|
|
|
######################
|
|
# ADD=611 delete list record and all leads within it
|
|
######################
|
|
|
|
if ($ADD==611)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) )
|
|
{
|
|
echo "<br>LISTA NÃO APAGADA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>List_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_lists where list_id='$list_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br>REMOVENDO REGISTROS HOPPERS DO HOPPER DA CAMPANHA ANTIGA ($list_id)\n";
|
|
$stmt="DELETE from vicidial_hopper where list_id='$list_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br>REMOVENDO REGISTROS DA LISTA DA TABELA VICIDIAL_LIST\n";
|
|
$stmt="DELETE from vicidial_list where list_id='$list_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTAS', event_type='DELETE', record_id='$list_id', event_code='ADMIN DELETE LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DA LISTA CONCLUÍDA: $list_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='100'; # go to lists list
|
|
}
|
|
|
|
######################
|
|
# ADD=6111 delete in-group record
|
|
######################
|
|
|
|
if ($ADD==6111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) )
|
|
{
|
|
echo "<br>GRUPO DE ENTRADA NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Group_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmtA="DELETE from vicidial_inbound_groups where group_id='$group_id' and group_id NOT IN('AGENTDIRECT') limit 1;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmt="DELETE from vicidial_inbound_group_agents where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_live_inbound_agents where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_campaign_stats where campaign_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='DELETE', record_id='$group_id', event_code='ADMIN DELETE INGROUP', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE GRUPO DE ENTRADA CONCLUÍDA: $group_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='1000'; # go to in-group list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=6311 delete did record
|
|
######################
|
|
|
|
if ($ADD==6311)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($did_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) )
|
|
{
|
|
echo "<br>DDR NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>did_id be at least 1 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_inbound_dids where did_id='$did_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='DELETE', record_id='$did_id', event_code='ADMIN DELETE DID', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO DDR FINALIZADA: $did_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='1300'; # go to did list
|
|
}
|
|
|
|
######################
|
|
# ADD=6511 delete call menu record
|
|
######################
|
|
|
|
if ($ADD==6511)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($menu_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) )
|
|
{
|
|
echo "<br>MENU NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>menu_id be at least 1 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_call_menu where menu_id='$menu_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="DELETE from vicidial_call_menu_options where menu_id='$menu_id' limit 17;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtA";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='DELETE', record_id='$menu_id', event_code='ADMIN DELETE CALL MENU', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE MENU COMPLETADA: $menu_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='1500'; # go to call menu list
|
|
}
|
|
|
|
######################
|
|
# ADD=61111 delete remote agent record
|
|
######################
|
|
|
|
if ($ADD==61111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) )
|
|
{
|
|
echo "<br>AGENTE REMOTO NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Remote_agent_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_remote_agents where remote_agent_id='$remote_agent_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='REMOTEAGENTS', event_type='DELETE', record_id='$remote_agent_id', event_code='ADMIN DELETE REMOTE AGENT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE AGENTE REMOTO CONCLUÍDA: $remote_agent_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='10000'; # go to remote agents list
|
|
}
|
|
|
|
######################
|
|
# ADD=611111 delete user group record
|
|
######################
|
|
|
|
if ($ADD==611111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) )
|
|
{
|
|
echo "<br>GRUPO DE USUÁRIOS NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Usuário_group be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_user_groups where user_group='$user_group' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERGROUPS', event_type='DELETE', record_id='$user_group', event_code='ADMIN DELETE GRUPO DE USUÁRIOS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE GRUPO DE USUÁRIOS CONCLUÍDA: $user_group</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='100000'; # go to user group list
|
|
}
|
|
|
|
######################
|
|
# ADD=6111111 delete script record
|
|
######################
|
|
|
|
if ($ADD==6111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) )
|
|
{
|
|
echo "<br>SCRIPT NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Script_id be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_scripts where script_id='$script_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SCRIPTS', event_type='DELETE', record_id='$script_id', event_code='ADMIN DELETE SCRIPT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE SCRIPT CONCLUÍDA: $script_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='1000000'; # go to script list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=61111111 delete filter record
|
|
######################
|
|
|
|
if ($ADD==61111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) )
|
|
{
|
|
echo "<br>FILTRO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do filtro deve ter pelo menos 2 caracteres de comprimento\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTROS', event_type='DELETE', record_id='$lead_filter_id', event_code='ADMIN DELETE FILTROS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO FILTRO COMPLETADA $lead_filter_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='10000000'; # go to filter list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=611111111 delete call times record
|
|
######################
|
|
|
|
if ($ADD==611111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAMADA NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do horário de cham. deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='DELETE', record_id='$call_time_id', event_code='ADMIN DELETE CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>HORÁRIO DE CHAM. REMOVIDO: $call_time_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='100000000'; # go to call times list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=6111111111 delete state call times record
|
|
######################
|
|
|
|
if ($ADD==6111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>HORÁRIO DE CHAM. POR ESTADO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do horário de cham. deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
$stmtA="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' limit 1;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
$stmt="SELECT call_time_id,ct_state_call_times from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" order by call_time_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$sct_to_print = mysql_num_rows($rslt);
|
|
$sct_list='';
|
|
|
|
$o=0;
|
|
while ($sct_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$sct_ids[$o] = "$rowx[0]";
|
|
$sct_states[$o] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
$o=0;
|
|
while ($sct_to_print > $o)
|
|
{
|
|
$sct_states[$o] = eregi_replace("\|$call_time_id\|",'|',$sct_states[$o]);
|
|
$stmt="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "$stmt\n";
|
|
echo "Regra de Estado Removida: $sct_ids[$o]<BR>\n";
|
|
$o++;
|
|
}
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='DELETE', record_id='$call_time_id', event_code='ADMIN DELETE STATE CALL TIME', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO HORÁRIO DE CHAM. POR ESTADO FINALIZADA: $call_time_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='1000000000'; # go to call times list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=631111111 delete shift record
|
|
######################
|
|
|
|
if ($ADD==631111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) )
|
|
{
|
|
echo "<br>TURNO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Shift ID must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_shifts where shift_id='$shift_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SHIFTS', event_type='DELETE', record_id='$shift_id', event_code='ADMIN DELETE SHIFT', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE TURNO FINALIZADA: $shift_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
|
|
$ADD='130000000'; # go to shifts list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=61111111111 delete phone record
|
|
######################
|
|
|
|
if ($ADD==61111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>RAMAL NÃO APAGADO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Extension be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='DELETE', record_id='$extension', event_code='ADMIN DELETE PHONE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DE RAMAL CONCLUÍDA: $extension - $server_ip</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='10000000000'; # go to phone list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=62111111111 delete phone alias record
|
|
######################
|
|
|
|
if ($ADD==62111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($alias_id) < 2) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>ALIAS DE RAMAL NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Alias ID must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from phones_alias where alias_id='$alias_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONEALIASES', event_type='DELETE', record_id='$alias_id', event_code='ADMIN REMOVER ALIAS DE RAMAL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO ALIAS DE RAMAL CONCLUÍDA: $alias_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='12000000000'; # go to phone alias list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=63111111111 delete group alias record
|
|
######################
|
|
|
|
if ($ADD==63111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($group_alias_id) < 2) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>ALIAS DE GRUPO NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Alias must be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from groups_alias where group_alias_id='$group_alias_id' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='GROUPALIASES', event_type='DELETE', record_id='$group_alias_id', event_code='ADMIN REMOVER ALIAS DE GRUPO', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO ALIAS DE GRUPO FINALIZADA: $group_alias_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='13000000000'; # go to group alias list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=611111111111 delete server record
|
|
######################
|
|
|
|
if ($ADD==611111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>SERVIDOR NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do Servidor be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from servers where server_id='$server_id' and server_ip='$server_ip' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERS', event_type='DELETE', record_id='$server_id', event_code='ADMIN DELETE SERVER', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>SERVIDOR DELETION COMPLETED: $server_id - $server_ip</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='100000000000'; # go to server list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=621111111111 delete vicidial server trunk record in the system
|
|
######################
|
|
|
|
if ($ADD==621111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) )
|
|
{
|
|
echo "<br>REGISTRO DE TRUNK VICIDIAL NAO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>campanha deve ter entre 3 e 8 caracteres de comprimento\n";
|
|
echo "<br>delay do IP do servidor deve ser pelo menos 7 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br><B>REGISTRO DE TRUNK VICIDIAL REMOVIDO: $campaign_id - $server_ip</B>\n";
|
|
|
|
$stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SERVERTRUNKS', event_type='DELETE', record_id='$server_ip', event_code='ADMIN DELETE SERVIDOR TRUNK', event_sql=\"$SQL_log\", event_notes='Campanha: $campaign_id';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
$ADD=311111111111; # go to server modification form below
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=631111111111 delete conf template record
|
|
######################
|
|
|
|
if ($ADD==631111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($template_id) < 2) or ($CoNfIrM != 'YES') )
|
|
{
|
|
echo "<br>TEMPLATE DE CONF NÃO REMOVIDO - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID do template deve ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE phones SET template_id='' where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="UPDATE vicidial_server_carriers SET template_id='' where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="DELETE from vicidial_conf_templates where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CONFTEMPLATES', event_type='DELETE', record_id='$template_id', event_code='ADMIN REMOVER TEMPLATE CONF', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DO TEMPLATE DE CONF FINALIZADA: $server_id - $server_ip</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='130000000000'; # go to conf template list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=641111111111 delete carrier record
|
|
######################
|
|
|
|
if ($ADD==641111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($carrier_id) < 2) or ($CoNfIrM != 'YES') )
|
|
{
|
|
echo "<br>OPERADORA NÃO REMOVIDA - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>O ID da operadora precisa ter pelo menos 2 caracteres\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="SELECT server_ip from vicidial_server_carriers where carrier_id='$carrier_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$CARRIERserver_ip = $row[0];
|
|
|
|
$stmt="DELETE from vicidial_server_carriers where carrier_id='$carrier_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$CARRIERserver_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CARRIERS', event_type='DELETE', record_id='$carrier_id', event_code='ADMIN REMOVER OPERADORA', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>REMOÇÃO DA OPERADORA FINALIZADA: $carrier_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='140000000000'; # go to carrier list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=651111111111 delete tts record
|
|
######################
|
|
|
|
if ($ADD==651111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($tts_id) < 2) or ($CoNfIrM != 'YES') )
|
|
{
|
|
echo "<br>TTS entrada no DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>TTS ID be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_tts_prompts where tts_id='$tts_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='TTS', event_type='DELETE', record_id='$tts_id', event_code='ADMIN DELETE TTS', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>TTS DELETION COMPLETED: $tts_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='150000000000'; # go to tts entry list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=661111111111 delete music on hold record
|
|
######################
|
|
|
|
if ($ADD==661111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($moh_id) < 2) or ($CoNfIrM != 'YES') )
|
|
{
|
|
echo "<br>MÚSICA EN ESPERA DE ENTRADA no se eliminan - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>MOH ID be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="UPDATE vicidial_music_on_hold SET remove='Y' where moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmtA="DELETE from vicidial_music_on_hold_files where moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|$stmtA|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='MOH', event_type='DELETE', record_id='$moh_id', event_code='ADMIN DELETE MOH', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>MÚSICA EN ESPERA SUPRESIÓN COMPLETA: $moh_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='160000000000'; # go to music on hold entry list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=671111111111 delete voicemail record
|
|
######################
|
|
|
|
if ($ADD==671111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($voicemail_id) < 2) or ($CoNfIrM != 'YES') )
|
|
{
|
|
echo "<br>Contestador no se eliminan - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>ID de correo de voz be at least 2 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_voicemail where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
$stmt="SELECT active_voicemail_server from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$active_voicemail_server = $row[0];
|
|
|
|
$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='DELETE', record_id='$voicemail_id', event_code='ADMIN DELETE VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>Contestador SUPRESIÓN COMPLETA: $voicemail_id</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='170000000000'; # go to voicemail entry list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=6111111111111 delete conference record
|
|
######################
|
|
|
|
if ($ADD==6111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>CONFERENCE NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Conference be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from conferences where conf_exten='$conf_exten' and server_ip='$server_ip' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CONFERENCES', event_type='DELETE', record_id='$conf_exten', event_code='ADMIN DELETE CONFERENCE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='1000000000000'; # go to conference list
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=61111111111111 delete vicidial conference record
|
|
######################
|
|
|
|
if ($ADD==61111111111111)
|
|
{
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) )
|
|
{
|
|
echo "<br>VICIDIAL CONFERENCE NOT DELETED - Por favor, volte e verifique os dados digitados\n";
|
|
echo "<br>Conference be at least 2 characters in length\n";
|
|
echo "<br>IP do Servidor be at least 7 characters in length\n";
|
|
}
|
|
else
|
|
{
|
|
$stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip' limit 1;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
### LOG INSERTION Admin Log Table ###
|
|
$SQL_log = "$stmt|";
|
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
$SQL_log = addslashes($SQL_log);
|
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CONFERENCES', event_type='DELETE', record_id='$conf_exten', event_code='ADMIN DELETE CONFERENCE', event_sql=\"$SQL_log\", event_notes='';";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
|
|
echo "<br><B>VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip</B>\n";
|
|
echo "<br><br>\n";
|
|
}
|
|
$ADD='10000000000000'; # go to vicidial conference list
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 3 series, record modification forms
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=3 modify user info in the system
|
|
######################
|
|
|
|
if ($ADD==3)
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$user_id = $row[0];
|
|
$user = $row[1];
|
|
$pass = $row[2];
|
|
$full_name = $row[3];
|
|
$user_level = $row[4];
|
|
$user_group = $row[5];
|
|
$phone_login = $row[6];
|
|
$phone_pass = $row[7];
|
|
$delete_users = $row[8];
|
|
$delete_user_groups = $row[9];
|
|
$delete_lists = $row[10];
|
|
$delete_campaigns = $row[11];
|
|
$delete_ingroups = $row[12];
|
|
$delete_remote_agents = $row[13];
|
|
$load_leads = $row[14];
|
|
$campaign_detail = $row[15];
|
|
$ast_admin_access = $row[16];
|
|
$ast_delete_phones = $row[17];
|
|
$delete_scripts = $row[18];
|
|
$modify_leads = $row[19];
|
|
$hotkeys_active = $row[20];
|
|
$change_agent_campaign =$row[21];
|
|
$agent_choose_ingroups =$row[22];
|
|
$scheduled_callbacks = $row[24];
|
|
$agentonly_callbacks = $row[25];
|
|
$agentcall_manual = $row[26];
|
|
$vicidial_recording = $row[27];
|
|
$vicidial_transfers = $row[28];
|
|
$delete_filters = $row[29];
|
|
$alter_agent_interface_options =$row[30];
|
|
$closer_default_blended = $row[31];
|
|
$delete_call_times = $row[32];
|
|
$modify_call_times = $row[33];
|
|
$modify_users = $row[34];
|
|
$modify_campaigns = $row[35];
|
|
$modify_lists = $row[36];
|
|
$modify_scripts = $row[37];
|
|
$modify_filters = $row[38];
|
|
$modify_ingroups = $row[39];
|
|
$modify_usergroups = $row[40];
|
|
$modify_remoteagents = $row[41];
|
|
$modify_servers = $row[42];
|
|
$view_reports = $row[43];
|
|
$vicidial_recording_override = $row[44];
|
|
$alter_custdata_override = $row[45];
|
|
$qc_enabled = $row[46];
|
|
$qc_user_level = $row[47];
|
|
$qc_pass = $row[48];
|
|
$qc_finish = $row[49];
|
|
$qc_commit = $row[50];
|
|
$add_timeclock_log = $row[51];
|
|
$modify_timeclock_log = $row[52];
|
|
$delete_timeclock_log = $row[53];
|
|
$alter_custphone_override = $row[54];
|
|
$vdc_agent_api_access = $row[55];
|
|
$modify_inbound_dids = $row[56];
|
|
$delete_inbound_dids = $row[57];
|
|
$active = $row[58];
|
|
$alert_enabled = $row[59];
|
|
$download_lists = $row[60];
|
|
$agent_shift_enforcement_override = $row[61];
|
|
$manager_shift_enforcement_override = $row[62];
|
|
$export_reports = $row[64];
|
|
$delete_from_dnc = $row[65];
|
|
$email = $row[66];
|
|
$user_code = $row[67];
|
|
$territory = $row[68];
|
|
$allow_alerts = $row[69];
|
|
$agent_choose_territories = $row[70];
|
|
$user_custom_one = $row[71];
|
|
$user_custom_two = $row[72];
|
|
$user_custom_three = $row[73];
|
|
$user_custom_four = $row[74];
|
|
$user_custom_five = $row[75];
|
|
|
|
if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) )
|
|
{
|
|
echo "<br>Você não tem permissão de alterar este usuário: $user\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<br>ALTERAR REGISTRO DE USUÁRIO: $user<form action=$PHP_SELF method=POST>\n";
|
|
if ($LOGuser_level > 8)
|
|
{echo "<input type=hidden name=ADD value=4A>\n";}
|
|
else
|
|
{
|
|
if ($LOGalter_agent_interface == "1")
|
|
{echo "<input type=hidden name=ADD value=4B>\n";}
|
|
else
|
|
{echo "<input type=hidden name=ADD value=4>\n";}
|
|
}
|
|
echo "<input type=hidden name=user value=\"$user\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left><b>$user</b>$NWB#vicidial_users-user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=20 maxlength=10 value=\"$pass\">$NWB#vicidial_users-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=full_name size=30 maxlength=30 value=\"$full_name\">$NWB#vicidial_users-full_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nível do Usuário: </td><td align=left><select size=1 name=user_level>";
|
|
$h=1;
|
|
while ($h<=$LOGuser_level)
|
|
{
|
|
echo "<option>$h</option>";
|
|
$h++;
|
|
}
|
|
echo "<option SELECTED>$user_level</option></select>$NWB#vicidial_users-user_level$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><A HREF=\"$PHP_SELF?ADD=311111&user_group=$user_group\">Grupo do Usuário</A>: </td><td align=left><select size=1 name=user_group>\n";
|
|
|
|
$stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Ugroups_to_print = mysql_num_rows($rslt);
|
|
$Ugroups_list='';
|
|
$o=0;
|
|
while ($Ugroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Ugroups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$Ugroups_list";
|
|
echo "<option SELECTED>$user_group</option>\n";
|
|
echo "</select>$NWB#vicidial_users-user_group$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Login do Ramal: </td><td align=left><input type=text name=phone_login size=20 maxlength=20 value=\"$phone_login\">$NWB#vicidial_users-phone_login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do Ramal: </td><td align=left><input type=text name=phone_pass size=20 maxlength=20 value=\"$phone_pass\">$NWB#vicidial_users-phone_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_users-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Email:</td><td align=left><input type=text name=email size=40 maxlength=100 value=\"$email\">$NWB#vicidial_users-optional$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário Code: </td><td align=left><input type=text name=user_code size=40 maxlength=100 value=\"$user_code\">$NWB#vicidial_users-optional$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Main Territorio: </td><td align=left><input type=text name=territory size=40 maxlength=100 value=\"$territory\">$NWB#vicidial_users-optional$NWE</td></tr>\n";
|
|
|
|
if ($SSuser_territories_active > 0)
|
|
{
|
|
$stmt="SELECT vut.territory,vt.territory_description from vicidial_user_territories vut,vicidial_territories vt where user='$user' and vut.territory=vt.territory;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Uterrs_to_print = mysql_num_rows($rslt);
|
|
$Uterrs_list='';
|
|
$o=0;
|
|
while ($Uterrs_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Uterrs_list .= "$rowx[0] - $rowx[1]<BR>\n";
|
|
$o++;
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"user_territories.php\">Territorios de usuario</a>: </td><td align=left>$Uterrs_list</tr>\n";
|
|
}
|
|
|
|
if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") )
|
|
{
|
|
echo "<tr bgcolor=#015B91><td colspan=2 align=center><font color=white><B>OPÇÕES DA INTERFACE DO AGENTE:</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente pode escolher Grupos de Entrada: </td><td align=left><select size=1 name=agent_choose_ingroups><option>0</option><option>1</option><option SELECTED>$agent_choose_ingroups</option></select>$NWB#vicidial_users-agent_choose_ingroups$NWE</td></tr>\n";
|
|
if ($SSuser_territories_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente Elija territorios: </td><td align=left><select size=1 name=agent_choose_territories><option>0</option><option>1</option><option SELECTED>$agent_choose_territories</option></select>$NWB#vicidial_users-agent_choose_territories$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Atalhos Ativos: </td><td align=left><select size=1 name=hotkeys_active><option>0</option><option>1</option><option SELECTED>$hotkeys_active</option></select>$NWB#vicidial_users-hotkeys_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agendamento de Chamadas: </td><td align=left><select size=1 name=scheduled_callbacks><option>0</option><option>1</option><option SELECTED>$scheduled_callbacks</option></select>$NWB#vicidial_users-scheduled_callbacks$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agendamento de Chamadas com Fidelização: </td><td align=left><select size=1 name=agentonly_callbacks><option>0</option><option>1</option><option SELECTED>$agentonly_callbacks</option></select>$NWB#vicidial_users-agentonly_callbacks$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente Manual: </td><td align=left><select size=1 name=agentcall_manual><option>0</option><option>1</option><option SELECTED>$agentcall_manual</option></select>$NWB#vicidial_users-agentcall_manual$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Gravação do Vicidial: </td><td align=left><select size=1 name=vicidial_recording><option>0</option><option>1</option><option SELECTED>$vicidial_recording</option></select>$NWB#vicidial_users-vicidial_recording$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transferências do Vicidial: </td><td align=left><select size=1 name=vicidial_transfers><option>0</option><option>1</option><option SELECTED>$vicidial_transfers</option></select>$NWB#vicidial_users-vicidial_transfers$NWE</td></tr>\n";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Finalizador Padrão como Mesclado: </td><td align=left><select size=1 name=closer_default_blended><option>0</option><option>1</option><option SELECTED>$closer_default_blended</option></select>$NWB#vicidial_users-closer_default_blended$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Conf. de Gravação no VICIDIAL:</td><td align=left><select size=1 name=vicidial_recording_override><option>DISABLED</option><option>NEVER</option><option>ONDEMAND</option><option>ALLCALLS</option><option>ALLFORCE</option><option SELECTED>$vicidial_recording_override</option></select>$NWB#vicidial_users-vicidial_recording_override$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Permissão de Alteração</td><td align=left><select size=1 name=alter_custdata_override><option>NOT_ACTIVE</option><option>ALLOW_ALTER</option><option SELECTED>$alter_custdata_override</option></select>$NWB#vicidial_users-alter_custdata_override$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Permissão de Alter. de Telefone:</td><td align=left><select size=1 name=alter_custphone_override><option>NOT_ACTIVE</option><option>ALLOW_ALTER</option><option SELECTED>$alter_custphone_override</option></select>$NWB#vicidial_users-alter_custphone_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Controle de Turno do Agente: </td><td align=left><select size=1 name=agent_shift_enforcement_override><option>DISABLED</option><option>OFF</option><option>START</option><option>ALL</option><option SELECTED>$agent_shift_enforcement_override</option></select>$NWB#vicidial_users-agent_shift_enforcement_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Alerta Ativo: </td><td align=left>$alert_enabled $NWB#vicidial_users-alert_enabled$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Alertas: </td><td align=left><select size=1 name=allow_alerts><option>0</option><option>1</option><option SELECTED>$allow_alerts</option></select>$NWB#vicidial_users-allow_alerts$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>Rankings da Campanha:$NWB#vicidial_users-campaign_ranks$NWE<BR>\n";
|
|
echo "<table border=0>\n";
|
|
echo "$RANKcampaigns_list";
|
|
echo "</table>\n";
|
|
echo "</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>Grupos de Entrada: $NWB#vicidial_users-closer_campaigns$NWE<BR>\n";
|
|
echo "<table border=0>\n";
|
|
echo "$RANKgroups_list";
|
|
echo "</table>\n";
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom 1: </td><td align=left><input type=text name=custom_one size=50 maxlength=100 value=\"$user_custom_one\">$NWB#vicidial_users-custom_one$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom 2: </td><td align=left><input type=text name=custom_two size=50 maxlength=100 value=\"$user_custom_two\">$NWB#vicidial_users-custom_two$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom 3: </td><td align=left><input type=text name=custom_three size=50 maxlength=100 value=\"$user_custom_three\">$NWB#vicidial_users-custom_three$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom 4: </td><td align=left><input type=text name=custom_four size=50 maxlength=100 value=\"$user_custom_four\">$NWB#vicidial_users-custom_four$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom 5: </td><td align=left><input type=text name=custom_five size=50 maxlength=100 value=\"$user_custom_five\">$NWB#vicidial_users-custom_five$NWE</td></tr>\n";
|
|
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>CQ Ativado:</td><td align=left><select size=1 name=qc_enabled><option>0</option><option>1</option><option SELECTED>$qc_enabled</option></select>$NWB#vicidial_users-qc_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Nível de Usuário CQ:</td><td align=left><select size=1 name=qc_user_level><option value=1>1 - Não Modificar Nada</option><option value=2>2 - Não Modificar Nada Exceto Status</option><option value=3>3 - Modificar Todos Campos</option><option value=4>4 - Verificar primeiro nível de CQ</option><option value=5>5 - Vizualizar Estatísticas de CQ</option><option value=6>6 - Capacidade de Alterar Registros Finalizados</option><option value=7>7 - Nível Gerente</option><option SELECTED>$qc_user_level</option></select>$NWB#vicidial_users-qc_user_level$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Passou no CQ:</td><td align=left><select size=1 name=qc_pass><option>0</option><option>1</option><option SELECTED>$qc_pass</option></select>$NWB#vicidial_users-qc_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Fim do CQ:</td><td align=left><select size=1 name=qc_finish><option>0</option><option>1</option><option SELECTED>$qc_finish</option></select>$NWB#vicidial_users-qc_finish$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Confirmado CQ:</td><td align=left><select size=1 name=qc_commit><option>0</option><option>1</option><option SELECTED>$qc_commit</option></select>$NWB#vicidial_users-qc_commit$NWE</td></tr>\n";
|
|
}
|
|
}
|
|
if ($LOGuser_level > 8)
|
|
{
|
|
echo "<tr bgcolor=#015B91><td colspan=2 align=center><font color=white><B>OPÇÕES DA INTERFACE ADMIN:</td></tr>\n";
|
|
|
|
#9BB9FB
|
|
#B9CBFD
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Mostrar Relatórios: </td><td align=left><select size=1 name=view_reports><option>0</option><option>1</option><option SELECTED>$view_reports</option></select>$NWB#vicidial_users-view_reports$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar opções da Interface do Agente:</td><td align=left><select size=1 name=alter_agent_interface_options><option>0</option><option>1</option><option SELECTED>$alter_agent_interface_options</option></select>$NWB#vicidial_users-alter_agent_interface_options$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Usuários: </td><td align=left><select size=1 name=modify_users><option>0</option><option>1</option><option SELECTED>$modify_users</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar a Campanha do Agente: </td><td align=left><select size=1 name=change_agent_campaign><option>0</option><option>1</option><option SELECTED>$change_agent_campaign</option></select>$NWB#vicidial_users-change_agent_campaign$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Apagar Usuários: </td><td align=left><select size=1 name=delete_users><option>0</option><option>1</option><option SELECTED>$delete_users</option></select>$NWB#vicidial_users-delete_users$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Alterar Grupos de Usuário: </td><td align=left><select size=1 name=modify_usergroups><option>0</option><option>1</option><option SELECTED>$modify_usergroups</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Apagar Grupos de Usuários: </td><td align=left><select size=1 name=delete_user_groups><option>0</option><option>1</option><option SELECTED>$delete_user_groups</option></select>$NWB#vicidial_users-delete_user_groups$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Listas: </td><td align=left><select size=1 name=modify_lists><option>0</option><option>1</option><option SELECTED>$modify_lists</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Apagar Listas: </td><td align=left><select size=1 name=delete_lists><option>0</option><option>1</option><option SELECTED>$delete_lists</option></select>$NWB#vicidial_users-delete_lists$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Carregar Registros: </td><td align=left><select size=1 name=load_leads><option>0</option><option>1</option><option SELECTED>$load_leads</option></select>$NWB#vicidial_users-load_leads$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Registros: </td><td align=left><select size=1 name=modify_leads><option>0</option><option>1</option><option SELECTED>$modify_leads</option></select>$NWB#vicidial_users-modify_leads$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Download de Listas: </td><td align=left><select size=1 name=download_lists><option>0</option><option>1</option><option SELECTED>$download_lists</option></select>$NWB#vicidial_users-modify_leads$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Exportar Relatórios: </td><td align=left><select size=1 name=export_reports><option>0</option><option>1</option><option SELECTED>$export_reports</option></select>$NWB#vicidial_users-export_reports$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Remover da Lista de Bloqueio: </td><td align=left><select size=1 name=delete_from_dnc><option>0</option><option>1</option><option SELECTED>$delete_from_dnc</option></select>$NWB#vicidial_users-delete_from_dnc$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Alterar Campanhas: </td><td align=left><select size=1 name=modify_campaigns><option>0</option><option>1</option><option SELECTED>$modify_campaigns</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Detalhes da Campanha: </td><td align=left><select size=1 name=campaign_detail><option>0</option><option>1</option><option SELECTED>$campaign_detail</option></select>$NWB#vicidial_users-campaign_detail$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Apagar Campanhas: </td><td align=left><select size=1 name=delete_campaigns><option>0</option><option>1</option><option SELECTED>$delete_campaigns</option></select>$NWB#vicidial_users-delete_campaigns$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Grupos de Ent.: </td><td align=left><select size=1 name=modify_ingroups><option>0</option><option>1</option><option SELECTED>$modify_ingroups</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Apagar Grupos de Entrada: </td><td align=left><select size=1 name=delete_ingroups><option>0</option><option>1</option><option SELECTED>$delete_ingroups</option></select>$NWB#vicidial_users-delete_ingroups$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar DDRs:</td><td align=left><select size=1 name=modify_inbound_dids><option>0</option><option>1</option><option SELECTED>$modify_inbound_dids</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Remover DDRs:</td><td align=left><select size=1 name=delete_inbound_dids><option>0</option><option>1</option><option SELECTED>$delete_inbound_dids</option></select>$NWB#vicidial_users-delete_ingroups$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Alterar Agentes Remotos: </td><td align=left><select size=1 name=modify_remoteagents><option>0</option><option>1</option><option SELECTED>$modify_remoteagents</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Apagar Usuários Remotos: </td><td align=left><select size=1 name=delete_remote_agents><option>0</option><option>1</option><option SELECTED>$delete_remote_agents</option></select>$NWB#vicidial_users-delete_remote_agents$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Scripts: </td><td align=left><select size=1 name=modify_scripts><option>0</option><option>1</option><option SELECTED>$modify_scripts</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Apagar Scriptss: </td><td align=left><select size=1 name=delete_scripts><option>0</option><option>1</option><option SELECTED>$delete_scripts</option></select>$NWB#vicidial_users-delete_scripts$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Alterar Filtros: </td><td align=left><select size=1 name=modify_filters><option>0</option><option>1</option><option SELECTED>$modify_filters</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Apagar Filtros: </td><td align=left><select size=1 name=delete_filters><option>0</option><option>1</option><option SELECTED>$delete_filters</option></select>$NWB#vicidial_users-delete_filters$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Acesso Admin ao AGC: </td><td align=left><select size=1 name=ast_admin_access><option>0</option><option>1</option><option SELECTED>$ast_admin_access</option></select>$NWB#vicidial_users-ast_admin_access$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Apagar Ramais do AGC: </td><td align=left><select size=1 name=ast_delete_phones><option>0</option><option>1</option><option SELECTED>$ast_delete_phones</option></select>$NWB#vicidial_users-ast_delete_phones$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar um Hor. de Cham.s: </td><td align=left><select size=1 name=modify_call_times><option>0</option><option>1</option><option SELECTED>$modify_call_times</option></select>$NWB#vicidial_users-modify_call_times$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>RemoverHorários de Cham.: </td><td align=left><select size=1 name=delete_call_times><option>0</option><option>1</option><option SELECTED>$delete_call_times</option></select>$NWB#vicidial_users-delete_call_times$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Alterar Servidor: </td><td align=left><select size=1 name=modify_servers><option>0</option><option>1</option><option SELECTED>$modify_servers</option></select>$NWB#vicidial_users-modify_sections$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Agente para Acesso ao API:</td><td align=left><select size=1 name=vdc_agent_api_access><option>0</option><option>1</option><option SELECTED>$vdc_agent_api_access</option></select>$NWB#vicidial_users-vdc_agent_api_access$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Incluir Registro de Ponto: </td><td align=left><select size=1 name=add_timeclock_log><option>0</option><option>1</option><option SELECTED>$add_timeclock_log</option></select>$NWB#vicidial_users-add_timeclock_log$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Alterar Registro de Log do Ponto: </td><td align=left><select size=1 name=modify_timeclock_log><option>0</option><option>1</option><option SELECTED>$modify_timeclock_log</option></select>$NWB#vicidial_users-modify_timeclock_log$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Remover Registro de Log do Ponto: </td><td align=left><select size=1 name=delete_timeclock_log><option>0</option><option>1</option><option SELECTED>$delete_timeclock_log</option></select>$NWB#vicidial_users-delete_timeclock_log$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Sobrepor Controle de Turno do Gerente: </td><td align=left><select size=1 name=manager_shift_enforcement_override><option>0</option><option>1</option><option SELECTED>$manager_shift_enforcement_override</option></select>$NWB#vicidial_users-manager_shift_enforcement_override$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
if ($LOGdelete_users > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5&user=$user\">APAGAR ESTE USUÁRIO</a>\n";
|
|
}
|
|
echo "<br><br><a href=\"./AST_agent_time_sheet.php?agent=$user\">Clique aqui para a planilha de tempo do usuário</a>\n";
|
|
echo "<br><br><a href=\"./user_status.php?user=$user\">Clique aqui para o status do usuário</a>\n";
|
|
echo "<br><br><a href=\"./user_stats.php?user=$user\">Clique aqui para ver o status do usuário</a>\n";
|
|
echo "<br><br><a href=\"./AST_agent_days_detail.php?user=$user&query_date=$REPORTdate&end_date=$REPORTdate&group[]=--ALL--&shift=ALL\">Clique aqui para um relatório de status de vários dias</a>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=8&user=$user\">Clique aqui para os registros de Chamada Agendada do usuário</a>\n";
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=USUÁRIOS&stage=$user\">Clique aqui para ver alterações Admin para este registro</FONT>\n";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=31 modify campaign info in the system - Detail view
|
|
######################
|
|
|
|
if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Básico if not allowed
|
|
|
|
if ( ($ADD==31) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPANHAS",$LOGallowed_campaigns)) ) )
|
|
{$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list
|
|
|
|
if ($ADD==31)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
if ($stage=='show_dialable')
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if ($stage=='hide_dialable')
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
|
|
$stmt="SELECT enable_vtiger_integration,vtiger_url from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$enable_vtiger_integration_LU = $row[0];
|
|
$vtiger_url_LU = $row[1];
|
|
|
|
$stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaign_name = $row[1];
|
|
$dial_status_a = $row[3];
|
|
$dial_status_b = $row[4];
|
|
$dial_status_c = $row[5];
|
|
$dial_status_d = $row[6];
|
|
$dial_status_e = $row[7];
|
|
$lead_order = $row[8];
|
|
$web_form_address = stripslashes($row[11]);
|
|
$allow_closers = $row[12];
|
|
$hopper_level = $row[13];
|
|
$auto_dial_level = $row[14];
|
|
$next_agent_call = $row[15];
|
|
$local_call_time = $row[16];
|
|
$voicemail_ext = $row[17];
|
|
$dial_timeout = $row[18];
|
|
$dial_prefix = $row[19];
|
|
$campaign_cid = $row[20];
|
|
$campaign_vdad_exten = $row[21];
|
|
$campaign_rec_exten = $row[22];
|
|
$campaign_recording = $row[23];
|
|
$campaign_rec_filename = $row[24];
|
|
$script_id = $row[25];
|
|
$get_call_launch = $row[26];
|
|
$am_message_exten = $row[27];
|
|
$amd_send_to_vmx = $row[28];
|
|
$xferconf_a_dtmf = $row[29];
|
|
$xferconf_a_number = $row[30];
|
|
$xferconf_b_dtmf = $row[31];
|
|
$xferconf_b_number = $row[32];
|
|
$alt_number_dialing = $row[33];
|
|
$scheduled_callbacks = $row[34];
|
|
$lead_filter_id = $row[35];
|
|
if ($lead_filter_id=='') {$lead_filter_id='NONE';}
|
|
$drop_call_seconds = $row[36];
|
|
$drop_action = $row[37];
|
|
$safe_harbor_exten = $row[38];
|
|
$display_dialable_count = $row[39];
|
|
$wrapup_seconds = $row[40];
|
|
$wrapup_message = $row[41];
|
|
# $closer_campaigns = $row[42];
|
|
$use_internal_dnc = $row[43];
|
|
$allcalls_delay = $row[44];
|
|
$omit_phone_code = $row[45];
|
|
$dial_method = $row[46];
|
|
$available_only_ratio_tally = $row[47];
|
|
$adaptive_dropped_percentage = $row[48];
|
|
$adaptive_maximum_level = $row[49];
|
|
$adaptive_latest_server_time = $row[50];
|
|
$adaptive_intensity = $row[51];
|
|
$adaptive_dl_diff_target = $row[52];
|
|
$concurrent_transfers = $row[53];
|
|
$auto_alt_dial = $row[54];
|
|
$auto_alt_dial_statuses = $row[55];
|
|
$agent_pause_codes_active = $row[56];
|
|
$campaign_description = $row[57];
|
|
$campaign_changedate = $row[58];
|
|
$campaign_stats_refresh = $row[59];
|
|
$campaign_logindate = $row[60];
|
|
$dial_statuses = $row[61];
|
|
$disable_alter_custdata = $row[62];
|
|
$no_hopper_leads_logins = $row[63];
|
|
$list_order_mix = $row[64];
|
|
$campaign_allow_inbound = $row[65];
|
|
$manual_dial_list_id = $row[66];
|
|
$default_xfer_group = $row[67];
|
|
$queue_priority = $row[69];
|
|
$drop_inbound_group = $row[70];
|
|
$qc_enabled = $row[71];
|
|
$qc_statuses = $row[72];
|
|
$qc_lists = $row[73];
|
|
$qc_shift_id = $row[74];
|
|
$qc_get_record_launch = $row[75];
|
|
$qc_show_recording = $row[76];
|
|
$qc_web_form_address = stripslashes($row[77]);
|
|
$qc_script = $row[78];
|
|
$survey_first_audio_file = $row[79];
|
|
$survey_dtmf_digits = $row[80];
|
|
$survey_ni_digit = $row[81];
|
|
$survey_opt_in_audio_file = $row[82];
|
|
$survey_ni_audio_file = $row[83];
|
|
$survey_method = $row[84];
|
|
$survey_no_response_action = $row[85];
|
|
$survey_ni_status = $row[86];
|
|
$survey_response_digit_map = $row[87];
|
|
$survey_xfer_exten = $row[88];
|
|
$survey_camp_record_dir = $row[89];
|
|
$disable_alter_custphone = $row[90];
|
|
$display_queue_count = $row[91];
|
|
$manual_dial_filter = $row[92];
|
|
$agent_clipboard_copy = $row[93];
|
|
$agent_extended_alt_dial = $row[94];
|
|
$use_campaign_dnc = $row[95];
|
|
$three_way_call_cid = $row[96];
|
|
$three_way_dial_prefix = $row[97];
|
|
$web_form_target = $row[98];
|
|
$vtiger_search_category = $row[99];
|
|
$vtiger_create_call_record = $row[100];
|
|
$vtiger_create_lead_record = $row[101];
|
|
$vtiger_screen_login = $row[102];
|
|
$cpd_amd_action = $row[103];
|
|
$agent_allow_group_alias = $row[104];
|
|
$default_group_alias = $row[105];
|
|
$vtiger_search_dead = $row[106];
|
|
$vtiger_status_call = $row[107];
|
|
$survey_third_digit = $row[108];
|
|
$survey_third_audio_file = $row[109];
|
|
$survey_third_status = $row[110];
|
|
$survey_third_exten = $row[111];
|
|
$survey_fourth_digit = $row[112];
|
|
$survey_fourth_audio_file = $row[113];
|
|
$survey_fourth_status = $row[114];
|
|
$survey_fourth_exten = $row[115];
|
|
$drop_lockout_time = $row[116];
|
|
$quick_transfer_button = $row[117];
|
|
$prepopulate_transfer_preset = $row[118];
|
|
$drop_rate_group = $row[119];
|
|
$view_calls_in_queue = $row[120];
|
|
$view_calls_in_queue_launch = $row[121];
|
|
$grab_calls_in_queue = $row[122];
|
|
$call_requeue_button = $row[123];
|
|
$pause_after_each_call = $row[124];
|
|
$no_hopper_dialing = $row[125];
|
|
$agent_dial_owner_only = $row[126];
|
|
$agent_display_dialable_leads = $row[127];
|
|
$web_form_address_two = $row[128];
|
|
$waitforsilence_options = $row[129];
|
|
$agent_select_territories = $row[130];
|
|
$campaign_calldate = $row[131];
|
|
$crm_popup_login = $row[132];
|
|
$crm_login_address = $row[133];
|
|
$timer_action = $row[134];
|
|
$timer_action_message = $row[135];
|
|
$timer_action_seconds = $row[136];
|
|
$start_call_url = $row[137];
|
|
$dispo_call_url = $row[138];
|
|
$xferconf_c_number = $row[139];
|
|
$xferconf_d_number = $row[140];
|
|
$xferconf_e_number = $row[141];
|
|
|
|
if (ereg("DISABLED",$list_order_mix))
|
|
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
|
|
else
|
|
{$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;}
|
|
|
|
$stmt="SELECT count(*) from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] < 1)
|
|
{
|
|
$mixes_list="<option SELECTED value=\"DISABLED\">DISABLED</option>\n";
|
|
$mixname_list["DISABLED"] = "DISABLED";
|
|
}
|
|
else
|
|
{
|
|
##### get list_mix listings for dynamic pulldown
|
|
$stmt="SELECT vcl_id,vcl_name from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE' limit 1";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$mixes_to_print = mysql_num_rows($rslt);
|
|
$mixes_list="<option value=\"DISABLED\">DISABLED</option>\n";
|
|
|
|
$o=0;
|
|
while ($mixes_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$mixes_list .= "<option value=\"ACTIVE\">ACTIVE ($rowx[0] - $rowx[1])</option>\n";
|
|
$mixname_list["ACTIVE"] = "$rowx[0] - $rowx[1]";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
$dial_statuses = preg_replace("/ -$/","",$dial_statuses);
|
|
$Dstatuses = explode(" ", $dial_statuses);
|
|
$Ds_to_print = (count($Dstatuses) -1);
|
|
|
|
$qc_statuses = preg_replace("/^ | -$/","",$qc_statuses);
|
|
$QCstatuses = explode(" ", $qc_statuses);
|
|
$QCs_to_print = (count($QCstatuses) -0);
|
|
|
|
$qc_lists = preg_replace("/^ | -$/","",$qc_lists);
|
|
$QClists = explode(" ", $qc_lists);
|
|
$QCL_to_print = (count($QClists) -0);
|
|
|
|
##### get status listings for dynamic pulldown
|
|
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$statuses_list='';
|
|
$dial_statuses_list='';
|
|
$qc_statuses_list='';
|
|
$survey_ni_status_list='';
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($rowx[0] != 'CBHOLD')
|
|
{
|
|
$dial_statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($survey_ni_status == $rowx[0])
|
|
{
|
|
$survey_ni_status_list .= "<option value=\"$rowx[0]\" SELECTED>$rowx[0] - $rowx[1]</option>\n";
|
|
}
|
|
else
|
|
{
|
|
$survey_ni_status_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
}
|
|
}
|
|
$statname_list["$rowx[0]"] = "$rowx[1]";
|
|
$LRstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if (eregi("Y",$rowx[2]))
|
|
{$HKstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
|
|
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
|
|
$p=0;
|
|
while ($p < $QCs_to_print)
|
|
{
|
|
if ($rowx[0] == $QCstatuses[$p])
|
|
{
|
|
$qc_statuses_list .= " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
|
|
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Cstatuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($Cstatuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
$statname_list["$rowx[0]"] = "$rowx[1]";
|
|
$LRstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if (eregi("Y",$rowx[2]))
|
|
{$HKstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
|
|
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
|
|
$p=0;
|
|
while ($p < $QCs_to_print)
|
|
{
|
|
if ($rowx[0] == $QCstatuses[$p])
|
|
{
|
|
$qc_statuses_list .= " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
|
|
|
|
$o++;
|
|
}
|
|
|
|
##### get in-groups listings for dynamic drop in-group pulldown
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
|
# $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Dgroups_to_print = mysql_num_rows($rslt);
|
|
$Dgroups_menu='';
|
|
$Dgroups_selected=0;
|
|
$o=0;
|
|
while ($Dgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Dgroups_menu .= "<option ";
|
|
if ($drop_inbound_group == "$rowx[0]")
|
|
{
|
|
$Dgroups_menu .= "SELECTED ";
|
|
$Dgroups_selected++;
|
|
}
|
|
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
if ($Dgroups_selected < 1)
|
|
{$Dgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Dgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
|
|
|
|
##### get in-groups listings for dynamic transfer group pulldown list menu
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups $xfer_groupsSQL order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Xgroups_to_print = mysql_num_rows($rslt);
|
|
$Xgroups_menu='';
|
|
$Xgroups_selected=0;
|
|
$o=0;
|
|
while ($Xgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Xgroups_menu .= "<option ";
|
|
if ($default_xfer_group == "$rowx[0]")
|
|
{
|
|
$Xgroups_menu .= "SELECTED ";
|
|
$Xgroups_selected++;
|
|
}
|
|
$Xgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
if ($Xgroups_selected < 1)
|
|
{$Xgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Xgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
|
|
|
|
if ($SUB<1) {$camp_detail_color=$subcamp_color;}
|
|
else {$camp_detail_color=$campaigns_color;}
|
|
if ($SUB==22) {$camp_statuses_color=$subcamp_color;}
|
|
else {$camp_statuses_color=$campaigns_color;}
|
|
if ($SUB==23) {$camp_hotkeys_color=$subcamp_color;}
|
|
else {$camp_hotkeys_color=$campaigns_color;}
|
|
if ($SUB==25) {$camp_recycle_color=$subcamp_color;}
|
|
else {$camp_recycle_color=$campaigns_color;}
|
|
if ($SUB==26) {$camp_autoalt_color=$subcamp_color;}
|
|
else {$camp_autoalt_color=$campaigns_color;}
|
|
if ($SUB==27) {$camp_pause_color=$subcamp_color;}
|
|
else {$camp_pause_color=$campaigns_color;}
|
|
if ($SUB==28) {$camp_qc_color=$subcamp_color;}
|
|
else {$camp_qc_color=$campaigns_color;}
|
|
if ($SUB==29) {$camp_listmix_color=$subcamp_color;}
|
|
else {$camp_listmix_color=$campaigns_color;}
|
|
if ($SUB=='20A') {$camp_survey_color=$subcamp_color;}
|
|
else {$camp_survey_color=$campaigns_color;}
|
|
echo "<TABLE WIDTH=$page_width CELLPADDING=2 CELLSPACING=0><TR BGCOLOR=\"$campaigns_color\">\n";
|
|
echo "<TD><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\"> <B>$row[0]</B>: </font></TD>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=34&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Básico </font></a></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_detail_color\"> <a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Detalhes </font></a> </TD>";
|
|
echo "<TD BGCOLOR=\"$camp_statuses_color\"><a href=\"$PHP_SELF?ADD=31&SUB=22&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Status</font></a></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_hotkeys_color\"><a href=\"$PHP_SELF?ADD=31&SUB=23&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Atalhos</font></a></TD>";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<TD BGCOLOR=\"$camp_recycle_color\"><a href=\"$PHP_SELF?ADD=31&SUB=25&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Lead Recycling</font></a></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_autoalt_color\"><a href=\"$PHP_SELF?ADD=31&SUB=26&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Discar Num. Alt.</font></a></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_listmix_color\"><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Mesclagem de Lista</font></a></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_survey_color\"><a href=\"$PHP_SELF?ADD=31&SUB=20A&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Pesquisa</font></a></TD>";
|
|
}
|
|
echo "<TD BGCOLOR=\"$camp_pause_color\"><a href=\"$PHP_SELF?ADD=31&SUB=27&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Códigos de Pausa</font></a></TD>";
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
echo "<TD BGCOLOR=\"$camp_qc_color\"><a href=\"$PHP_SELF?ADD=31&SUB=28&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">QC</font></a></TD>";
|
|
}
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
echo "<TD></TD><TD></TD><TD></TD><TD></TD>\n";
|
|
}
|
|
echo "<TD> <a href=\"./AST_timeonVDADall.php?RR=4&DB=0&group=$row[0]\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Tempo Real</font></a></TD>\n";
|
|
echo "</TR></TABLE>\n";
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<center>\n";
|
|
|
|
if ($SUB < 1)
|
|
{
|
|
echo "<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left><b>$row[0]</b>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Campanha: </td><td align=left><input type=text name=campaign_name size=40 maxlength=40 value=\"$campaign_name\">$NWB#vicidial_campaigns-campaign_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição da Campanha: </td><td align=left><input type=text name=campaign_description size=40 maxlength=255 value=\"$campaign_description\">$NWB#vicidial_campaigns-campaign_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Data da Alter.: </td><td align=left>$campaign_changedate $NWB#vicidial_campaigns-campaign_changedate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Data do Login: </td><td align=left>$campaign_logindate $NWB#vicidial_campaigns-campaign_logindate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Call Date: </td><td align=left>$campaign_calldate $NWB#vicidial_campaigns-campaign_calldate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$row[2]</option></select>$NWB#vicidial_campaigns-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão de Estacionamento: </td><td align=left><input type=text name=park_ext size=10 maxlength=10 value=\"$row[9]\"> - Filename: <input type=text name=park_file_name size=10 maxlength=10 value=\"$row[10]\">$NWB#vicidial_campaigns-park_ext$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web: </td><td align=left><input type=text name=web_form_address size=70 maxlength=1055 value=\"$web_form_address\">$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
|
|
if ($SSenable_second_webform > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web Two: </td><td align=left><input type=text name=web_form_address_two size=70 maxlength=1055 value=\"$web_form_address_two\">$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Target do Form. Web: </td><td align=left><input type=text name=web_form_target size=25 maxlength=255 value=\"$web_form_target\">$NWB#vicidial_campaigns-web_form_target$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Finalizadores (Closers): </td><td align=left><select size=1 name=allow_closers><option>Y</option><option>N</option><option SELECTED>$allow_closers</option></select>$NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Entrantes e Blended:</td><td align=left><select size=1 name=campaign_allow_inbound><option>Y</option><option>N</option><option SELECTED>$campaign_allow_inbound</option></select>$NWB#vicidial_campaigns-campaign_allow_inbound$NWE</td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($Ds_to_print > $o)
|
|
{
|
|
$o++;
|
|
$Dstatus = $Dstatuses[$o];
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Status de Discagem$o: </td><td align=left> \n";
|
|
|
|
if ($DEFstatusDISABLED > 0)
|
|
{
|
|
echo "<font color=grey><DEL><b>$Dstatus</b> - $statname_list[$Dstatus] <font size=2>\n";
|
|
echo "REMOVE</DEL></td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<b>$Dstatus</b> - $statname_list[$Dstatus] <font size=2>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=68&campaign_id=$campaign_id&status=$Dstatuses[$o]\">REMOVER</a></td></tr>\n";
|
|
}
|
|
}
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
|
|
echo "<option value=\"\"> - NONE - </option>\n";
|
|
|
|
echo "$dial_statuses_list";
|
|
echo "</select> \n";
|
|
echo "<input type=submit name=submit value=ADD> $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ordem da Lista: </td><td align=left><select size=1 name=lead_order>
|
|
<option SELECTED>$lead_order</option>
|
|
<option>DOWN</option>
|
|
<option>UP</option>
|
|
<option>DOWN PHONE</option>
|
|
<option>UP PHONE</option>
|
|
<option>DOWN LAST NAME</option>
|
|
<option>UP LAST NAME</option>
|
|
<option>DOWN COUNT</option>
|
|
<option>UP COUNT</option>
|
|
<option>RANDOM</option>
|
|
<option>DOWN LAST CALL TIME</option>
|
|
<option>UP LAST CALL TIME</option>
|
|
<option>DOWN RANK</option>
|
|
<option>UP RANK</option>
|
|
<option>DOWN OWNER</option>
|
|
<option>UP OWNER</option>
|
|
<option>DOWN TIMEZONE</option>
|
|
<option>UP TIMEZONE</option>
|
|
<option>DOWN 2nd NEW</option>
|
|
<option>DOWN 3rd NEW</option>
|
|
<option>DOWN 4th NEW</option>
|
|
<option>DOWN 5th NEW</option>
|
|
<option>DOWN 6th NEW</option>
|
|
<option>UP 2nd NEW</option>
|
|
<option>UP 3rd NEW</option>
|
|
<option>UP 4th NEW</option>
|
|
<option>UP 5th NEW</option>
|
|
<option>UP 6th NEW</option>
|
|
<option>DOWN PHONE 2nd NEW</option>
|
|
<option>DOWN PHONE 3rd NEW</option>
|
|
<option>DOWN PHONE 4th NEW</option>
|
|
<option>DOWN PHONE 5th NEW</option>
|
|
<option>DOWN PHONE 6th NEW</option>
|
|
<option>UP PHONE 2nd NEW</option>
|
|
<option>UP PHONE 3rd NEW</option>
|
|
<option>UP PHONE 4th NEW</option>
|
|
<option>UP PHONE 5th NEW</option>
|
|
<option>UP PHONE 6th NEW</option>
|
|
<option>DOWN LAST NAME 2nd NEW</option>
|
|
<option>DOWN LAST NAME 3rd NEW</option>
|
|
<option>DOWN LAST NAME 4th NEW</option>
|
|
<option>DOWN LAST NAME 5th NEW</option>
|
|
<option>DOWN LAST NAME 6th NEW</option>
|
|
<option>UP LAST NAME 2nd NEW</option>
|
|
<option>UP LAST NAME 3rd NEW</option>
|
|
<option>UP LAST NAME 4th NEW</option>
|
|
<option>UP LAST NAME 5th NEW</option>
|
|
<option>UP LAST NAME 6th NEW</option>
|
|
<option>DOWN COUNT 2nd NEW</option>
|
|
<option>DOWN COUNT 3rd NEW</option>
|
|
<option>DOWN COUNT 4th NEW</option>
|
|
<option>DOWN COUNT 5th NEW</option>
|
|
<option>DOWN COUNT 6th NEW</option>
|
|
<option>UP COUNT 2nd NEW</option>
|
|
<option>UP COUNT 3rd NEW</option>
|
|
<option>UP COUNT 4th NEW</option>
|
|
<option>UP COUNT 5th NEW</option>
|
|
<option>UP COUNT 6th NEW</option>
|
|
<option>RANDOM 2nd NEW</option>
|
|
<option>RANDOM 3rd NEW</option>
|
|
<option>RANDOM 4th NEW</option>
|
|
<option>RANDOM 5th NEW</option>
|
|
<option>RANDOM 6th NEW</option>
|
|
<option>DOWN LAST CALL TIME 2nd NEW</option>
|
|
<option>DOWN LAST CALL TIME 3rd NEW</option>
|
|
<option>DOWN LAST CALL TIME 4th NEW</option>
|
|
<option>DOWN LAST CALL TIME 5th NEW</option>
|
|
<option>DOWN LAST CALL TIME 6th NEW</option>
|
|
<option>UP LAST CALL TIME 2nd NEW</option>
|
|
<option>UP LAST CALL TIME 3rd NEW</option>
|
|
<option>UP LAST CALL TIME 4th NEW</option>
|
|
<option>UP LAST CALL TIME 5th NEW</option>
|
|
<option>UP LAST CALL TIME 6th NEW</option>
|
|
<option>DOWN RANK 2nd NEW</option>
|
|
<option>DOWN RANK 3rd NEW</option>
|
|
<option>DOWN RANK 4th NEW</option>
|
|
<option>DOWN RANK 5th NEW</option>
|
|
<option>DOWN RANK 6th NEW</option>
|
|
<option>UP RANK 2nd NEW</option>
|
|
<option>UP RANK 3rd NEW</option>
|
|
<option>UP RANK 4th NEW</option>
|
|
<option>UP RANK 5th NEW</option>
|
|
<option>UP RANK 6th NEW</option>
|
|
<option>DOWN OWNER 2nd NEW</option>
|
|
<option>DOWN OWNER 3rd NEW</option>
|
|
<option>DOWN OWNER 4th NEW</option>
|
|
<option>DOWN OWNER 5th NEW</option>
|
|
<option>DOWN OWNER 6th NEW</option>
|
|
<option>UP OWNER 2nd NEW</option>
|
|
<option>UP OWNER 3rd NEW</option>
|
|
<option>UP OWNER 4th NEW</option>
|
|
<option>UP OWNER 5th NEW</option>
|
|
<option>UP OWNER 6th NEW</option>
|
|
<option>DOWN TIMEZONE 2nd NEW</option>
|
|
<option>DOWN TIMEZONE 3rd NEW</option>
|
|
<option>DOWN TIMEZONE 4th NEW</option>
|
|
<option>DOWN TIMEZONE 5th NEW</option>
|
|
<option>DOWN TIMEZONE 6th NEW</option>
|
|
<option>UP TIMEZONE 2nd NEW</option>
|
|
<option>UP TIMEZONE 3rd NEW</option>
|
|
<option>UP TIMEZONE 4th NEW</option>
|
|
<option>UP TIMEZONE 5th NEW</option>
|
|
<option>UP TIMEZONE 6th NEW</option>
|
|
</select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">Mesclagem de Lista</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
|
|
echo "$mixes_list";
|
|
if (ereg("DISABLED",$list_order_mix))
|
|
{echo "<option selected value=\"$list_order_mix\">$list_order_mix - $mixname_list[$list_order_mix]</option>\n";}
|
|
else
|
|
{echo "<option selected value=\"ACTIVE\">ACTIVE ($mixname_list[ACTIVE])</option>\n";}
|
|
echo "</select>$NWB#vicidial_campaigns-list_order_mix$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31111111&lead_filter_id=$lead_filter_id\">Filtro de registros</a>: </td><td align=left><select size=1 name=lead_filter_id>\n";
|
|
echo "$filters_list";
|
|
echo "<option selected value=\"$lead_filter_id\">$lead_filter_id - $filtername_list[$lead_filter_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-lead_filter_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tiempo de caída de bloqueo: </td><td align=left><input type=text name=drop_lockout_time size=6 maxlength=6 value=\"$drop_lockout_time\"> $NWB#vicidial_campaigns-drop_lockout_time$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Nível do Hopper: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>20</option><option>50</option><option>100</option><option>200</option><option>500</option><option>700</option><option>1000</option><option>2000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Forçar Reset do Hopper: </td><td align=left><select size=1 name=reset_hopper><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_campaigns-force_reset_hopper$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Método de Discagem: </td><td align=left><select size=1 name=dial_method><option >MANUAL</option><option>RATIO</option><option>ADAPT_HARD_LIMIT</option><option>ADAPT_TAPERED</option><option>ADAPT_AVERAGE</option><option>ENTRANTE_MAN</option><option SELECTED>$dial_method</option></select>$NWB#vicidial_campaigns-dial_method$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Nível de Discagem Automática: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
|
$adl=0;
|
|
while($adl <= $SSauto_dial_limit)
|
|
{
|
|
echo "<option>$adl</option>\n";
|
|
if ($adl < 1)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 3)
|
|
{$adl = ($adl + 0.1);}
|
|
else
|
|
{
|
|
if ($adl < 4)
|
|
{$adl = ($adl + 0.25);}
|
|
else
|
|
{
|
|
if ($adl < 5)
|
|
{$adl = ($adl + 0.5);}
|
|
else
|
|
{
|
|
if ($adl < 10)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 20)
|
|
{$adl = ($adl + 2);}
|
|
else
|
|
{
|
|
if ($adl < 40)
|
|
{$adl = ($adl + 5);}
|
|
else
|
|
{
|
|
if ($adl < 200)
|
|
{$adl = ($adl + 10);}
|
|
else
|
|
{
|
|
if ($adl < 400)
|
|
{$adl = ($adl + 50);}
|
|
else
|
|
{
|
|
if ($adl < 1000)
|
|
{$adl = ($adl + 100);}
|
|
else
|
|
{$adl = ($adl + 1);}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE <input type=checkbox name=dial_level_override value=\"1\">SOBREPOR ADAPT</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Somente Lista Autom.: </td><td align=left><select size=1 name=available_only_ratio_tally><option >Y</option><option>N</option><option SELECTED>$available_only_ratio_tally</option></select>$NWB#vicidial_campaigns-available_only_ratio_tally$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Limite de Derrubadas (drop): </td><td align=left><select size=1 name=adaptive_dropped_percentage>\n";
|
|
$n=101;
|
|
while ($n>=0.1)
|
|
{
|
|
if ($n <= 3)
|
|
{$n = ($n - 0.1);}
|
|
else
|
|
{$n--;}
|
|
echo "<option>$n</option>\n";
|
|
}
|
|
echo "<option SELECTED>$adaptive_dropped_percentage</option></select>% $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Nível Máximo de Discagem: </td><td align=left><input type=text name=adaptive_maximum_level size=6 maxlength=6 value=\"$adaptive_maximum_level\"><i>number only</i> $NWB#vicidial_campaigns-adaptive_maximum_level$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Horário Final do Servidor: </td><td align=left><input type=text name=adaptive_latest_server_time size=6 maxlength=4 value=\"$adaptive_latest_server_time\"><i>4 somente dígitos</i> $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Modificador de Intensidade : </td><td align=left><select size=1 name=adaptive_intensity>\n";
|
|
$n=40;
|
|
while ($n>=-40)
|
|
{
|
|
$dtl = 'Balanced';
|
|
if ($n<0) {$dtl = 'Less Intense';}
|
|
if ($n>0) {$dtl = 'More Intense';}
|
|
if ($n == $adaptive_intensity)
|
|
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
|
|
else
|
|
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
|
|
$n--;
|
|
}
|
|
echo "</select> $NWB#vicidial_campaigns-adaptive_intensity$NWE</td></tr>\n";
|
|
|
|
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Alvo de Diferença de Nível: </td><td align=left><select size=1 name=adaptive_dl_diff_target>\n";
|
|
$n=40;
|
|
while ($n>=-40)
|
|
{
|
|
$nabs = abs($n);
|
|
$dtl = 'Balanced';
|
|
if ($n<0) {$dtl = 'Agentes Waiting for Calls';}
|
|
if ($n>0) {$dtl = 'Calls Waiting for Agentes';}
|
|
if ($n == $adaptive_dl_diff_target)
|
|
{echo "<option SELECTED value=\"$n\">$n --- $nabs $dtl</option>\n";}
|
|
else
|
|
{echo "<option value=\"$n\">$n --- $nabs $dtl</option>\n";}
|
|
$n--;
|
|
}
|
|
echo "</select> $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Transferências Simultâneas: </td><td align=left><select size=1 name=concurrent_transfers><option >AUTO</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option SELECTED>$concurrent_transfers</option></select>$NWB#vicidial_campaigns-concurrent_transfers$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Prioridade da Fila:</td><td align=left><select size=1 name=queue_priority>\n";
|
|
$n=99;
|
|
while ($n>=-99)
|
|
{
|
|
$dtl = 'Even';
|
|
if ($n<0) {$dtl = 'Lower';}
|
|
if ($n>0) {$dtl = 'Higher';}
|
|
if ($n == $queue_priority)
|
|
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
|
|
else
|
|
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
|
|
$n--;
|
|
}
|
|
echo "</select> $NWB#vicidial_campaigns-queue_priority$NWE</td></tr>\n";
|
|
|
|
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Varias campañas Drop Rate Grupo: </td><td align=left><select size=1 name=drop_rate_group>";
|
|
##### get list_mix listings for dynamic pulldown
|
|
$stmt="SELECT group_id from vicidial_drop_rate_groups;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$DRgroups_to_print = mysql_num_rows($rslt);
|
|
$DRgroups_list="<option value=\"DISABLED\">DISABLED</option>\n";
|
|
|
|
$o=0;
|
|
while ($DRgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$DRgroups[$o] = "$rowx[0]";
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($DRgroups_to_print > $o)
|
|
{
|
|
$DRcampaigns='';
|
|
$stmt="SELECT campaign_id from vicidial_campaigns where drop_rate_group='$DRgroups[$o]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$DRcampaigns_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ($DRcampaigns_to_print > $p)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$DRcampaigns .= "$rowx[0] ";
|
|
$p++;
|
|
}
|
|
if (strlen($DRcampaigns)<2)
|
|
{$DRcampaigns='-EMPTY- ';}
|
|
while(strlen($DRcampaigns) > 45) {$DRcampaigns = substr("$DRcampaigns", 0, -1);}
|
|
if(strlen($DRcampaigns) > 42) {$DRcampaigns = "$DRcampaigns...";}
|
|
|
|
$DRgroups_list .= "<option value=\"$DRgroups[$o]\">$DRgroups[$o] ( $DRcampaigns)</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$DRgroups_list<option SELECTED>$drop_rate_group</option></select>$NWB#vicidial_campaigns-drop_rate_group$NWE</td></tr>\n";
|
|
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Discar Alternativo: </td><td align=left><select size=1 name=auto_alt_dial><option >NONE</option><option>ALT_ONLY</option><option>ADDR3_ONLY</option><option>ALT_AND_ADDR3</option><option>ALT_AND_EXTENDED</option><option>ALT_AND_ADDR3_AND_EXTENDED</option><option>EXTENDED_ONLY</option><option SELECTED>$auto_alt_dial</option></select>$NWB#vicidial_campaigns-auto_alt_dial$NWE</td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Próximo Agente a chamar: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option><option>longest_wait_time</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$local_call_time\">Horário Local da Chamada: </a></td><td align=left><select size=1 name=local_call_time>\n";
|
|
echo "$call_times_list";
|
|
echo "<option selected value=\"$local_call_time\">$local_call_time - $call_timename_list[$local_call_time]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-local_call_time$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Tempo de Espera da Discagem: </td><td align=left><input type=text name=dial_timeout size=3 maxlength=3 value=\"$dial_timeout\"> <i>in seconds</i>$NWB#vicidial_campaigns-dial_timeout$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Prefixo de Discagem: </td><td align=left><input type=text name=dial_prefix size=20 maxlength=20 value=\"$dial_prefix\"> <font size=1>for 91NXXNXXXXXX value would be 9, for no dial prefix use X</font>$NWB#vicidial_campaigns-dial_prefix$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Omitir Código de Telefone: </td><td align=left><select size=1 name=omit_phone_code><option>Y</option><option>N</option><option SELECTED>$omit_phone_code</option></select>$NWB#vicidial_campaigns-omit_phone_code$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>CallerID da Campanha: </td><td align=left><input type=text name=campaign_cid size=20 maxlength=20 value=\"$campaign_cid\">$NWB#vicidial_campaigns-campaign_cid$NWE\n";
|
|
$stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and campaign_cid_override != '' and active='Y';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] > 0)
|
|
{echo " <font color=red>LIST OVERRIDE ACTIVE</font>";}
|
|
echo "</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Extensão VDAD da Campanha: </td><td align=left><input type=text name=campaign_vdad_exten size=10 maxlength=20 value=\"$campaign_vdad_exten\">$NWB#vicidial_campaigns-campaign_vdad_exten$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão de Gravação da Campanha: </td><td align=left><input type=text name=campaign_rec_exten size=10 maxlength=10 value=\"$campaign_rec_exten\">$NWB#vicidial_campaigns-campaign_rec_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Gravação da Campanha: </td><td align=left><select size=1 name=campaign_recording><option>NEVER</option><option>ONDEMAND</option><option>ALLCALLS</option><option>ALLFORCE</option><option SELECTED>$campaign_recording</option></select>$NWB#vicidial_campaigns-campaign_recording$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Arquivo de Gravação da Campanha: </td><td align=left><input type=text name=campaign_rec_filename size=50 maxlength=50 value=\"$campaign_rec_filename\">$NWB#vicidial_campaigns-campaign_rec_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Atraso de Gravação: </td><td align=left><input type=text name=allcalls_delay size=3 maxlength=3 value=\"$allcalls_delay\"> <i>in seconds</i>$NWB#vicidial_campaigns-allcalls_delay$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script</a>: </td><td align=left><select size=1 name=script_id>\n";
|
|
echo "$scripts_list";
|
|
echo "<option selected value=\"$script_id\">$script_id - $scriptname_list[$script_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-campaign_script$NWE\n";
|
|
$stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and agent_script_override != '' and active='Y';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] > 0)
|
|
{echo " <font color=red>LIST OVERRIDE ACTIVE</font>";}
|
|
echo "</td></tr>\n";
|
|
|
|
$eswHTML='';
|
|
if ($SSenable_second_webform > 0)
|
|
{$eswHTML = '<option>WEBFORMTWO</option>';}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pegar lançamento da chamada: </td><td align=left><select size=1 name=get_call_launch><option selected>NONE</option><option>SCRIPT</option><option>WEBFORM</option>$eswHTML<option selected>$get_call_launch</option></select>$NWB#vicidial_campaigns-get_call_launch$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Mensagem na Secretária Eletrônica: </td><td><input type=text size=50 maxlength=100 name=am_message_exten id=am_message_exten value=\"$am_message_exten\"> <a href=\"javascript:launch_chooser('am_message_exten','date',1200);\">audio chooser</a> $NWB#vicidial_campaigns-am_message_exten$NWE\n";
|
|
$stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and am_message_exten_override != '' and active='Y';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] > 0)
|
|
{echo " <font color=red>LIST OVERRIDE ACTIVE</font>";}
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Opciones WaitForSilence: </td><td align=left><input type=text name=waitforsilence_options size=20 maxlength=25 value=\"$waitforsilence_options\">$NWB#vicidial_campaigns-waitforsilence_options$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Extensão para enviar AMD: </td><td align=left><select size=1 name=amd_send_to_vmx><option>Y</option><option>N</option><option SELECTED>$amd_send_to_vmx</option></select>$NWB#vicidial_campaigns-amd_send_to_vmx$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Ação CPD AMD: </td><td align=left><select size=1 name=cpd_amd_action><option>DISABLED</option><option>DISPO</option><option>MESSAGE</option><option SELECTED>$cpd_amd_action</option></select>$NWB#vicidial_campaigns-cpd_amd_action$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transfer-Conf DTMF 1: </td><td align=left><input type=text name=xferconf_a_dtmf size=20 maxlength=50 value=\"$xferconf_a_dtmf\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 1: </td><td align=left><input type=text name=xferconf_a_number size=20 maxlength=50 value=\"$xferconf_a_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transfer-Conf DTMF 2: </td><td align=left><input type=text name=xferconf_b_dtmf size=20 maxlength=50 value=\"$xferconf_b_dtmf\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 2: </td><td align=left><input type=text name=xferconf_b_number size=20 maxlength=50 value=\"$xferconf_b_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 3: </td><td align=left><input type=text name=xferconf_c_number size=20 maxlength=50 value=\"$xferconf_c_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 4: </td><td align=left><input type=text name=xferconf_d_number size=20 maxlength=50 value=\"$xferconf_d_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 5: </td><td align=left><input type=text name=xferconf_e_number size=20 maxlength=50 value=\"$xferconf_e_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Rápida transferencia Button: </td><td align=left><select size=1 name=quick_transfer_button><option>N</option><option>IN_GROUP</option><option>PRESET_1</option><option>PRESET_2</option><option>PRESET_3</option><option>PRESET_4</option><option>PRESET_5</option><option SELECTED>$quick_transfer_button</option></select>$NWB#vicidial_campaigns-quick_transfer_button$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transferencia de rellenar previamente Preset: </td><td align=left><select size=1 name=prepopulate_transfer_preset><option>N</option><option>PRESET_1</option><option>PRESET_2</option><option>PRESET_3</option><option>PRESET_4</option><option>PRESET_5</option><option SELECTED>$prepopulate_transfer_preset</option></select>$NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador de Acción de: </td><td align=left><select size=1 name=timer_action><option selected>NONE</option><option>D1_DIAL</option><option>D2_DIAL</option><option>D3_DIAL</option><option>D4_DIAL</option><option>D5_DIAL</option><option>MESSAGE_ONLY</option><option>WEBFORM</option>$eswHTML<option selected>$timer_action</option></select>$NWB#vicidial_campaigns-timer_action$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador de mensaje de acción: </td><td align=left><input type=text name=timer_action_message size=50 maxlength=255 value=\"$timer_action_message\">$NWB#vicidial_campaigns-timer_action_message$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador Segundos Acción: </td><td align=left><input type=text name=timer_action_seconds size=10 maxlength=10 value=\"$timer_action_seconds\">$NWB#vicidial_campaigns-timer_action_seconds$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Discagem para número alternativo: </td><td align=left><select size=1 name=alt_number_dialing><option>Y</option><option>N</option><option SELECTED>$alt_number_dialing</option></select>$NWB#vicidial_campaigns-alt_number_dialing$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agendamento de Chamadas: </td><td align=left><select size=1 name=scheduled_callbacks><option>Y</option><option>N</option><option SELECTED>$scheduled_callbacks</option></select>$NWB#vicidial_campaigns-scheduled_callbacks$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Tempo até derrubar(DROP): </td><td align=left><input type=text name=drop_call_seconds size=5 maxlength=2 value=\"$drop_call_seconds\">$NWB#vicidial_campaigns-drop_call_seconds$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Ação de Drop:</td><td align=left><select size=1 name=drop_action><option>HANGUP</option><option>MESSAGE</option><option>VOICEMAIL</option><option>IN_GROUP</option><option SELECTED>$drop_action</option></select>$NWB#vicidial_campaigns-drop_action$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Extensão do Porto Seguro: </td><td align=left><input type=text name=safe_harbor_exten size=10 maxlength=20 value=\"$safe_harbor_exten\">$NWB#vicidial_campaigns-safe_harbor_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Correio de Voz: </td><td align=left><input type=text name=voicemail_ext id=voicemail_ext size=12 maxlength=10 value=\"$voicemail_ext\"> <a href=\"javascript:launch_vm_chooser('voicemail_ext','vm',1600);\">voicemail chooser</a>$NWB#vicidial_campaigns-voicemail_ext$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Grupo de Transferência de Drop:</td><td align=left><select size=1 name=drop_inbound_group>";
|
|
echo "$Dgroups_menu";
|
|
echo "</select>$NWB#vicidial_campaigns-drop_inbound_group$NWE\n";
|
|
$stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and drop_inbound_group_override != '' and active='Y';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] > 0)
|
|
{echo " <font color=red>LIST OVERRIDE ACTIVE</font>";}
|
|
echo "</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tempo de pós atendimento: </td><td align=left><input type=text name=wrapup_seconds size=5 maxlength=3 value=\"$wrapup_seconds\">$NWB#vicidial_campaigns-wrapup_seconds$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mensagem de pós atendimento: </td><td align=left><input type=text name=wrapup_message size=40 maxlength=255 value=\"$wrapup_message\">$NWB#vicidial_campaigns-wrapup_message$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Usar lista de bloqueio interna: </td><td align=left><select size=1 name=use_internal_dnc><option>Y</option><option>N</option><option>AREACODE</option><option SELECTED>$use_internal_dnc</option></select>$NWB#vicidial_campaigns-use_internal_dnc$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Usar Lista de Bloqueio: </td><td align=left><select size=1 name=use_campaign_dnc><option>Y</option><option>N</option><option>AREACODE</option><option SELECTED>$use_campaign_dnc</option></select>$NWB#vicidial_campaigns-use_campaign_dnc$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>AgentCódigos de PausaAtivo: </td><td align=left><select size=1 name=agent_pause_codes_active><option>FORCE</option><option>Y</option><option>N</option><option SELECTED>$agent_pause_codes_active</option></select>$NWB#vicidial_campaigns-agent_pause_codes_active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Stats Refresh: </td><td align=left><select size=1 name=campaign_stats_refresh><option>Y</option><option>N</option><option SELECTED>$campaign_stats_refresh</option></select>$NWB#vicidial_campaigns-campaign_stats_refresh$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Desabilitar Alteração de Dados do Cliente:</td><td align=left><select size=1 name=disable_alter_custdata><option>Y</option><option>N</option><option SELECTED>$disable_alter_custdata</option></select>$NWB#vicidial_campaigns-disable_alter_custdata$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Desab. Alterar Telefone do Cliente :</td><td align=left><select size=1 name=disable_alter_custphone><option>Y</option><option>N</option><option>ESCONDER</option><option SELECTED>$disable_alter_custphone</option></select>$NWB#vicidial_campaigns-disable_alter_custphone$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Logar Sem Registros no Hopper: </td><td align=left><select size=1 name=no_hopper_leads_logins><option>Y</option><option>N</option><option SELECTED>$no_hopper_leads_logins</option></select>$NWB#vicidial_campaigns-no_hopper_leads_logins$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>N marcado Hopper: </td><td align=left><select size=1 name=no_hopper_dialing><option>Y</option><option>N</option><option SELECTED>$no_hopper_dialing</option></select>$NWB#vicidial_campaigns-no_hopper_dialing$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Único propietario de marcado: </td><td align=left><select size=1 name=agent_dial_owner_only><option>NONE</option><option>USER</option><option>TERRITORY</option><option>USER_GROUP</option><option SELECTED>$agent_dial_owner_only</option></select>$NWB#vicidial_campaigns-agent_dial_owner_only$NWE</td></tr>\n";
|
|
|
|
if ($SSuser_territories_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente Seleccione territorios: </td><td align=left><select size=1 name=agent_select_territories><option>Y</option><option>N</option><option SELECTED>$agent_select_territories</option></select>$NWB#vicidial_campaigns-agent_select_territories$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Agente de pantalla Dialable Leads: </td><td align=left><select size=1 name=agent_display_dialable_leads><option>Y</option><option>N</option><option SELECTED>$agent_display_dialable_leads</option></select>$NWB#vicidial_campaigns-agent_display_dialable_leads$NWE</td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Mostrar Clientes em Espera ao Agente:</td><td align=left><select size=1 name=display_queue_count><option>Y</option><option>N</option><option SELECTED>$display_queue_count</option></select>$NWB#vicidial_campaigns-display_queue_count$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Agente Pide Ver en cola: </td><td align=left><select size=1 name=view_calls_in_queue><option>NONE</option><option>ALL</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option SELECTED>$view_calls_in_queue</option></select>$NWB#vicidial_campaigns-view_calls_in_queue$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Ver las llamadas en cola de lanzamiento: </td><td align=left><select size=1 name=view_calls_in_queue_launch><option>AUTO</option><option>MANUAL</option><option SELECTED>$view_calls_in_queue_launch</option></select>$NWB#vicidial_campaigns-view_calls_in_queue_launch$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Agente Pide Agarre en cola: </td><td align=left><select size=1 name=grab_calls_in_queue><option>Y</option><option>N</option><option SELECTED>$grab_calls_in_queue</option></select>$NWB#vicidial_campaigns-grab_calls_in_queue$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente de Call Re-Cola Button: </td><td align=left><select size=1 name=call_requeue_button><option>Y</option><option>N</option><option SELECTED>$call_requeue_button</option></select>$NWB#vicidial_campaigns-call_requeue_button$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente de pausa después de cada llamada: </td><td align=left><select size=1 name=pause_after_each_call><option>Y</option><option>N</option><option SELECTED>$pause_after_each_call</option></select>$NWB#vicidial_campaigns-pause_after_each_call$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>ID da Lista Manual :</td><td align=left><input type=text name=manual_dial_list_id size=15 maxlength=12 value=\"$manual_dial_list_id\">$NWB#vicidial_campaigns-manual_dial_list_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Filtro de Discagem Manual:</td><td align=left><select size=1 name=manual_dial_filter><option>NONE</option><option>DNC_ONLY</option><option>CAMPLISTAS_ONLY</option><option>DNC_AND_CAMPLISTAS</option><option SELECTED>$manual_dial_filter</option></select>$NWB#vicidial_campaigns-manual_dial_filter$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Cópia p/ Área de Transf. do Agente: </td><td align=left><select size=1 name=agent_clipboard_copy><option>NONE</option><option>lead_id</option><option>list_id</option><option>title</option><option>first_name</option><option>middle_initial</option><option>last_name</option><option>phone_code</option><option>phone_number</option><option>address1</option><option>address2</option><option>address3</option><option>city</option><option>state</option><option>province</option><option>postal_code</option><option>country_code</option><option>alt_phone</option><option>comments</option><option>date_of_birth</option><option>email</option><option>gender</option><option>gmt_offset_now</option><option>security_phrase</option><option>vendor_lead_code</option><option SELECTED>$agent_clipboard_copy</option></select>$NWB#vicidial_campaigns-agent_clipboard_copy$NWE</td></tr>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Discagem Extendida na tela do Agente : </td><td align=left><select size=1 name=agent_extended_alt_dial><option>Y</option><option>N</option><option SELECTED>$agent_extended_alt_dial</option></select>$NWB#vicidial_campaigns-agent_extended_alt_dial$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>CallerID de Chamada a 3: </td><td align=left><select size=1 name=three_way_call_cid><option>CAMPANHA</option><option>CUSTOMER</option><option>AGENT_PHONE</option><option>AGENT_CHOOSE</option><option SELECTED>$three_way_call_cid</option></select>$NWB#vicidial_campaigns-three_way_call_cid$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Prefixo para chamadas a 3: </td><td align=left><input type=text name=three_way_dial_prefix size=15 maxlength=20 value=\"$three_way_dial_prefix\">$NWB#vicidial_campaigns-three_way_dial_prefix$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Alias de Grupo Permitido: </td><td align=left><select size=1 name=agent_allow_group_alias><option>Y</option><option>N</option><option SELECTED>$agent_allow_group_alias</option></select>$NWB#vicidial_campaigns-agent_allow_group_alias$NWE</td></tr>\n";
|
|
|
|
if ($agent_allow_group_alias == 'Y')
|
|
{
|
|
##### get groups_alias listings for dynamic default group alias pulldown list menu
|
|
$stmt="SELECT group_alias_id,group_alias_name from groups_alias where active='Y' order by group_alias_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$group_alias_to_print = mysql_num_rows($rslt);
|
|
$group_alias_menu='';
|
|
$group_alias_selected=0;
|
|
$o=0;
|
|
while ($group_alias_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$group_alias_menu .= "<option ";
|
|
if ($default_group_alias == "$rowx[0]")
|
|
{
|
|
$group_alias_menu .= "SELECTED ";
|
|
$group_alias_selected++;
|
|
}
|
|
$group_alias_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Alias de Grupo Padrão: </td><td align=left><select size=1 name=default_group_alias>";
|
|
echo "<option value=\"\">NONE</option>";
|
|
echo "$group_alias_menu";
|
|
echo "</select>$NWB#vicidial_campaigns-default_group_alias$NWE</td></tr>\n";
|
|
}
|
|
|
|
if ($SSenable_vtiger_integration > 0)
|
|
{
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Categoria de Pesquisa Vtiger: </td><td align=left><select size=1 name=vtiger_search_category><option>LEAD</option><option>ACCOUNT</option><option>VENDOR</option><option>LEAD_ACCOUNT</option><option>LEAD_ACCOUNT_VENDOR</option><option>ACCTID</option><option>ACCTID_ACCOUNT</option><option>ACCTID_ACCOUNT_LEAD_VENDOR</option><option>UNIFIED_CONTACT</option><option SELECTED>$vtiger_search_category</option></select>$NWB#vicidial_campaigns-vtiger_search_category$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Pesquisar contas Mortas no Vtiger: </td><td align=left><select size=1 name=vtiger_search_dead><option>DISABLED</option><option>ASK</option><option>RESURRECT</option><option SELECTED>$vtiger_search_dead</option></select>$NWB#vicidial_campaigns-vtiger_search_dead$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Criar Registro de Chamada no Vtiger: </td><td align=left><select size=1 name=vtiger_create_call_record><option>Y</option><option>N</option><option>DISPO</option><option SELECTED>$vtiger_create_call_record</option></select>$NWB#vicidial_campaigns-vtiger_create_call_record$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Criar Registro de Tel. no Vtiger: </td><td align=left><select size=1 name=vtiger_create_lead_record><option>Y</option><option>N</option><option SELECTED>$vtiger_create_lead_record</option></select>$NWB#vicidial_campaigns-vtiger_create_lead_record$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Status da Chamada no Vtiger: </td><td align=left><select size=1 name=vtiger_status_call><option>Y</option><option>N</option><option SELECTED>$vtiger_status_call</option></select>$NWB#vicidial_campaigns-vtiger_status_call$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Tela de Login do Vtiger: </td><td align=left><select size=1 name=vtiger_screen_login><option>Y</option><option>N</option><option>NEW_WINDOW</option><option SELECTED>$vtiger_screen_login</option></select>$NWB#vicidial_campaigns-vtiger_screen_login$NWE</td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<input type=hidden name=vtiger_search_category value=\"$vtiger_search_category\">\n";
|
|
echo "<input type=hidden name=vtiger_create_call_record value=\"$vtiger_create_call_record\">\n";
|
|
echo "<input type=hidden name=vtiger_create_lead_record value=\"$vtiger_create_lead_record\">\n";
|
|
echo "<input type=hidden name=vtiger_screen_login value=\"$vtiger_screen_login\">\n";
|
|
echo "<input type=hidden name=vtiger_search_dead value=\"$vtiger_search_dead\">\n";
|
|
echo "<input type=hidden name=vtiger_status_call value=\"$vtiger_status_call\">\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>CRM Popup Login: </td><td align=left><select size=1 name=crm_popup_login><option>Y</option><option>N</option><option SELECTED>$crm_popup_login</option></select>$NWB#vicidial_campaigns-crm_popup_login$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>CRM Dirección Popup: </td><td align=left><input type=text name=crm_login_address size=70 maxlength=1000 value=\"$crm_login_address\">$NWB#vicidial_campaigns-crm_login_address$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Iniciar llamada URL: </td><td align=left><input type=text name=start_call_url size=70 maxlength=1000 value=\"$start_call_url\">$NWB#vicidial_campaigns-start_call_url$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dispo Call URL: </td><td align=left><input type=text name=dispo_call_url size=70 maxlength=1000 value=\"$dispo_call_url\">$NWB#vicidial_campaigns-dispo_call_url$NWE</td></tr>\n";
|
|
|
|
if ($campaign_allow_inbound == 'Y')
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupos De entrada Permitidos: <BR>";
|
|
echo " $NWB#vicidial_campaigns-closer_campaigns$NWE</td><td align=left>\n";
|
|
echo "$groups_list";
|
|
echo "</td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de Transferência Padrão:</td><td align=left><select size=1 name=default_xfer_group>";
|
|
echo "$Xgroups_menu";
|
|
echo "</select>$NWB#vicidial_campaigns-default_xfer_group$NWE</td></tr>\n";
|
|
|
|
if ($allow_closers == 'Y')
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupos de Transferência Permitidos:<BR>";
|
|
echo " $NWB#vicidial_campaigns-xfer_groups$NWE</td><td align=left>\n";
|
|
echo "$XFERgroups_list";
|
|
echo "</td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center></FORM>\n";
|
|
|
|
echo "<center>\n";
|
|
|
|
echo "<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41>\n";
|
|
echo "<input type=hidden name=DB value=$DB>\n";
|
|
echo "<input type=hidden name=stage value=list_activation>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<br><b>LISTAS DESTA CAMPANHA: $NWB#vicidial_campaign_lists$NWE</b>\n";
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$LISTlink='stage=LISTIDDOWN';
|
|
$TALLYlink='stage=TALLYDOWN';
|
|
$ACTIVElink='stage=ACTIVEDOWN';
|
|
$CAMPANHAlink='stage=CAMPANHADOWN';
|
|
$CALLDATElink='stage=CALLDATEDOWN';
|
|
$SQLorder='order by list_id';
|
|
if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';}
|
|
if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';}
|
|
if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';}
|
|
if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';}
|
|
if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';}
|
|
if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';}
|
|
if (eregi("CAMPANHAUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPANHAlink='stage=CAMPANHADOWN';}
|
|
if (eregi("CAMPANHADOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPANHAlink='stage=CAMPANHAUP';}
|
|
if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
|
|
if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
|
|
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id and campaign_id='$campaign_id' group by list_id $SQLorder";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$LISTlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID DA LISTA</B></a></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>NOME DA LISTA</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</B></TD>\n";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$TALLYlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TOTAL DE REG.</B></a></TD>\n";
|
|
echo "<TD COLSPAN=2><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$ACTIVElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ATIVO</B></a></TD>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$CALLDATElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ÚLTIMA CHAMADA</B></a></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td>";
|
|
|
|
if (ereg('Y',$row[4]))
|
|
{
|
|
$active_lists++;
|
|
$camp_lists .= "'$row[0]',";
|
|
echo "<input type=\"checkbox\" name=\"list_active_change[]\" value=\"$row[0]\" CHECKED>";
|
|
}
|
|
else
|
|
{
|
|
$inactive_lists++;
|
|
echo "<input type=\"checkbox\" name=\"list_active_change[]\" value=\"$row[0]\"";
|
|
}
|
|
|
|
echo "</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
|
|
$o++;
|
|
}
|
|
|
|
echo "<TR><TD COLSPAN=7 ALIGN=CENTER><input type=submit value=\"ENVIAR ALTERAÇÕES EM LISTAS ATIVAS\"></TD></TR>\n";
|
|
echo "</TABLE></center><BR></FORM>\n";
|
|
|
|
echo "<center><b>\n";
|
|
|
|
$filterSQL = $filtersql_list[$lead_filter_id];
|
|
$filterSQL = preg_replace("/\\\\/","",$filterSQL);
|
|
$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL);
|
|
if (strlen($filterSQL)>4)
|
|
{$fSQL = "and $filterSQL";}
|
|
else
|
|
{$fSQL = '';}
|
|
|
|
$camp_lists = eregi_replace(".$","",$camp_lists);
|
|
echo "Esta campanha tem$active_lists listas ativas e$inactive_lists listas inativas<br><br>\n";
|
|
|
|
if ($display_dialable_count == 'Y')
|
|
{
|
|
### call function to calculate and print dialable leads
|
|
dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL);
|
|
echo " - <font size=1><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&stage=hide_dialable\">ESCONDER</a></font><BR><BR>";
|
|
}
|
|
else
|
|
{
|
|
echo "<a href=\"$PHP_SELF?ADD=73&campaign_id=$campaign_id\" target=\"_blank\">Popup Dialable Leads Count</a>";
|
|
echo " - <font size=1><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&stage=show_dialable\">MOSTRAR</a></font><BR><BR>";
|
|
}
|
|
|
|
$stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$hopper_leads = "$rowx[0]";
|
|
|
|
echo "Esta campanha tem$hopper_leads registros no hopper<br><br>\n";
|
|
echo "<a href=\"./AST_VICIDIAL_hopperlist.php?group=$campaign_id\">Clique aqui para ver quais registros estão no hopper agora</a><br><br>\n";
|
|
echo "<a href=\"./AST_VDADstats.php?group=$campaign_id\">Clique aqui para ver um relatório VDAD para esta campanha</a><BR><BR>\n";
|
|
}
|
|
echo "<a href=\"$PHP_SELF?ADD=81&campaign_id=$campaign_id\">Clique aqui para visualizar todos os registros de Chamada Agendada para esta campanha</a><BR><BR>\n";
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CAMPANHAS&stage=$campaign_id\">Clique aqui para ver alterações Admin para esta campanha</a></FONT>\n";
|
|
}
|
|
echo "</b></center>\n";
|
|
}
|
|
|
|
|
|
##### CAMPANHA CUSTOM STATUS #####
|
|
if ($SUB==22)
|
|
{
|
|
|
|
##### get status category listings for dynamic pulldown
|
|
$stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$cats_to_print = mysql_num_rows($rslt);
|
|
$cats_list="";
|
|
|
|
$o=0;
|
|
while ($cats_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$cats_list .= "<option value=\"$rowx[0]\">$rowx[0] - " . substr($rowx[1],0,20) . "</option>\n";
|
|
$catsname_list["$rowx[0]"] = substr($rowx[1],0,20);
|
|
$o++;
|
|
}
|
|
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>STATUS CUSTOMIZADOS PARA ESSA CAMPANHA: $NWB#vicidial_campaign_statuses$NWE</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS</td><td>DESCRIÇÃO</td><td>SELECIONÁVEL</td><td>RESPOSTA HUMANOA</td><td>CATEGORIA</td><td>MODIFY-DELETE</td></tr>\n";
|
|
|
|
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$AScategory = $rowx[5];
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=42>\n";
|
|
echo "<input type=hidden name=stage value=modify>\n";
|
|
echo "<input type=hidden name=status value=\"$rowx[0]\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<font size=2><B>$rowx[0]</B></td>\n";
|
|
echo "<td><input type=text name=status_name size=20 maxlength=30 value=\"$rowx[1]\"></td>\n";
|
|
echo "<td><select size=1 name=selectable><option>Y</option><option>N</option><option selected>$rowx[2]</option></select></td>\n";
|
|
echo "<td><select size=1 name=human_answered><option>Y</option><option>N</option><option selected>$rowx[4]</option></select></td>\n";
|
|
echo "<td>\n";
|
|
echo "<select size=1 name=category>\n";
|
|
echo "$cats_list";
|
|
echo "<option selected value=\"$AScategory\">$AScategory - $catsname_list[$AScategory]</option>\n";
|
|
echo "</select>\n";
|
|
echo "</td>\n";
|
|
echo "<td align=center nowrap><font size=1><input type=submit name=submit value=MODIFY> \n";
|
|
echo " \n";
|
|
echo "<a href=\"$PHP_SELF?ADD=42&campaign_id=$campaign_id&status=$rowx[0]&stage=delete\">APAGAR</a>\n";
|
|
echo "</td></tr><tr $bgcolor><td colspan=6 align=center><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>\n";
|
|
|
|
echo " Sale: <select size=1 name=sale><option>Y</option><option>N</option><option selected>$rowx[6]</option></select> \n";
|
|
echo " DNC: <select size=1 name=dnc><option>Y</option><option>N</option><option selected>$rowx[7]</option></select> \n";
|
|
echo " Customer Contact: <select size=1 name=customer_contact><option>Y</option><option>N</option><option selected>$rowx[8]</option></select> \n";
|
|
echo " Not Interested: <select size=1 name=not_interested><option>Y</option><option>N</option><option selected>$rowx[9]</option></select> \n";
|
|
echo " Unworkable: <select size=1 name=unworkable><option>Y</option><option>N</option><option selected>$rowx[10]</option></select> \n";
|
|
|
|
echo "</form></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR NOVO STATUS DE CAMPANHA<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=22>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Status: <input type=text name=status_id size=8 maxlength=6> \n";
|
|
echo "Descrição: <input type=text name=status_name size=20 maxlength=30> \n";
|
|
echo "Selecionável: <select size=1 name=selectable><option>Y</option><option>N</option></select> <BR>\n";
|
|
echo "Resposta Humana: <select size=1 name=human_answered><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Sale: <select size=1 name=sale><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "DNC: <select size=1 name=dnc><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Customer Contact: <select size=1 name=customer_contact><option>Y</option><option SELECTED>N</option></select> <BR>\n";
|
|
echo "Not Interested: <select size=1 name=not_interested><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Unworkable: <select size=1 name=unworkable><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Categoria:\n";
|
|
echo "<select size=1 name=category>\n";
|
|
echo "$cats_list";
|
|
echo "<option selected value=\"$AScategory\">$AScategory - $catsname_list[$AScategory]</option>\n";
|
|
echo "</select> <BR>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
}
|
|
|
|
##### CAMPANHA HOTKEYS #####
|
|
if ($SUB==23)
|
|
{
|
|
echo "<br><b>ATALHOS DE TECLADO DESTA CAMPANHA: $NWB#vicidial_campaign_hotkeys$NWE</b><br>\n";
|
|
echo "<TABLE width=400 cellspacing=3>\n";
|
|
echo "<tr><td>ATALHO</td><td>STATUS</td><td>DESCRIÇÃO</td><td>APAGAR</td></tr>\n";
|
|
|
|
$stmt="SELECT status,hotkey,status_name,selectable,campaign_id from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[0]</td><td><font size=1>$rowx[2]</td><td><font size=1><a href=\"$PHP_SELF?ADD=43&campaign_id=$campaign_id&status=$rowx[0]&hotkey=$rowx[1]&action=DELETE\">APAGAR</a></td></tr>\n";
|
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR NOVO ATALHO DE TECLADO DA CAMPANHA<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=23>\n";
|
|
echo "<input type=hidden name=selectable value=Y>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Hotkey: <select size=1 name=hotkey>\n";
|
|
echo "<option>1</option>\n";
|
|
echo "<option>2</option>\n";
|
|
echo "<option>3</option>\n";
|
|
echo "<option>4</option>\n";
|
|
echo "<option>5</option>\n";
|
|
echo "<option>6</option>\n";
|
|
echo "<option>7</option>\n";
|
|
echo "<option>8</option>\n";
|
|
echo "<option>9</option>\n";
|
|
echo "</select> \n";
|
|
echo "Status: <select size=1 name=HKstatus>\n";
|
|
echo "$HKstatuses_list\n";
|
|
echo "<option value=\"ALTPH2-----Alternate Phone Hot Dial\">ALTPH2 - Alternate Phone Hot Dial</option>\n";
|
|
echo "<option value=\"ADDR3-----Address3 Hot Dial\">ADDR3 - Address3 Hot Dial</option>\n";
|
|
echo "</select> \n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
echo "</form><BR>\n";
|
|
}
|
|
|
|
##### CAMPANHA LEAD RECYCLING #####
|
|
if ($SUB==25)
|
|
{
|
|
### display counts on leads that have hit the limit in this campaign
|
|
$stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
$camp_lists='';
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";}
|
|
$o++;
|
|
}
|
|
$camp_lists = eregi_replace(".$","",$camp_lists);
|
|
|
|
$stmt="SELECT recycle_id,campaign_id,status,attempt_delay,attempt_maximum,active from vicidial_lead_recycle where campaign_id='$campaign_id' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$recycle_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($recycle_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$RECYCLE_status[$o] = $rowx[2];
|
|
$RECYCLE_delay[$o] = $rowx[3];
|
|
$RECYCLE_attempt[$o] = $rowx[4];
|
|
$RECYCLE_active[$o] = $rowx[5];
|
|
$RECYCLE_count[$o] = "'Y','Y1','Y2','Y3','Y4','Y5','Y6','Y7','Y8','Y9','Y10'";
|
|
if ($RECYCLE_attempt[$o]==1) {$RECYCLE_count[$o] = "'Y1','Y2','Y3','Y4','Y5','Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==2) {$RECYCLE_count[$o] = "'Y2','Y3','Y4','Y5','Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==3) {$RECYCLE_count[$o] = "'Y3','Y4','Y5','Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==4) {$RECYCLE_count[$o] = "'Y4','Y5','Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==5) {$RECYCLE_count[$o] = "'Y5','Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==6) {$RECYCLE_count[$o] = "'Y6','Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==7) {$RECYCLE_count[$o] = "'Y7','Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==8) {$RECYCLE_count[$o] = "'Y8','Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]==9) {$RECYCLE_count[$o] = "'Y9','Y10'";}
|
|
if ($RECYCLE_attempt[$o]>9) {$RECYCLE_count[$o] = "'Y10'";}
|
|
$o++;
|
|
}
|
|
$o=0;
|
|
|
|
echo "<br><br><b>RECICLAGEM DE REGISTROS DESTA CAMPANHA: $NWB#vicidial_lead_recycle$NWE</b><br>\n";
|
|
echo "<TABLE width=700 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS</td><td>TEMPO DE TENTATIVA</td><td>QUANTIDADE MÁXIMA DE TENTATIVAS</td><td>REGISTROS NO LIMITE</td><td>ATIVO</td><td> </td><td>APAGAR</td></tr>\n";
|
|
|
|
while ($recycle_to_print > $o)
|
|
{
|
|
$recycle_limit=0;
|
|
if (strlen($camp_lists) > 2)
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_list where status='$RECYCLE_status[$o]' and list_id IN($camp_lists) and called_since_last_reset IN($RECYCLE_count[$o]);";
|
|
if ($DB) {echo "|$stmt|\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$counts_to_print = mysql_num_rows($rslt);
|
|
if ($counts_to_print > 0)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$recycle_limit = $rowx[0];
|
|
}
|
|
}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=2> $RECYCLE_status[$o]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=status value=\"$RECYCLE_status[$o]\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<input type=hidden name=ADD value=45></td>\n";
|
|
echo "<td><font size=1><input type=text size=7 maxlength=5 name=attempt_delay value=\"$RECYCLE_delay[$o]\"></td>\n";
|
|
echo "<td><font size=1><input type=text size=5 maxlength=3 name=attempt_maximum value=\"$RECYCLE_attempt[$o]\"></td>\n";
|
|
echo "<td align=right><font size=2>$recycle_limit </td>\n";
|
|
echo "<td><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$RECYCLE_active[$o]</option></select></td>\n";
|
|
echo "<td><font size=1><input type=submit name=submit value=MODIFY></form></td>\n";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=65&campaign_id=$campaign_id&status=$RECYCLE_status[$o]\">APAGAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR RECICLAGEM DE REGISTROS DA CAMPANHA<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=25>\n";
|
|
echo "<input type=hidden name=active value=\"N\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Status: <select size=1 name=status>\n";
|
|
echo "$LRstatuses_list\n";
|
|
echo "</select> \n";
|
|
echo "Tempo de Tentativa: <input type=text size=7 maxlength=5 name=attempt_delay>\n";
|
|
echo "Quantidade Máxima de Tentativas: <input type=text size=5 maxlength=3 name=attempt_maximum>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
echo "<br>\n";
|
|
echo "* Contagem de registros tirada das listas ativas nesta campanha.\n";
|
|
}
|
|
|
|
##### CAMPANHA AUTO-ALT-NUMBER DIALING #####
|
|
if ($SUB==26)
|
|
{
|
|
echo "<br><br><b>DISCAR NÚMERO ALT. NESTA CAMPANHA: $NWB#vicidial_auto_alt_dial_statuses$NWE</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS</td><td>APAGAR</td></tr>\n";
|
|
|
|
$auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses);
|
|
$AADstatuses = explode(" ", $auto_alt_dial_statuses);
|
|
$AADs_to_print = (count($AADstatuses) -1);
|
|
|
|
$o=0;
|
|
while ($AADs_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
$o++;
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$AADstatuses[$o]</td>\n";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=66&campaign_id=$campaign_id&status=$AADstatuses[$o]\">APAGAR</a></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR NOVO STATUS PARA DISCAGEM DE NÚM. ALT.<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=26>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Status: <select size=1 name=status>\n";
|
|
echo "$LRstatuses_list\n";
|
|
echo "</select> \n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
}
|
|
|
|
##### CAMPANHA CÓDIGOS DE PAUSA #####
|
|
if ($SUB==27)
|
|
{
|
|
echo "<br><br><b>CÓDIGOS DE PAUSA PARA CAMPANHA: $NWB#vicidial_pause_codes$NWE</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>CÓDIGOS DE PAUSA</td><td>COBRÁVEL</td><td>ALTERAR</td><td>APAGAR</td></tr>\n";
|
|
|
|
$stmt="SELECT pause_code,pause_code_name,billable,campaign_id from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$pause_codes_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($pause_codes_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><form action=$PHP_SELF method=POST><font size=1>$rowx[0]\n";
|
|
echo "<input type=hidden name=ADD value=47>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<input type=hidden name=pause_code value=\"$rowx[0]\"> \n";
|
|
echo "<input type=text size=20 maxlength=30 name=pause_code_name value=\"$rowx[1]\"></td>\n";
|
|
echo "<td><select size=1 name=billable><option>YES</option><option>NO</option><option>HALF</option><option SELECTED>$rowx[2]</option></select></td>\n";
|
|
echo "<td><font size=1><input type=submit name=submit value=MODIFY></form></td>\n";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=67&campaign_id=$campaign_id&pause_code=$rowx[0]\">APAGAR</a></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>NOVO CÓDIGO DE PAUSA<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=27>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Código de Pausa: <input type=text size=8 maxlength=6 name=pause_code>\n";
|
|
echo "Nome do Código de Pausa: <input type=text size=20 maxlength=30 name=pause_code_name>\n";
|
|
echo " Cobrável: <select size=1 name=billable><option>YES</option><option>NO</option><option>HALF</option></select>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</center></FORM><br>\n";
|
|
}
|
|
|
|
##### CAMPANHA QC SETTINGS #####
|
|
if ( ($SUB==28) and ($SSqc_features_active > 0) )
|
|
{
|
|
$stmt="SELECT list_id,list_name,active from vicidial_lists where campaign_id='$campaign_id'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
$qc_lists_list='';
|
|
|
|
$p=0;
|
|
while ($lists_to_print > $p)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$qc_lists_list .= "<input type=\"checkbox\" name=\"qc_lists[]\" value=\"$rowx[0]\"";
|
|
$r=0;
|
|
while ($r < $QCL_to_print)
|
|
{
|
|
if ($rowx[0] == $QClists[$r])
|
|
{
|
|
$qc_lists_list .= " CHECKED";
|
|
}
|
|
$r++;
|
|
}
|
|
$qc_lists_list .= "> $rowx[0] - $rowx[1] - $rowx[2]<BR>\n";
|
|
|
|
$p++;
|
|
}
|
|
|
|
##### get scripts listings for pulldown
|
|
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$scripts_to_print = mysql_num_rows($rslt);
|
|
$QCscripts_list="";
|
|
$o=0;
|
|
while ($scripts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$QCscripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$scriptname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
##### get shifts listings for pulldown
|
|
$stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$shifts_to_print = mysql_num_rows($rslt);
|
|
$QCshifts_list="";
|
|
$o=0;
|
|
while ($shifts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$QCshifts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$shiftname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
echo "<br><br><b>CONFIGURAÇÕES DE CQ PARA CAMPANHA:</b><br>\n";
|
|
echo "<form action=$PHP_SELF method=POST><center><TABLE width=700 cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><input type=hidden name=ADD value=48>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "CQ Ativado:</td><td><select size=1 name=qc_enabled><option>Y</option><option>N</option><option SELECTED>$qc_enabled</option></select> $NWB#vicidial_campaigns-qc_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Status de CQ:<BR> $NWB#vicidial_campaigns-qc_statuses$NWE</td><td>$qc_statuses_list</td></tr>\n";
|
|
# echo "<tr bgcolor=#B9CBFD><td align=right>QC Lists: <BR> $NWB#vicidial_campaigns-qc_lists$NWE</td><td>$qc_lists_list</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>WebForm de CQ:</td><td align=left><input type=text name=qc_web_form_address size=70 maxlength=255 value=\"$qc_web_form_address\">$NWB#vicidial_campaigns-qc_web_form_address$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script de CQ</a>: </td><td align=left><select size=1 name=qc_script>\n";
|
|
echo "$QCscripts_list";
|
|
echo "<option selected value=\"$qc_script\">$qc_script - $scriptname_list[$qc_script]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-qc_script$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=331111111&shift_id=$qc_shift_id\">Turno de CQ</a>: </td><td align=left><select size=1 name=qc_shift_id>\n";
|
|
echo "$QCshifts_list";
|
|
echo "<option selected value=\"$qc_shift_id\">$qc_shift_id - $shiftname_list[$qc_shift_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-qc_shift_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Entrada de registro CQ: </td><td><select size=1 name=qc_get_record_launch><option>NONE</option><option>SCRIPT</option><option>WEBFORM</option><option>QCSCRIPT</option><option>QCWEBFORM</option><option SELECTED>$qc_get_record_launch</option></select> $NWB#vicidial_campaigns-qc_get_record_launch$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Mostrar Gravações CQ: </td><td><select size=1 name=qc_show_recording><option>Y</option><option>N</option><option SELECTED>$qc_show_recording</option></select> $NWB#vicidial_campaigns-qc_show_recording$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=ENVIAR></td></tr>\n";
|
|
echo "</table>\n";
|
|
echo "<BR></center></FORM><br>\n";
|
|
}
|
|
|
|
##### CAMPANHA SURVEY SETTINGS #####
|
|
if ($SUB=='20A')
|
|
{
|
|
|
|
echo "<center><br><b>CONFIG. DE PESQUISA PARA ESTA CAMPANHA:</b><br>\n";
|
|
echo "<form action=$PHP_SELF method=POST name=admin_form id=admin_form><center><TABLE width=750 cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><input type=hidden name=ADD value=40A>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Primeiro Arquivo de Audio: </td><td><input type=text size=50 maxlength=50 name=survey_first_audio_file id=survey_first_audio_file value=\"$survey_first_audio_file\"> <a href=\"javascript:launch_chooser('survey_first_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_first_audio_file$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Dígitos DTMF: </td><td><input type=text size=16 maxlength=16 name=survey_dtmf_digits value=\"$survey_dtmf_digits\"> $NWB#vicidial_campaigns-survey_dtmf_digits$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Dígito p/ Não Interessado: </td><td><input type=text size=5 maxlength=1 name=survey_ni_digit value=\"$survey_ni_digit\"> $NWB#vicidial_campaigns-survey_ni_digit$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Arquivo de Audio para Interessado: </td><td><input type=text size=50 maxlength=50 name=survey_opt_in_audio_file id=survey_opt_in_audio_file value=\"$survey_opt_in_audio_file\"> <a href=\"javascript:launch_chooser('survey_opt_in_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_opt_in_audio_file$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Arquivo de Audio para não Interessado: </td><td><input type=text size=50 maxlength=50 name=survey_ni_audio_file id=survey_ni_audio_file value=\"$survey_ni_audio_file\"> <a href=\"javascript:launch_chooser('survey_ni_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_ni_audio_file$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Método de Pesquisa: </td><td><select size=1 name=survey_method><option>AGENT_XFER</option><option>VOICEMAIL</option><option>EXTENSÃO</option><option>HANGUP</option><option>CAMPREC_60_WAV</option><option SELECTED>$survey_method</option></select> $NWB#vicidial_campaigns-survey_method$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Ação p/ sem Resposta: </td><td><select size=1 name=survey_no_response_action><option>OPTIN</option><option>OPTOUT</option><option SELECTED>$survey_no_response_action</option></select> $NWB#vicidial_campaigns-survey_no_response_action$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Status p/ Não Interessado: </td><td><select name=survey_ni_status>$survey_ni_status_list</select> $NWB#vicidial_campaigns-survey_ni_status$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Terceiro Dígito: </td><td><input type=text size=5 maxlength=1 name=survey_third_digit id=survey_third_digit value=\"$survey_third_digit\"> $NWB#vicidial_campaigns-survey_third_digit$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Terceiro Arquivo de Audio: </td><td><input type=text size=50 maxlength=50 name=survey_third_audio_file id=survey_third_audio_file value=\"$survey_third_audio_file\"> <a href=\"javascript:launch_chooser('survey_third_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_third_audio_file$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Terceiro Status: </td><td><input type=text size=10 maxlength=6 name=survey_third_status value=\"$survey_third_status\"> $NWB#vicidial_campaigns-survey_third_status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Terceira Extensão: </td><td><input type=text size=20 maxlength=20 name=survey_third_exten value=\"$survey_third_exten\"> $NWB#vicidial_campaigns-survey_third_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Quarto Dígito: </td><td><input type=text size=5 maxlength=1 name=survey_fourth_digit value=\"$survey_fourth_digit\"> $NWB#vicidial_campaigns-survey_fourth_digit$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Quarto Arquivo de Audio: </td><td><input type=text size=50 maxlength=50 name=survey_fourth_audio_file id=survey_fourth_audio_file value=\"$survey_fourth_audio_file\"> <a href=\"javascript:launch_chooser('survey_fourth_audio_file','date',30);\">audio chooser</a> $NWB#vicidial_campaigns-survey_fourth_audio_file$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Quarto Status: </td><td><input type=text size=10 maxlength=6 name=survey_fourth_status value=\"$survey_fourth_status\"> $NWB#vicidial_campaigns-survey_fourth_status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Quarta Extensão: </td><td><input type=text size=20 maxlength=20 name=survey_fourth_exten value=\"$survey_fourth_exten\"> $NWB#vicidial_campaigns-survey_fourth_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Mapa de Digitos: </td><td><input type=text size=70 maxlength=100 name=survey_response_digit_map value=\"$survey_response_digit_map\"> $NWB#vicidial_campaigns-survey_response_digit_map$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Pesquisa Extensão de Transfer.: </td><td><input type=text size=12 maxlength=20 name=survey_xfer_exten value=\"$survey_xfer_exten\"> $NWB#vicidial_campaigns-survey_xfer_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Diretório de Gravações da Pesquisa: </td><td><input type=text size=70 maxlength=255 name=survey_camp_record_dir value=\"$survey_camp_record_dir\"> $NWB#vicidial_campaigns-survey_camp_record_dir$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Correio de Voz: </td><td><input type=text size=12 maxlength=10 name=voicemail_ext id=voicemail_ext value=\"$voicemail_ext\"> <a href=\"javascript:launch_vm_chooser('voicemail_ext','vm',300);\">voicemail chooser</a> $NWB#vicidial_campaigns-voicemail_ext$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=ENVIAR></td></tr>\n";
|
|
echo "</table>\n";
|
|
echo "<BR></center></FORM><br>\n";
|
|
}
|
|
|
|
|
|
if ($SUB < 1)
|
|
{
|
|
echo "<BR><BR>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=52&campaign_id=$campaign_id&DB=$DB\">DESCONECTAR TODOS OS AGENTES DESTA CAMPANHA</a><BR><BR>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=53&campaign_id=$campaign_id&DB=$DB\">EMERGENCY VDAC CLEAR FOR THIS CAMPANHA</a><BR><BR>\n";
|
|
|
|
if ($LOGdelete_campaigns > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51&campaign_id=$campaign_id\">APAGAR ESTA CAMPANHA</a>\n";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=34 modify campaign info in the system - Basic View
|
|
######################
|
|
|
|
if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPANHAS",$LOGallowed_campaigns)) ) )
|
|
{$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list
|
|
|
|
if ($ADD==34)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
if ($stage=='show_dialable')
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
if ($stage=='hide_dialable')
|
|
{
|
|
$stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
}
|
|
|
|
$stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options from vicidial_campaigns where campaign_id='$campaign_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$dial_status_a = $row[3];
|
|
$dial_status_b = $row[4];
|
|
$dial_status_c = $row[5];
|
|
$dial_status_d = $row[6];
|
|
$dial_status_e = $row[7];
|
|
$lead_order = $row[8];
|
|
$hopper_level = $row[13];
|
|
$auto_dial_level = $row[14];
|
|
$next_agent_call = $row[15];
|
|
$local_call_time = $row[16];
|
|
$voicemail_ext = $row[17];
|
|
$dial_timeout = $row[18];
|
|
$dial_prefix = $row[19];
|
|
$campaign_cid = $row[20];
|
|
$campaign_vdad_exten = $row[21];
|
|
$script_id = $row[25];
|
|
$get_call_launch = $row[26];
|
|
$lead_filter_id = $row[35];
|
|
if ($lead_filter_id=='') {$lead_filter_id='NONE';}
|
|
$display_dialable_count = $row[39];
|
|
$dial_method = $row[46];
|
|
$adaptive_intensity = $row[51];
|
|
$campaign_description = $row[57];
|
|
$campaign_changedate = $row[58];
|
|
$campaign_stats_refresh = $row[59];
|
|
$campaign_logindate = $row[60];
|
|
$dial_statuses = $row[61];
|
|
$list_order_mix = $row[64];
|
|
$default_xfer_group = $row[67];
|
|
$campaign_allow_inbound = $row[65];
|
|
$default_xfer_group = $row[67];
|
|
$drop_lockout_time = $row[116];
|
|
|
|
if (ereg("DISABLED",$list_order_mix))
|
|
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
|
|
else
|
|
{$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;}
|
|
|
|
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$statuses_list='';
|
|
$dial_statuses_list='';
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
$statname_list["$rowx[0]"] = "$rowx[1]";
|
|
$LRstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if (eregi("Y",$rowx[2]))
|
|
{$HKstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Cstatuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($Cstatuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
$statname_list["$rowx[0]"] = "$rowx[1]";
|
|
$LRstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if (eregi("Y",$rowx[2]))
|
|
{$HKstatuses_list .= "<option value=\"$rowx[0]-----$rowx[1]\">$rowx[0] - $rowx[1]</option>\n";}
|
|
$o++;
|
|
}
|
|
|
|
$dial_statuses = preg_replace("/ -$/","",$dial_statuses);
|
|
$Dstatuses = explode(" ", $dial_statuses);
|
|
$Ds_to_print = (count($Dstatuses) -1);
|
|
|
|
$stmt="SELECT count(*) from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] < 1)
|
|
{
|
|
$mixes_list="<option SELECTED value=\"DISABLED\">DISABLED</option>\n";
|
|
$mixname_list["DISABLED"] = "DISABLED";
|
|
}
|
|
else
|
|
{
|
|
##### get list_mix listings for dynamic pulldown
|
|
$stmt="SELECT vcl_id,vcl_name from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE' limit 1";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$mixes_to_print = mysql_num_rows($rslt);
|
|
$mixes_list="<option value=\"DISABLED\">DISABLED</option>\n";
|
|
|
|
$o=0;
|
|
while ($mixes_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$mixes_list .= "<option value=\"ACTIVE\">ACTIVE ($rowx[0] - $rowx[1])</option>\n";
|
|
$mixname_list["ACTIVE"] = "$rowx[0] - $rowx[1]";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
if ($SUB<1) {$camp_detail_color=$subcamp_color;}
|
|
else {$camp_detail_color=$campaigns_color;}
|
|
if ($SUB==22) {$camp_statuses_color=$subcamp_color;}
|
|
else {$camp_statuses_color=$campaigns_color;}
|
|
if ($SUB==23) {$camp_hotkeys_color=$subcamp_color;}
|
|
else {$camp_hotkeys_color=$campaigns_color;}
|
|
if ($SUB==25) {$camp_recycle_color=$subcamp_color;}
|
|
else {$camp_recycle_color=$campaigns_color;}
|
|
if ($SUB==26) {$camp_autoalt_color=$subcamp_color;}
|
|
else {$camp_autoalt_color=$campaigns_color;}
|
|
if ($SUB==27) {$camp_pause_color=$subcamp_color;}
|
|
else {$camp_pause_color=$campaigns_color;}
|
|
if ($SUB==29) {$camp_listmix_color=$subcamp_color;}
|
|
else {$camp_listmix_color=$campaigns_color;}
|
|
echo "<TABLE WIDTH=$page_width CELLPADDING=2 CELLSPACING=0><TR BGCOLOR=\"$campaigns_color\">\n";
|
|
echo "<TD><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\"> <B>$row[0]</B>: </font></TD>";
|
|
echo "<TD BGCOLOR=\"$camp_detail_color\"><a href=\"$PHP_SELF?ADD=34&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Visão Básica </font></a></TD>";
|
|
echo "<TD> <a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Visão Detalhada</font></a> </TD>";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<TD BGCOLOR=\"$camp_listmix_color\"> <a href=\"$PHP_SELF?ADD=34&SUB=29&campaign_id=$campaign_id\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Mesclagem de Lista</font></a> </TD>";
|
|
}
|
|
echo "<TD> <a href=\"./AST_timeonVDADall.php?RR=4&DB=0&group=$row[0]\"><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\">Tela de Tempo Real</font></a></TD>\n";
|
|
echo "<TD WIDTH=300><font size=2 color=$subcamp_font face=\"ARIAL,HELVETICA\"> </font></TD>\n";
|
|
if ($SSoutbound_autodial_active < 1)
|
|
{
|
|
echo "<TD></TD>";
|
|
}
|
|
echo "</TR></TABLE>\n";
|
|
|
|
if ($SUB < 1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
echo "<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=44>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha: </td><td align=left><b>$row[0]</b>$NWB#vicidial_campaigns-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Campanha: </td><td align=left><input type=text name=campaign_name size=40 maxlength=40 value=\"$row[1]\">$NWB#vicidial_campaigns-campaign_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição da Campanha: </td><td align=left>$row[57]$NWB#vicidial_campaigns-campaign_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Data da Alter.: </td><td align=left>$campaign_changedate $NWB#vicidial_campaigns-campaign_changedate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha Data do Login: </td><td align=left>$campaign_logindate $NWB#vicidial_campaigns-campaign_logindate$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$row[2]</option></select>$NWB#vicidial_campaigns-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão de Estacionamento: </td><td align=left>$row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web: </td><td align=left>$row[11]$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Finalizadores (Closers): </td><td align=left>$row[12] $NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de Transferência Padrão:</td><td align=left>$default_xfer_group $NWB#vicidial_campaigns-default_xfer_group$NWE</td></tr>\n";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Entrantes e Blended:</td><td align=left>$campaign_allow_inbound $NWB#vicidial_campaigns-campaign_allow_inbound$NWE</td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($Ds_to_print > $o)
|
|
{
|
|
$o++;
|
|
$Dstatus = $Dstatuses[$o];
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Status de Discagem$o: </td><td align=left> \n";
|
|
if ($DEFstatusDISABLED > 0)
|
|
{
|
|
echo "<font color=grey><DEL><b>$Dstatus</b> - $statname_list[$Dstatus] <font size=2>\n";
|
|
echo "REMOVE</DEL></td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<b>$Dstatus</b> - $statname_list[$Dstatus] <font size=2>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=68&campaign_id=$campaign_id&status=$Dstatuses[$o]\">REMOVER</a></td></tr>\n";
|
|
}
|
|
}
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Add A Dial Status: </td><td align=left><select size=1 name=dial_status $DEFlistDISABLE>\n";
|
|
echo "<option value=\"\"> - NONE - </option>\n";
|
|
|
|
echo "$dial_statuses_list";
|
|
echo "</select> \n";
|
|
echo "<input type=submit name=submit value=ADD> $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ordem da Lista: </td><td align=left><select size=1 name=lead_order>
|
|
<option SELECTED>$lead_order</option>
|
|
<option>DOWN</option>
|
|
<option>UP</option>
|
|
<option>DOWN PHONE</option>
|
|
<option>UP PHONE</option>
|
|
<option>DOWN LAST NAME</option>
|
|
<option>UP LAST NAME</option>
|
|
<option>DOWN COUNT</option>
|
|
<option>UP COUNT</option>
|
|
<option>RANDOM</option>
|
|
<option>DOWN LAST CALL TIME</option>
|
|
<option>UP LAST CALL TIME</option>
|
|
<option>DOWN RANK</option>
|
|
<option>UP RANK</option>
|
|
<option>DOWN OWNER</option>
|
|
<option>UP OWNER</option>
|
|
<option>DOWN TIMEZONE</option>
|
|
<option>UP TIMEZONE</option>
|
|
<option>DOWN 2nd NEW</option>
|
|
<option>DOWN 3rd NEW</option>
|
|
<option>DOWN 4th NEW</option>
|
|
<option>DOWN 5th NEW</option>
|
|
<option>DOWN 6th NEW</option>
|
|
<option>UP 2nd NEW</option>
|
|
<option>UP 3rd NEW</option>
|
|
<option>UP 4th NEW</option>
|
|
<option>UP 5th NEW</option>
|
|
<option>UP 6th NEW</option>
|
|
<option>DOWN PHONE 2nd NEW</option>
|
|
<option>DOWN PHONE 3rd NEW</option>
|
|
<option>DOWN PHONE 4th NEW</option>
|
|
<option>DOWN PHONE 5th NEW</option>
|
|
<option>DOWN PHONE 6th NEW</option>
|
|
<option>UP PHONE 2nd NEW</option>
|
|
<option>UP PHONE 3rd NEW</option>
|
|
<option>UP PHONE 4th NEW</option>
|
|
<option>UP PHONE 5th NEW</option>
|
|
<option>UP PHONE 6th NEW</option>
|
|
<option>DOWN LAST NAME 2nd NEW</option>
|
|
<option>DOWN LAST NAME 3rd NEW</option>
|
|
<option>DOWN LAST NAME 4th NEW</option>
|
|
<option>DOWN LAST NAME 5th NEW</option>
|
|
<option>DOWN LAST NAME 6th NEW</option>
|
|
<option>UP LAST NAME 2nd NEW</option>
|
|
<option>UP LAST NAME 3rd NEW</option>
|
|
<option>UP LAST NAME 4th NEW</option>
|
|
<option>UP LAST NAME 5th NEW</option>
|
|
<option>UP LAST NAME 6th NEW</option>
|
|
<option>DOWN COUNT 2nd NEW</option>
|
|
<option>DOWN COUNT 3rd NEW</option>
|
|
<option>DOWN COUNT 4th NEW</option>
|
|
<option>DOWN COUNT 5th NEW</option>
|
|
<option>DOWN COUNT 6th NEW</option>
|
|
<option>UP COUNT 2nd NEW</option>
|
|
<option>UP COUNT 3rd NEW</option>
|
|
<option>UP COUNT 4th NEW</option>
|
|
<option>UP COUNT 5th NEW</option>
|
|
<option>UP COUNT 6th NEW</option>
|
|
<option>RANDOM 2nd NEW</option>
|
|
<option>RANDOM 3rd NEW</option>
|
|
<option>RANDOM 4th NEW</option>
|
|
<option>RANDOM 5th NEW</option>
|
|
<option>RANDOM 6th NEW</option>
|
|
<option>DOWN LAST CALL TIME 2nd NEW</option>
|
|
<option>DOWN LAST CALL TIME 3rd NEW</option>
|
|
<option>DOWN LAST CALL TIME 4th NEW</option>
|
|
<option>DOWN LAST CALL TIME 5th NEW</option>
|
|
<option>DOWN LAST CALL TIME 6th NEW</option>
|
|
<option>UP LAST CALL TIME 2nd NEW</option>
|
|
<option>UP LAST CALL TIME 3rd NEW</option>
|
|
<option>UP LAST CALL TIME 4th NEW</option>
|
|
<option>UP LAST CALL TIME 5th NEW</option>
|
|
<option>UP LAST CALL TIME 6th NEW</option>
|
|
<option>DOWN RANK 2nd NEW</option>
|
|
<option>DOWN RANK 3rd NEW</option>
|
|
<option>DOWN RANK 4th NEW</option>
|
|
<option>DOWN RANK 5th NEW</option>
|
|
<option>DOWN RANK 6th NEW</option>
|
|
<option>UP RANK 2nd NEW</option>
|
|
<option>UP RANK 3rd NEW</option>
|
|
<option>UP RANK 4th NEW</option>
|
|
<option>UP RANK 5th NEW</option>
|
|
<option>UP RANK 6th NEW</option>
|
|
<option>DOWN OWNER 2nd NEW</option>
|
|
<option>DOWN OWNER 3rd NEW</option>
|
|
<option>DOWN OWNER 4th NEW</option>
|
|
<option>DOWN OWNER 5th NEW</option>
|
|
<option>DOWN OWNER 6th NEW</option>
|
|
<option>UP OWNER 2nd NEW</option>
|
|
<option>UP OWNER 3rd NEW</option>
|
|
<option>UP OWNER 4th NEW</option>
|
|
<option>UP OWNER 5th NEW</option>
|
|
<option>UP OWNER 6th NEW</option>
|
|
<option>DOWN TIMEZONE 2nd NEW</option>
|
|
<option>DOWN TIMEZONE 3rd NEW</option>
|
|
<option>DOWN TIMEZONE 4th NEW</option>
|
|
<option>DOWN TIMEZONE 5th NEW</option>
|
|
<option>DOWN TIMEZONE 6th NEW</option>
|
|
<option>UP TIMEZONE 2nd NEW</option>
|
|
<option>UP TIMEZONE 3rd NEW</option>
|
|
<option>UP TIMEZONE 4th NEW</option>
|
|
<option>UP TIMEZONE 5th NEW</option>
|
|
<option>UP TIMEZONE 6th NEW</option>
|
|
</select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">Mesclagem de Lista</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
|
|
echo "$mixes_list";
|
|
if (ereg("DISABLED",$list_order_mix))
|
|
{echo "<option selected value=\"$list_order_mix\">$list_order_mix - $mixname_list[$list_order_mix]</option>\n";}
|
|
else
|
|
{echo "<option selected value=\"ACTIVE\">ACTIVE ($mixname_list[ACTIVE])</option>\n";}
|
|
echo "</select>$NWB#vicidial_campaigns-list_order_mix$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31111111&lead_filter_id=$lead_filter_id\">Filtro de registros</a>: </td><td align=left><select size=1 name=lead_filter_id>\n";
|
|
echo "$filters_list";
|
|
echo "<option selected value=\"$lead_filter_id\">$lead_filter_id - $filtername_list[$lead_filter_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_campaigns-lead_filter_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Nível do Hopper: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>20</option><option>50</option><option>100</option><option>200</option><option>500</option><option>700</option><option>1000</option><option>2000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Forçar Reset do Hopper: </td><td align=left><select size=1 name=reset_hopper><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_campaigns-force_reset_hopper$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Método de Discagem: </td><td align=left><select size=1 name=dial_method><option >MANUAL</option><option>RATIO</option><option>ADAPT_HARD_LIMIT</option><option>ADAPT_TAPERED</option><option>ADAPT_AVERAGE</option><option>ENTRANTE_MAN</option><option SELECTED>$dial_method</option></select>$NWB#vicidial_campaigns-dial_method$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Nível de Discagem Automática: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
|
$adl=0;
|
|
while($adl <= $SSauto_dial_limit)
|
|
{
|
|
echo "<option>$adl</option>\n";
|
|
if ($adl < 1)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 3)
|
|
{$adl = ($adl + 0.1);}
|
|
else
|
|
{
|
|
if ($adl < 4)
|
|
{$adl = ($adl + 0.25);}
|
|
else
|
|
{
|
|
if ($adl < 5)
|
|
{$adl = ($adl + 0.5);}
|
|
else
|
|
{
|
|
if ($adl < 10)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 20)
|
|
{$adl = ($adl + 2);}
|
|
else
|
|
{
|
|
if ($adl < 40)
|
|
{$adl = ($adl + 5);}
|
|
else
|
|
{
|
|
if ($adl < 200)
|
|
{$adl = ($adl + 10);}
|
|
else
|
|
{
|
|
if ($adl < 400)
|
|
{$adl = ($adl + 50);}
|
|
else
|
|
{
|
|
if ($adl < 1000)
|
|
{$adl = ($adl + 100);}
|
|
else
|
|
{$adl = ($adl + 1);}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Modificador de Intensidade : </td><td align=left><select size=1 name=adaptive_intensity>\n";
|
|
$n=40;
|
|
while ($n>=-40)
|
|
{
|
|
$dtl = 'Balanced';
|
|
if ($n<0) {$dtl = 'Less Intense';}
|
|
if ($n>0) {$dtl = 'More Intense';}
|
|
if ($n == $adaptive_intensity)
|
|
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
|
|
else
|
|
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
|
|
$n--;
|
|
}
|
|
echo "</select> $NWB#vicidial_campaigns-adaptive_intensity$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script</a>: </td><td align=left>$script_id</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pegar lançamento da chamada: </td><td align=left>$get_call_launch</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center></FORM>\n";
|
|
|
|
echo "<center>\n";
|
|
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=44>\n";
|
|
echo "<input type=hidden name=DB value=$DB>\n";
|
|
echo "<input type=hidden name=stage value=list_activation>\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<br><b>LISTAS DESTA CAMPANHA: $NWB#vicidial_campaign_lists$NWE</b>\n";
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$LISTlink='stage=LISTIDDOWN';
|
|
$TALLYlink='stage=TALLYDOWN';
|
|
$ACTIVElink='stage=ACTIVEDOWN';
|
|
$CAMPANHAlink='stage=CAMPANHADOWN';
|
|
$CALLDATElink='stage=CALLDATEDOWN';
|
|
$SQLorder='order by list_id';
|
|
if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';}
|
|
if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';}
|
|
if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';}
|
|
if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';}
|
|
if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';}
|
|
if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';}
|
|
if (eregi("CAMPANHAUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPANHAlink='stage=CAMPANHADOWN';}
|
|
if (eregi("CAMPANHADOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPANHAlink='stage=CAMPANHAUP';}
|
|
if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
|
|
if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
|
|
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id and campaign_id='$campaign_id' group by list_id $SQLorder";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$LISTlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID DA LISTA</B></a></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>NOME DA LISTA</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</B></TD>\n";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$TALLYlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TOTAL DE REG.</B></a></TD>\n";
|
|
echo "<TD COLSPAN=2><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$ACTIVElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ATIVO</B></a></TD>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&$CALLDATElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ÚLTIMA CHAMADA</B></a></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td>";
|
|
|
|
if (ereg('Y',$row[4]))
|
|
{
|
|
$active_lists++;
|
|
$camp_lists .= "'$row[0]',";
|
|
echo "<input type=\"checkbox\" name=\"list_active_change[]\" value=\"$row[0]\" CHECKED>";
|
|
}
|
|
else
|
|
{
|
|
$inactive_lists++;
|
|
echo "<input type=\"checkbox\" name=\"list_active_change[]\" value=\"$row[0]\"";
|
|
}
|
|
|
|
echo "</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
|
|
$o++;
|
|
}
|
|
|
|
echo "<TR><TD COLSPAN=7 ALIGN=CENTER><input type=submit value=\"ENVIAR ALTERAÇÕES EM LISTAS ATIVAS\"></TD></TR>\n";
|
|
echo "</TABLE></center><BR></FORM>\n";
|
|
echo "<center><b>\n";
|
|
|
|
$filterSQL = $filtersql_list[$lead_filter_id];
|
|
$filterSQL = preg_replace("/\\\\/","",$filterSQL);
|
|
$filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL);
|
|
if (strlen($filterSQL)>4)
|
|
{$fSQL = "and $filterSQL";}
|
|
else
|
|
{$fSQL = '';}
|
|
|
|
$camp_lists = eregi_replace(".$","",$camp_lists);
|
|
echo "Esta campanha tem$active_lists listas ativas e$inactive_lists listas inativas<br><br>\n";
|
|
|
|
|
|
if ($display_dialable_count == 'Y')
|
|
{
|
|
### call function to calculate and print dialable leads
|
|
dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL);
|
|
echo " - <font size=1><a href=\"$PHP_SELF?ADD=34&campaign_id=$campaign_id&stage=hide_dialable\">ESCONDER</a></font><BR><BR>";
|
|
}
|
|
else
|
|
{
|
|
echo "<a href=\"$PHP_SELF?ADD=73&campaign_id=$campaign_id\" target=\"_blank\">Popup Dialable Leads Count</a>";
|
|
echo " - <font size=1><a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id&stage=show_dialable\">MOSTRAR</a></font><BR><BR>";
|
|
}
|
|
|
|
|
|
|
|
$stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$hopper_leads = "$rowx[0]";
|
|
|
|
echo "Esta campanha tem$hopper_leads registros no hopper<br><br>\n";
|
|
echo "<a href=\"./AST_VICIDIAL_hopperlist.php?group=$campaign_id\">Clique aqui para ver quais registros estão no hopper agora</a><br><br>\n";
|
|
echo "<a href=\"./AST_VDADstats.php?group=$campaign_id\">Clique aqui para ver um relatório VDAD para esta campanha</a><BR><BR>\n";
|
|
}
|
|
echo "<a href=\"$PHP_SELF?ADD=81&campaign_id=$campaign_id\">Clique aqui para visualizar todos os registros de Chamada Agendada para esta campanha</a><BR><BR>\n";
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CAMPANHAS&stage=$campaign_id\">Clique aqui para ver alterações Admin para esta campanha</a></FONT>\n";
|
|
}
|
|
|
|
echo "</b></center>\n";
|
|
|
|
echo "<br>\n";
|
|
|
|
### list of agent rank or skill-level for this campaign
|
|
echo "<center>\n";
|
|
echo "<br><b>RANKING DO AGENTE NA CAMPANHA:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>USER</td><td> RANK</td><td> CALLS TODAY</td></tr>\n";
|
|
|
|
$stmt="SELECT vu.user,vca.campaign_rank,vca.calls_today,full_name from vicidial_campaign_agents vca, vicidial_users vu where campaign_id='$campaign_id' and active='Y' and vu.user=vca.user;";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$users_to_print = mysql_num_rows($rsltx);
|
|
|
|
$o=0;
|
|
while ($users_to_print > $o) {
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$rowx[0]\">$rowx[0]</a> - $rowx[3]</td><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[2]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
echo "<a href=\"$PHP_SELF?ADD=52&campaign_id=$campaign_id&DB=$DB\">DESCONECTAR TODOS OS AGENTES DESTA CAMPANHA</a><BR><BR>\n";
|
|
|
|
|
|
if ($LOGdelete_campaigns > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51&campaign_id=$campaign_id\">APAGAR ESTA CAMPANHA</a>\n";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=31 or 34 and SUB=29 for list mixes
|
|
######################
|
|
if ( ( ($ADD==34) or ($ADD==31) ) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPANHAS",$LOGallowed_campaigns)) ) )
|
|
{$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list
|
|
|
|
if ( ($ADD==34) or ($ADD==31) )
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
##### CAMPANHA LIST MIX SETTINGS #####
|
|
if ($SUB==29)
|
|
{
|
|
##### get list_id listings for dynamic pulldown
|
|
$stmt="SELECT list_id,list_name from vicidial_lists where campaign_id='$campaign_id' order by list_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$mixlists_to_print = mysql_num_rows($rslt);
|
|
$mixlists_list="";
|
|
|
|
$o=0;
|
|
while ($mixlists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$mixlists_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$mixlistsname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
|
|
echo "<br><br><b>MESCLAGEM DE LISTAS PARA ESTA CAMPANHA: $NWB#vicidial_campaigns-list_order_mix$NWE</b><br>\n";
|
|
|
|
echo "<br><b>ATENÇÃO, só recomendamos Mesclagem de Listas para usuários avançados, Por favor leia o Manual de Gerente do Vicidial</b><br>\n";
|
|
|
|
$stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id'";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses = mysql_num_rows($rslt);
|
|
if ($statuses > 0)
|
|
{
|
|
$rowy=mysql_fetch_row($rslt);
|
|
$LMdial_statuses=$rowy[0];
|
|
}
|
|
|
|
$stmt="SELECT vcl_id,vcl_name,campaign_id,list_mix_container,mix_method,status from vicidial_campaigns_list_mix where campaign_id='$campaign_id' order by status, vcl_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$listmixes = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($listmixes > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$vcl_id=$rowx[0];
|
|
$o++;
|
|
|
|
if ($o < 2)
|
|
{$tablecolor='bgcolor="#99FF99"'; $bgcolor='bgcolor="#CCFFCC"';}
|
|
else
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$tablecolor='bgcolor="#B9CBFD"'; $bgcolor='bgcolor="#9BB9FB"';}
|
|
else
|
|
{$tablecolor='bgcolor="#9BB9FB"'; $bgcolor='bgcolor="#B9CBFD"';}
|
|
}
|
|
echo "<a name=\"LINK_$vcl_id\"><BR>\n";
|
|
echo "<span id=\"LISTMIX$US$vcl_id$US$o\">";
|
|
echo "<TABLE width=740 cellspacing=3 $tablecolor>\n";
|
|
echo "<tr><td colspan=6>\n";
|
|
echo "<form action=\"$PHP_SELF#LINK_$vcl_id\" method=POST name=$vcl_id id=$vcl_id>\n";
|
|
echo "<input type=hidden name=ADD value=49>\n";
|
|
echo "<input type=hidden name=SUB value=29>\n";
|
|
echo "<input type=hidden name=stage value=\"MODIFY\">\n";
|
|
echo "<input type=hidden name=vcl_id value=\"$vcl_id\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "<input type=hidden name=list_mix_container$US$vcl_id id=list_mix_container$US$vcl_id value=\"\">\n";
|
|
echo "<B>$vcl_id:</B>\n";
|
|
echo "<input type=text size=40 maxlength=50 name=vcl_name$US$vcl_id id=vcl_name$US$vcl_id value=\"$rowx[1]\">\n";
|
|
echo " <a href=\"$PHP_SELF?ADD=49&SUB=29&stage=DELMIX&campaign_id=$campaign_id&vcl_id=$vcl_id\">DELETE LIST MIX</a></td></tr>\n";
|
|
echo "<tr><td colspan=3>Status: \n";
|
|
if ($rowx[5]=='INACTIVE')
|
|
{
|
|
echo "<B>$rowx[5]</B>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=49&SUB=29&stage=SETACTIVE&campaign_id=$campaign_id&vcl_id=$vcl_id\"><font size=1>ATIVAR</font></a></td>\n";
|
|
}
|
|
else
|
|
{echo "<B>$rowx[5]</B></td>\n";}
|
|
echo "<td colspan=3>Method:\n";
|
|
echo "<select size=1 name=mix_method$US$vcl_id id=method$US$vcl_id><option value=\"EVEN_MIX\">EVEN_MIX</option><option value=\"IN_ORDER\">IN_ORDER</option><option value=\"RANDOM\">RANDOM</option><option SELECTED value=\"$rowx[4]\">$rowx[4]</option></select></td></tr>\n";
|
|
echo "<tr><td>ID DA LISTA</td><td>PRIORIDADE</td><td>% MIX</td><td>STATUS</td><td></td></tr>\n";
|
|
|
|
# list_id|order|percent|statuses|:list_id|order|percent|statuses|:...
|
|
# 101|1|40| A B NA -|:102|2|25| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|
|
|
# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX','TESTCAMP List Mix','TESTCAMP','101|1|40| A B NA -|:102|2|25| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE');
|
|
# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX2','TESTCAMP List Mix2','TESTCAMP','101|1|20| A B -|:102|2|45| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE');
|
|
# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX3','TESTCAMP List Mix3','TESTCAMP','101|1|30| A NA -|:102|2|35| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE');
|
|
|
|
$MIXentries = $MT;
|
|
$MIXentries = explode(":", $rowx[3]);
|
|
$Ms_to_print = (count($MIXentries) - 0);
|
|
$q=0;
|
|
while ($Ms_to_print > $q)
|
|
{
|
|
$MIXdetails = explode('|', $MIXentries[$q]);
|
|
$MIXdetailsLIST = $MIXdetails[0];
|
|
|
|
$dial_statuses = preg_replace("/ -$/","",$dial_statuses);
|
|
$Dstatuses = explode(" ", $dial_statuses);
|
|
$Ds_to_print = (count($Dstatuses) - 0);
|
|
$Dsql = '';
|
|
$r=0;
|
|
while ($Ds_to_print > $r)
|
|
{
|
|
$r++;
|
|
$Dsql .= "'$Dstatuses[$r]',";
|
|
}
|
|
$Dsql = preg_replace("/,$/","",$Dsql);
|
|
|
|
echo "<tr $bgcolor><td NOWRAP><font size=3>\n";
|
|
echo "<input type=hidden name=list_id$US$q$US$vcl_id id=list_id$US$q$US$vcl_id value=$MIXdetailsLIST>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=311&list_id=$MIXdetailsLIST\">List</a>: $MIXdetailsLIST <font size=1><a href=\"$PHP_SELF?ADD=49&SUB=29&stage=REMOVE&campaign_id=$campaign_id&vcl_id=$vcl_id&mix_container_item=$q&list_id=$MIXdetailsLIST#LINK_$vcl_id\">REMOVER</a></font></td>\n";
|
|
|
|
echo "<td><select size=1 name=priority$US$q$US$vcl_id id=priority$US$q$US$vcl_id>\n";
|
|
$n=40;
|
|
while ($n>=1)
|
|
{
|
|
echo "<option value=\"$n\">$n</option>\n";
|
|
$n = ($n-1);
|
|
}
|
|
echo "<option SELECTED value=\"$MIXdetails[1]\">$MIXdetails[1]</option></select></td>\n";
|
|
|
|
echo "<td><select size=1 name=\"percentage$US$q$US$vcl_id\" id=\"percentage$US$q$US$vcl_id\" onChange=\"mod_mix_percent('$vcl_id','$Ms_to_print')\">\n";
|
|
$n=100;
|
|
while ($n>=0)
|
|
{
|
|
echo "<option value=\"$n\">$n</option>\n";
|
|
$n = ($n-1);
|
|
}
|
|
echo "<option SELECTED value=\"$MIXdetails[2]\">$MIXdetails[2]</option></select></td>\n";
|
|
|
|
|
|
echo "<td><input type=hidden name=status$US$q$US$vcl_id id=status$US$q$US$vcl_id value=\"$MIXdetails[3]\"><input type=text size=20 maxlength=255 name=ROstatus$US$q$US$vcl_id id=ROstatus$US$q$US$vcl_id value=\"$MIXdetails[3]\" READONLY></td>\n";
|
|
echo "<td NOWRAP>\n";
|
|
|
|
|
|
|
|
echo "<select size=1 name=dial_status$US$q$US$vcl_id id=dial_status$US$q$US$vcl_id>\n";
|
|
echo "<option value=\"\"> - Select A Status - </option>\n";
|
|
|
|
echo "$dial_statuses_list";
|
|
echo "</select> <font size=2><B>\n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('ADD','$vcl_id','$q');return false;\">ADD</a> \n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('REMOVE','$vcl_id','$q');return false;\">REMOVER</a>\n";
|
|
echo "</font></B></td></tr>\n";
|
|
|
|
|
|
echo "</td></tr>\n";
|
|
|
|
|
|
$q++;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<tr $bgcolor><td colspan=3 align=right><font size=2>\n";
|
|
echo "Difference %: <input type=text size=4 name=PCT_DIFF_$vcl_id id=PCT_DIFF_$vcl_id value=0 readonly>\n";
|
|
echo "</td>\n";
|
|
|
|
echo "<td colspan=2><input type=button name=submit_$vcl_id id=submit_$vcl_id value=\"ENVIAR\" onClick=\"submit_mix('$vcl_id','$Ms_to_print')\"> \n";
|
|
echo "<span id=ERROR_$vcl_id></span>\n";
|
|
echo "</form></td></tr>\n";
|
|
|
|
|
|
echo "<tr $bgcolor><td colspan=3 align=center VALIGN=BOTTOM><font size=2>\n";
|
|
echo "<form action=\"$PHP_SELF#LINK_$vcl_id\" method=POST name=ADD_$vcl_id id=ADD_$vcl_id>\n";
|
|
echo "<input type=hidden name=ADD value=49>\n";
|
|
echo "<input type=hidden name=SUB value=29>\n";
|
|
echo "<input type=hidden name=stage value=\"ADD\">\n";
|
|
echo "<input type=hidden name=vcl_id value=\"$vcl_id\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "List: <select size=1 name=list_id>\n";
|
|
echo "$mixlists_list";
|
|
echo "<option selected value=\"\">ADD ANOTHER ENTRY</option>\n";
|
|
echo "</select>\n";
|
|
|
|
if ($q > 39) {$AE_disabled = 'DISABLED';}
|
|
else {$AE_disabled = '';}
|
|
echo "<input type=submit name=submit value=\"ADD ENTRY\" $AE_disabled>\n";
|
|
echo "</form></td>\n";
|
|
|
|
$X='X';
|
|
echo "<td NOWRAP VALIGN=BOTTOM>\n";
|
|
echo "<form action=\"$PHP_SELF#LINK_$vcl_id\" method=POST name=DEFAULT_$vcl_id id=DEFAULT_$vcl_id>\n";
|
|
echo "<input type=hidden name=status$US$X$US$vcl_id id=status$US$X$US$vcl_id value=\"\"><input type=text size=20 maxlength=255 name=ROstatus$US$X$US$vcl_id id=ROstatus$US$X$US$vcl_id value=\"$LMdial_statuses\" READONLY>\n";
|
|
echo "<BR><font size=2><B>CHANGE: \n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('ALL','$vcl_id','$q');return false;\">ALL</a> \n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('EMPTY','$vcl_id','$q');return false;\">EMPTY</a>\n";
|
|
echo "</td><td NOWRAP VALIGN=MIDDLE>\n";
|
|
echo "<select size=1 name=dial_status$US$X$US$vcl_id id=dial_status$US$X$US$vcl_id>\n";
|
|
echo "<option value=\"\"> - Select A Status - </option>\n";
|
|
echo "$dial_statuses_list";
|
|
echo "</select> <font size=2><B>\n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('ADD','$vcl_id','X');return false;\">ADD</a> \n";
|
|
echo "<a href=\"#\" onclick=\"mod_mix_status('REMOVE','$vcl_id','X');return false;\">REMOVER</a>\n";
|
|
echo "</form></td></tr>\n";
|
|
echo "</table></span>\n";
|
|
}
|
|
|
|
|
|
echo "<br><br><B>NOVA LISTA MIX</B><BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<table border=0>\n";
|
|
echo "<tr $bgcolor><td><form action=\"$PHP_SELF#LINK_$vcl_id\" method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=49>\n";
|
|
echo "<input type=hidden name=SUB value=29>\n";
|
|
echo "<input type=hidden name=stage value=\"NEWMIX\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
|
echo "Mix ID: <input type=text size=20 maxlength=20 name=vcl_id value=\"\"></td>\n";
|
|
echo "<td>Mix Name: <input type=text size=30 maxlength=50 name=vcl_name value=\"\"></td>\n";
|
|
echo "<td>Mix Method: ";
|
|
echo "<select size=1 name=mix_method><option value=\"EVEN_MIX\">EVEN_MIX</option><option value=\"IN_ORDER\">IN_ORDER</option><option value=\"RANDOM\">RANDOM</option></select></td></tr>\n";
|
|
echo "<tr $bgcolor><td>List: <select size=1 name=list_id>\n";
|
|
echo "$mixlists_list";
|
|
echo "</select></td>\n";
|
|
echo "<td>Dial Status: <select size=1 name=status>\n";
|
|
echo "$dial_statuses_list";
|
|
echo "</select></td>\n";
|
|
echo "<td> <input type=submit name=submit value=ENVIAR></form></td>\n";
|
|
echo "</tr>\n";
|
|
echo "</table>\n";
|
|
|
|
echo "<br>\n";
|
|
|
|
}
|
|
}
|
|
echo "</TD></TR></TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=30 campaign not allowed
|
|
######################
|
|
|
|
if ($ADD==30)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
echo "You do not have permission to view campaign $campaign_id\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=32 display all campaign statuses
|
|
######################
|
|
if ($ADD==32)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE STATUS CUSTOMIZADOS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>STATUS</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=22&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT status from vicidial_campaign_statuses where campaign_id='$campaigns_id_list[$o]' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if ($p<1)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=22&campaign_id=$campaigns_id_list[$o]\">MODIFY STATUS</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=33 display all campaign hotkeys
|
|
######################
|
|
if ($ADD==33)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE ATALHOS DA CAMPANHA:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>HOTKEYS</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=23&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT status from vicidial_campaign_hotkeys where campaign_id='$campaigns_id_list[$o]' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if ($p<1)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=23&campaign_id=$campaigns_id_list[$o]\">MODIFY HOTKEYS</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=35 display all campaign lead recycle entries
|
|
######################
|
|
if ($ADD==35)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE RECICLAGEM DE REGISTROS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>RECICLAGEM DE REGISTROS</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=25&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT status from vicidial_lead_recycle where campaign_id='$campaigns_id_list[$o]' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if ($p<1)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=25&campaign_id=$campaigns_id_list[$o]\">MODIFY RECICLAGEM DE REGISTROS</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=36 display all campaign auto-alt dial entries
|
|
######################
|
|
if ($ADD==36)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE DISC. ALTERN. DE REG.:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>AUTO-ALT DIAL</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=26&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaigns_id_list[$o]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if (strlen($row[0])<3)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=26&campaign_id=$campaigns_id_list[$o]\">MODIFY AUTO-ALT DIAL</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=37 display all campaign agent pause codes
|
|
######################
|
|
if ($ADD==37)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE CÓDIGOS DE PAUSA DE AGENTE:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>CÓDIGOS DE PAUSA</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=27&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT pause_code from vicidial_pause_codes where campaign_id='$campaigns_id_list[$o]' order by pause_code;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if ($p<1)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=27&campaign_id=$campaigns_id_list[$o]\">MODIFY CÓDIGOS DE PAUSA</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=39 display all campaign list mixes
|
|
######################
|
|
if ($ADD==39)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>LISTA DE MESCLAGEM DE LISTA DE REGISTROS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr>\n";
|
|
echo "<td><B>CAMPANHA</B></td>\n";
|
|
echo "<td><B>NOME</B></td>\n";
|
|
echo "<td><B>LIST MIX</B></td>\n";
|
|
echo "<td><B>ALTERAR</B></td>\n";
|
|
echo "</tr>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$campaigns_id_list[$o] = $row[0];
|
|
$campaigns_name_list[$o] = $row[1];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaigns_id_list[$o]\">$campaigns_id_list[$o]</a></td>";
|
|
echo "<td><font size=1> $campaigns_name_list[$o] </td>";
|
|
echo "<td><font size=1> ";
|
|
|
|
$stmt="SELECT vcl_id from vicidial_campaigns_list_mix where campaign_id='$campaigns_id_list[$o]' order by status,vcl_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campstatus_to_print = mysql_num_rows($rslt);
|
|
$p=0;
|
|
while ( ($campstatus_to_print > $p) and ($p < 10) )
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "$row[0] ";
|
|
$p++;
|
|
}
|
|
if ($p<1)
|
|
{echo "<font color=grey><DEL>NONE</DEL></font>";}
|
|
echo "</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaigns_id_list[$o]\">MODIFY LIST MIX</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=311 modify list info in the system
|
|
######################
|
|
|
|
if ($ADD==311)
|
|
{
|
|
if ($LOGmodify_lists==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$list_name = $row[1];
|
|
$campaign_id = $row[2];
|
|
$active = $row[3];
|
|
$list_description = $row[4];
|
|
$list_changedate = $row[5];
|
|
$list_lastcalldate = $row[6];
|
|
$reset_time = $row[7];
|
|
$agent_script_override = $row[8];
|
|
$campaign_cid_override = $row[9];
|
|
$am_message_exten_override = $row[10];
|
|
$drop_inbound_group_override = $row[11];
|
|
$xferconf_a_number = $row[12];
|
|
$xferconf_b_number = $row[13];
|
|
$xferconf_c_number = $row[14];
|
|
$xferconf_d_number = $row[15];
|
|
$xferconf_e_number = $row[16];
|
|
|
|
# grab names of global statuses and statuses in the selected campaign
|
|
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Cstatuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($Cstatuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$statuses_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
# end grab status names
|
|
|
|
##### get scripts listings for pulldown
|
|
$Lscripts_list = "<option value=\"\">NONE - INACTIVE</option>\n";
|
|
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$scripts_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($scripts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Lscripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$scriptname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
##### get in-groups listings for dynamic drop in-group pulldown
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Dgroups_to_print = mysql_num_rows($rslt);
|
|
$Dgroups_menu='';
|
|
$Dgroups_selected=0;
|
|
$o=0;
|
|
while ($Dgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Dgroups_menu .= "<option ";
|
|
if ($drop_inbound_group_override == "$rowx[0]")
|
|
{
|
|
$Dgroups_menu .= "SELECTED ";
|
|
$Dgroups_selected++;
|
|
}
|
|
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
if ($Dgroups_selected < 1)
|
|
{$Dgroups_menu .= "<option SELECTED value=\"\">---NONE---</option>\n";}
|
|
else
|
|
{$Dgroups_menu .= "<option value=\"\">---NONE---</option>\n";}
|
|
|
|
|
|
echo "<br>ALTERAR REGISTRO DA LISTA: $list_id<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=411>\n";
|
|
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
|
echo "<input type=hidden name=old_campaign_id value=\"$campaign_id\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Lista: </td><td align=left><b>$list_id</b>$NWB#vicidial_lists-list_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Lista: </td><td align=left><input type=text name=list_name size=20 maxlength=20 value=\"$list_name\">$NWB#vicidial_lists-list_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição da Lista: </td><td align=left><input type=text name=list_description size=30 maxlength=255 value=\"$list_description\">$NWB#vicidial_lists-list_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=34&campaign_id=$campaign_id\">Campanha</a>: </td><td align=left><select size=1 name=campaign_id>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$campaigns_list";
|
|
echo "<option SELECTED>$campaign_id</option>\n";
|
|
echo "</select>$NWB#vicidial_lists-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_lists-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Reiniciar Status dos registros de chamada para esta Lista: </td><td align=left><select size=1 name=reset_list><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_lists-reset_list$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Perdí Times: </td><td align=left><input type=text name=reset_time size=30 maxlength=100 value=\"$reset_time\">$NWB#vicidial_lists-reset_time$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Data da Alteração: </td><td align=left>$list_changedate $NWB#vicidial_lists-list_changedate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Data da última chamada da lista: </td><td align=left>$list_lastcalldate $NWB#vicidial_lists-list_lastcalldate$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$agent_script_override\">Agente de secuencias de comandos Reemplazar</a>: </td><td align=left><select size=1 name=agent_script_override>\n";
|
|
echo "$Lscripts_list";
|
|
echo "<option selected value=\"$agent_script_override\">$agent_script_override - $scriptname_list[$agent_script_override]</option>\n";
|
|
echo "</select>$NWB#vicidial_lists-agent_script_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Campaña CID Override: </td><td align=left><input type=text name=campaign_cid_override size=20 maxlength=20 value=\"$campaign_cid_override\">$NWB#vicidial_lists-campaign_cid_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Contestador automático de mensajes Override: </td><td align=left><input type=text name=am_message_exten_override id=am_message_exten_override size=50 maxlength=100 value=\"$am_message_exten_override\"> <a href=\"javascript:launch_chooser('am_message_exten_override','date',300);\">audio chooser</a> $NWB#vicidial_lists-am_message_exten_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Drop de entrada Grupo de Override: </td><td align=left><select size=1 name=drop_inbound_group_override>";
|
|
echo "$Dgroups_menu";
|
|
echo "</select>$NWB#vicidial_lists-drop_inbound_group_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Número Transfer-Conf 1 Override: </td><td align=left><input type=text name=xferconf_a_number size=20 maxlength=50 value=\"$xferconf_a_number\">$NWB#vicidial_lists-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Número Transfer-Conf 2 Override: </td><td align=left><input type=text name=xferconf_b_number size=20 maxlength=50 value=\"$xferconf_b_number\">$NWB#vicidial_lists-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Número Transfer-Conf 3 Override: </td><td align=left><input type=text name=xferconf_c_number size=20 maxlength=50 value=\"$xferconf_c_number\">$NWB#vicidial_lists-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Número Transfer-Conf 4 Override: </td><td align=left><input type=text name=xferconf_d_number size=20 maxlength=50 value=\"$xferconf_d_number\">$NWB#vicidial_lists-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#8EBCFD><td align=right>Número Transfer-Conf 5 Override: </td><td align=left><input type=text name=xferconf_e_number size=20 maxlength=50 value=\"$xferconf_e_number\">$NWB#vicidial_lists-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>STATUS DESTA LISTA:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS</td><td>NOME DO STATUS</td><td>CHAMADO</td><td>NÃO CHAMADO</td></tr>\n";
|
|
|
|
$leads_in_list = 0;
|
|
$leads_in_list_N = 0;
|
|
$leads_in_list_Y = 0;
|
|
$stmt="SELECT status,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by status,called_since_last_reset order by status,called_since_last_reset";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
$lead_list['count'] = 0;
|
|
$lead_list['Y_count'] = 0;
|
|
$lead_list['N_count'] = 0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
|
|
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
|
|
if ($rowx[1] == 'N')
|
|
{
|
|
$since_reset = 'N';
|
|
$since_resetX = 'Y';
|
|
}
|
|
else
|
|
{
|
|
$since_reset = 'Y';
|
|
$since_resetX = 'N';
|
|
}
|
|
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
|
|
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
|
|
#If opposite side is not set, it may not in the future so give it a value of zero
|
|
if (!isset($lead_list[$since_resetX][$rowx[0]]))
|
|
{
|
|
$lead_list[$since_resetX][$rowx[0]]=0;
|
|
}
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
if ($lead_list['count'] > 0)
|
|
{
|
|
while (list($dispo,) = each($lead_list[$since_reset]))
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
if ($dispo == 'CBHOLD')
|
|
{
|
|
$CLB="<a href=\"$PHP_SELF?ADD=811&list_id=$list_id\">";
|
|
$CLE="</a>";
|
|
}
|
|
else
|
|
{
|
|
$CLB='';
|
|
$CLE='';
|
|
}
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$CLB$dispo$CLE</td><td><font size=1>$statuses_list[$dispo]</td><td><font size=1>".$lead_list['Y'][$dispo]."</td><td><font size=1>".$lead_list['N'][$dispo]." </td></tr>\n";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
echo "<tr><td colspan=2><font size=1>SUBTOTAIS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
|
|
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=3 align=center><font size=1>$lead_list[count]</td></tr>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
unset($lead_list);
|
|
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>FUSOS HORÁRIOS DESTA CAMPANHA:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>DIFERENÇA PARA GMT AGORA (horário local)</td><td>CHAMADO</td><td>NÃO CHAMADO</td></tr>\n";
|
|
|
|
$stmt="SELECT gmt_offset_now,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by gmt_offset_now,called_since_last_reset order by gmt_offset_now,called_since_last_reset";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
$plus='+';
|
|
$lead_list['count'] = 0;
|
|
$lead_list['Y_count'] = 0;
|
|
$lead_list['N_count'] = 0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
|
|
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
|
|
if ($rowx[1] == 'N')
|
|
{
|
|
$since_reset = 'N';
|
|
$since_resetX = 'Y';
|
|
}
|
|
else
|
|
{
|
|
$since_reset = 'Y';
|
|
$since_resetX = 'N';
|
|
}
|
|
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
|
|
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
|
|
#If opposite side is not set, it may not in the future so give it a value of zero
|
|
if (!isset($lead_list[$since_resetX][$rowx[0]]))
|
|
{
|
|
$lead_list[$since_resetX][$rowx[0]]=0;
|
|
}
|
|
$o++;
|
|
}
|
|
|
|
if ($lead_list['count'] > 0)
|
|
{
|
|
while (list($tzone,) = each($lead_list[$since_reset]))
|
|
{
|
|
$LOCALzone=3600 * $tzone;
|
|
$LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone);
|
|
|
|
if ($tzone >= 0) {$DISPtzone = "$plus$tzone";}
|
|
else {$DISPtzone = "$tzone";}
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1>".$DISPtzone." ($LOCALdate)</td><td><font size=1>".$lead_list['Y'][$tzone]."</td><td><font size=1>".$lead_list['N'][$tzone]."</td></tr>\n";
|
|
}
|
|
}
|
|
|
|
echo "<tr><td><font size=1>SUBTOTAIS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
|
|
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=2 align=center><font size=1>$lead_list[count]</td></tr>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
unset($lead_list);
|
|
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>PROPIETARIOS dentro de esta lista:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>OWNER</td><td>CHAMADO</td><td>NÃO CHAMADO</td></tr>\n";
|
|
|
|
$leads_in_list = 0;
|
|
$leads_in_list_N = 0;
|
|
$leads_in_list_Y = 0;
|
|
$stmt="SELECT owner,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by owner,called_since_last_reset order by owner,called_since_last_reset";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$owners_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
$lead_list['count'] = 0;
|
|
$lead_list['Y_count'] = 0;
|
|
$lead_list['N_count'] = 0;
|
|
while ($owners_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
|
|
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
|
|
if ($rowx[1] == 'N')
|
|
{
|
|
$since_reset = 'N';
|
|
$since_resetX = 'Y';
|
|
}
|
|
else
|
|
{
|
|
$since_reset = 'Y';
|
|
$since_resetX = 'N';
|
|
}
|
|
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
|
|
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
|
|
#If opposite side is not set, it may not in the future so give it a value of zero
|
|
if (!isset($lead_list[$since_resetX][$rowx[0]]))
|
|
{
|
|
$lead_list[$since_resetX][$rowx[0]]=0;
|
|
}
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
if ($lead_list['count'] > 0)
|
|
{
|
|
while (list($owner,) = each($lead_list[$since_reset]))
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
$CLB='';
|
|
$CLE='';
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$CLB$owner$CLE</td><td><font size=1>".$lead_list['Y'][$owner]."</td><td><font size=1>".$lead_list['N'][$owner]." </td></tr>\n";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
echo "<tr><td><font size=1>SUBTOTAIS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
|
|
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=3 align=center><font size=1>$lead_list[count]</td></tr>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
unset($lead_list);
|
|
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>RANKS dentro de esta lista:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>RANK</td><td>CHAMADO</td><td>NÃO CHAMADO</td></tr>\n";
|
|
|
|
$leads_in_list = 0;
|
|
$leads_in_list_N = 0;
|
|
$leads_in_list_Y = 0;
|
|
$stmt="SELECT rank,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by rank,called_since_last_reset order by rank,called_since_last_reset";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ranks_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
$lead_list['count'] = 0;
|
|
$lead_list['Y_count'] = 0;
|
|
$lead_list['N_count'] = 0;
|
|
while ($ranks_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
|
|
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
|
|
if ($rowx[1] == 'N')
|
|
{
|
|
$since_reset = 'N';
|
|
$since_resetX = 'Y';
|
|
}
|
|
else
|
|
{
|
|
$since_reset = 'Y';
|
|
$since_resetX = 'N';
|
|
}
|
|
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
|
|
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
|
|
#If opposite side is not set, it may not in the future so give it a value of zero
|
|
if (!isset($lead_list[$since_resetX][$rowx[0]]))
|
|
{
|
|
$lead_list[$since_resetX][$rowx[0]]=0;
|
|
}
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
if ($lead_list['count'] > 0)
|
|
{
|
|
while (list($rank,) = each($lead_list[$since_reset]))
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
$CLB='';
|
|
$CLE='';
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$CLB$rank$CLE</td><td><font size=1>".$lead_list['Y'][$rank]."</td><td><font size=1>".$lead_list['N'][$rank]." </td></tr>\n";
|
|
$o++;
|
|
}
|
|
}
|
|
|
|
echo "<tr><td><font size=1>SUBTOTAIS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
|
|
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=3 align=center><font size=1>$lead_list[count]</td></tr>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
unset($lead_list);
|
|
|
|
|
|
$leads_in_list = 0;
|
|
$leads_in_list_N = 0;
|
|
$leads_in_list_Y = 0;
|
|
$stmt="SELECT status, if(called_count >= 100, 100, called_count), count(*) from vicidial_list where list_id='$list_id' group by status, if(called_count >= 100, 100, called_count) order by status,called_count";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$status_called_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
$sts=0;
|
|
$first_row=1;
|
|
$all_called_first=1000;
|
|
$all_called_last=0;
|
|
while ($status_called_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$leads_in_list = ($leads_in_list + $rowx[2]);
|
|
$count_statuses[$o] = $rowx[0];
|
|
$count_called[$o] = $rowx[1];
|
|
$count_count[$o] = $rowx[2];
|
|
$all_called_count[$rowx[1]] = ($all_called_count[$rowx[1]] + $rowx[2]);
|
|
|
|
if ( (strlen($status[$sts]) < 1) or ($status[$sts] != "$rowx[0]") )
|
|
{
|
|
if ($first_row) {$first_row=0;}
|
|
else {$sts++;}
|
|
$status[$sts] = "$rowx[0]";
|
|
$status_called_first[$sts] = "$rowx[1]";
|
|
if ($status_called_first[$sts] < $all_called_first) {$all_called_first = $status_called_first[$sts];}
|
|
}
|
|
$leads_in_sts[$sts] = ($leads_in_sts[$sts] + $rowx[2]);
|
|
$status_called_last[$sts] = "$rowx[1]";
|
|
if ($status_called_last[$sts] > $all_called_last) {$all_called_last = $status_called_last[$sts];}
|
|
|
|
$o++;
|
|
}
|
|
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>CHAMADAS EFETUADAS DESTA LISTA:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=1>\n";
|
|
echo "<tr><td align=left><font size=1>STATUS</td><td align=center><font size=1>NOME DO STATUS</td>";
|
|
$first = $all_called_first;
|
|
while ($first <= $all_called_last)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';}
|
|
else{$AB='bgcolor="#E0FFFF"';}
|
|
if ($first >= 100) {$Fplus='+';}
|
|
else {$Fplus='';}
|
|
echo "<td align=center $AB><font size=1>$first$Fplus</td>";
|
|
$first++;
|
|
}
|
|
echo "<td align=center><font size=1>SUBTOTAL</td></tr>\n";
|
|
|
|
$sts=0;
|
|
$statuses_called_to_print = count($status);
|
|
while ($statuses_called_to_print > $sts)
|
|
{
|
|
$Pstatus = $status[$sts];
|
|
if (eregi("1$|3$|5$|7$|9$", $sts))
|
|
{$bgcolor='bgcolor="#B9CBFD"'; $AB='bgcolor="#9BB9FB"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"'; $AB='bgcolor="#B9CBFD"';}
|
|
# echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n";
|
|
# echo "$status[$sts]|";
|
|
echo "<tr $bgcolor><td><font size=1>$Pstatus</td><td><font size=1>$statuses_list[$Pstatus]</td>";
|
|
|
|
$first = $all_called_first;
|
|
while ($first <= $all_called_last)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $sts))
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#9BB9FB"';}
|
|
else{$AB='bgcolor="#B9CBFD"';}
|
|
}
|
|
else
|
|
{
|
|
if (eregi("0$|2$|4$|6$|8$", $first)) {$AB='bgcolor="#9BB9FB"';}
|
|
else{$AB='bgcolor="#B9CBFD"';}
|
|
}
|
|
|
|
$called_printed=0;
|
|
$o=0;
|
|
while ($status_called_to_print > $o)
|
|
{
|
|
if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") )
|
|
{
|
|
$called_printed++;
|
|
echo "<td $AB><font size=1> $count_count[$o]</td>";
|
|
}
|
|
|
|
$o++;
|
|
}
|
|
if (!$called_printed)
|
|
{echo "<td $AB><font size=1> </td>";}
|
|
$first++;
|
|
}
|
|
echo "<td><font size=1>$leads_in_sts[$sts]</td></tr>\n\n";
|
|
|
|
$sts++;
|
|
}
|
|
|
|
echo "<tr><td align=center colspan=2><b><font size=1>TOTAL</td>";
|
|
$first = $all_called_first;
|
|
while ($first <= $all_called_last)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $first)) {$AB='bgcolor="#AFEEEE"';}
|
|
else{$AB='bgcolor="#E0FFFF"';}
|
|
echo "<td align=center $AB><b><font size=1>$all_called_count[$first]</td>";
|
|
$first++;
|
|
}
|
|
echo "<td align=center><b><font size=1>$leads_in_list</td></tr>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
|
|
|
|
|
|
echo "<center><b>\n";
|
|
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=811&list_id=$list_id\">Clique aqui para ver todos os registros de Callback para esta lista</a><BR><BR>\n";
|
|
echo "<br><br><a href=\"./list_download.php?list_id=$list_id\">Clique aqui para fazer download desta lista</a><BR><BR>\n";
|
|
|
|
if ($LOGdelete_lists > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=511&list_id=$list_id\">APAGAR ESTA LISTA</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=LISTAS&stage=$list_id\">Clique aqui para ver alterações Admin para esta lista</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=3111 modify in-group info in the system
|
|
######################
|
|
|
|
if ($ADD==3111)
|
|
{
|
|
if ($LOGmodify_ingroups==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$group_name = $row[1];
|
|
$group_color = $row[2];
|
|
$active = $row[3];
|
|
$web_form_address = stripslashes($row[4]);
|
|
$voicemail_ext = $row[5];
|
|
$next_agent_call = $row[6];
|
|
$fronter_display = $row[7];
|
|
$script_id = $row[8];
|
|
$get_call_launch = $row[9];
|
|
$xferconf_a_dtmf = $row[10];
|
|
$xferconf_a_number = $row[11];
|
|
$xferconf_b_dtmf = $row[12];
|
|
$xferconf_b_number = $row[13];
|
|
$drop_call_seconds = $row[14];
|
|
$drop_action = $row[15];
|
|
$drop_exten = $row[16];
|
|
$call_time_id = $row[17];
|
|
$after_hours_action = $row[18];
|
|
$after_hours_message_filename = $row[19];
|
|
$after_hours_exten = $row[20];
|
|
$after_hours_voicemail = $row[21];
|
|
$welcome_message_filename = $row[22];
|
|
$moh_context = $row[23];
|
|
$onhold_prompt_filename = $row[24];
|
|
$prompt_interval = $row[25];
|
|
$agent_alert_exten = $row[26];
|
|
$agent_alert_delay = $row[27];
|
|
$default_xfer_group = $row[28];
|
|
$queue_priority = $row[29];
|
|
$drop_inbound_group = $row[30];
|
|
$ingroup_recording_override = $row[31];
|
|
$ingroup_rec_filename = $row[32];
|
|
$afterhours_xfer_group = $row[33];
|
|
$qc_enabled = $row[34];
|
|
$qc_statuses = $row[35];
|
|
$qc_shift_id = $row[36];
|
|
$qc_get_record_launch = $row[37];
|
|
$qc_show_recording = $row[38];
|
|
$qc_web_form_address = stripslashes($row[39]);
|
|
$qc_script = $row[40];
|
|
$play_place_in_line = $row[41];
|
|
$play_estimate_hold_time = $row[42];
|
|
$hold_time_option = $row[43];
|
|
$hold_time_option_seconds = $row[44];
|
|
$hold_time_option_exten = $row[45];
|
|
$hold_time_option_voicemail = $row[46];
|
|
$hold_time_option_xfer_group = $row[47];
|
|
$hold_time_option_callback_filename = $row[48];
|
|
$hold_time_option_callback_list_id = $row[49];
|
|
$hold_recall_xfer_group = $row[50];
|
|
$no_delay_call_route = $row[51];
|
|
$play_welcome_message = $row[52];
|
|
$answer_sec_pct_rt_stat_one = $row[53];
|
|
$answer_sec_pct_rt_stat_two = $row[54];
|
|
$default_group_alias = $row[55];
|
|
$no_agent_no_queue = $row[56];
|
|
$no_agent_action = $row[57];
|
|
$no_agent_action_value = $row[58];
|
|
$web_form_address_two = stripslashes($row[59]);
|
|
$timer_action = $row[60];
|
|
$timer_action_message = $row[61];
|
|
$timer_action_seconds = $row[62];
|
|
$start_call_url = $row[63];
|
|
$dispo_call_url = $row[64];
|
|
$xferconf_c_number = $row[65];
|
|
$xferconf_d_number = $row[66];
|
|
$xferconf_e_number = $row[67];
|
|
|
|
##### get in-groups listings for dynamic pulldown
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Xgroups_to_print = mysql_num_rows($rslt);
|
|
$Xgroups_menu='';
|
|
$Xgroups_selected=0;
|
|
$Dgroups_menu='';
|
|
$Dgroups_selected=0;
|
|
$Agroups_menu='';
|
|
$Agroups_selected=0;
|
|
$Hgroups_menu='';
|
|
$Hgroups_selected=0;
|
|
$Tgroups_menu='';
|
|
$Tgroups_selected=0;
|
|
$o=0;
|
|
while ($Xgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Xgroups_menu .= "<option ";
|
|
$Dgroups_menu .= "<option ";
|
|
$Agroups_menu .= "<option ";
|
|
$Tgroups_menu .= "<option ";
|
|
$Hgroups_menu .= "<option ";
|
|
if ($default_xfer_group == "$rowx[0]")
|
|
{
|
|
$Xgroups_menu .= "SELECTED ";
|
|
$Xgroups_selected++;
|
|
}
|
|
if ($drop_inbound_group == "$rowx[0]")
|
|
{
|
|
$Dgroups_menu .= "SELECTED ";
|
|
$Dgroups_selected++;
|
|
}
|
|
if ($afterhours_xfer_group == "$rowx[0]")
|
|
{
|
|
$Agroups_menu .= "SELECTED ";
|
|
$Agroups_selected++;
|
|
}
|
|
if ($hold_time_option_xfer_group == "$rowx[0]")
|
|
{
|
|
$Tgroups_menu .= "SELECTED ";
|
|
$Tgroups_selected++;
|
|
}
|
|
if ($hold_recall_xfer_group == "$rowx[0]")
|
|
{
|
|
$Hgroups_menu .= "SELECTED ";
|
|
$Hgroups_selected++;
|
|
}
|
|
$Xgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
if ($group_id!=$rowx[0])
|
|
{
|
|
$Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
}
|
|
$o++;
|
|
}
|
|
if ($Xgroups_selected < 1)
|
|
{$Xgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Xgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
if ($Dgroups_selected < 1)
|
|
{$Dgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Dgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
if ($Agroups_selected < 1)
|
|
{$Agroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Agroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
if ($Tgroups_selected < 1)
|
|
{$Tgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Tgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
if ($Hgroups_selected < 1)
|
|
{$Hgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Hgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
|
|
|
|
echo "<br>ALTERAR REGISTRO DE GRUPOS: $row[0]<form action=$PHP_SELF method=POST name=admin_form id=admin_form>\n";
|
|
echo "<input type=hidden name=ADD value=4111>\n";
|
|
echo "<input type=hidden name=group_id value=\"$row[0]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Grupo: </td><td align=left><b>$row[0]</b>$NWB#vicidial_inbound_groups-group_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Grupo: </td><td align=left><input type=text name=group_name size=30 maxlength=30 value=\"$row[1]\">$NWB#vicidial_inbound_groups-group_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Cor do Grupo: </td><td align=left bgcolor=\"$row[2]\" id=\"group_color_td\"><input type=text name=group_color size=7 maxlength=7 value=\"$row[2]\">$NWB#vicidial_inbound_groups-group_color$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web: </td><td align=left><input type=text name=web_form_address size=70 maxlength=1055 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
|
|
if ($SSenable_second_webform > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulário Web Two: </td><td align=left><input type=text name=web_form_address_two size=70 maxlength=1055 value=\"$web_form_address_two\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Próximo Agente a chamar: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option>longest_wait_time</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#BDFFBD><td align=right>Prioridade da Fila:</td><td align=left><select size=1 name=queue_priority>\n";
|
|
$n=99;
|
|
while ($n>=-99)
|
|
{
|
|
$dtl = 'Even';
|
|
if ($n<0) {$dtl = 'Lower';}
|
|
if ($n>0) {$dtl = 'Higher';}
|
|
if ($n == $queue_priority)
|
|
{echo "<option SELECTED value=\"$n\">$n - $dtl</option>\n";}
|
|
else
|
|
{echo "<option value=\"$n\">$n - $dtl</option>\n";}
|
|
$n--;
|
|
}
|
|
echo "</select> $NWB#vicidial_inbound_groups-queue_priority$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mostrar Fronter: </td><td align=left><select size=1 name=fronter_display><option>Y</option><option>N</option><option SELECTED>$fronter_display</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script</a>: </td><td align=left><select size=1 name=script_id>\n";
|
|
echo "$scripts_list";
|
|
echo "<option selected value=\"$script_id\">$script_id - $scriptname_list[$script_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_groups-ingroup_script$NWE</td></tr>\n";
|
|
$eswHTML='';
|
|
if ($SSenable_second_webform > 0)
|
|
{$eswHTML = '<option>WEBFORMTWO</option>';}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Pegar lançamento da chamada: </td><td align=left><select size=1 name=get_call_launch><option selected>NONE</option><option>SCRIPT</option><option>WEBFORM</option>$eswHTML<option selected>$get_call_launch</option></select>$NWB#vicidial_inbound_groups-get_call_launch$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transfer-Conf DTMF 1: </td><td align=left><input type=text name=xferconf_a_dtmf size=20 maxlength=50 value=\"$xferconf_a_dtmf\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 1: </td><td align=left><input type=text name=xferconf_a_number size=20 maxlength=50 value=\"$xferconf_a_number\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Transfer-Conf DTMF 2: </td><td align=left><input type=text name=xferconf_b_dtmf size=20 maxlength=50 value=\"$xferconf_b_dtmf\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 2: </td><td align=left><input type=text name=xferconf_b_number size=20 maxlength=50 value=\"$xferconf_b_number\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 3: </td><td align=left><input type=text name=xferconf_c_number size=20 maxlength=50 value=\"$xferconf_c_number\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 4: </td><td align=left><input type=text name=xferconf_d_number size=20 maxlength=50 value=\"$xferconf_d_number\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número Transfer-Conf 5: </td><td align=left><input type=text name=xferconf_e_number size=20 maxlength=50 value=\"$xferconf_e_number\">$NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador de Acción de: </td><td align=left><select size=1 name=timer_action><option selected>NONE</option><option>D1_DIAL</option><option>D2_DIAL</option><option>D3_DIAL</option><option>D4_DIAL</option><option>D5_DIAL</option><option>MESSAGE_ONLY</option><option>WEBFORM</option>$eswHTML<option selected>$timer_action</option></select>$NWB#vicidial_inbound_groups-timer_action$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador de mensaje de acción: </td><td align=left><input type=text name=timer_action_message size=50 maxlength=255 value=\"$timer_action_message\">$NWB#vicidial_inbound_groups-timer_action_message$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Temporizador Segundos Acción: </td><td align=left><input type=text name=timer_action_seconds size=10 maxlength=10 value=\"$timer_action_seconds\">$NWB#vicidial_inbound_groups-timer_action_seconds$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Tempo até derrubar(DROP): </td><td align=left><input type=text name=drop_call_seconds size=5 maxlength=4 value=\"$drop_call_seconds\">$NWB#vicidial_inbound_groups-drop_call_seconds$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Ação de Drop:</td><td align=left><select size=1 name=drop_action><option>HANGUP</option><option>MESSAGE</option><option>VOICEMAIL</option><option>IN_GROUP</option><option SELECTED>$drop_action</option></select>$NWB#vicidial_inbound_groups-drop_action$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Exten de Drop: </td><td align=left><input type=text name=drop_exten size=10 maxlength=20 value=\"$drop_exten\">$NWB#vicidial_inbound_groups-drop_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Correio de Voz: </td><td align=left><input type=text name=voicemail_ext id=voicemail_ext size=12 maxlength=10 value=\"$voicemail_ext\"> <a href=\"javascript:launch_vm_chooser('voicemail_ext','vm',400);\">voicemail chooser</a>$NWB#vicidial_inbound_groups-voicemail_ext$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Grupo de Transferência de Drop:</td><td align=left><select size=1 name=drop_inbound_group>";
|
|
echo "$Dgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-drop_inbound_group$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$call_time_id\">Horário de Chamada:</a></td><td align=left><select size=1 name=call_time_id>\n";
|
|
echo "$call_times_list";
|
|
echo "<option selected value=\"$call_time_id\">$call_time_id - $call_timename_list[$call_time_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_groups-call_time_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Ação Fora do Expediente:</td><td align=left><select size=1 name=after_hours_action><option>HANGUP</option><option>MESSAGE</option><option>EXTENSÃO</option><option>VOICEMAIL</option><option>IN_GROUP</option><option SELECTED>$after_hours_action</option></select>$NWB#vicidial_inbound_groups-after_hours_action$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Arquivo Fora do Expediente:</td><td align=left><input type=text name=after_hours_message_filename id=after_hours_message_filename size=50 maxlength=255 value=\"$after_hours_message_filename\"> <a href=\"javascript:launch_chooser('after_hours_message_filename','date',400);\">audio chooser</a> $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Extensão Fora do Expediente:</td><td align=left><input type=text name=after_hours_exten size=10 maxlength=20 value=\"$after_hours_exten\">$NWB#vicidial_inbound_groups-after_hours_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Correio de Voz Fora do Expediente:</td><td align=left><input type=text name=after_hours_voicemail id=after_hours_voicemail size=12 maxlength=10 value=\"$after_hours_voicemail\"> <a href=\"javascript:launch_vm_chooser('after_hours_voicemail','vm',600);\">voicemail chooser</a>$NWB#vicidial_inbound_groups-after_hours_voicemail$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Grupo de Transferência Fora do Exped.:</td><td align=left><select size=1 name=afterhours_xfer_group>";
|
|
echo "$Agroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>N de colas n Agentes: </td><td align=left><select size=1 name=no_agent_no_queue><option>Y</option><option>N</option><option>NO_PAUSED</option><option SELECTED>$no_agent_no_queue</option></select>$NWB#vicidial_inbound_groups-no_agent_no_queue$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>No No Acción cola de agente: </td><td align=left><select size=1 name=no_agent_action id=no_agent_action onChange=\"dynamic_call_action('no_agent_action','$no_agent_action','$no_agent_action_value','600');\"><option>CALLMENU</option><option>INGROUP</option><option>DID</option><option>MESSAGE</option><option>EXTENSÃO</option><option>VOICEMAIL</option><option SELECTED>$no_agent_action</option></select>$NWB#vicidial_inbound_groups-no_agent_no_queue$NWE\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>";
|
|
echo "<span id=\"no_agent_action_value_span\" name=\"no_agent_action_value_span\">\n";
|
|
|
|
if ($no_agent_action=='CALLMENU')
|
|
{
|
|
echo "<span name=no_agent_action_value_link id=no_agent_action_value_link>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3511&menu_id=$no_agent_action_value\">Menu:</a>";
|
|
echo "</span>";
|
|
echo " <select size=1 name=no_agent_action_value id=no_agent_action_value onChange=\"dynamic_call_action_link('no_agent_action','CALLMENU');\">$call_menu_list<option SELECTED>$no_agent_action_value</option></select>\n";
|
|
}
|
|
if ($no_agent_action=='INGROUP')
|
|
{
|
|
if (strlen($no_agent_action_value) < 10)
|
|
{$no_agent_action_value = 'SALESLINE,CID,LB,998,TESTCAMP,1';}
|
|
$IGno_agent_action_value = explode(",",$no_agent_action_value);
|
|
$IGgroup_id = $IGno_agent_action_value[0];
|
|
$IGhandle_method = $IGno_agent_action_value[1];
|
|
$IGsearch_method = $IGno_agent_action_value[2];
|
|
$IGlist_id = $IGno_agent_action_value[3];
|
|
$IGcampaign_id = $IGno_agent_action_value[4];
|
|
$IGphone_code = $IGno_agent_action_value[5];
|
|
echo "<span name=no_agent_action_value_link id=no_agent_action_value_link>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3111&group_id=$IGgroup_id\">In-Group:</a>";
|
|
echo "</span>";
|
|
echo " <select size=1 name=IGgroup_id_no_agent_action id=IGgroup_id_no_agent_action onChange=\"dynamic_call_action_link('IGgroup_id_no_agent_action','INGROUP');\">";
|
|
echo "$ingroup_list<option SELECTED>$IGgroup_id</option></select>";
|
|
echo " Handle Method: <select size=1 name=IGhandle_method_$j id=IGhandle_method_$j>";
|
|
echo "$IGhandle_method_list<option SELECTED>$IGhandle_method</option></select>\n";
|
|
echo "<BR>Search Method: <select size=1 name=IGsearch_method_$j id=IGsearch_method_$j>";
|
|
echo "$IGsearch_method_list<option SELECTED>$IGsearch_method</option></select>\n";
|
|
echo " ID da Lista: <input type=text size=5 maxlength=14 name=IGlist_id_$j id=IGlist_id_$j value=\"$IGlist_id\">";
|
|
echo "<BR>ID da Campanha: <select size=1 name=IGcampaign_id_$j id=IGcampaign_id_$j>";
|
|
echo "$IGcampaign_id_list<option SELECTED>$IGcampaign_id</option></select>\n";
|
|
echo " Phone Code: <input type=text size=5 maxlength=14 name=IGphone_code_$j id=IGphone_code_$j value=\"$IGphone_code\">";
|
|
}
|
|
if ($no_agent_action=='DID')
|
|
{
|
|
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$no_agent_action_value';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$did_id = $row[0];
|
|
|
|
echo "<span name=no_agent_action_value_link id=no_agent_action_value_link>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3311&did_id=$did_id\">DID:</a>";
|
|
echo "</span>";
|
|
echo " <select size=1 name=no_agent_action_value id=no_agent_action_value onChange=\"dynamic_call_action_link('no_agent_action','DID');\">$did_list<option SELECTED>$no_agent_action_value</option></select>\n";
|
|
}
|
|
if ($no_agent_action=='MESSAGE')
|
|
{
|
|
if (strlen($no_agent_action_value) < 3)
|
|
{$no_agent_action_value = 'nbdy-avail-to-take-call|vm-goodbye';}
|
|
echo "Audio File: <input type=text name=no_agent_action_value id=no_agent_action_value size=50 maxlength=255 value=\"$no_agent_action_value\"> <a href=\"javascript:launch_chooser('no_agent_action_value','date',600);\">audio chooser</a>\n";
|
|
}
|
|
if ($no_agent_action=='EXTENSION')
|
|
{
|
|
if (strlen($no_agent_action_value) < 3)
|
|
{$no_agent_action_value = '8304,default';}
|
|
$EXno_agent_action_value = explode(",",$no_agent_action_value);
|
|
$EXextension = $EXno_agent_action_value[0];
|
|
$EXcontext = $EXno_agent_action_value[1];
|
|
echo "Extensão:<input type=text name=EXextension_no_agent_action id=EXextension_no_agent_action size=20 maxlength=255 value=\"$EXextension\"> Context: <input type=text name=EXcontext_no_agent_action id=EXcontext_no_agent_action size=20 maxlength=255 value=\"$EXcontext\">\n";
|
|
}
|
|
if ($no_agent_action=='VOICEMAIL')
|
|
{
|
|
echo "Caixa do Correio de Voz:<input type=text name=no_agent_action_value id=no_agent_action_value size=12 maxlength=10 value=\"$no_agent_action_value\"> <a href=\"javascript:launch_vm_chooser('no_agent_action_value','vm',700);\">voicemail chooser</a>\n";
|
|
}
|
|
|
|
echo "</span>
|
|
<BR> </td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Arquivo de Boas Vindas:</td><td align=left><input type=text name=welcome_message_filename id=welcome_message_filename size=50 maxlength=255 value=\"$welcome_message_filename\"> <a href=\"javascript:launch_chooser('welcome_message_filename','date',500);\">audio chooser</a> $NWB#vicidial_inbound_groups-welcome_message_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tocar Mens. de Boas Vindas:</td><td align=left><select size=1 name=play_welcome_message><option>ALWAYS</option><option>NEVER</option><option>IF_WAIT_ONLY</option><option>YES_UNLESS_NODELAY</option><option SELECTED>$play_welcome_message</option></select>$NWB#vicidial_inbound_groups-play_welcome_message$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Contexto da Música de Espera:</td><td align=left><input type=text name=moh_context id=moh_context size=50 maxlength=50 value=\"$moh_context\"> <a href=\"javascript:launch_moh_chooser('moh_context','moh',500);\">moh chooser</a> $NWB#vicidial_inbound_groups-moh_context$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Arquivo de Aviso de Espera</td><td align=left><input type=text name=onhold_prompt_filename id=onhold_prompt_filename size=50 maxlength=255 value=\"$onhold_prompt_filename\"> <a href=\"javascript:launch_chooser('onhold_prompt_filename','date',600);\">audio chooser</a> $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Intervalo de Aviso de Espera:</td><td align=left><input type=text name=prompt_interval size=5 maxlength=5 value=\"$prompt_interval\">$NWB#vicidial_inbound_groups-prompt_interval$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tocar Lugar na Fila:</td><td align=left><select size=1 name=play_place_in_line><option>Y</option><option>N</option><option SELECTED>$play_place_in_line</option></select>$NWB#vicidial_inbound_groups-play_place_in_line$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tocar Tempo Estimado:</td><td align=left><select size=1 name=play_estimate_hold_time><option>Y</option><option>N</option><option SELECTED>$play_estimate_hold_time</option></select>$NWB#vicidial_inbound_groups-play_estimate_hold_time$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Opção de Espera:</td><td align=left><select size=1 name=hold_time_option><option>NONE</option><option>EXTENSÃO</option><option>VOICEMAIL</option><option>IN_GROUP</option><option>CALLERID_CALLBACK</option><option>DROP_ACTION</option><option>PRESS_VMAIL</option><option SELECTED>$hold_time_option</option></select>$NWB#vicidial_inbound_groups-hold_time_option$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Tempo de Opção de Espera:</td><td align=left><input type=text name=hold_time_option_seconds size=5 maxlength=5 value=\"$hold_time_option_seconds\">$NWB#vicidial_inbound_groups-hold_time_option_seconds$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Extensão de Opção de Espera:</td><td align=left><input type=text name=hold_time_option_exten size=20 maxlength=20 value=\"$hold_time_option_exten\">$NWB#vicidial_inbound_groups-hold_time_option_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Correio de Voz da Opção de Espera:</td><td align=left><input type=text name=hold_time_option_voicemail id=hold_time_option_voicemail size=12 maxlength=10 value=\"$hold_time_option_voicemail\"> <a href=\"javascript:launch_vm_chooser('hold_time_option_voicemail','vm',900);\">voicemail chooser</a> $NWB#vicidial_inbound_groups-hold_time_option_voicemail$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Grupo de Entrada da Opção de Espera:</td><td align=left><select size=1 name=hold_time_option_xfer_group>";
|
|
echo "$Tgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-hold_time_option_xfer_group$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Arq. de Agend. da Opção de Espera:</td><td align=left><input type=text name=hold_time_option_callback_filename id=hold_time_option_callback_filename size=50 maxlength=255 value=\"$hold_time_option_callback_filename\"> <a href=\"javascript:launch_chooser('hold_time_option_callback_filename','date',900);\">audio chooser</a> $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Lista de Agend. da Opção de Espera:</td><td align=left><input type=text name=hold_time_option_callback_list_id size=14 maxlength=14 value=\"$hold_time_option_callback_list_id\">$NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente de Alerta Nombre de archivo: </td><td align=left><input type=text name=agent_alert_exten id=agent_alert_exten size=40 maxlength=100 value=\"$agent_alert_exten\"> <a href=\"javascript:launch_chooser('agent_alert_exten','date',1000);\">audio chooser</a> $NWB#vicidial_inbound_groups-agent_alert_exten$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Atraso de Alerta ao Agente:</td><td align=left><input type=text name=agent_alert_delay size=6 maxlength=6 value=\"$agent_alert_delay\">$NWB#vicidial_inbound_groups-agent_alert_delay$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de Transferência Padrão:</td><td align=left><select size=1 name=default_xfer_group>";
|
|
echo "$Xgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-default_xfer_group$NWE</td></tr>\n";
|
|
|
|
##### get groups_alias listings for dynamic default group alias pulldown list menu
|
|
$stmt="SELECT group_alias_id,group_alias_name from groups_alias where active='Y' order by group_alias_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$group_alias_to_print = mysql_num_rows($rslt);
|
|
$group_alias_menu='';
|
|
$group_alias_selected=0;
|
|
$o=0;
|
|
while ($group_alias_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$group_alias_menu .= "<option ";
|
|
if ($default_group_alias == "$rowx[0]")
|
|
{
|
|
$group_alias_menu .= "SELECTED ";
|
|
$group_alias_selected++;
|
|
}
|
|
$group_alias_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Alias de Grupo Padrão: </td><td align=left><select size=1 name=default_group_alias>";
|
|
echo "<option value=\"\">NONE</option>";
|
|
echo "$group_alias_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-default_group_alias$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de Transferência de Rechamada:</td><td align=left><select size=1 name=hold_recall_xfer_group>";
|
|
echo "$Hgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_groups-hold_recall_xfer_group$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Rotear sem Atrasos:</td><td align=left><select size=1 name=no_delay_call_route><option>Y</option><option>N</option><option SELECTED>$no_delay_call_route</option></select>$NWB#vicidial_inbound_groups-no_delay_call_route$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Config. de Grav. de Entr.:</td><td align=left><select size=1 name=ingroup_recording_override><option>DISABLED</option><option>NEVER</option><option>ONDEMAND</option><option>ALLCALLS</option><option>ALLFORCE</option><option SELECTED>$ingroup_recording_override</option></select>$NWB#vicidial_inbound_groups-ingroup_recording_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Arquivo de Gravação de Entrada:</td><td align=left><input type=text name=ingroup_rec_filename size=50 maxlength=50 value=\"$ingroup_rec_filename\">$NWB#vicidial_inbound_groups-ingroup_rec_filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Percentual Estatístico de Chamadas Atendidas em X seg 1: </td><td align=left><input type=text name=answer_sec_pct_rt_stat_one size=5 maxlength=5 value=\"$answer_sec_pct_rt_stat_one\">$NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Percentual Estatístico de Chamadas Atendidas em X seg 2: </td><td align=left><input type=text name=answer_sec_pct_rt_stat_two size=5 maxlength=5 value=\"$answer_sec_pct_rt_stat_two\">$NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Iniciar llamada URL: </td><td align=left><input type=text name=start_call_url size=70 maxlength=1000 value=\"$start_call_url\">$NWB#vicidial_inbound_groups-start_call_url$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dispo Call URL: </td><td align=left><input type=text name=dispo_call_url size=70 maxlength=1000 value=\"$dispo_call_url\">$NWB#vicidial_inbound_groups-dispo_call_url$NWE</td></tr>\n";
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2> </td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2> Config. de CQ para Entrantes: </td></tr>\n";
|
|
|
|
##### get status listings for dynamic pulldown
|
|
$qc_statuses = preg_replace("/^ | -$/","",$qc_statuses);
|
|
$QCstatuses = explode(" ", $qc_statuses);
|
|
$QCs_to_print = (count($QCstatuses) -0);
|
|
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$qc_statuses_list='';
|
|
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
|
|
$p=0;
|
|
while ($p < $QCs_to_print)
|
|
{
|
|
if ($rowx[0] == $QCstatuses[$p])
|
|
{
|
|
$qc_statuses_list .= " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
|
|
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT distinct(status),status_name from vicidial_campaign_statuses order by status";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Cstatuses_to_print = mysql_num_rows($rslt);
|
|
|
|
$o=0;
|
|
while ($Cstatuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if (!ereg("\"$rowx[0]\"",$qc_statuses_list))
|
|
{
|
|
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
|
|
$p=0;
|
|
while ($p < $QCs_to_print)
|
|
{
|
|
if ($rowx[0] == $QCstatuses[$p])
|
|
{
|
|
$qc_statuses_list .= " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
|
|
}
|
|
$o++;
|
|
}
|
|
|
|
##### get scripts listings for pulldown
|
|
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$scripts_to_print = mysql_num_rows($rslt);
|
|
$QCscripts_list="";
|
|
$o=0;
|
|
while ($scripts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$QCscripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$scriptname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
##### get shifts listings for pulldown
|
|
$stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$shifts_to_print = mysql_num_rows($rslt);
|
|
$QCshifts_list="";
|
|
$o=0;
|
|
while ($shifts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$QCshifts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$shiftname_list["$rowx[0]"] = "$rowx[1]";
|
|
$o++;
|
|
}
|
|
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>CQ Ativado:</td><td><select size=1 name=qc_enabled><option>Y</option><option>N</option><option SELECTED>$qc_enabled</option></select> $NWB#vicidial_inbound_groups-qc_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#9BB9FB><td align=right>Status de CQ:<BR> $NWB#vicidial_inbound_groups-qc_statuses$NWE</td><td>$qc_statuses_list</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>WebForm de CQ:</td><td align=left><input type=text name=qc_web_form_address size=70 maxlength=255 value=\"$qc_web_form_address\">$NWB#vicidial_inbound_groups-qc_web_form_address$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">Script de CQ</a>: </td><td align=left><select size=1 name=qc_script>\n";
|
|
echo "$QCscripts_list";
|
|
echo "<option selected value=\"$qc_script\">$qc_script - $scriptname_list[$qc_script]</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_groups-qc_script$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=331111111&shift_id=$qc_shift_id\">Turno de CQ</a>: </td><td align=left><select size=1 name=qc_shift_id>\n";
|
|
echo "$QCshifts_list";
|
|
echo "<option selected value=\"$qc_shift_id\">$qc_shift_id - $shiftname_list[$qc_shift_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_groups-qc_shift_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Entrada de registro CQ: </td><td><select size=1 name=qc_get_record_launch><option>NONE</option><option>SCRIPT</option><option>WEBFORM</option><option>QCSCRIPT</option><option>QCWEBFORM</option><option SELECTED>$qc_get_record_launch</option></select> $NWB#vicidial_inbound_groups-qc_get_record_launch$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Mostrar Gravações CQ: </td><td><select size=1 name=qc_show_recording><option>Y</option><option>N</option><option SELECTED>$qc_show_recording</option></select> $NWB#vicidial_inbound_groups-qc_show_recording$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=ENVIAR></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
echo "<BR></center></FORM><br>\n";
|
|
|
|
|
|
### list of agent rank or skill-level for this inbound group
|
|
echo "<center>\n";
|
|
echo "<br><b>AGENTE RANKS FOR THIS ENTRANTE GROUP:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>USER</td><td> RANK</td><td> CALLS TODAY</td></tr>\n";
|
|
|
|
$stmt="SELECT vu.user,viga.group_rank,calls_today,full_name from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user;";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$users_to_print = mysql_num_rows($rsltx);
|
|
|
|
$o=0;
|
|
while ($users_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$rowx[0]\">$rowx[0]</a> - $rowx[3]</td><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[2]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
echo "<a href=\"./AST_CLOSERstats.php?group[]=$group_id\">Clique aqui para ver um relatório deste grupo de entrada</a><BR><BR>\n";
|
|
|
|
echo "<center><b>\n";
|
|
|
|
echo "<B>DIDS USING THIS IN-GROUP:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where group_id='$group_id' and did_route='IN_GROUP';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$dids_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($dids_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">$row[1] </a></TD><TD> $row[2]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE><BR>\n";
|
|
echo "<B>CALL MENUS USING THIS IN-GROUP:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='INGROUP' and option_route_value='$group_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$cms_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($cms_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3511&menu_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE><BR>\n";
|
|
echo "<B>CAMPAÑAS QUE PERMITA EN ESTE GRUPO:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $group_id %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campin_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($campin_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
|
|
if ($LOGdelete_ingroups > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=53&campaign_id=$group_id&stage=IN\">EMERGENCY VDAC CLEAR FOR THIS IN-GROUP</a><BR><BR>\n";
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5111&group_id=$group_id\">APAGAR ESTE GRUPO DE ENTRADA</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=INGROUPS&stage=$group_id\">Clique aqui para ver alterações Admin para este grupo de entrada</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=3311 modify did info in the system
|
|
######################
|
|
|
|
if ($ADD==3311)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$didSQL = "did_id='$did_id'";
|
|
if ( (strlen($did_id)<1) and (strlen($did_pattern)>0) )
|
|
{$didSQL = "did_pattern='$did_pattern'";}
|
|
$stmt="SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id from vicidial_inbound_dids where $didSQL;";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$did_id = $row[0];
|
|
$did_pattern = $row[1];
|
|
$did_description = $row[2];
|
|
$did_active = $row[3];
|
|
$did_route = $row[4];
|
|
$extension = $row[5];
|
|
$exten_context = $row[6];
|
|
$voicemail_ext = $row[7];
|
|
$phone = $row[8];
|
|
$server_ip = $row[9];
|
|
$user = $row[10];
|
|
$user_unavailable_action = $row[11];
|
|
$user_route_settings_ingroup = $row[12];
|
|
$group_id = $row[13];
|
|
$call_handle_method = $row[14];
|
|
$agent_search_method = $row[15];
|
|
$list_id = $row[16];
|
|
$campaign_id = $row[17];
|
|
$phone_code = $row[18];
|
|
$menu_id = $row[19];
|
|
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
##### get in-groups listings for dynamic pulldown
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Xgroups_to_print = mysql_num_rows($rslt);
|
|
$Xgroups_menu='';
|
|
$Xgroups_selected=0;
|
|
$o=0;
|
|
while ($Xgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Xgroups_menu .= "<option ";
|
|
if ($user_route_settings_ingroup == "$rowx[0]")
|
|
{
|
|
$Xgroups_menu .= "SELECTED ";
|
|
$Xgroups_selected++;
|
|
}
|
|
$Xgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
if ($Xgroups_selected < 1)
|
|
{$Xgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Xgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
|
|
|
|
##### get in-groups listings for dynamic pulldown
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$Dgroups_to_print = mysql_num_rows($rslt);
|
|
$Dgroups_menu='';
|
|
$Dgroups_selected=0;
|
|
$o=0;
|
|
while ($Dgroups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Dgroups_menu .= "<option ";
|
|
if ($group_id == "$rowx[0]")
|
|
{
|
|
$Dgroups_menu .= "SELECTED ";
|
|
$Dgroups_selected++;
|
|
}
|
|
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
if ($Dgroups_selected < 1)
|
|
{$Dgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
|
else
|
|
{$Dgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
|
|
|
|
|
echo "<br>ALTERAR UM REGISTRO DDR:$row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=4311>\n";
|
|
echo "<input type=hidden name=did_id value=\"$did_id\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão DDR:</td><td align=left><input type=text name=did_pattern size=30 maxlength=50 value=\"$did_pattern\">$NWB#vicidial_inbound_dids-did_pattern$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição DDR:</td><td align=left><input type=text name=did_description size=40 maxlength=50 value=\"$did_description\">$NWB#vicidial_inbound_dids-did_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=did_active><option>Y</option><option>N</option><option SELECTED>$did_active</option></select>$NWB#vicidial_inbound_dids-did_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Rota DDR:</td><td align=left><select size=1 name=did_route><option>AGENT</option><option>EXTEN</option><option>VOICEMAIL</option><option>PHONE</option><option>IN_GROUP</option><option>CALLMENU</option><option SELECTED>$did_route</option></select>$NWB#vicidial_inbound_dids-did_route$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão:</td><td align=left><input type=text name=extension size=40 maxlength=50 value=\"$extension\">$NWB#vicidial_inbound_dids-extension$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Contexto da Extensão:</td><td align=left><input type=text name=exten_context size=40 maxlength=50 value=\"$exten_context\">$NWB#vicidial_inbound_dids-exten_context$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Caixa do Correio de Voz:</td><td align=left><input type=text name=voicemail_ext id=voicemail_ext size=12 maxlength=10 value=\"$voicemail_ext\"> <a href=\"javascript:launch_vm_chooser('voicemail_ext','vm',100);\">voicemail chooser</a>$NWB#vicidial_inbound_dids-voicemail_ext$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão do Ramal:</td><td align=left><input type=text name=phone size=20 maxlength=100 value=\"$phone\">$NWB#vicidial_inbound_dids-phone$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$server_ip</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_dids-server_ip$NWE</td></tr>\n";
|
|
|
|
$stmt="select menu_id,menu_name,menu_prompt from vicidial_call_menu;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$menus_to_print = mysql_num_rows($rslt);
|
|
$menu_list='';
|
|
$i=0;
|
|
while ($i < $menus_to_print)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$menu_list .= "<option value=\"$row[0]\">$row[0] - $row[1] - $row[2]</option>";
|
|
$i++;
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3511&menu_id=$menu_id\">Menu:</a> </td><td align=left><select size=1 name=menu_id>$menu_list<option SELECTED>$menu_id</option></select>$NWB#vicidial_inbound_dids-menu_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Agente:</td><td align=left><input type=text name=user size=20 maxlength=20 value=\"$user\">$NWB#vicidial_inbound_dids-user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ação p/ Agente não Disponível:</td><td align=left><select size=1 name=user_unavailable_action><option>EXTEN</option><option>VOICEMAIL</option><option>PHONE</option><option>IN_GROUP</option><option SELECTED>$user_unavailable_action</option></select>$NWB#vicidial_inbound_dids-user_unavailable_action$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Config. de Rota de Entrada do Agente:</td><td align=left><select size=1 name=user_route_settings_ingroup>";
|
|
echo "$Xgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_dids-user_route_settings_ingroup$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111&group_id=$group_id\">In-ID do Grupo</a>: </td><td align=left><select size=1 name=group_id>";
|
|
echo "$Dgroups_menu";
|
|
echo "</select>$NWB#vicidial_inbound_dids-group_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Método de Manuseio de Chamada Entrante:</td><td align=left><select size=1 name=call_handle_method><option>CID</option><option>CIDLOOKUP</option><option>CIDLOOKUPRL</option><option>CIDLOOKUPRC</option><option>ANI</option><option>ANILOOKUP</option><option>ANILOOKUPRL</option><option>VIDPROMPT</option><option>VIDPROMPTLOOKUP</option><option>VIDPROMPTLOOKUPRL</option><option>VIDPROMPTLOOKUPRC</option><option>CLOSER</option><option>3DIGITID</option><option>4DIGITID</option><option>5DIGITID</option><option>10DIGITID</option><option SELECTED>$call_handle_method</option></select>$NWB#vicidial_inbound_dids-call_handle_method$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Método de Busca de Agente p/ Ch. Entr.:</td><td align=left><select size=1 name=agent_search_method><option value=\"LB\">LB - Load Balanced</option><option value=\"LO\">LO - Load Balanced Overflow</option><option value=\"SO\">SO - Server Only</option><option SELECTED>$agent_search_method</option></select>$NWB#vicidial_inbound_dids-agent_search_method$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Lista de Entrada:</td><td align=left><input type=text name=list_id size=14 maxlength=14 value=\"$list_id\">$NWB#vicidial_inbound_dids-list_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Campanha de Entrada:</td><td align=left><select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list";
|
|
echo "<option SELECTED>$campaign_id</option>\n";
|
|
echo "</select>$NWB#vicidial_inbound_dids-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Código do Ramal de Entrada:</td><td align=left><input type=text name=phone_code size=14 maxlength=14 value=\"$phone_code\">$NWB#vicidial_inbound_dids-phone_code$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</table>\n";
|
|
echo "<BR></center></FORM><br>\n";
|
|
|
|
echo "<br><a href=\"./AST_DIDstats.php?group[0]=$did_id\">Haga clic aquí para ver un informe de tráfico para este DID</FONT><br>\n";
|
|
|
|
if ($LOGdelete_dids > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5311&did_id=$did_id\">REMOVER DDR</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=DIDS&stage=$did_id\">Clique aqui para ver alterações Admin para este DDR</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=3511 modify call menu info in the system
|
|
######################
|
|
|
|
if ($ADD==3511)
|
|
{
|
|
if ($LOGmodify_dids==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group from vicidial_call_menu where menu_id='$menu_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$menu_name = $row[0];
|
|
$menu_prompt = $row[1];
|
|
$menu_timeout = $row[2];
|
|
$menu_timeout_prompt = $row[3];
|
|
$menu_invalid_prompt = $row[4];
|
|
$menu_repeat = $row[5];
|
|
$menu_time_check = $row[6];
|
|
$call_time_id = $row[7];
|
|
$track_in_vdac = $row[8];
|
|
$custom_dialplan_entry= $row[9];
|
|
$tracking_group = $row[10];
|
|
|
|
|
|
echo "<br>ALTERAR O REGISTRO DE MENU: $menu_id<form action=$PHP_SELF method=POST name=admin_form id=admin_form>\n";
|
|
echo "<input type=hidden name=ADD value=4511>\n";
|
|
echo "<input type=hidden name=menu_id value=\"$menu_id\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Menu: </td><td align=left>$menu_id $NWB#vicidial_call_menu-menu_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Menu: </td><td align=left><input type=text name=menu_name size=40 maxlength=50 value=\"$menu_name\">$NWB#vicidial_call_menu-menu_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Audio do Menu: </td><td align=left><input type=text name=menu_prompt id=menu_prompt size=60 maxlength=255 value=\"$menu_prompt\"> <a href=\"javascript:launch_chooser('menu_prompt','date',30);\">audio chooser</a> $NWB#vicidial_call_menu-menu_prompt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tempo max do menu: </td><td align=left><input type=text name=menu_timeout size=10 maxlength=5 value=\"$menu_timeout\">$NWB#vicidial_call_menu-menu_timeout$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Audio de tempo excedido do menu: </td><td align=left><input type=text name=menu_timeout_prompt id=menu_timeout_prompt size=60 maxlength=255 value=\"$menu_timeout_prompt\"> <a href=\"javascript:launch_chooser('menu_timeout_prompt','date',30);\">audio chooser</a> $NWB#vicidial_call_menu-menu_timeout_prompt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Audio de Opção Inválida do menu: </td><td align=left><input type=text name=menu_invalid_prompt id=menu_invalid_prompt size=60 maxlength=255 value=\"$menu_invalid_prompt\"> <a href=\"javascript:launch_chooser('menu_invalid_prompt','date',30);\">audio chooser</a> $NWB#vicidial_call_menu-menu_invalid_prompt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Repetir Menu: </td><td align=left><input type=text name=menu_repeat size=4 maxlength=3 value=\"$menu_repeat\">$NWB#vicidial_call_menu-menu_repeat$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Verif. Horário de Menu: </td><td align=left><select size=1 name=menu_time_check>\n";
|
|
if ($menu_time_check > 0)
|
|
{
|
|
echo "<option value=\"0\">0 - Sem Verif. Horário</option><option selected value=\"1\">1 - Verif. Horário</option>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<option selected value=\"0\">0 - Sem Verif. Horário</option><option value=\"1\">1 - Verif. Horário</option>\n";
|
|
}
|
|
echo " </select>$NWB#vicidial_call_menu-menu_time_check$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$call_time_id\">Horário de Chamada:</a></td><td align=left><select size=1 name=call_time_id>\n";
|
|
echo "$call_times_list";
|
|
echo "<option selected value=\"$call_time_id\">$call_time_id - $call_timename_list[$call_time_id]</option>\n";
|
|
echo "</select>$NWB#vicidial_call_menu-call_time_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Rastrear Chamadas no Relat. Tempo-Real: </td><td align=left><select size=1 name=track_in_vdac>";
|
|
if ($track_in_vdac > 0)
|
|
{
|
|
echo "<option value=\"0\">0 - Sem Rastream. em Tempo-Real</option><option selected value=\"1\">1 - Rastrear em Tempo-Real</option>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<option selected value=\"0\">0 - Sem Rastream. em Tempo-Real</option><option value=\"1\">1 - Rastrear em Tempo-Real</option>\n";
|
|
}
|
|
echo "</select>$NWB#vicidial_call_menu-track_in_vdac$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de seguimiento de: </td><td align=left><select size=1 name=tracking_group>\n";
|
|
echo "<option value=\"CALLMENU\">CALLMENU - Default</option>\n";
|
|
echo "$ingroup_list";
|
|
echo "<option selected value=\"$tracking_group\">$tracking_group</option>\n";
|
|
echo "</select>$NWB#vicidial_call_menu-tracking_group$NWE</td></tr>\n";
|
|
|
|
echo "<tr><td align=center colspan=2> <input type=submit name=ENVIAR value=ENVIAR> </td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=CENTER colspan=2> Opções do Menu: </td></tr>\n";
|
|
|
|
$j=0;
|
|
$stmtA="SELECT option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$menu_id' order by option_value;";
|
|
$rslt=mysql_query($stmtA, $link);
|
|
$menus_to_print = mysql_num_rows($rslt);
|
|
|
|
while ($menus_to_print > $j)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$Aoption_value[$j] = $row[0];
|
|
$Aoption_description[$j] = $row[1];
|
|
$Aoption_route[$j] = $row[2];
|
|
$Aoption_route_value[$j] = $row[3];
|
|
$Aoption_route_value_context[$j] = $row[4];
|
|
$j++;
|
|
}
|
|
|
|
$j=0;
|
|
while ($menus_to_print > $j)
|
|
{
|
|
$choose_height = (($j * 40) + 400);
|
|
$option_value = $Aoption_value[$j];
|
|
$option_description = $Aoption_description[$j];
|
|
$option_route = $Aoption_route[$j];
|
|
$option_route_value = $Aoption_route_value[$j];
|
|
$option_route_value_context = $Aoption_route_value_context[$j];
|
|
|
|
$dtmf_list = "<select size=1 name=option_value_$j>";
|
|
$h=0;
|
|
while ($h <= 18)
|
|
{
|
|
$dtmf_list .= "<option";
|
|
if ( (preg_match("/$dtmf[$h]/",$option_value) and (strlen($option_value) == strlen($dtmf[$h])) ) )
|
|
{$dtmf_list .= " selected";}
|
|
$dtmf_list .= " value=\"$dtmf[$h]\"> $dtmf_key[$h]</option>";
|
|
$h++;
|
|
}
|
|
$dtmf_list .= "</select>";
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $j))
|
|
{$bgcolor='bgcolor="#CCFFFF"';}
|
|
else
|
|
{$bgcolor='bgcolor="#99FFCC"';}
|
|
|
|
echo "<tr $bgcolor><td align=CENTER colspan=2>
|
|
Opção: $dtmf_list
|
|
Descrição: <input type=text name=option_description_$j size=40 maxlength=255 value=\"$option_description\">
|
|
Route: <select size=1 name=option_route_$j id=option_route_$j onChange=\"call_menu_option('$j','$option_route','$option_route_value','$option_route_value_context','$choose_height');\">
|
|
<option>CALLMENU</option>
|
|
<option>INGROUP</option>
|
|
<option>DID</option>
|
|
<option>HANGUP</option>
|
|
<option>EXTENSÃO</option>
|
|
<option>PHONE</option>
|
|
<option>VOICEMAIL</option>
|
|
<option>AGI</option>
|
|
<option value=\"\">* REMOVE *</option>
|
|
<option selected value=\"$option_route\">$option_route</option>
|
|
</select> $NWB#vicidial_call_menu-option_value$NWE <BR>
|
|
|
|
<span id=\"option_value_value_context_$j\" name=\"option_value_value_context_$j\">\n";
|
|
|
|
if ($option_route=='CALLMENU')
|
|
{
|
|
echo "<span name=option_route_link_$j id=option_route_link_$j>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3511&menu_id=$option_route_value\">Menu:</a>";
|
|
echo "</span>";
|
|
echo " <select size=1 name=option_route_value_$j id=option_route_value_$j onChange=\"call_menu_link('$j','CALLMENU');\">$call_menu_list<option SELECTED>$option_route_value</option></select>\n";
|
|
}
|
|
if ($option_route=='INGROUP')
|
|
{
|
|
if (strlen($option_route_value_context) < 10)
|
|
{$option_route_value_context = 'CID,LB,998,TESTCAMP,1';}
|
|
$IGoption_route_value_context = explode(",",$option_route_value_context);
|
|
$IGhandle_method = $IGoption_route_value_context[0];
|
|
$IGsearch_method = $IGoption_route_value_context[1];
|
|
$IGlist_id = $IGoption_route_value_context[2];
|
|
$IGcampaign_id = $IGoption_route_value_context[3];
|
|
$IGphone_code = $IGoption_route_value_context[4];
|
|
echo "<span name=option_route_link_$j id=option_route_link_$j>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3111&group_id=$option_route_value\">In-Group:</a>";
|
|
echo "</span>";
|
|
echo " <input type=hidden name=option_route_value_context_$j id=option_route_value_context_$j value=\"$option_route_value_context\">";
|
|
echo " <select size=1 name=option_route_value_$j id=option_route_value_$j onChange=\"call_menu_link('$j','INGROUP');\">";
|
|
echo "$ingroup_list<option SELECTED>$option_route_value</option></select>";
|
|
echo " Handle Method: <select size=1 name=IGhandle_method_$j id=IGhandle_method_$j>";
|
|
echo "$IGhandle_method_list<option SELECTED>$IGhandle_method</option></select>\n";
|
|
echo "<BR>Search Method: <select size=1 name=IGsearch_method_$j id=IGsearch_method_$j>";
|
|
echo "$IGsearch_method_list<option SELECTED>$IGsearch_method</option></select>\n";
|
|
echo " ID da Lista: <input type=text size=5 maxlength=14 name=IGlist_id_$j id=IGlist_id_$j value=\"$IGlist_id\">";
|
|
echo "<BR>ID da Campanha: <select size=1 name=IGcampaign_id_$j id=IGcampaign_id_$j>";
|
|
echo "$IGcampaign_id_list<option SELECTED>$IGcampaign_id</option></select>\n";
|
|
echo " Phone Code: <input type=text size=5 maxlength=14 name=IGphone_code_$j id=IGphone_code_$j value=\"$IGphone_code\">";
|
|
}
|
|
if ($option_route=='DID')
|
|
{
|
|
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$option_route_value';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$did_id = $row[0];
|
|
|
|
echo "<span name=option_route_link_$j id=option_route_link_$j>";
|
|
echo "<a href=\"$PHP_SELF?ADD=3311&did_id=$did_id\">DID:</a>";
|
|
echo "</span>";
|
|
echo " <select size=1 name=option_route_value_$j id=option_route_value_$j onChange=\"call_menu_link('$j','DID');\">$did_list<option SELECTED>$option_route_value</option></select>\n";
|
|
}
|
|
if ($option_route=='HANGUP')
|
|
{
|
|
echo "Audio File: <input type=text name=option_route_value_$j id=option_route_value_$j size=50 maxlength=255 value=\"$option_route_value\"> <a href=\"javascript:launch_chooser('option_route_value_$j','date',$choose_height);\">audio chooser</a>\n";
|
|
}
|
|
if ($option_route=='EXTENSION')
|
|
{
|
|
echo "Extensão:<input type=text name=option_route_value_$j id=option_route_value_$j size=20 maxlength=255 value=\"$option_route_value\"> Context: <input type=text name=option_route_value_context_$j id=option_route_value_context_$j size=20 maxlength=255 value=\"$option_route_value_context\">\n";
|
|
}
|
|
if ($option_route=='PHONE')
|
|
{
|
|
echo "Phone: <select size=1 name=option_route_value_$j id=option_route_value_$j>$phone_list<option SELECTED>$option_route_value</option></select>\n";
|
|
}
|
|
if ($option_route=='VOICEMAIL')
|
|
{
|
|
echo "Caixa do Correio de Voz:<input type=text name=option_route_value_$j id=option_route_value_$j size=12 maxlength=10 value=\"$option_route_value\"> <a href=\"javascript:launch_vm_chooser('option_route_value_$j','vm',700);\">voicemail chooser</a>\n";
|
|
}
|
|
if ($option_route=='AGI')
|
|
{
|
|
echo "AGI: <input type=text name=option_route_value_$j id=option_route_value_$j size=80 maxlength=255 value=\"$option_route_value\">\n";
|
|
}
|
|
|
|
echo "</span>
|
|
<BR> </td></tr>\n";
|
|
$j++;
|
|
}
|
|
|
|
while ($j <= 18)
|
|
{
|
|
$choose_height = (($j * 40) + 400);
|
|
$dtmf_list = "<select size=1 name=option_value_$j><option value=\"\"></option>";
|
|
$h=0;
|
|
while ($h <= 18)
|
|
{
|
|
$dtmf_list .= "<option value=\"$dtmf[$h]\"> $dtmf_key[$h]</option>";
|
|
$h++;
|
|
}
|
|
$dtmf_list .= "</select>";
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $j))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td align=CENTER colspan=2>
|
|
Opção: $dtmf_list
|
|
Descrição: <input type=text name=option_description_$j size=40 maxlength=255 value=\"\">
|
|
Route: <select size=1 name=option_route_$j id=option_route_$j onChange=\"call_menu_option('$j','','','','$choose_height');\">
|
|
<option>CALLMENU</option>
|
|
<option>INGROUP</option>
|
|
<option>DID</option>
|
|
<option>HANGUP</option>
|
|
<option>EXTENSÃO</option>
|
|
<option>PHONE</option>
|
|
<option>VOICEMAIL</option>
|
|
<option>AGI</option>
|
|
<option SELECTED value=\"\"> </option>
|
|
</select>
|
|
$NWB#vicidial_call_menu-option_value$NWE <BR>
|
|
|
|
<span id=\"option_value_value_context_$j\" name=\"option_value_value_context_$j\">\n";
|
|
echo "</span>
|
|
<BR> </td></tr>\n";
|
|
$j++;
|
|
}
|
|
|
|
if ($SSallow_custom_dialplan > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom Plano de Discagem: <BR> $NWB#vicidial_call_menu-custom_dialplan_entry$NWE</td><td align=left><TEXTAREA NAME=custom_dialplan_entry ROWS=5 COLS=70>$custom_dialplan_entry</TEXTAREA></td></tr>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Custom Plano de Discagem: </td><td align=left>Disabled <input type=hidden name=custom_dialplan_entry value=\"\">$NWB#vicidial_call_menu-custom_dialplan_entry$NWE</td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</table>\n";
|
|
echo "<BR></center></FORM><br>\n";
|
|
|
|
echo "<B>DIDS USING THIS CALL MENU:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where menu_id='$menu_id' and did_route='CALLMENU';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$dids_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($dids_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">$row[1] </a></TD><TD> $row[2]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE><BR>\n";
|
|
|
|
echo "<B>CALL MENUS USING THIS CALL MENU:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='CALLMENU' and option_route_value='$menu_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$cms_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($cms_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3511&menu_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
|
|
|
|
if ($LOGdelete_dids > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5511&menu_id=$menu_id\">REMOVER ESTE MENU</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CALLMENUS&stage=$menu_id\">Clique aqui para ver as alterações deste MENU</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=31111 modify remote agents info in the system
|
|
######################
|
|
|
|
if ($ADD==31111)
|
|
{
|
|
if ($LOGmodify_remoteagents==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$remote_agent_id = $row[0];
|
|
$user_start = $row[1];
|
|
$number_of_lines = $row[2];
|
|
$server_ip = $row[3];
|
|
$conf_exten = $row[4];
|
|
$status = $row[5];
|
|
$campaign_id = $row[6];
|
|
|
|
echo "<br>ALTERAR AGENTES REMOTOS: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41111>\n";
|
|
echo "<input type=hidden name=remote_agent_id value=\"$row[0]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3&user=$user_start\">Início do ID do Usuário</a>: </td><td align=left><input type=text name=user_start size=6 maxlength=6 value=\"$user_start\"> (somente números, incremented)$NWB#vicidial_remote_agents-user_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número de linhas: </td><td align=left><input type=text name=number_of_lines size=3 maxlength=3 value=\"$number_of_lines\"> (somente números)$NWB#vicidial_remote_agents-number_of_lines$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$row[3]</option>\n";
|
|
echo "</select>$NWB#vicidial_remote_agents-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão Externa: </td><td align=left><input type=text name=conf_exten size=20 maxlength=20 value=\"$conf_exten\"> (número do plano de discagem para ligar para agentes)$NWB#vicidial_remote_agents-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option SELECTED>ATIVO</option><option>INACTIVE</option><option SELECTED>$status</option></select>$NWB#vicidial_remote_agents-status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha: </td><td align=left><select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list";
|
|
echo "<option SELECTED>$campaign_id</option>\n";
|
|
echo "</select>$NWB#vicidial_remote_agents-campaign_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupos de Entrada: </td><td align=left>\n";
|
|
echo "$groups_list";
|
|
echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
echo "AVISO: Pode demorar até 30 segundos para que as alterações enviadas por essa tela se tornem ativas\n";
|
|
|
|
|
|
if ($LOGdelete_remote_agents > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51111&remote_agent_id=$remote_agent_id\">APAGAR ESTE USUÁRIO REMOTO</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=REMOTEAGENTS&stage=$remote_agent_id\">Clique aqui para ver alterações Admin para este Agente Remoto</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=311111 modify user group info in the system
|
|
######################
|
|
|
|
if ($ADD==311111)
|
|
{
|
|
if ($LOGmodify_usergroups==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT user_group,group_name,allowed_campaigns,qc_allowed_campaigns,qc_allowed_inbound_groups,group_shifts,forced_timeclock_login,shift_enforcement,agent_status_viewable_groups,agent_status_view_time from vicidial_user_groups where user_group='$user_group';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$user_group = $row[0];
|
|
$group_name = $row[1];
|
|
$GROUP_shifts = $row[5];
|
|
$forced_timeclock_login = $row[6];
|
|
$shift_enforcement = $row[7];
|
|
$VGROUP_vgroups = $row[8];
|
|
$agent_status_view_time = $row[9];
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ALTERAR O REGISTRO DE GRUPO DE USUÁRIOS<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=411111>\n";
|
|
echo "<input type=hidden name=OLDuser_group value=\"$user_group\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo: </td><td align=left><input type=text name=user_group size=15 maxlength=20 value=\"$user_group\"> (sem espaços ou pontos)$NWB#vicidial_user_groups-user_group$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição: </td><td align=left><input type=text name=group_name size=40 maxlength=40 value=\"$group_name\"> (descrição do grupo)$NWB#vicidial_user_groups-group_name$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Forçar Login no Ponto: </td><td align=left><select size=1 name=forced_timeclock_login><option SELECTED>N</option><option>Y</option><option>ADMIN_EXEMPT</option><option SELECTED>$forced_timeclock_login</option></select>$NWB#vicidial_user_groups-forced_timeclock_login$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Controle de Turno: </td><td align=left><select size=1 name=shift_enforcement><option SELECTED>OFF</option><option>START</option><option>ALL</option><option>ADMIN_EXEMPT</option><option SELECTED>$shift_enforcement</option></select>$NWB#vicidial_user_groups-shift_enforcement$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanhas Permitidas: <BR>$NWB#vicidial_user_groups-allowed_campaigns$NWE</td><td align=left>\n";
|
|
echo "$campaigns_list <BR> ";
|
|
echo "</td></tr>\n";
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Turnos do Grupo:<BR>$NWB#vicidial_user_groups-group_shifts$NWE</td><td align=left>\n";
|
|
$stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$shifts_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($shifts_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$shift_id_value = $rowx[0];
|
|
$shift_name_value = $rowx[1];
|
|
echo "<input type=\"checkbox\" name=\"group_shifts[]\" value=\"$shift_id_value\"";
|
|
$p=0;
|
|
while ($p<1000)
|
|
{
|
|
if (ereg(" $shift_id_value ", $GROUP_shifts))
|
|
{
|
|
echo " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
echo "> <a href=\"$PHP_SELF?ADD=331111111&shift_id=$shift_id_value\">$shift_id_value</a> - $shift_name_value<BR>\n";
|
|
$o++;
|
|
}
|
|
echo " <BR> </td></tr>\n";
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Estado del agente visible Grupos: <BR>$NWB#vicidial_user_groups-agent_status_viewable_groups$NWE</td><td align=left>\n";
|
|
echo "<input type=\"checkbox\" name=\"agent_status_viewable_groups[]\" value=\"--ALL-GROUPS--\"";
|
|
if (ereg(" --ALL-GROUPS-- ", $VGROUP_vgroups))
|
|
{echo " CHECKED";}
|
|
echo "><B>ALL-GROUPS</B> - All user groups in the system<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"agent_status_viewable_groups[]\" value=\"--CAMPANHA-AGENTS--\"";
|
|
if (ereg(" --CAMPANHA-AGENTS-- ", $VGROUP_vgroups))
|
|
{echo " CHECKED";}
|
|
echo "><B>CAMPANHA-AGENTS</B> - All users logged into the same campaign as the agent<BR>\n";
|
|
|
|
$stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$view_groups_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($view_groups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$vgroups_id_value = $rowx[0];
|
|
$vgroups_name_value = $rowx[1];
|
|
echo "<input type=\"checkbox\" name=\"agent_status_viewable_groups[]\" value=\"$vgroups_id_value\"";
|
|
$p=0;
|
|
while ($p<1000)
|
|
{
|
|
if (ereg(" $vgroups_id_value ", $VGROUP_vgroups))
|
|
{
|
|
echo " CHECKED";
|
|
}
|
|
$p++;
|
|
}
|
|
echo "> <a href=\"$PHP_SELF?ADD=311111&user_group=$vgroups_id_value\">$vgroups_id_value</a> - $vgroups_name_value<BR>\n";
|
|
$o++;
|
|
}
|
|
echo " <BR> </td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ver estado del agente de turno: </td><td align=left><select size=1 name=agent_status_view_time><option SELECTED>Y</option><option>N</option><option SELECTED>$agent_status_view_time</option></select>$NWB#vicidial_user_groups-agent_status_view_time$NWE</td></tr>\n";
|
|
|
|
if ($SSqc_features_active > 0)
|
|
{
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanhas Permitidas no CQ:<BR>$NWB#vicidial_user_groups-qc_allowed_campaigns$NWE</td><td align=left>\n";
|
|
echo "$qc_campaigns_list";
|
|
echo " <BR> </td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupos de Entrada para CQ:<BR>$NWB#vicidial_user_groups-qc_allowed_inbound_groups$NWE</td><td align=left>\n";
|
|
echo "$qc_groups_list";
|
|
echo " <BR> </td></tr>\n";
|
|
}
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
|
|
### list of users in this user group
|
|
|
|
$active_confs = 0;
|
|
$stmt="SELECT user,full_name,user_level,active from vicidial_users where user_group='$user_group'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$users_to_print = mysql_num_rows($rsltx);
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>USUÁRIOS DESTE GRUPO: $users_to_print</b><br>\n";
|
|
echo "<TABLE width=400 cellspacing=3>\n";
|
|
echo "<tr><td>USER</td><td>NOME COMPLETO</td><td>NÍVEL</td><td>ATIVO</td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($users_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor>\n";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$rowx[0]\">$rowx[0]</a></td>\n";
|
|
echo "<td><font size=1>$rowx[1]</td>\n";
|
|
echo "<td><font size=1>$rowx[2]</td>\n";
|
|
echo "<td><font size=1>$rowx[3]</td>\n";
|
|
echo "</tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=8111&user_group=$user_group\">Clique aqui para ver todos os registros de CallBack para este grupo de usuários</a><BR><BR>\n";
|
|
echo "<br><br><a href=\"./timeclock_status.php?user_group=$user_group\">Clique aqui para ver o Status de Relógio de ponto para este usuário</a><BR><BR>\n";
|
|
|
|
if ($LOGdelete_user_groups > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=511111&user_group=$user_group\">APAGAR ESTE GRUPO DE USUÁRIOS</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=USERGROUPS&stage=$user_group\">Clique aqui para ver as alterações Admin para este Grupo de usuários</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=3111111 modify script info in the system
|
|
######################
|
|
|
|
if ($ADD==3111111)
|
|
{
|
|
if ($LOGmodify_scripts==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT script_id,script_name,script_comments,script_text,active from vicidial_scripts where script_id='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$script_name = $row[1];
|
|
$script_comments = $row[2];
|
|
$script_text = stripslashes($row[3]);
|
|
$active = $row[4];
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ALTERAR SCRIPT<form name=scriptForm action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=4111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<input type=hidden name=script_id value=\"$script_id\">\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Script: </td><td align=left><B>$script_id</B>$NWB#vicidial_scripts-script_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Script: </td><td align=left><input type=text name=script_name size=40 maxlength=50 value=\"$script_name\"> (título do script)$NWB#vicidial_scripts-script_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do Script: </td><td align=left><input type=text name=script_comments size=50 maxlength=255 value=\"$script_comments\"> $NWB#vicidial_scripts-script_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option><option selected>$active</option></select>$NWB#vicidial_scripts-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Texto do Script: <BR><BR><B><a href=\"javascript:openNewWindow('$PHP_SELF?ADD=7111111&script_id=$script_id')\">Pré-Visualizar Script</a></B> </td><td align=left>";
|
|
# BEGIN Insert Field
|
|
echo "<select id=\"selectedField\" name=\"selectedField\">";
|
|
echo "<option>vendor_lead_code</option>";
|
|
echo "<option>source_id</option>";
|
|
echo "<option>list_id</option>";
|
|
echo "<option>gmt_offset_now</option>";
|
|
echo "<option>called_since_last_reset</option>";
|
|
echo "<option>phone_code</option>";
|
|
echo "<option>phone_number</option>";
|
|
echo "<option>title</option>";
|
|
echo "<option>first_name</option>";
|
|
echo "<option>middle_initial</option>";
|
|
echo "<option>last_name</option>";
|
|
echo "<option>address1</option>";
|
|
echo "<option>address2</option>";
|
|
echo "<option>address3</option>";
|
|
echo "<option>city</option>";
|
|
echo "<option>state</option>";
|
|
echo "<option>province</option>";
|
|
echo "<option>postal_code</option>";
|
|
echo "<option>country_code</option>";
|
|
echo "<option>gender</option>";
|
|
echo "<option>date_of_birth</option>";
|
|
echo "<option>alt_phone</option>";
|
|
echo "<option>email</option>";
|
|
echo "<option>security_phrase</option>";
|
|
echo "<option>comments</option>";
|
|
echo "<option>lead_id</option>";
|
|
echo "<option>campaign</option>";
|
|
echo "<option>phone_login</option>";
|
|
echo "<option>group</option>";
|
|
echo "<option>channel_group</option>";
|
|
echo "<option>SQLdate</option>";
|
|
echo "<option>epoch</option>";
|
|
echo "<option>uniqueid</option>";
|
|
echo "<option>customer_zap_channel</option>";
|
|
echo "<option>server_ip</option>";
|
|
echo "<option>SIPexten</option>";
|
|
echo "<option>session_id</option>";
|
|
echo "<option>dialed_number</option>";
|
|
echo "<option>dialed_label</option>";
|
|
echo "<option>rank</option>";
|
|
echo "<option>owner</option>";
|
|
echo "<option>camp_script</option>";
|
|
echo "<option>in_script</option>";
|
|
echo "<option>script_width</option>";
|
|
echo "<option>script_height</option>";
|
|
echo "<option>recording_filename</option>";
|
|
echo "<option>recording_id</option>";
|
|
echo "<option>user_custom_one</option>";
|
|
echo "<option>user_custom_two</option>";
|
|
echo "<option>user_custom_three</option>";
|
|
echo "<option>user_custom_four</option>";
|
|
echo "<option>user_custom_five</option>";
|
|
echo "<option>preset_number_a</option>";
|
|
echo "<option>preset_number_b</option>";
|
|
echo "<option>preset_number_c</option>";
|
|
echo "<option>preset_number_d</option>";
|
|
echo "<option>preset_number_e</option>";
|
|
echo "<option>preset_number_f</option>";
|
|
echo "<option>preset_dtmf_a</option>";
|
|
echo "<option>preset_dtmf_b</option>";
|
|
echo "</select>";
|
|
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
|
|
# END Insert Field
|
|
echo "<TEXTAREA NAME=script_text ROWS=20 COLS=50>$script_text</TEXTAREA> $NWB#vicidial_scripts-script_text$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
|
|
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B> CAMPANHAS USING THIS SCRIPT:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where campaign_script='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B> GRUPOS DE ENTR. USING THIS SCRIPT:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where ingroup_script='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B> LIST OVERRIDES USING THIS SCRIPT:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT list_id,list_name from vicidial_lists where agent_script_override='$script_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
|
|
|
|
if ($LOGdelete_scripts > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5111111&script_id=$script_id\">APAGAR ESTE SCRIPT</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=SCRIPTS&stage=$script_id\">Clique aqui para ver as alterações Admin para este script</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=31111111 modify filter info in the system
|
|
######################
|
|
|
|
if ($ADD==31111111)
|
|
{
|
|
if ($LOGmodify_filters==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_comments,lead_filter_sql from vicidial_lead_filters where lead_filter_id='$lead_filter_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$lead_filter_name = $row[1];
|
|
$lead_filter_comments = $row[2];
|
|
$lead_filter_sql = stripslashes($row[3]);
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ALTERAR FILTRO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<input type=hidden name=lead_filter_id value=\"$lead_filter_id\">\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Filtro:</td><td align=left><B>$lead_filter_id</B>$NWB#vicidial_lead_filters-lead_filter_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Filtro:</td><td align=left><input type=text name=lead_filter_name size=40 maxlength=50 value=\"$lead_filter_name\"> (descrição simples do filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do filtro: </td><td align=left><input type=text name=lead_filter_comments size=50 maxlength=255 value=\"$lead_filter_comments\"> $NWB#vicidial_lead_filters-lead_filter_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filtro SQL:</td><td align=left><TEXTAREA NAME=lead_filter_sql ROWS=20 COLS=50>$lead_filter_sql</TEXTAREA> $NWB#vicidial_lead_filters-lead_filter_sql$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center></form>\n";
|
|
|
|
##### get campaigns listing for dynamic pulldown
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
$campaigns_list='';
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "<BR><BR>";
|
|
echo "<br>TESTAR A CAMPANHA: <form action=$PHP_SELF method=POST target=\"_blank\">\n";
|
|
echo "<input type=hidden name=lead_filter_id value=\"$lead_filter_id\">\n";
|
|
echo "<input type=hidden name=ADD value=\"73\">\n";
|
|
echo "<select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list";
|
|
echo "</select>\n";
|
|
echo "<input type=submit name=ENVIAR value=ENVIAR>\n";
|
|
|
|
|
|
if ($LOGdelete_filters > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51111111&lead_filter_id=$lead_filter_id\">APAGAR ESTE FILTRO</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=FILTROS&stage=$lead_filter_id\">Clique aqui para ver as alterações Admin para este Filtro</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=321111111 modify call time definition info in the system
|
|
######################
|
|
|
|
if ($ADD==321111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
if ( ($stage=="ADD") and (strlen($state_rule)>0) )
|
|
{
|
|
$stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$ct_state_call_times = $row[0];
|
|
|
|
if (eregi("\|$",$ct_state_call_times))
|
|
{$ct_state_call_times = "$ct_state_call_times$state_rule\|";}
|
|
else
|
|
{$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";}
|
|
$stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "Regra de Estado Adicionada: $state_rule<BR>\n";
|
|
}
|
|
if ( ($stage=="REMOVE") and (strlen($state_rule)>0) )
|
|
{
|
|
$stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$ct_state_call_times = $row[0];
|
|
|
|
$ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times);
|
|
$stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "Regra de Estado Removida: $state_rule<BR>\n";
|
|
}
|
|
|
|
$ADD=311111111;
|
|
}
|
|
else
|
|
{
|
|
echo "Você não esta autorizado a visualizar esta página. Por favor retorne.";
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=311111111 modify call time definition info in the system
|
|
######################
|
|
|
|
if ($ADD==311111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$call_time_name = $row[1];
|
|
$call_time_comments = $row[2];
|
|
$ct_default_start = $row[3];
|
|
$ct_default_stop = $row[4];
|
|
$ct_sunday_start = $row[5];
|
|
$ct_sunday_stop = $row[6];
|
|
$ct_monday_start = $row[7];
|
|
$ct_monday_stop = $row[8];
|
|
$ct_tuesday_start = $row[9];
|
|
$ct_tuesday_stop = $row[10];
|
|
$ct_wednesday_start = $row[11];
|
|
$ct_wednesday_stop = $row[12];
|
|
$ct_thursday_start = $row[13];
|
|
$ct_thursday_stop = $row[14];
|
|
$ct_friday_start = $row[15];
|
|
$ct_friday_stop = $row[16];
|
|
$ct_saturday_start = $row[17];
|
|
$ct_saturday_stop = $row[18];
|
|
$ct_state_call_times = $row[19];
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ALTERAR UM HOR. DE CHAM.<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=411111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<input type=hidden name=call_time_id value=\"$call_time_id\">\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Horário de Cham.: </td><td align=left colspan=3><B>$call_time_id</B>$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Horário de Cham.: </td><td align=left colspan=3><input type=text name=call_time_name size=40 maxlength=50 value=\"$call_time_name\"> (descrição curta do horário de chamada)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do Horário de cham.: </td><td align=left colspan=3><input type=text name=call_time_comments size=50 maxlength=255 value=\"$call_time_comments\"> $NWB#vicidial_call_times-call_time_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Padrão de Início:</td><td align=left><input type=text name=ct_default_start size=5 maxlength=4 value=\"$ct_default_start\"> </td><td align=right>Padrão de Fim:</td><td align=left><input type=text name=ct_default_stop size=5 maxlength=4 value=\"$ct_default_stop\"> $NWB#vicidial_call_times-ct_default_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início no Domingo:</td><td align=left><input type=text name=ct_sunday_start size=5 maxlength=4 value=\"$ct_sunday_start\"> </td><td align=right>Fim no Domingo:</td><td align=left><input type=text name=ct_sunday_stop size=5 maxlength=4 value=\"$ct_sunday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Segunda:</td><td align=left><input type=text name=ct_monday_start size=5 maxlength=4 value=\"$ct_monday_start\"> </td><td align=right>Fim na Segunda:</td><td align=left><input type=text name=ct_monday_stop size=5 maxlength=4 value=\"$ct_monday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Terça:</td><td align=left><input type=text name=ct_tuesday_start size=5 maxlength=4 value=\"$ct_tuesday_start\"> </td><td align=right>Fim na Terça:</td><td align=left><input type=text name=ct_tuesday_stop size=5 maxlength=4 value=\"$ct_tuesday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Quarta:</td><td align=left><input type=text name=ct_wednesday_start size=5 maxlength=4 value=\"$ct_wednesday_start\"> </td><td align=right>Fim na Quarta:</td><td align=left><input type=text name=ct_wednesday_stop size=5 maxlength=4 value=\"$ct_wednesday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Quinta:</td><td align=left><input type=text name=ct_thursday_start size=5 maxlength=4 value=\"$ct_thursday_start\"> </td><td align=right>Fim na Quinta:</td><td align=left><input type=text name=ct_thursday_stop size=5 maxlength=4 value=\"$ct_thursday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Sexta:</td><td align=left><input type=text name=ct_friday_start size=5 maxlength=4 value=\"$ct_friday_start\"> </td><td align=right>Fim na Sexta:</td><td align=left><input type=text name=ct_friday_stop size=5 maxlength=4 value=\"$ct_friday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início no Sábado:</td><td align=left><input type=text name=ct_saturday_start size=5 maxlength=4 value=\"$ct_saturday_start\"> </td><td align=right>Fim no Sábado:</td><td align=left><input type=text name=ct_saturday_stop size=5 maxlength=4 value=\"$ct_saturday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=4><input type=submit name=ENVIAR value=ENVIAR></FORM></td></tr>\n";
|
|
|
|
$ct_srs=1;
|
|
$b=0;
|
|
$srs_SQL ='';
|
|
if (strlen($ct_state_call_times)>2)
|
|
{
|
|
$state_rules = explode('|',$ct_state_call_times);
|
|
$ct_srs = ((count($state_rules)) - 1);
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=center rowspan=$ct_srs>Configuração de Horário de Chamada por estado para este Registro: </td>\n";
|
|
echo "<td align=center colspan=3> </td></tr>\n";
|
|
while($ct_srs >= $b)
|
|
{
|
|
if (strlen($state_rules[$b])>0)
|
|
{
|
|
$stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=3111111111&call_time_id=$state_rules[$b]\">$state_rules[$b] </a> - <a href=\"$PHP_SELF?ADD=321111111&call_time_id=$call_time_id&state_rule=$state_rules[$b]&stage=REMOVE\">REMOVE </a></td><td align=left colspan=2>$row[0] - $row[1]</td></tr>\n";
|
|
$srs_SQL .= "'$state_rules[$b]',";
|
|
$srs_state_SQL .= "'$row[0]',";
|
|
}
|
|
$b++;
|
|
}
|
|
if (strlen($srs_SQL)>2)
|
|
{
|
|
$srs_SQL = "$srs_SQL''";
|
|
$srs_state_SQL = "$srs_state_SQL''";
|
|
$srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)";
|
|
}
|
|
else
|
|
{$srs_SQL='';}
|
|
$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$sct_to_print = mysql_num_rows($rslt);
|
|
$sct_list='';
|
|
|
|
$o=0;
|
|
while ($sct_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$sct_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=321111111>\n";
|
|
echo "<input type=hidden name=stage value=\"ADD\">\n";
|
|
echo "<input type=hidden name=call_time_id value=\"$call_time_id\">\n";
|
|
echo "Add state call time rule: </td><td align=left colspan=2><select size=1 name=state_rule>\n";
|
|
echo "$sct_list";
|
|
echo "</select></td>\n";
|
|
echo "<td align=center colspan=4><input type=submit name=ENVIAR value=ENVIAR></FORM></td></tr>\n";
|
|
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B>CAMPANHAS QUE USAM ESTE HORÁRIO DE CHAMADA:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=31&campaign_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
echo "<B>ENTRANTE GROUPS USING THIS CALL TIME:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT group_id,group_name from vicidial_inbound_groups where call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
echo "</center><BR><BR>\n";
|
|
|
|
if ($LOGdelete_call_times > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=511111111&call_time_id=$call_time_id\">APAGAR ESTA CONFIGURAÇÃO DE HORÁRIO DE CHAMADA</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CALLTIMES&stage=$call_time_id\">Clique aqui para ver as alterações Admin para este Horário de Chamada</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não esta autorizado a visualizar esta página. Por favor retorne.";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=3111111111 modify state call time definition info in the system
|
|
######################
|
|
|
|
if ($ADD==3111111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,state_call_time_comments,sct_default_start,sct_default_stop,sct_sunday_start,sct_sunday_stop,sct_monday_start,sct_monday_stop,sct_tuesday_start,sct_tuesday_stop,sct_wednesday_start,sct_wednesday_stop,sct_thursday_start,sct_thursday_stop,sct_friday_start,sct_friday_stop,sct_saturday_start,sct_saturday_stop from vicidial_state_call_times where state_call_time_id='$call_time_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$state_call_time_state =$row[1];
|
|
$call_time_name = $row[2];
|
|
$call_time_comments = $row[3];
|
|
$ct_default_start = $row[4];
|
|
$ct_default_stop = $row[5];
|
|
$ct_sunday_start = $row[6];
|
|
$ct_sunday_stop = $row[7];
|
|
$ct_monday_start = $row[8];
|
|
$ct_monday_stop = $row[9];
|
|
$ct_tuesday_start = $row[10];
|
|
$ct_tuesday_stop = $row[11];
|
|
$ct_wednesday_start = $row[12];
|
|
$ct_wednesday_stop = $row[13];
|
|
$ct_thursday_start = $row[14];
|
|
$ct_thursday_stop = $row[15];
|
|
$ct_friday_start = $row[16];
|
|
$ct_friday_stop = $row[17];
|
|
$ct_saturday_start = $row[18];
|
|
$ct_saturday_stop = $row[19];
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br> ALTERAR HOR. CHAM. P/ ESTADO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=4111111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<input type=hidden name=call_time_id value=\"$call_time_id\">\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Horário de Cham.: </td><td align=left colspan=3><B>$call_time_id</B>$NWB#vicidial_call_times-call_time_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>State Call Time State: </td><td align=left colspan=3><input type=text name=state_call_time_state size=4 maxlength=2 value=\"$state_call_time_state\"> $NWB#vicidial_call_times-state_call_time_state$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do horário de chamada por estado: </td><td align=left colspan=3><input type=text name=call_time_name size=40 maxlength=50 value=\"$call_time_name\"> (descrição curta do horário de chamada)$NWB#vicidial_call_times-call_time_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Comentários do horário de chamada por estado: </td><td align=left colspan=3><input type=text name=call_time_comments size=50 maxlength=255 value=\"$call_time_comments\"> $NWB#vicidial_call_times-call_time_comments$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Padrão de Início:</td><td align=left><input type=text name=ct_default_start size=5 maxlength=4 value=\"$ct_default_start\"> </td><td align=right>Padrão de Fim:</td><td align=left><input type=text name=ct_default_stop size=5 maxlength=4 value=\"$ct_default_stop\"> $NWB#vicidial_call_times-ct_default_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início no Domingo:</td><td align=left><input type=text name=ct_sunday_start size=5 maxlength=4 value=\"$ct_sunday_start\"> </td><td align=right>Fim no Domingo:</td><td align=left><input type=text name=ct_sunday_stop size=5 maxlength=4 value=\"$ct_sunday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Segunda:</td><td align=left><input type=text name=ct_monday_start size=5 maxlength=4 value=\"$ct_monday_start\"> </td><td align=right>Fim na Segunda:</td><td align=left><input type=text name=ct_monday_stop size=5 maxlength=4 value=\"$ct_monday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Terça:</td><td align=left><input type=text name=ct_tuesday_start size=5 maxlength=4 value=\"$ct_tuesday_start\"> </td><td align=right>Fim na Terça:</td><td align=left><input type=text name=ct_tuesday_stop size=5 maxlength=4 value=\"$ct_tuesday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Quarta:</td><td align=left><input type=text name=ct_wednesday_start size=5 maxlength=4 value=\"$ct_wednesday_start\"> </td><td align=right>Fim na Quarta:</td><td align=left><input type=text name=ct_wednesday_stop size=5 maxlength=4 value=\"$ct_wednesday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Quinta:</td><td align=left><input type=text name=ct_thursday_start size=5 maxlength=4 value=\"$ct_thursday_start\"> </td><td align=right>Fim na Quinta:</td><td align=left><input type=text name=ct_thursday_stop size=5 maxlength=4 value=\"$ct_thursday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início na Sexta:</td><td align=left><input type=text name=ct_friday_start size=5 maxlength=4 value=\"$ct_friday_start\"> </td><td align=right>Fim na Sexta:</td><td align=left><input type=text name=ct_friday_stop size=5 maxlength=4 value=\"$ct_friday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início no Sábado:</td><td align=left><input type=text name=ct_saturday_start size=5 maxlength=4 value=\"$ct_saturday_start\"> </td><td align=right>Fim no Sábado:</td><td align=left><input type=text name=ct_saturday_stop size=5 maxlength=4 value=\"$ct_saturday_stop\"> $NWB#vicidial_call_times-ct_sunday_start$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=4><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B>TEMPOS DE CHAMADA USANDO HORÁRIOS DE CHAMADA POR ESTADO:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
echo "</center><BR><BR>\n";
|
|
|
|
if ($LOGdelete_call_times > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5111111111&call_time_id=$call_time_id\">APAGAR ESTE HORÁRIO DE CHAMADA POR ESTADO</a>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não esta autorizado a visualizar esta página. Por favor retorne.";
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=331111111 modify shift definition info in the system
|
|
######################
|
|
|
|
if ($ADD==331111111)
|
|
{
|
|
if ($LOGmodify_call_times==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays from vicidial_shifts where shift_id='$shift_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$shift_name = $row[1];
|
|
$shift_start_time = $row[2];
|
|
$shift_length = $row[3];
|
|
$shift_weekdays = $row[4];
|
|
|
|
$shift_start_hour = substr($shift_start_time,0,2);
|
|
$shift_start_min = substr($shift_start_time,2,2);
|
|
$shift_length_hour = substr($shift_length,0,2);
|
|
$shift_length_min = substr($shift_length,3,2);
|
|
$shift_end_hour = ($shift_start_hour + $shift_length_hour);
|
|
$shift_end_min = ($shift_start_min + $shift_length_min);
|
|
if ($shift_end_min >=60)
|
|
{
|
|
$shift_end_min = ($shift_end_min - 60);
|
|
$shift_end_hour++;
|
|
}
|
|
if ($shift_end_hour >=24)
|
|
{
|
|
$shift_end_hour = ($shift_end_hour - 24);
|
|
}
|
|
$shift_end_hour = sprintf("%02s", $shift_end_hour);
|
|
$shift_end_min = sprintf("%02s", $shift_end_min);
|
|
$shift_end = "$shift_end_hour$shift_end_min";
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>ALTERAR TURNO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=431111111>\n";
|
|
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
|
echo "<input type=hidden name=shift_id value=\"$shift_id\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Turno:</td><td align=left><B>$shift_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Turno:</td><td align=left><input type=text name=shift_name size=50 maxlength=50 value=\"$shift_name\"> (descrição curta do turno)$NWB#vicidial_shifts-shift_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Início do Turno:</td><td align=left><input type=text name=shift_start_time size=5 maxlength=4 id=shift_start_time value=\"$shift_start_time\">\n";
|
|
echo " Final do Turno:<input type=text name=shift_end_time size=5 maxlength=4 id=shift_end_time value=\"$shift_end\">\n";
|
|
echo "<input type=button name=shift_calc value=\"Calculate Duração do Turno\" onClick=\"shift_time();\"> $NWB#vicidial_shifts-shift_start_time$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Duração do Turno: </td><td align=left><input type=text name=shift_length id=shift_length size=6 maxlength=5 value=\"$shift_length\"> $NWB#vicidial_shifts-shift_length$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dias do Turno:<BR>$NWB#vicidial_shifts-shift_weekdays$NWE</td><td align=left>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"0\"";
|
|
if (ereg('0',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Domingo<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"1\"";
|
|
if (ereg('1',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Segunda<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"2\"";
|
|
if (ereg('2',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Terça<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"3\"";
|
|
if (ereg('3',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Quarta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"4\"";
|
|
if (ereg('4',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Quinta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"5\"";
|
|
if (ereg('5',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Sexta<BR>\n";
|
|
echo "<input type=\"checkbox\" name=\"shift_weekdays[]\" value=\"6\"";
|
|
if (ereg('6',$shift_weekdays)) {echo " CHECKED";}
|
|
echo ">Sábado<BR>\n";
|
|
echo "</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=ENVIAR value=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<B>GRUPOS DE USUÁRIO USANDO ESTE TURNO:</B><BR>\n";
|
|
echo "<TABLE>\n";
|
|
|
|
$stmt="SELECT user_group,group_name from vicidial_user_groups where group_shifts LIKE\"% $shift_id %\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$camps_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($camps_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<TR><TD><a href=\"$PHP_SELF?ADD=311111&user_group=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
echo "</center><BR><BR>\n";
|
|
|
|
if ($LOGdelete_call_times > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=531111111&shift_id=$shift_id\">REMOVER ESTE TURNO</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=SHIFTS&stage=$shift_id\">Clique aqui para ver as alterações Admin para este Turno</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não esta autorizado a visualizar esta página. Por favor retorne.";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=31111111111 modify phone record in the system
|
|
######################
|
|
|
|
if ($ADD==31111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email from phones where extension='$extension' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
echo "<br>ALTERAR UM REGISTRO DE RAMAL: $row[1]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41111111111>\n";
|
|
echo "<input type=hidden name=old_extension value=\"$row[0]\">\n";
|
|
echo "<input type=hidden name=old_server_ip value=\"$row[5]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão do Ramal: </td><td align=left><input type=text name=extension size=20 maxlength=100 value=\"$row[0]\">$NWB#phones-extension$NWE <i>(Agent Screen Login do Ramal)</i></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número no Plano de Discagem: </td><td align=left><input type=text name=dialplan_number size=15 maxlength=20 value=\"$row[1]\"> (somente dígitos)$NWB#phones-dialplan_number$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Caixa do Correio de Voz:</td><td align=left><input type=text name=voicemail_id size=10 maxlength=10 value=\"$row[2]\"> (somente dígitos)$NWB#phones-voicemail_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>CallerID de Saída: </td><td align=left><input type=text name=outbound_cid size=10 maxlength=20 value=\"$row[65]\"> (somente dígitos)$NWB#phones-outbound_cid$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Ramal: </td><td align=left><input type=text name=phone_ip size=20 maxlength=15 value=\"$row[3]\"> (optional)$NWB#phones-phone_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Computador: </td><td align=left><input type=text name=computer_ip size=20 maxlength=15 value=\"$row[4]\"> (optional)$NWB#phones-computer_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111111&server_ip=$row[5]\">IP do Servidor</a>: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$row[5]</option>\n";
|
|
echo "</select>$NWB#phones-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Login: </td><td align=left><input type=text name=login size=10 maxlength=10 value=\"$row[6]\">$NWB#phones-login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=10 maxlength=10 value=\"$row[7]\">$NWB#phones-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option>ATIVO</option><option>SUSPENDED</option><option>CLOSED</option><option>PENDING</option><option>ADMIN</option><option selected>$row[8]</option></select>$NWB#phones-status$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conta Ativa: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option selected>$row[9]</option></select>$NWB#phones-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Tipo de Ramal: </td><td align=left><input type=text name=phone_type size=20 maxlength=50 value=\"$row[10]\">$NWB#phones-phone_type$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=fullname size=20 maxlength=50 value=\"$row[11]\">$NWB#phones-fullname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Email:</td><td align=left><input type=text name=email size=50 maxlength=100 value=\"$row[67]\"> $NWB#phones-email$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Eliminar correo de voz después del email: </td><td align=left><select size=1 name=delete_vm_after_email><option>Y</option><option>N</option><option selected>$row[73]</option></select>$NWB#phones-delete_vm_after_email$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Empresa: </td><td align=left><input type=text name=company size=10 maxlength=10 value=\"$row[12]\">$NWB#phones-company$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Foto: </td><td align=left><input type=text name=picture size=20 maxlength=19 value=\"$row[13]\">$NWB#phones-picture$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mensagens Novas: </td><td align=left><b>$row[14]</b>$NWB#phones-messages$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mensagens Antigas: </td><td align=left><b>$row[15]</b>$NWB#phones-old_messages$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Protocolo do Cliente: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option><option selected>$row[16]</option></select>$NWB#phones-protocol$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>GMT Local: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option><option selected>$row[17]</option></select> (NÃO ajuste para o horário de verão)$NWB#phones-local_gmt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Teléfono Anillo de tiempo de espera: </td><td align=left><input type=text name=phone_ring_timeout size=4 maxlength=5 value=\"$row[71]\">$NWB#phones-phone_ring_timeout$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Login do Gerente: </td><td align=left><input type=text name=ASTmgrUSERNAME size=20 maxlength=20 value=\"$row[18]\">$NWB#phones-ASTmgrUSERNAME$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do Gerente: </td><td align=left><input type=text name=ASTmgrSECRET size=20 maxlength=20 value=\"$row[19]\">$NWB#phones-ASTmgrSECRET$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário padrão do VICIDIAL: </td><td align=left><input type=text name=login_user size=20 maxlength=20 value=\"$row[20]\">$NWB#phones-login_user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha padrão do VICIDIAL: </td><td align=left><input type=text name=login_pass size=20 maxlength=20 value=\"$row[21]\">$NWB#phones-login_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Campanha padrão do VICIDIAL: </td><td align=left><input type=text name=login_campaign size=10 maxlength=10 value=\"$row[22]\">$NWB#phones-login_campaign$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Exten de Estacionamento: </td><td align=left><input type=text name=park_on_extension size=10 maxlength=10 value=\"$row[23]\">$NWB#phones-park_on_extension$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Exten de Conferência: </td><td align=left><input type=text name=conf_on_extension size=10 maxlength=10 value=\"$row[24]\">$NWB#phones-conf_on_extension$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão de estacionamento do VICIDIAL: </td><td align=left><input type=text name=VICIDIAL_park_on_extension size=10 maxlength=10 value=\"$row[25]\">$NWB#phones-VICIDIAL_park_on_extension$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Arquivo de estacionamento do VICIDIAL: </td><td align=left><input type=text name=VICIDIAL_park_on_filename size=10 maxlength=10 value=\"$row[26]\">$NWB#phones-VICIDIAL_park_on_filename$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Prefixo de Monitoramento: </td><td align=left><input type=text name=monitor_prefix size=10 maxlength=10 value=\"$row[27]\">$NWB#phones-monitor_prefix$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Exten de Gravação: </td><td align=left><input type=text name=recording_exten size=10 maxlength=10 value=\"$row[28]\">$NWB#phones-recording_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Exten de Correio de Voz Principal: </td><td align=left><input type=text name=voicemail_exten size=10 maxlength=10 value=\"$row[29]\">$NWB#phones-voicemail_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Exten de Correio de Voz: </td><td align=left><input type=text name=voicemail_dump_exten size=20 maxlength=20 value=\"$row[30]\">$NWB#phones-voicemail_dump_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Contexto do Exten: </td><td align=left><input type=text name=ext_context size=20 maxlength=20 value=\"$row[31]\">$NWB#phones-ext_context$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Teléfono Contexto: </td><td align=left><input type=text name=phone_context size=20 maxlength=20 value=\"$row[70]\">$NWB#phones-phone_context$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Conf. Archivo Secreto: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20 value=\"$row[72]\">$NWB#phones-conf_secret$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Canal de envio do DTMF: </td><td align=left><input type=text name=dtmf_send_extension size=40 maxlength=100 value=\"$row[32]\">$NWB#phones-dtmf_send_extension$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo de Saída de Chamadas: </td><td align=left><input type=text name=call_out_number_group size=40 maxlength=100 value=\"$row[33]\">$NWB#phones-call_out_number_group$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Localização do Navegador: </td><td align=left><input type=text name=client_browser size=40 maxlength=100 value=\"$row[34]\">$NWB#phones-client_browser$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Caminho de Instalação: </td><td align=left><input type=text name=install_directory size=40 maxlength=100 value=\"$row[35]\">$NWB#phones-install_directory$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>URL do CallerID: </td><td align=left><input type=text name=local_web_callerID_URL size=40 maxlength=255 value=\"$row[36]\">$NWB#phones-local_web_callerID_URL$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>URL Padrão do VICIDIAL: </td><td align=left><input type=text name=VICIDIAL_web_URL size=40 maxlength=255 value=\"$row[37]\">$NWB#phones-VICIDIAL_web_URL$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Call Logging: </td><td align=left><select size=1 name=AGI_call_logging_enabled><option>1</option><option>0</option><option selected>$row[38]</option></select>$NWB#phones-AGI_call_logging_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Troca de Usuário: </td><td align=left><select size=1 name=user_switching_enabled><option>1</option><option>0</option><option selected>$row[39]</option></select>$NWB#phones-user_switching_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conferências: </td><td align=left><select size=1 name=conferencing_enabled><option>1</option><option>0</option><option selected>$row[40]</option></select>$NWB#phones-conferencing_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Hang Up do Admin: </td><td align=left><select size=1 name=admin_hangup_enabled><option>1</option><option>0</option><option selected>$row[41]</option></select>$NWB#phones-admin_hangup_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Captura do Admin: </td><td align=left><select size=1 name=admin_hijack_enabled><option>1</option><option>0</option><option selected>$row[42]</option></select>$NWB#phones-admin_hijack_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Monitoramento do Admin: </td><td align=left><select size=1 name=admin_monitor_enabled><option>1</option><option>0</option><option selected>$row[43]</option></select>$NWB#phones-admin_monitor_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Estacionamento de Chamada: </td><td align=left><select size=1 name=call_parking_enabled><option>1</option><option>0</option><option selected>$row[44]</option></select>$NWB#phones-call_parking_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Verificar Atualizador: </td><td align=left><select size=1 name=updater_check_enabled><option>1</option><option>0</option><option selected>$row[45]</option></select>$NWB#phones-updater_check_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>AF Logging: </td><td align=left><select size=1 name=AFLogging_enabled><option>1</option><option>0</option><option selected>$row[46]</option></select>$NWB#phones-AFLogging_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Filas: </td><td align=left><select size=1 name=QUEUE_ACTION_enabled><option>1</option><option>0</option><option selected>$row[47]</option></select>$NWB#phones-QUEUE_ACTION_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Popup do CallerID: </td><td align=left><select size=1 name=CallerID_popup_enabled><option>1</option><option>0</option><option selected>$row[48]</option></select>$NWB#phones-CallerID_popup_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Botão CxPostal : </td><td align=left><select size=1 name=voicemail_button_enabled><option>1</option><option>0</option><option selected>$row[49]</option></select>$NWB#phones-voicemail_button_enabled$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Atualizar Rápido: </td><td align=left><select size=1 name=enable_fast_refresh><option>1</option><option>0</option><option selected>$row[50]</option></select>$NWB#phones-enable_fast_refresh$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Taxa da Atualização Rápida: </td><td align=left><input type=text size=5 name=fast_refresh_rate value=\"$row[51]\">(in ms)$NWB#phones-fast_refresh_rate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Persistant MySQL: </td><td align=left><select size=1 name=enable_persistant_mysql><option>1</option><option>0</option><option selected>$row[52]</option></select>$NWB#phones-enable_persistant_mysql$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Discar próximo número: </td><td align=left><select size=1 name=auto_dial_next_number><option>1</option><option>0</option><option selected>$row[53]</option></select>$NWB#phones-auto_dial_next_number$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Parar de gravar após cada chamada: </td><td align=left><select size=1 name=VDstop_rec_after_each_call><option>1</option><option>0</option><option selected>$row[54]</option></select>$NWB#phones-VDstop_rec_after_each_call$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Habilitar Mensagens SIPSAK: </td><td align=left><select size=1 name=enable_sipsak_messages><option>1</option><option>0</option><option selected>$row[66]</option></select>$NWB#phones-enable_sipsak_messages$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Servidor do DBX: </td><td align=left><input type=text name=DBX_server size=15 maxlength=15 value=\"$row[55]\"> (Primário DB Server)$NWB#phones-DBX_server$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Base de dados do DBX: </td><td align=left><input type=text name=DBX_database size=15 maxlength=15 value=\"$row[56]\"> (Primário Server Database)$NWB#phones-DBX_database$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário do DBX: </td><td align=left><input type=text name=DBX_user size=15 maxlength=15 value=\"$row[57]\"> (Primário DB Login)$NWB#phones-DBX_user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do DBX: </td><td align=left><input type=text name=DBX_pass size=15 maxlength=15 value=\"$row[58]\"> (Primário DB Secret)$NWB#phones-DBX_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Porta do DBX: </td><td align=left><input type=text name=DBX_port size=6 maxlength=6 value=\"$row[59]\"> (Primário DB Port)$NWB#phones-DBX_port$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Servidor do DBY: </td><td align=left><input type=text name=DBY_server size=15 maxlength=15 value=\"$row[60]\"> (Secundário DB Server)$NWB#phones-DBY_server$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Base de dados do DBY: </td><td align=left><input type=text name=DBY_database size=15 maxlength=15 value=\"$row[61]\"> (Secundário Server Database)$NWB#phones-DBY_database$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário do DBY: </td><td align=left><input type=text name=DBY_user size=15 maxlength=15 value=\"$row[62]\"> (Secundário DB Login)$NWB#phones-DBY_user$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do DBY: </td><td align=left><input type=text name=DBY_pass size=15 maxlength=15 value=\"$row[63]\"> (Secundário DB Secret)$NWB#phones-DBY_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Porta do DBY: </td><td align=left><input type=text name=DBY_port size=6 maxlength=6 value=\"$row[64]\"> (Secundário DB Port)$NWB#phones-DBY_port$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=331111111111&template_id=$row[68]\">ID do Template</a>: </td><td align=left><select size=1 name=template_id>\n";
|
|
$stmt="SELECT template_id,template_name from vicidial_conf_templates order by template_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$templates_to_print = mysql_num_rows($rslt);
|
|
$templates_list='<option SELECTED>--NONE--</option>';
|
|
$o=0;
|
|
while ($templates_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$templates_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$templates_list";
|
|
echo "<option SELECTED>$row[68]</option>\n";
|
|
echo "</select>$NWB#phones-template_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Sobrepor Conf: </td><td align=left><TEXTAREA NAME=conf_override ROWS=10 COLS=70>$row[69]</TEXTAREA> $NWB#phones-conf_override$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<br><br><a href=\"./phone_stats.php?extension=$row[0]&server_ip=$row[5]\">Clique aqui para statísticas do ramal</a>\n";
|
|
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51111111111&extension=$extension&server_ip=$server_ip\">APAGAR ESTE RAMAL</a>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=32111111111 modify phone alias record in the system
|
|
######################
|
|
|
|
if ($ADD==32111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT alias_id,alias_name,logins_list from phones_alias where alias_id='$alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
echo "<br>ALTERAR UM ALIAS DE RAMAL: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=42111111111>\n";
|
|
echo "<input type=hidden name=alias_id value=\"$row[0]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Alias:</td><td align=left><B>$row[0]</B> $NWB#phones-alias_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Alias: </td><td align=left><input type=text name=alias_name size=30 maxlength=50 value=\"$row[1]\"> $NWB#phones-alias_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Phones Logins List: </td><td align=left><input type=text name=logins_list size=50 maxlength=255 value=\"$row[2]\"> (comma separated)$NWB#phones-logins_list$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
|
|
### list of phones in this phones alias
|
|
$phone_alias_SQL = ereg_replace(',',"','",$row[2]);
|
|
|
|
echo "<center>\n";
|
|
echo "<br><b>RAMAIS DESTE ALIAS:</b><br>\n";
|
|
echo "<TABLE width=600 cellspacing=3>\n";
|
|
echo "<tr><td>LOGIN</td><td>EXTENSÃO</td><td>SERVER</td><td>PROTOCOL</td><td>IP</td></tr>\n";
|
|
|
|
$stmt="SELECT login,extension,server_ip,protocol,phone_ip from phones where login IN ('$phone_alias_SQL');";
|
|
if ($DB) {echo "|$stmt|";}
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o) {
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111111&extension=$rowx[1]&server_ip=$rowx[2]\">$rowx[0]</a></td><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[2]</td><td><font size=1>$rowx[3]</td><td><font size=1>$rowx[4]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=52111111111&alias_id=$row[0]\">REMOVER ESTE ALIAS DE RAMAL</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=PHONEALIASES&stage=$alias_id\">Clique aqui para ver as alterações Admin para este Alias de Ramal</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=33111111111 modify group alias record in the system
|
|
######################
|
|
|
|
if ($ADD==33111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active from groups_alias where group_alias_id='$group_alias_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
echo "<br>ALTERAR ALIAS DE GRUPO: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=43111111111>\n";
|
|
echo "<input type=hidden name=group_alias_id value=\"$row[0]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Alias: </td><td align=left><B>$row[0]</B> $NWB#phones-group_alias_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Alias: </td><td align=left><input type=text name=group_alias_name size=30 maxlength=50 value=\"$row[1]\"> $NWB#phones-group_alias_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número CallerID: </td><td align=left><input type=text name=caller_id_number size=20 maxlength=20 value=\"$row[2]\"> $NWB#phones-caller_id_number$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome CallerID: </td><td align=left><input type=text name=caller_id_name size=20 maxlength=20 value=\"$row[3]\"> $NWB#phones-caller_id_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option selected>$row[4]</option></select></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=53111111111&group_alias_id=$row[0]\">REMOVER ESTE ALIAS DE GRUPO</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=GROUPALIASES&stage=$group_alias_id\">Clique aqui para ver as alterações Admin para este Alias de Grupo</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=311111111111 modify server record in the system
|
|
######################
|
|
|
|
if ($ADD==311111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,local_gmt,voicemail_dump_exten,answer_transfer_agent,ext_context,sys_perf_log,vd_server_logs,agi_output,vicidial_balance_active,balance_trunks_offlimits,recording_web_link,alt_server_ip,active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,outbound_calls_per_second,sysload,channels_total,cpu_idle_percent,disk_usage,sounds_update,vicidial_recording_limit,carrier_logging_active,vicidial_balance_rank,rebuild_music_on_hold,active_agent_login_server,conf_secret from servers where server_id='$server_id' or server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$server_id = $row[0];
|
|
$server_description = $row[1];
|
|
$server_ip = $row[2];
|
|
$active = $row[3];
|
|
$asterisk_version = $row[4];
|
|
$max_vicidial_trunks = $row[5];
|
|
$telnet_host = $row[6];
|
|
$telnet_port = $row[7];
|
|
$ASTmgrUSERNAME = $row[8];
|
|
$ASTmgrSECRET = $row[9];
|
|
$ASTmgrUSERNAMEupdate = $row[10];
|
|
$ASTmgrUSERNAMElisten = $row[11];
|
|
$ASTmgrUSERNAMEsend = $row[12];
|
|
$local_gmt = $row[13];
|
|
$voicemail_dump_exten = $row[14];
|
|
$answer_transfer_agent = $row[15];
|
|
$ext_context = $row[16];
|
|
$sys_perf_log = $row[17];
|
|
$vd_server_logs = $row[18];
|
|
$agi_output = $row[19];
|
|
$vicidial_balance_active = $row[20];
|
|
$balance_trunks_offlimits = $row[21];
|
|
$recording_web_link = $row[22];
|
|
$alt_server_ip = $row[23];
|
|
$active_asterisk_server = $row[24];
|
|
$generate_vicidial_conf = $row[25];
|
|
$rebuild_conf_files = $row[26];
|
|
$outbound_calls_per_second = $row[27];
|
|
$sysload = $row[28];
|
|
$channels_total = $row[29];
|
|
$cpu_idle_percent = $row[30];
|
|
$disk_usage = $row[31];
|
|
$sounds_update = $row[32];
|
|
$vicidial_recording_limit = $row[33];
|
|
$carrier_logging_active = $row[34];
|
|
$vicidial_balance_rank = $row[35];
|
|
$rebuild_music_on_hold = $row[36];
|
|
$active_agent_login_server = $row[37];
|
|
$conf_secret = $row[38];
|
|
|
|
$cpu = (100 - $cpu_idle_percent);
|
|
$disk_usage = preg_replace("/ /"," - ",$disk_usage);
|
|
$disk_usage = preg_replace("/\|/","% ",$disk_usage);
|
|
|
|
echo "<br>ALTERAR O REGISTRO DO SERVIDOR: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=411111111111>\n";
|
|
echo "<input type=hidden name=old_server_id value=\"$server_id\">\n";
|
|
echo "<input type=hidden name=old_server_ip value=\"$server_ip\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Servidor: </td><td align=left><input type=text name=server_id size=10 maxlength=10 value=\"$server_id\">$NWB#servers-server_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descrição do Servidor: </td><td align=left><input type=text name=server_description size=30 maxlength=255 value=\"$server_description\">$NWB#servers-server_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Endereço IP do Servidor: </td><td align=left><input type=text name=server_ip size=20 maxlength=15 value=\"$server_ip\">$NWB#servers-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option selected>$active</option></select>$NWB#servers-active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Carga do Sistema: </td><td align=left>$sysload - $cpu% $NWB#servers-sysload$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Canais Falando: </td><td align=left>$channels_total $NWB#servers-channels_total$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Uso do HD: </td><td align=left>$disk_usage $NWB#servers-disk_usage$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Versão do Asterisk: </td><td align=left><input type=text name=asterisk_version size=20 maxlength=20 value=\"$asterisk_version\">$NWB#servers-asterisk_version$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Máx. Trunks no VICIDIAL: </td><td align=left><input type=text name=max_vicidial_trunks size=5 maxlength=4 value=\"$max_vicidial_trunks\">$NWB#servers-max_vicidial_trunks$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Máx. de Chamadas por Segundo: </td><td align=left><input type=text name=outbound_calls_per_second size=5 maxlength=4 value=\"$outbound_calls_per_second\">$NWB#servers-outbound_calls_per_second$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Discagem Balanceada do VICIDIAL: </td><td align=left><select size=1 name=vicidial_balance_active><option>Y</option><option>N</option><option selected>$vicidial_balance_active</option></select>$NWB#servers-vicidial_balance_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Balance Vicidial Rango:</td><td align=left><input type=text name=vicidial_balance_rank size=4 maxlength=2 value=\"$vicidial_balance_rank\">$NWB#servers-vicidial_balance_rank$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Limite de Balanceamento do VICIDIAL: </td><td align=left><input type=text name=balance_trunks_offlimits size=5 maxlength=4 value=\"$balance_trunks_offlimits\">$NWB#servers-balance_trunks_offlimits$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Host Telnet: </td><td align=left><input type=text name=telnet_host size=20 maxlength=20 value=\"$telnet_host\">$NWB#servers-telnet_host$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Porta Telnet: </td><td align=left><input type=text name=telnet_port size=6 maxlength=5 value=\"$telnet_port\">$NWB#servers-telnet_port$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário do Manager (AMI): </td><td align=left><input type=text name=ASTmgrUSERNAME size=20 maxlength=20 value=\"$ASTmgrUSERNAME\">$NWB#servers-ASTmgrUSERNAME$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha do Gerente: </td><td align=left><input type=text name=ASTmgrSECRET size=20 maxlength=20 value=\"$ASTmgrSECRET\">$NWB#servers-ASTmgrSECRET$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário do Atualizador do Manager: </td><td align=left><input type=text name=ASTmgrUSERNAMEupdate size=20 maxlength=20 value=\"$ASTmgrUSERNAMEupdate\">$NWB#servers-ASTmgrUSERNAMEupdate$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário de Listen do Manager: </td><td align=left><input type=text name=ASTmgrUSERNAMElisten size=20 maxlength=20 value=\"$ASTmgrUSERNAMElisten\">$NWB#servers-ASTmgrUSERNAMElisten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Usuário de Send do Manager: </td><td align=left><input type=text name=ASTmgrUSERNAMEsend size=20 maxlength=20 value=\"$ASTmgrUSERNAMEsend\">$NWB#servers-ASTmgrUSERNAMEsend$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conf. Archivo Secreto: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20 value=\"$conf_secret\">$NWB#servers-conf_secret$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>GMT Local: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option><option selected>$local_gmt</option></select> (NÃO ajuste para o horário de verão)$NWB#servers-local_gmt$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão para descarregar Correio de Voz : </td><td align=left><input type=text name=voicemail_dump_exten size=20 maxlength=20 value=\"$voicemail_dump_exten\">$NWB#servers-voicemail_dump_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão do AD do VICIDIAL: </td><td align=left><input type=text name=answer_transfer_agent size=20 maxlength=20 value=\"$answer_transfer_agent\">$NWB#servers-answer_transfer_agent$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Contexto Padrão: </td><td align=left><input type=text name=ext_context size=20 maxlength=20 value=\"$ext_context\">$NWB#servers-ext_context$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Performance do Sistema: </td><td align=left><select size=1 name=sys_perf_log><option>Y</option><option>N</option><option selected>$sys_perf_log</option></select>$NWB#servers-sys_perf_log$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Logs do Servidor: </td><td align=left><select size=1 name=vd_server_logs><option>Y</option><option>N</option><option selected>$vd_server_logs</option></select>$NWB#servers-vd_server_logs$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Saída do AGI: </td><td align=left><select size=1 name=agi_output><option>NONE</option><option>STDERR</option><option>FILE</option><option>BOTH</option><option selected>$agi_output</option></select>$NWB#servers-agi_output$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Portador de registro activo: </td><td align=left><select size=1 name=carrier_logging_active><option>Y</option><option>N</option><option selected>$carrier_logging_active</option></select>$NWB#servers-carrier_logging_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Link Web de Gravação: </td><td align=left><select size=1 name=recording_web_link><option>SERVER_IP</option><option>ALT_IP</option><option selected>$recording_web_link</option></select>$NWB#servers-recording_web_link$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Alternate Recording IP do Servidor: </td><td align=left><input type=text name=alt_server_ip size=30 maxlength=100 value=\"$alt_server_ip\">$NWB#servers-alt_server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Servidor Asterisk Ativo: </td><td align=left><select size=1 name=active_asterisk_server><option>Y</option><option>N</option><option selected>$active_asterisk_server</option></select>$NWB#servers-active_asterisk_server$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo Server Agent: </td><td align=left><select size=1 name=active_agent_login_server><option>Y</option><option>N</option><option selected>$active_agent_login_server</option></select>$NWB#servers-active_agent_login_server$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Gerar Arquivos Conf: </td><td align=left><select size=1 name=generate_vicidial_conf><option>Y</option><option>N</option><option selected>$generate_vicidial_conf</option></select>$NWB#servers-generate_vicidial_conf$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Reconstruir Arquivos Conf: </td><td align=left><select size=1 name=rebuild_conf_files><option>Y</option><option>N</option><option selected>$rebuild_conf_files</option></select>$NWB#servers-rebuild_conf_files$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Volver a generar música en espera: </td><td align=left><select size=1 name=rebuild_music_on_hold><option>Y</option><option>N</option><option selected>$rebuild_music_on_hold</option></select>$NWB#servers-rebuild_music_on_hold$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Actualización de los sonidos: </td><td align=left><select size=1 name=sounds_update><option>Y</option><option>N</option><option selected>$sounds_update</option></select>$NWB#servers-sounds_update$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grabación Vicidial Límite: </td><td align=left><input type=text name=vicidial_recording_limit size=8 maxlength=6 value=\"$vicidial_recording_limit\">$NWB#servers-vicidial_recording_limit$NWE</td></tr>\n";
|
|
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center></form>\n";
|
|
|
|
|
|
### vicidial server trunk records for this server
|
|
echo "<br><br><b>TRUNKS DO VICIDIAL PARA ESTE SERVIDOR: $NWB#vicidial_server_trunks$NWE</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td> CAMPANHA</td><td> TRUNKS </td><td> RESTRIÇÃO </td><td> </td><td> DELETE </td></tr>\n";
|
|
|
|
$stmt="SELECT server_ip,campaign_id,dedicated_trunks,trunk_restriction from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$recycle_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($recycle_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1>$rowx[1]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
|
echo "<input type=hidden name=campaign_id value=\"$rowx[1]\">\n";
|
|
echo "<input type=hidden name=ADD value=421111111111></td>\n";
|
|
echo "<td><font size=1><input size=6 maxlength=4 name=dedicated_trunks value=\"$rowx[2]\"></td>\n";
|
|
echo "<td><select size=1 name=trunk_restriction><option>MAXIMUM_LIMIT</option><option>OVERFLOW_ALLOWED</option><option SELECTED>$rowx[3]</option></select></td>\n";
|
|
echo "<td><font size=1><input type=submit name=submit value=MODIFY></form></td>\n";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=621111111111&campaign_id=$rowx[1]&server_ip=$server_ip\">APAGAR</a></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br><b>INCLUIR TRUNK DO SERVIDOR VICIDIAL</b><BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=221111111111>\n";
|
|
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
|
echo "TRUNKS: <input size=6 maxlength=4 name=dedicated_trunks><BR>\n";
|
|
echo "CAMPANHA: <select size=1 name=campaign_id>\n";
|
|
echo "$campaigns_list\n";
|
|
echo "</select><BR>\n";
|
|
echo "RESTRICTION: <select size=1 name=trunk_restriction><option>MAXIMUM_LIMIT</option><option>OVERFLOW_ALLOWED</option></select><BR>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</center></FORM><br>\n";
|
|
|
|
|
|
### list of carriers on this server
|
|
echo "<center>\n";
|
|
echo "<br><b>OPERADORAS NESTE SERVIDOR:</b><br>\n";
|
|
echo "<TABLE width=600 cellspacing=3>\n";
|
|
echo "<tr><td>CARRIER ID</td><td>NOME</td><td>REGISTRATION</td><td>ATIVO</td></tr>\n";
|
|
|
|
$active_carriers = 0;
|
|
$inactive_carriers = 0;
|
|
$stmt="SELECT carrier_id,carrier_name,registration_string,active from vicidial_server_carriers where server_ip='$row[2]'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$carriers_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($carriers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
if (ereg("Y", $rowx[3])) {$active_carriers++;}
|
|
if (ereg("N", $rowx[3])) {$inactive_carriers++;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=341111111111&carrier_id=$rowx[0]\">$rowx[0]</a></td><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[2]</td><td><font size=1>$rowx[3]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
### list of phones on this server
|
|
echo "<center>\n";
|
|
echo "<br><b>RAMAIS DESTE SERVIDOR:</b><br>\n";
|
|
echo "<TABLE width=400 cellspacing=3>\n";
|
|
echo "<tr><td>EXTENSÃO</td><td>NOME</td><td>ATIVO</td></tr>\n";
|
|
|
|
$active_phones = 0;
|
|
$inactive_phones = 0;
|
|
$stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";}
|
|
if (ereg("N", $rowx[1])) {$inactive_phones++;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111111&extension=$rowx[0]&server_ip=$row[2]\">$rowx[0]</a></td><td><font size=1>$rowx[2]</td><td><font size=1>$rowx[1]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
### list of conferences on this server
|
|
echo "<center>\n";
|
|
echo "<br><b>CONFERENCES WITHIN THIS SERVER:</b><br>\n";
|
|
echo "<TABLE width=400 cellspacing=3>\n";
|
|
echo "<tr><td>CONFERENCE</td><td>EXTENSÃO</td></tr>\n";
|
|
|
|
$active_confs = 0;
|
|
$stmt="SELECT conf_exten,extension from conferences where server_ip='$row[2]'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
$active_confs++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111111111111&conf_exten=$rowx[0]&server_ip=$row[2]\">$rowx[0]</a></td><td><font size=1>$rowx[2]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
### list of vicidial conferences on this server
|
|
echo "<center>\n";
|
|
echo "<br><b>VICIDIAL CONFERENCES WITHIN THIS SERVER:</b><br>\n";
|
|
echo "<TABLE width=400 cellspacing=3>\n";
|
|
echo "<tr><td>VD CONFERENCE</td><td>EXTENSÃO</td></tr>\n";
|
|
|
|
$active_vdconfs = 0;
|
|
$stmt="SELECT conf_exten,extension from vicidial_conferences where server_ip='$row[2]'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
$active_vdconfs++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111111111&conf_exten=$rowx[0]&server_ip=$row[2]\">$rowx[0]</a></td><td><font size=1>$rowx[2]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
echo "<center><b>\n";
|
|
|
|
$camp_lists = eregi_replace(".$","",$camp_lists);
|
|
echo "Este servidor tem $active_carriers active carriers and $inactive_carriers inactive carriers<br><br>\n";
|
|
echo "Este servidor tem $active_phones ramais ativos e $inactive_phones ramais inativos<br><br>\n";
|
|
echo "Este servidor tem $active_confs active conferences<br><br>\n";
|
|
echo "Este servidor tem $active_vdconfs active vicidial conferences<br><br>\n";
|
|
echo "</b></center>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=511111111111&server_id=$server_id&server_ip=$server_ip\">REMOVER ESTE SERVIDOR</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=SERVERS&stage=$server_id\">Clique aqui para ver as alterações Admin para este Servidor</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=331111111111 modify conf template record in the system
|
|
######################
|
|
|
|
if ($ADD==331111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT template_id,template_name,template_contents from vicidial_conf_templates where template_id='$template_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$template_id = $row[0];
|
|
$template_name = $row[1];
|
|
$template_contents = $row[2];
|
|
|
|
echo "<br>ALTERAR UM REGISTRO DE TEMPLATE DE CONF: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=431111111111>\n";
|
|
echo "<input type=hidden name=template_id value=\"$template_id\">\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID do Template: </td><td align=left><B>$template_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome do Template: </td><td align=left><input type=text name=template_name size=40 maxlength=50 value=\"$template_name\">$NWB#vicidial_conf_templates-template_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conteúdo do Template: </td><td align=left><TEXTAREA NAME=template_contents ROWS=10 COLS=70>$template_contents</TEXTAREA> $NWB#vicidial_conf_templates-template_contents$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
|
|
### list of phones using this conf template
|
|
echo "<center>\n";
|
|
echo "<br><b>RAMAIS USANDO ESTA TEMPLATE DE CONF:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>EXTENSÃO</td><td>NOME</td><td>SERVER</td><td>ATIVO</td></tr>\n";
|
|
|
|
$active_phones = 0;
|
|
$inactive_phones = 0;
|
|
$stmt="SELECT extension,active,fullname,server_ip from phones where template_id='$template_id'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";}
|
|
if (ereg("N", $rowx[1])) {$inactive_phones++;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111111&extension=$rowx[0]&server_ip=$rowx[3]\">$rowx[0]</a></td><td><font size=1>$rowx[2]</td><td><font size=1>$rowx[3]</td><td><font size=1>$rowx[1]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
### list of carriers using this conf template
|
|
echo "<center>\n";
|
|
echo "<br><b>OPERADORAS USANDO ESTA TEMPLATE DE CONF:</b><br>\n";
|
|
echo "<TABLE width=500 cellspacing=3>\n";
|
|
echo "<tr><td>CARRIER</td><td>NOME</td><td>SERVER</td><td>ATIVO</td></tr>\n";
|
|
|
|
$active_phones = 0;
|
|
$inactive_phones = 0;
|
|
$stmt="SELECT carrier_id,active,carrier_name,server_ip from vicidial_server_carriers where template_id='$template_id'";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rsltx);
|
|
$camp_lists='';
|
|
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$o++;
|
|
if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";}
|
|
if (ereg("N", $rowx[1])) {$inactive_phones++;}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=341111111111&carrier_id=$rowx[0]\">$rowx[0]</a></td><td><font size=1>$rowx[2]</td><td><font size=1>$rowx[3]</td><td><font size=1>$rowx[1]</td></tr>\n";
|
|
}
|
|
|
|
echo "</table></center><br>\n";
|
|
|
|
|
|
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=531111111111&template_id=$template_id&template_name=$template_name\">REMOVER TEMPLATE DE CONF</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CONFTEMPLATES&stage=$template_id\">Clique aqui para ver as alterações Admin para este template de conf</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=341111111111 modify carrier record in the system
|
|
######################
|
|
|
|
if ($ADD==341111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,server_ip,active,carrier_description from vicidial_server_carriers where carrier_id='$carrier_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$carrier_id = $row[0];
|
|
$carrier_name = $row[1];
|
|
$registration_string = $row[2];
|
|
$template_id = $row[3];
|
|
$account_entry = $row[4];
|
|
$protocol = $row[5];
|
|
$globals_string = $row[6];
|
|
$dialplan_entry = $row[7];
|
|
$server_ip = $row[8];
|
|
$active = $row[9];
|
|
$carrier_description = $row[10];
|
|
|
|
echo "<br>ALTERAR OPERADORA: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=441111111111>\n";
|
|
echo "<input type=hidden name=carrier_id value=\"$carrier_id\">\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID da Operadora: </td><td align=left><B>$carrier_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome da Operadora: </td><td align=left><input type=text name=carrier_name size=40 maxlength=50 value=\"$carrier_name\">$NWB#vicidial_server_carriers-carrier_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Descripción Carrier: </td><td align=left><input type=text name=carrier_description size=70 maxlength=255 value=\"$carrier_description\">$NWB#vicidial_server_carriers-carrier_description$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>String de Registro: </td><td align=left><input type=text name=registration_string size=50 maxlength=255 value=\"$registration_string\">$NWB#vicidial_server_carriers-registration_string$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=331111111111&template_id=$template_id\">ID do Template</a>: </td><td align=left><select size=1 name=template_id>\n";
|
|
$stmt="SELECT template_id,template_name from vicidial_conf_templates order by template_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$templates_to_print = mysql_num_rows($rslt);
|
|
$templates_list='<option SELECTED>--NONE--</option>';
|
|
$o=0;
|
|
while ($templates_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$templates_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$templates_list";
|
|
echo "<option SELECTED>$template_id</option>\n";
|
|
echo "</select>$NWB#vicidial_server_carriers-template_id$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Dados da Conta: </td><td align=left><TEXTAREA NAME=account_entry ROWS=10 COLS=70>$account_entry</TEXTAREA> $NWB#vicidial_server_carriers-account_entry$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Protocolo: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option><option SELECTED>$protocol</option></select>$NWB#vicidial_server_carriers-protocol$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>String Global: </td><td align=left><input type=text name=globals_string size=50 maxlength=255 value=\"$globals_string\">$NWB#vicidial_server_carriers-globals_string$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Plano de Discagem: </td><td align=left><TEXTAREA NAME=dialplan_entry ROWS=10 COLS=70>$dialplan_entry</TEXTAREA> $NWB#vicidial_server_carriers-dialplan_entry$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>IP do Servidor: </td><td align=left><select size=1 name=server_ip>\n";
|
|
##### get server listing for dynamic pulldown
|
|
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rsltx);
|
|
$servers_list='';
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$server_ip</option>\n";
|
|
echo "</select>$NWB#vicidial_server_carriers-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_server_carriers-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=541111111111&carrier_id=$carrier_id&carrier_name=$carrier_name\">REMOVER OPERADORA</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=CARRIERS&stage=$carrier_id\">Clique aqui para ver as alterações Admin para esta Operadora</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=351111111111 modify tts record in the system
|
|
######################
|
|
|
|
if ($ADD==351111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT tts_id,tts_name,active,tts_text from vicidial_tts_prompts where tts_id='$tts_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$tts_id = $row[0];
|
|
$tts_name = $row[1];
|
|
$active = $row[2];
|
|
$tts_text = $row[3];
|
|
|
|
echo "<br>TTS MODIFICAR UN RECORD: $tts_id<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=451111111111>\n";
|
|
echo "<input type=hidden name=tts_id value=\"$tts_id\">\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>TTS ID: </td><td align=left><B>$tts_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nombre TTS: </td><td align=left><input type=text name=tts_name size=50 maxlength=100 value=\"$tts_name\">$NWB#vicidial_tts_prompts-tts_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>N</option><option>Y</option><option SELECTED>$active</option></select>$NWB#vicidial_tts_prompts-active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>TTS Texto: </td><td align=left><TEXTAREA NAME=tts_text ROWS=20 COLS=70>$tts_text</TEXTAREA> $NWB#vicidial_tts_prompts-tts_text$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=551111111111&tts_id=$tts_id&tts_name=$tts_name\">ELIMINAR ESTA ENTRADA TTS</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=TTS&stage=$tts_id\">Haga clic aquí para ver chages Admin a esta entrada a TTS</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=361111111111 modify music on hold record in the system
|
|
######################
|
|
|
|
if ($ADD==361111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT moh_id,moh_name,active,random from vicidial_music_on_hold where moh_id='$moh_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$moh_id = $row[0];
|
|
$moh_name = $row[1];
|
|
$active = $row[2];
|
|
$random = $row[3];
|
|
|
|
echo "<br>MODIFY A MUSIC ON HOLD RECORD: $moh_id<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=461111111111>\n";
|
|
echo "<input type=hidden name=moh_id value=\"$moh_id\">\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Música en espera de identificación: </td><td align=left><B>$moh_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Música en espera Nombre: </td><td align=left><input type=text name=moh_name size=50 maxlength=100 value=\"$moh_name\">$NWB#vicidial_music_on_hold-moh_name$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>N</option><option>Y</option><option SELECTED>$active</option></select>$NWB#vicidial_music_on_hold-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Orden aleatorio: </td><td align=left><select size=1 name=random><option>N</option><option>Y</option><option SELECTED>$random</option></select>$NWB#vicidial_music_on_hold-random$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Archivos de Audio: </td><td align=left>\n";
|
|
##### get files listing for rank/delete options
|
|
$stmt="SELECT filename,rank from vicidial_music_on_hold_files where moh_id='$moh_id' order by rank;";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$mohfiles_to_print = mysql_num_rows($rsltx);
|
|
$ranks = ($mohfiles_to_print + 2);
|
|
$o=0;
|
|
while ($mohfiles_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
echo "<font size=2>Rango:</font><select size=1 name=$rowx[0]>\n";
|
|
echo "<option SELECTED>$rowx[1]</option>\n";
|
|
$k=1;
|
|
while ($ranks > $k)
|
|
{
|
|
echo "<option>$k</option>\n";
|
|
$k++;
|
|
}
|
|
echo "</select>\n";
|
|
|
|
echo " <B>$rowx[0]</B> - <a href=\"$PHP_SELF?ADD=461111111111&moh_id=$moh_id&stage=FILEDELETE&filename=$rowx[0]\">APAGAR</a><BR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B9CBFD><td align=right>Añadir un archivo de audio: </td><td><input type=text size=50 maxlength=50 name=filename id=filename value=\"\"> <a href=\"javascript:launch_chooser('filename','date',30);\">audio chooser</a> $NWB#vicidial_music_on_hold-filename$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=561111111111&moh_id=$moh_id&moh_name=$moh_name\">DELETE MÚSICA EN ESPERA DE ENTRADA</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=MOH&stage=$moh_id\">Haga clic aquí para ver chages de administración para esta música en espera de entrada</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=371111111111 modify voicemail box in the system
|
|
######################
|
|
|
|
if ($ADD==371111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT voicemail_id,pass,fullname,active,email,messages,old_messages,delete_vm_after_email from vicidial_voicemail where voicemail_id='$voicemail_id';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$voicemail_id = $row[0];
|
|
$pass = $row[1];
|
|
$fullname = $row[2];
|
|
$active = $row[3];
|
|
$email = $row[4];
|
|
$messages = $row[5];
|
|
$old_messages = $row[6];
|
|
$delete_vm_after_email = $row[7];
|
|
|
|
echo "<br>MODIFICAR UN contestador: $tts_id<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=471111111111>\n";
|
|
echo "<input type=hidden name=voicemail_id value=\"$voicemail_id\">\n";
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>ID de correo de voz: </td><td align=left><B>$voicemail_id</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Senha: </td><td align=left><input type=text name=pass size=12 maxlength=10 value=\"$pass\">$NWB#vicidial_voicemail-pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Name: </td><td align=left><input type=text name=fullname size=50 maxlength=100 value=\"$fullname\">$NWB#vicidial_voicemail-fullname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Email:</td><td align=left><input type=text name=email size=50 maxlength=100 value=\"$email\">$NWB#vicidial_voicemail-email$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Ativo: </td><td align=left><select size=1 name=active><option>N</option><option>Y</option><option SELECTED>$active</option></select>$NWB#vicidial_voicemail-active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Eliminar correo de voz después del email: </td><td align=left><select size=1 name=delete_vm_after_email><option>Y</option><option>N</option><option selected>$delete_vm_after_email</option></select>$NWB#vicidial_voicemail-delete_vm_after_email$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mensagens Novas: </td><td align=left><B>$messages</B></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mensagens Antigas: </td><td align=left><B>$old_messages</B></td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=571111111111&voicemail_id=$voicemail_id&fullname=$fullname\">Este mensaje de voz DELETE BOX</a>\n";
|
|
}
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=VOICEMAIL&stage=$voicemail_id\">Haga clic aquí para ver chages de administración para esta casilla de correo de voz</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=3111111111111 modify conference record in the system
|
|
######################
|
|
|
|
if ($ADD==3111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT conf_exten,server_ip,extension from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$conf_exten = $row[0];
|
|
$server_ip = $row[1];
|
|
|
|
echo "<br>ALTERAR O REGISTRO DA CONFERÊNCIA: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=4111111111111>\n";
|
|
echo "<input type=hidden name=old_conf_exten value=\"$row[0]\">\n";
|
|
echo "<input type=hidden name=old_server_ip value=\"$row[1]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conferência: </td><td align=left><input type=text name=conf_exten size=10 maxlength=7 value=\"$row[0]\">$NWB#conferences-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111111&server_ip=$row[1]\">IP do Servidor</a>: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$row[1]</option>\n";
|
|
echo "</select>$NWB#conferences-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão Atual: </td><td align=left><input type=text name=extension size=20 maxlength=20 value=\"$row[2]\"></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5111111111111&conf_exten=$conf_exten&server_ip=$server_ip\">REMOVER ESTA CONFERÊNCIA</a>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=31111111111111 modify vicidial conference record in the system
|
|
######################
|
|
|
|
if ($ADD==31111111111111)
|
|
{
|
|
if ($LOGast_admin_access==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT conf_exten,server_ip,extension,leave_3way,leave_3way_datetime from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$conf_exten = $row[0];
|
|
$server_ip = $row[1];
|
|
|
|
echo "<br>MODIFY A VICIDIAL CONFERENCE RECORD: $row[0]<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=41111111111111>\n";
|
|
echo "<input type=hidden name=old_conf_exten value=\"$row[0]\">\n";
|
|
echo "<input type=hidden name=old_server_ip value=\"$row[1]\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Conferência: </td><td align=left><input type=text name=conf_exten size=10 maxlength=7 value=\"$row[0]\">$NWB#conferences-conf_exten$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111111&server_ip=$row[1]\">IP do Servidor</a>: </td><td align=left><select size=1 name=server_ip>\n";
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$row[1]</option>\n";
|
|
echo "</select>$NWB#conferences-server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Extensão Atual: </td><td align=left><input type=text name=extension size=20 maxlength=20 value=\"$row[2]\"></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "<center><b>\n";
|
|
if ($LOGast_delete_phones > 0)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=51111111111111&conf_exten=$conf_exten&server_ip=$server_ip\">REMOVER ESTA CONFERÊNCIA VICIDIAL</a>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=311111111111111 modify vicidial system settings
|
|
######################
|
|
|
|
if ($ADD==311111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$version = $row[0];
|
|
$install_date = $row[1];
|
|
$use_non_latin = $row[2];
|
|
$webroot_writable = $row[3];
|
|
$enable_queuemetrics_logging = $row[4];
|
|
$queuemetrics_server_ip = $row[5];
|
|
$queuemetrics_dbname = $row[6];
|
|
$queuemetrics_login = $row[7];
|
|
$queuemetrics_pass = $row[8];
|
|
$queuemetrics_url = $row[9];
|
|
$queuemetrics_log_id = $row[10];
|
|
$queuemetrics_eq_prepend = $row[11];
|
|
$vicidial_agent_disable = $row[12];
|
|
$allow_sipsak_messages = $row[13];
|
|
$admin_home_url = $row[14];
|
|
$enable_agc_xfer_log = $row[15];
|
|
$db_schema_version = $row[16];
|
|
$auto_user_add_value = $row[17];
|
|
$timeclock_end_of_day = $row[18];
|
|
$timeclock_last_reset_date = $row[19];
|
|
$vdc_header_date_format = $row[20];
|
|
$vdc_customer_date_format = $row[21];
|
|
$vdc_header_phone_format = $row[22];
|
|
$vdc_agent_api_active = $row[23];
|
|
$qc_last_pull_time = $row[24];
|
|
$enable_vtiger_integration = $row[25];
|
|
$vtiger_server_ip = $row[26];
|
|
$vtiger_dbname = $row[27];
|
|
$vtiger_login = $row[28];
|
|
$vtiger_pass = $row[29];
|
|
$vtiger_url = $row[30];
|
|
$qc_features_active = $row[31];
|
|
$outbound_autodial_active = $row[32];
|
|
$outbound_calls_per_second = $row[33];
|
|
$enable_tts_integration = $row[34];
|
|
$agentonly_callback_campaign_lock = $row[35];
|
|
$sounds_central_control_active = $row[36];
|
|
$sounds_web_server = $row[37];
|
|
$sounds_web_directory = $row[38];
|
|
$active_voicemail_server = $row[39];
|
|
$auto_dial_limit = $row[40];
|
|
$user_territories_active = $row[41];
|
|
$allow_custom_dialplan = $row[42];
|
|
$db_schema_update_date = $row[43];
|
|
$enable_second_webform = $row[44];
|
|
|
|
echo "<br>ALTERAR CONFIG. DE SISTEMA DO VICIDIAL<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=411111111111111>\n";
|
|
echo "<input type=hidden name=sounds_web_directory value=\"$sounds_web_directory\">\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Versão: </td><td align=left> $version</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>DB Schema Versão: </td><td align=left> $db_schema_version</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>DB Schema Update Date: </td><td align=left> $db_schema_update_date</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Usuário-add Value: </td><td align=left> $auto_user_add_value</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Data da Instalação: </td><td align=left> $install_date</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Uso Não-Latino: </td><td align=left><select size=1 name=use_non_latin><option>1</option><option>0</option><option selected>$use_non_latin</option></select>$NWB#settings-use_non_latin$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Raiz Web Gravável: </td><td align=left><select size=1 name=webroot_writable><option>1</option><option>0</option><option selected>$webroot_writable</option></select>$NWB#settings-webroot_writable$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Mostrar Bloqueio ao Agente VICIDIAL:</td><td align=left><select size=1 name=vicidial_agent_disable>\n";
|
|
echo "<option value=\"NOT_ACTIVE\">NOT_ACTIVE</option>\n";
|
|
echo "<option value=\"LIVE_AGENT\">LIVE_AGENT</option>\n";
|
|
echo "<option value=\"EXTERNAL\">EXTERNAL</option>\n";
|
|
echo "<option value=\"ALL\">ALL</option>\n";
|
|
echo "<option selected value=\"$vicidial_agent_disable\">$vicidial_agent_disable</option>\n";
|
|
echo "</select>$NWB#settings-vicidial_agent_disable$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Mensagens SIPSAK</td><td align=left><select size=1 name=allow_sipsak_messages><option>1</option><option>0</option><option selected>$allow_sipsak_messages</option></select>$NWB#settings-allow_sipsak_messages$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>URL Home do Admin: </td><td align=left><input type=text name=admin_home_url size=50 maxlength=255 value=\"$admin_home_url\">$NWB#settings-admin_home_url$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Habilitar Log de Transferências: </td><td align=left><select size=1 name=enable_agc_xfer_log><option>1</option><option>0</option><option selected>$enable_agc_xfer_log</option></select>$NWB#settings-enable_agc_xfer_log$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Relógio Ponto Final do Dia:</td><td align=left><input type=text name=timeclock_end_of_day size=5 maxlength=4 value=\"$timeclock_end_of_day\">$NWB#settings-timeclock_end_of_day$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Último Sair Automático do Ponto:</td><td align=left> $timeclock_last_reset_date</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formato da Data no Cabeçalho da tela do Agente: </td><td align=left><select size=1 name=vdc_header_date_format>\n";
|
|
echo "<option>MS_DASH_24HR 2008-06-24 23:59:59</option>\n";
|
|
echo "<option>US_SLASH_24HR 06/24/2008 23:59:59</option>\n";
|
|
echo "<option>EU_SLASH_24HR 24/06/2008 23:59:59</option>\n";
|
|
echo "<option>AL_TEXT_24HR JUN 24 23:59:59</option>\n";
|
|
echo "<option>MS_DASH_AMPM 2008-06-24 11:59:59 PM</option>\n";
|
|
echo "<option>US_SLASH_AMPM 06/24/2008 11:59:59 PM</option>\n";
|
|
echo "<option>EU_SLASH_AMPM 24/06/2008 11:59:59 PM</option>\n";
|
|
echo "<option>AL_TEXT_AMPM JUN 24 11:59:59 PM</option>\n";
|
|
echo "<option selected value=\"$vdc_header_date_format\">$vdc_header_date_format</option>\n";
|
|
echo "</select>$NWB#settings-vdc_header_date_format$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formato da Data do Cliente na tela do Agente: </td><td align=left><select size=1 name=vdc_customer_date_format>\n";
|
|
echo "<option>MS_DASH_24HR 2008-06-24 23:59:59</option>\n";
|
|
echo "<option>US_SLASH_24HR 06/24/2008 23:59:59</option>\n";
|
|
echo "<option>EU_SLASH_24HR 24/06/2008 23:59:59</option>\n";
|
|
echo "<option>AL_TEXT_24HR JUN 24 23:59:59</option>\n";
|
|
echo "<option>MS_DASH_AMPM 2008-06-24 11:59:59 PM</option>\n";
|
|
echo "<option>US_SLASH_AMPM 06/24/2008 11:59:59 PM</option>\n";
|
|
echo "<option>EU_SLASH_AMPM 24/06/2008 11:59:59 PM</option>\n";
|
|
echo "<option>AL_TEXT_AMPM JUN 24 11:59:59 PM</option>\n";
|
|
echo "<option selected value=\"$vdc_customer_date_format\">$vdc_customer_date_format</option>\n";
|
|
echo "</select>$NWB#settings-vdc_customer_date_format$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formato do Número do Telefone na tela do Agente: </td><td align=left><select size=1 name=vdc_header_phone_format>\n";
|
|
echo "<option>US_DASH 000-000-0000</option>\n";
|
|
echo "<option>US_PARN (000)000-0000</option>\n";
|
|
echo "<option>MS_NODS 0000000000</option>\n";
|
|
echo "<option>UK_DASH 00 0000-0000</option>\n";
|
|
echo "<option>AU_SPAC 000 000 000</option>\n";
|
|
echo "<option>IT_DASH 0000-000-000</option>\n";
|
|
echo "<option>FR_SPAC 00 00 00 00 00</option>\n";
|
|
echo "<option selected value=\"$vdc_header_phone_format\">$vdc_header_phone_format</option>\n";
|
|
echo "</select>$NWB#settings-vdc_header_phone_format$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>API do Agente Ativa:</td><td align=left><select size=1 name=vdc_agent_api_active><option>1</option><option>0</option><option selected>$vdc_agent_api_active</option></select>$NWB#settings-vdc_agent_api_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Trava para Agendamento Vinculado: </td><td align=left><select size=1 name=agentonly_callback_campaign_lock><option>1</option><option>0</option><option selected>$agentonly_callback_campaign_lock</option></select>$NWB#settings-agentonly_callback_campaign_lock$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Controle Central de Audio Ativado: </td><td align=left><select size=1 name=sounds_central_control_active><option>1</option><option>0</option><option selected>$sounds_central_control_active</option></select>$NWB#settings-sounds_central_control_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Servidor Web de Sons: </td><td align=left><input type=text name=sounds_web_server size=30 maxlength=50 value=\"$sounds_web_server\">$NWB#settings-sounds_web_server$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Diretório Web de Sons: </td><td align=left><a href=\"http://$sounds_web_server/$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Servidor de correo de voz activo: </td><td align=left><select size=1 name=active_voicemail_server>\n";
|
|
##### get server listing for dynamic pulldown
|
|
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
|
$rsltx=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rsltx);
|
|
$servers_list='';
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rsltx);
|
|
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "$servers_list";
|
|
echo "<option SELECTED>$active_voicemail_server</option>\n";
|
|
echo "</select>$NWB#settings-active_voicemail_server$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Marcado automático de límite de: </td><td align=left><select size=1 name=auto_dial_limit><option selected>$auto_dial_limit</option>\n";
|
|
$adl=1;
|
|
while($adl < 1000)
|
|
{
|
|
echo "<option>$adl</option>\n";
|
|
if ($adl < 3)
|
|
{$adl = ($adl + 0.1);}
|
|
else
|
|
{
|
|
if ($adl < 4)
|
|
{$adl = ($adl + 0.25);}
|
|
else
|
|
{
|
|
if ($adl < 5)
|
|
{$adl = ($adl + 0.5);}
|
|
else
|
|
{
|
|
if ($adl < 10)
|
|
{$adl = ($adl + 1);}
|
|
else
|
|
{
|
|
if ($adl < 20)
|
|
{$adl = ($adl + 2);}
|
|
else
|
|
{
|
|
if ($adl < 40)
|
|
{$adl = ($adl + 5);}
|
|
else
|
|
{
|
|
if ($adl < 200)
|
|
{$adl = ($adl + 10);}
|
|
else
|
|
{
|
|
if ($adl < 400)
|
|
{$adl = ($adl + 50);}
|
|
else
|
|
{
|
|
if ($adl < 1000)
|
|
{$adl = ($adl + 100);}
|
|
else
|
|
{$adl = ($adl + 1);}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo "<option>$adl</option></select>$NWB#settings-auto_dial_limit$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Discagem Automática Ativa: </td><td align=left><select size=1 name=outbound_autodial_active><option>1</option><option>0</option><option selected>$outbound_autodial_active</option></select>$NWB#settings-outbound_autodial_active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Máx. de Cham. Trasnf. por Segundo: </td><td align=left><input type=text name=outbound_calls_per_second size=4 maxlength=3 value=\"$outbound_calls_per_second\">$NWB#settings-outbound_calls_per_second$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Permitir Custom Dialplan entradas: </td><td align=left><select size=1 name=allow_custom_dialplan><option>1</option><option>0</option><option selected>$allow_custom_dialplan</option></select>$NWB#settings-allow_custom_dialplan$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Territorios de usuario de Ativo: </td><td align=left><select size=1 name=user_territories_active><option>1</option><option>0</option><option selected>$user_territories_active</option></select>$NWB#settings-user_territories_active$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Formulario de Asistencia Segunda Habilitar: </td><td align=left><select size=1 name=enable_second_webform><option>1</option><option>0</option><option selected>$enable_second_webform</option></select>$NWB#settings-enable_second_webform$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Habilitar TTS Integración: </td><td align=left><select size=1 name=enable_tts_integration><option>1</option><option>0</option><option selected>$enable_tts_integration</option></select>$NWB#settings-enable_tts_integration$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Recursos de CQ Ativos: </td><td align=left><select size=1 name=qc_features_active><option>1</option><option>0</option><option selected>$qc_features_active</option></select>$NWB#settings-qc_features_active$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Última Hora de Retirada do CQ:</td><td align=left> $qc_last_pull_time</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Habilitar Log para o QueueMetrics: </td><td align=left><select size=1 name=enable_queuemetrics_logging><option>1</option><option>0</option><option selected>$enable_queuemetrics_logging</option></select>$NWB#settings-enable_queuemetrics_logging$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>IP do Servidor QueueMetrics: </td><td align=left><input type=text name=queuemetrics_server_ip size=18 maxlength=15 value=\"$queuemetrics_server_ip\">$NWB#settings-queuemetrics_server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Nome do BD do QueueMetrics: </td><td align=left><input type=text name=queuemetrics_dbname size=18 maxlength=50 value=\"$queuemetrics_dbname\">$NWB#settings-queuemetrics_dbname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Login do BD do QueueMetrics: </td><td align=left><input type=text name=queuemetrics_login size=18 maxlength=50 value=\"$queuemetrics_login\">$NWB#settings-queuemetrics_login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Senha do BD do QueueMetrics: </td><td align=left><input type=text name=queuemetrics_pass size=18 maxlength=50 value=\"$queuemetrics_pass\">$NWB#settings-queuemetrics_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics URL: </td><td align=left><input type=text name=queuemetrics_url size=50 maxlength=255 value=\"$queuemetrics_url\">$NWB#settings-queuemetrics_url$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>ID do Log do QueueMetrics: </td><td align=left><input type=text name=queuemetrics_log_id size=12 maxlength=10 value=\"$queuemetrics_log_id\">$NWB#settings-queuemetrics_log_id$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#99FFCC><td align=right>Prefixo QueueMetrics EnterQueue: </td><td align=left><select size=1 name=queuemetrics_eq_prepend>\n";
|
|
echo "<option value=\"NONE\">NONE</option>\n";
|
|
echo "<option value=\"lead_id\">lead_id</option>\n";
|
|
echo "<option value=\"list_id\">list_id</option>\n";
|
|
echo "<option value=\"source_id\">source_id</option>\n";
|
|
echo "<option value=\"vendor_lead_code\">vendor_lead_code</option>\n";
|
|
echo "<option value=\"address3\">address3</option>\n";
|
|
echo "<option value=\"security_phrase\">security_phrase</option>\n";
|
|
echo "<option selected value=\"$queuemetrics_eq_prepend\">$queuemetrics_eq_prepend</option>\n";
|
|
echo "</select>$NWB#settings-queuemetrics_eq_prepend$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Habilitar Integração com Vtiger: </td><td align=left><select size=1 name=enable_vtiger_integration><option>1</option><option>0</option><option selected>$enable_vtiger_integration</option></select>$NWB#settings-enable_vtiger_integration$NWE\n";
|
|
echo " <a href=\"./vtiger_user.php\" target=\"_blank\">Clique aqui para sincronizar usuários com o Vtiger</a>\n";
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>IP do Servidor Vtiger: </td><td align=left><input type=text name=vtiger_server_ip size=18 maxlength=15 value=\"$vtiger_server_ip\">$NWB#settings-vtiger_server_ip$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Vtiger DB Name: </td><td align=left><input type=text name=vtiger_dbname size=18 maxlength=50 value=\"$vtiger_dbname\">$NWB#settings-vtiger_dbname$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Vtiger DB Login: </td><td align=left><input type=text name=vtiger_login size=18 maxlength=50 value=\"$vtiger_login\">$NWB#settings-vtiger_login$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>Vtiger DB Senha: </td><td align=left><input type=text name=vtiger_pass size=18 maxlength=50 value=\"$vtiger_pass\">$NWB#settings-vtiger_pass$NWE</td></tr>\n";
|
|
echo "<tr bgcolor=#CCFFFF><td align=right>URL do Vtiger: </td><td align=left><input type=text name=vtiger_url size=50 maxlength=255 value=\"$vtiger_url\">$NWB#settings-vtiger_url$NWE</td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit VALUE=ENVIAR></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
echo "</form>\n";
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=SYSTEMSETTINGS&stage=system_settings\">Clique aqui para ver as alterações Admin para esta Configuração de sistema</FONT>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=321111111111111 modify vicidial system statuses
|
|
######################
|
|
|
|
if ($ADD==321111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br><center>\n";
|
|
echo "<b>ESTADOS DE VICIDIAL DENTRO DE ESTE SISTEMA: $NWB#vicidial_statuses$NWE</b><br>\n";
|
|
echo "<TABLE width=700 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS</td><td>DESCRIÇÃO</td><td>SELECT-<BR>ABLE</td><td>HUMANO<BR>RESPOSTA</td><td>CATEGORIA</td><td>MODIFY/DELETE</td></tr>\n";
|
|
|
|
##### get status category listings for dynamic pulldown
|
|
$stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$cats_to_print = mysql_num_rows($rslt);
|
|
$cats_list="";
|
|
|
|
$o=0;
|
|
while ($cats_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$cats_list .= "<option value=\"$rowx[0]\">$rowx[0] - " . substr($rowx[1],0,20) . "</option>\n";
|
|
$catsname_list["$rowx[0]"] = substr($rowx[1],0,20);
|
|
$o++;
|
|
}
|
|
|
|
|
|
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$AScategory = $rowx[4];
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=421111111111111>\n";
|
|
echo "<input type=hidden name=stage value=modify>\n";
|
|
echo "<input type=hidden name=status value=\"$rowx[0]\">\n";
|
|
echo "<font size=2><B>$rowx[0]</B></td>\n";
|
|
echo "<td><input type=text name=status_name size=20 maxlength=30 value=\"$rowx[1]\"></td>\n";
|
|
echo "<td><select size=1 name=selectable><option>Y</option><option>N</option><option selected>$rowx[2]</option></select></td>\n";
|
|
echo "<td><select size=1 name=human_answered><option>Y</option><option>N</option><option selected>$rowx[3]</option></select></td>\n";
|
|
echo "<td>\n";
|
|
echo "<select size=1 name=category>\n";
|
|
echo "$cats_list";
|
|
echo "<option selected value=\"$AScategory\">$AScategory - $catsname_list[$AScategory]</option>\n";
|
|
echo "</select>\n";
|
|
echo "</td>\n";
|
|
echo "<td align=center nowrap><font size=1><input type=submit name=submit value=MODIFY> \n";
|
|
echo " \n";
|
|
|
|
if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0]))
|
|
{
|
|
echo "<DEL>APAGAR</DEL>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<a href=\"$PHP_SELF?ADD=421111111111111&status=$rowx[0]&stage=delete\">APAGAR</a>\n";
|
|
}
|
|
|
|
echo "</td></tr><tr $bgcolor><td colspan=6 align=center><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>\n";
|
|
|
|
echo " Sale: <select size=1 name=sale><option>Y</option><option>N</option><option selected>$rowx[5]</option></select> \n";
|
|
echo " DNC: <select size=1 name=dnc><option>Y</option><option>N</option><option selected>$rowx[6]</option></select> \n";
|
|
echo " Customer Contact: <select size=1 name=customer_contact><option>Y</option><option>N</option><option selected>$rowx[7]</option></select> \n";
|
|
echo " Not Interested: <select size=1 name=not_interested><option>Y</option><option>N</option><option selected>$rowx[8]</option></select> \n";
|
|
echo " Unworkable: <select size=1 name=unworkable><option>Y</option><option>N</option><option selected>$rowx[9]</option></select> \n";
|
|
|
|
echo "</form></td></tr>\n";
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR STATUS DE SISTEMA<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=221111111111111>\n";
|
|
echo "Status: <input type=text name=status_id size=7 maxlength=6> \n";
|
|
echo "Descrição: <input type=text name=status_name size=30 maxlength=30><BR>\n";
|
|
echo "Selecionável: <select size=1 name=selectable><option>Y</option><option>N</option></select> \n";
|
|
echo "Resposta Humana: <select size=1 name=human_answered><option>Y</option><option>N</option></select> \n";
|
|
echo "Sale: <select size=1 name=sale><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "DNC: <select size=1 name=dnc><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Customer Contact: <select size=1 name=customer_contact><option>Y</option><option SELECTED>N</option></select> <BR>\n";
|
|
echo "Not Interested: <select size=1 name=not_interested><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Unworkable: <select size=1 name=unworkable><option>Y</option><option SELECTED>N</option></select> \n";
|
|
echo "Categoria:\n";
|
|
echo "<select size=1 name=category>\n";
|
|
echo "$cats_list";
|
|
echo "<option selected value=\"$AScategory\">$AScategory - $catsname_list[$AScategory]</option>\n";
|
|
echo "</select> <BR>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=331111111111111 modify vicidial status categories
|
|
######################
|
|
|
|
if ($ADD==331111111111111)
|
|
{
|
|
if ($LOGmodify_servers==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br><center>\n";
|
|
echo "<b>VICIDIAL CATEGORIA DE STATUS: $NWB#vicidial_status_categories$NWE</b><br>\n";
|
|
echo "<TABLE width=700 cellspacing=3>\n";
|
|
echo "<tr><td>CATEGORIA</td><td>NOME</td><td>STATUS NESTA CATEGORIA</td></tr>\n";
|
|
|
|
$stmt="SELECT vsc_id,vsc_name,vsc_description,tovdad_display,sale_category,dead_lead_category from vicidial_status_categories order by vsc_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Avsc_id[$o] = $rowx[0];
|
|
$Avsc_name[$o] = $rowx[1];
|
|
$Avsc_description[$o] = $rowx[2];
|
|
$Atovdad_display[$o] = $rowx[3];
|
|
$Asale_category[$o] = $rowx[4];
|
|
$Adead_lead_category[$o] = $rowx[5];
|
|
$o++;
|
|
}
|
|
$p=0;
|
|
while ($o > $p)
|
|
{
|
|
if (eregi("1$|3$|5$|7$|9$", $p))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
$CATstatuses='';
|
|
$stmt="SELECT status from vicidial_statuses where category='$Avsc_id[$p]' order by status;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$q=0;
|
|
while ($statuses_to_print > $q)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$CATstatuses.=" $rowx[0]";
|
|
$q++;
|
|
}
|
|
$stmt="SELECT status from vicidial_campaign_statuses where category='$Avsc_id[$p]' order by status;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$q=0;
|
|
while ($statuses_to_print > $q)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$CATstatuses.=" $rowx[0]";
|
|
$q++;
|
|
}
|
|
|
|
echo "<tr $bgcolor><td><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=431111111111111>\n";
|
|
echo "<input type=hidden name=stage value=modify>\n";
|
|
echo "<input type=hidden name=vsc_id value=\"$Avsc_id[$p]\">\n";
|
|
echo "<font size=2><B>$Avsc_id[$p]</B></td>\n";
|
|
echo "<td><input type=text name=vsc_name size=30 maxlength=50 value=\"$Avsc_name[$p]\"></td>\n";
|
|
echo "<td><font size=1>\n";
|
|
echo "$CATstatuses";
|
|
echo "</td></tr>\n";
|
|
echo "<tr $bgcolor>\n";
|
|
echo "<td colspan=3>TO VDAD Mostrar: <select size=1 name=tovdad_display><option>Y</option><option>N</option><option selected>$Atovdad_display[$p]</option></select> Categoria de Venda:<select size=1 name=sale_category><option>Y</option><option>N</option><option selected>$Asale_category[$p]</option></select> Categoria de Registro Ruim:<select size=1 name=dead_lead_category><option>Y</option><option>N</option><option selected>$Adead_lead_category[$p]</option></select> </td></tr>\n";
|
|
echo "<tr $bgcolor><td colspan=3><font size=1>Descrição: <input type=text name=vsc_description size=90 maxlength=255 value=\"$Avsc_description[$p]\"></td></tr>\n";
|
|
echo "<tr $bgcolor><td colspan=3 align=center><font size=1><input type=submit name=submit value=MODIFY> \n";
|
|
echo " <a href=\"$PHP_SELF?ADD=431111111111111&vsc_id=$Avsc_id[$p]&stage=delete\">APAGAR</a></td></tr>\n";
|
|
echo "<tr><td colspan=4><font size=1> </form></td></tr>\n";
|
|
|
|
$p++;
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR CATEG. DE STATUS<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=231111111111111>\n";
|
|
echo "Category ID: <input type=text name=vsc_id size=20 maxlength=20> \n";
|
|
echo "Name: <input type=text name=vsc_name size=20 maxlength=50> <BR>\n";
|
|
echo "TimeOnVDAD Mostrar: <select size=1 name=tovdad_display><option>Y</option><option selected>N</option></select> \n";
|
|
echo "Categoria de Venda:<select size=1 name=sale_category><option>Y</option><option selected>N</option></select> \n";
|
|
echo "Categoria de Registro Ruim:<select size=1 name=dead_lead_category><option>Y</option><option selected>N</option></select> <BR>\n";
|
|
echo "Descrição: <input type=text name=vsc_description size=80 maxlength=255> \n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=341111111111111 modify vicidial QC status code
|
|
######################
|
|
|
|
if ($ADD==341111111111111)
|
|
{
|
|
if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) )
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br><center>\n";
|
|
echo "<b>CÓDIGOS DE STATUS DE CQ NESTE SISTEMA VICIDIAL: $NWB#vicidial_qc_status_codes$NWE</b><br>\n";
|
|
echo "<TABLE width=600 cellspacing=3>\n";
|
|
echo "<tr><td>STATUS CODE</td><td>DESCRIÇÃO</td><td>MODIFY/DELETE</td></tr>\n";
|
|
|
|
##### go through each QC status code
|
|
$stmt="SELECT count(*) from vicidial_qc_codes;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
if ($rowx[0] > 0)
|
|
{
|
|
$stmt="SELECT code,code_name from vicidial_qc_codes order by code;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statuses_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($statuses_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$o++;
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
|
|
echo "<tr $bgcolor><td><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=441111111111111>\n";
|
|
echo "<input type=hidden name=stage value=modify>\n";
|
|
echo "<input type=hidden name=code value=\"$rowx[0]\">\n";
|
|
echo "<font size=2><B>$rowx[0]</B></td>\n";
|
|
echo "<td><input type=text name=code_name size=20 maxlength=30 value=\"$rowx[1]\"></td>\n";
|
|
echo "<td align=center nowrap><font size=1><input type=submit name=submit value=MODIFY> \n";
|
|
echo " \n";
|
|
|
|
if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0]))
|
|
{
|
|
echo "<DEL>APAGAR</DEL>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "<a href=\"$PHP_SELF?ADD=441111111111111&status=$rowx[0]&stage=delete\">APAGAR</a>\n";
|
|
}
|
|
echo "</form></td></tr>\n";
|
|
}
|
|
}
|
|
echo "</table>\n";
|
|
|
|
echo "<br>INCLUIR CÓDIGO DE CQ<BR><form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=241111111111111>\n";
|
|
echo "Status: <input type=text name=code size=9 maxlength=8> \n";
|
|
echo "Descrição: <input type=text name=code_name size=30 maxlength=30><BR>\n";
|
|
echo "<input type=submit name=submit value=ADD><BR>\n";
|
|
|
|
echo "</FORM><br>\n";
|
|
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=550 user search form
|
|
######################
|
|
|
|
if ($ADD==550)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
echo "<br>PESQUISAR USUÁRIO<form action=$PHP_SELF method=POST>\n";
|
|
echo "<input type=hidden name=ADD value=660>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Número do usuário: </td><td align=left><input type=text name=user size=20 maxlength=20></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nome Completo: </td><td align=left><input type=text name=full_name size=30 maxlength=30></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Nível do Usuário: </td><td align=left><select size=1 name=user_level><option selected>0</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option></select></td></tr>\n";
|
|
echo "<tr bgcolor=#B6D3FC><td align=right>Grupo do Usuário: </td><td align=left><select size=1 name=user_group>\n";
|
|
|
|
$stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$groups_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
$groups_list='';
|
|
while ($groups_to_print > $o)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$groups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
|
$o++;
|
|
}
|
|
echo "$groups_list</select></td></tr>\n";
|
|
|
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=search value=search></td></tr>\n";
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=660 user search results
|
|
######################
|
|
|
|
if ($ADD==660)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$SQL = '';
|
|
if ($user) {$SQL .= " user LIKE \"%$user%\" and";}
|
|
if ($full_name) {$SQL .= " full_name LIKE \"%$full_name%\" and";}
|
|
if ($user_level > 0) {$SQL .= " user_level LIKE \"%$user_level%\" and";}
|
|
if ($user_group) {$SQL .= " user_group = '$user_group' and";}
|
|
$SQL = eregi_replace(" and$", "", $SQL);
|
|
if (strlen($SQL)>5) {$SQL = "and $SQL";}
|
|
|
|
$stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts from vicidial_users where user_level <= $LOGuser_level $SQL order by full_name desc;";
|
|
# echo "\n|$stmt|\n";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$people_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>RESULTADOS DA PESQUISA:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
|
|
$o=0;
|
|
while ($people_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1>$row[1]</td><td><font size=1>$row[3]</td><td><font size=1>$row[4]</td><td><font size=1>$row[5]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$row[1]\">ALTERAR</a> | <a href=\"./user_stats.php?user=$row[1]\">ESTATÍSTICAS</a> | <a href=\"./user_status.php?user=$row[1]\">STATUS</a> | <a href=\"./AST_agent_time_sheet.php?agent=$row[1]\">TIME</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
|
|
}
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 8 series, Callback lists
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
######################
|
|
# ADD=8 find all callbacks on hold by a User
|
|
######################
|
|
if ($ADD==8)
|
|
{
|
|
if ($LOGmodify_users==1)
|
|
{
|
|
if ($SUB==89)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>Usuário($user) callback listings LIVE for more than one month have been made INACTIVE\n";
|
|
}
|
|
if ($SUB==899)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>Usuário($user) callback listings LIVE for more than one week have been made INACTIVE\n";
|
|
}
|
|
}
|
|
$CBinactiveLINK = "<BR><a href=\"$PHP_SELF?ADD=8&SUB=89&user=$user\">Remove LIVE Callbacks older than one month for this user</a><BR><a href=\"$PHP_SELF?ADD=8&SUB=899&user=$user\">Remove LIVE Callbacks older than one week for this user</a><BR>";
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$CBquerySQLwhere = "and user='$user'";
|
|
|
|
echo "<br>USER CALLBACK HOLD LISTINGS: $user\n";
|
|
$oldADD = "ADD=8&user=$user";
|
|
$ADD='82';
|
|
}
|
|
|
|
######################
|
|
# ADD=81 find all callbacks on hold within a Campaign
|
|
######################
|
|
if ($ADD==81)
|
|
{
|
|
if ($LOGmodify_campaigns==1)
|
|
{
|
|
if ($SUB==89)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>campaign($campaign_id) callback listings LIVE for more than one month have been made INACTIVE\n";
|
|
}
|
|
if ($SUB==899)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>campaign($campaign_id) callback listings LIVE for more than one week have been made INACTIVE\n";
|
|
}
|
|
}
|
|
$CBinactiveLINK = "<BR><a href=\"$PHP_SELF?ADD=81&SUB=89&campaign_id=$campaign_id\">Remove LIVE Callbacks older than one month for this campaign</a><BR><a href=\"$PHP_SELF?ADD=81&SUB=899&campaign_id=$campaign_id\">Remove LIVE Callbacks older than one week for this campaign</a><BR>";
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$CBquerySQLwhere = "and campaign_id='$campaign_id'";
|
|
|
|
echo "<br>CAMPANHA CALLBACK HOLD LISTINGS: $campaign_id\n";
|
|
$oldADD = "ADD=81&campaign_id=$campaign_id";
|
|
$ADD='82';
|
|
}
|
|
|
|
######################
|
|
# ADD=811 find all callbacks on hold within a List
|
|
######################
|
|
if ($ADD==811)
|
|
{
|
|
if ($LOGmodify_lists==1)
|
|
{
|
|
if ($SUB==89)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>list($list_id) callback listings LIVE for more than one month have been made INACTIVE\n";
|
|
}
|
|
if ($SUB==899)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>list($list_id) callback listings LIVE for more than one week have been made INACTIVE\n";
|
|
}
|
|
}
|
|
$CBinactiveLINK = "<BR><a href=\"$PHP_SELF?ADD=811&SUB=89&list_id=$list_id\">Remove LIVE Callbacks older than one month for this list</a><BR><a href=\"$PHP_SELF?ADD=811&SUB=899&list_id=$list_id\">Remove LIVE Callbacks older than one week for this list</a><BR>";
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$CBquerySQLwhere = "and list_id='$list_id'";
|
|
|
|
echo "<br>LIST CALLBACK HOLD LISTINGS: $list_id\n";
|
|
$oldADD = "ADD=811&list_id=$list_id";
|
|
$ADD='82';
|
|
}
|
|
|
|
######################
|
|
# ADD=8111 find all callbacks on hold within a user group
|
|
######################
|
|
if ($ADD==8111)
|
|
{
|
|
if ($LOGmodify_usergroups==1)
|
|
{
|
|
if ($SUB==89)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>user group($user_group) callback listings LIVE for more than one month have been made INACTIVE\n";
|
|
}
|
|
if ($SUB==899)
|
|
{
|
|
$stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
echo "<br>user group($user_group) callback listings LIVE for more than one week have been made INACTIVE\n";
|
|
}
|
|
}
|
|
$CBinactiveLINK = "<BR><a href=\"$PHP_SELF?ADD=8111&SUB=89&user_group=$user_group\">Remove LIVE Callbacks older than one month for this user group</a><BR><a href=\"$PHP_SELF?ADD=8111&SUB=899&user_group=$user_group\">Remove LIVE Callbacks older than one week for this user group</a><BR>";
|
|
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$CBquerySQLwhere = "and user_group='$user_group'";
|
|
|
|
echo "<br>GRUPO DE USUÁRIOS CALLBACK HOLD LISTINGS: $list_id\n";
|
|
$oldADD = "ADD=8111&user_group=$user_group";
|
|
$ADD='82';
|
|
}
|
|
|
|
######################
|
|
# ADD=82 display all callbacks on hold
|
|
######################
|
|
if ($ADD==82)
|
|
{
|
|
$USERlink='stage=USERIDDOWN';
|
|
$GROUPlink='stage=GROUPDOWN';
|
|
$ENDATElink='stage=ENDATEDOWN';
|
|
$SQLorder='order by ';
|
|
if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc,'; $USERlink='stage=USERIDUP';}
|
|
if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc,'; $NAMElink='stage=NAMEUP';}
|
|
if (eregi("ENDATEDOWN",$stage)) {$SQLorder='order by entry_time desc,'; $NÍVELlink='stage=NÍVELUP';}
|
|
|
|
$stmt="SELECT callback_id,lead_id,list_id,campaign_id,status,entry_time,callback_time,modify_date,user,recipient,comments,user_group from vicidial_callbacks where status IN('ACTIVE','LIVE') $CBquerySQLwhere $SQLorder recipient,status desc,callback_time";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$cb_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>\n";
|
|
echo "<td><font size=1 color=white>LEAD</td><td><font size=1 color=white>LIST</td>\n";
|
|
echo "<td><font size=1 color=white> CAMPANHA</td>\n";
|
|
echo "<td><a href=\"$PHP_SELF?$oldADD&$ENDATElink\"><font size=1 color=white><B>ENTRY DATA</B></a></td>\n";
|
|
echo "<td><font size=1 color=white>CALLBACK DATA</td>\n";
|
|
echo "<td><a href=\"$PHP_SELF?$oldADD&$USERlink\"><font size=1 color=white><B>USER</B></a></td>\n";
|
|
echo "<td><font size=1 color=white>RECIPIENT</td>\n";
|
|
echo "<td><font size=1 color=white>STATUS</td>\n";
|
|
echo "<td><a href=\"$PHP_SELF?$oldADD&$GROUPlink\"><font size=1 color=white><B>GROUP</B></a></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($cb_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor>";
|
|
echo "<td><font size=1><A HREF=\"admin_modify_lead.php?lead_id=$row[1]\" target=\"_blank\">$row[1]</A></td>";
|
|
echo "<td><font size=1><A HREF=\"$PHP_SELF?ADD=311&list_id=$row[2]\">$row[2]</A></td>";
|
|
echo "<td><font size=1><A HREF=\"$PHP_SELF?ADD=31&campaign_id=$row[3]\">$row[3]</A></td>";
|
|
echo "<td><font size=1>$row[5]</td>";
|
|
echo "<td><font size=1>$row[6]</td>";
|
|
echo "<td><font size=1><A HREF=\"$PHP_SELF?ADD=3&user=$row[8]\">$row[8]</A></td>";
|
|
echo "<td><font size=1>$row[9]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td><font size=1><A HREF=\"$PHP_SELF?ADD=311111&user_group=$row[11]\">$row[11]</A></td>";
|
|
echo "</tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
|
|
echo "$CBinactiveLINK";
|
|
}
|
|
|
|
|
|
|
|
######################################################################################################
|
|
######################################################################################################
|
|
####### 0 series, displays and searches
|
|
######################################################################################################
|
|
######################################################################################################
|
|
|
|
######################
|
|
# ADD=0 display all active users
|
|
######################
|
|
if ($ADD==0)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
echo "<br>LISTA DE USUÁRIOS: ";
|
|
if (ereg('display_all',$status))
|
|
{
|
|
$SQLstatus = '';
|
|
echo " <a href=\"$PHP_SELF?ADD=0\"><font size=1 color=black>mostrar somente usuários ativos</a>\n";
|
|
}
|
|
else
|
|
{
|
|
$SQLstatus = "and active='Y'";
|
|
echo " <a href=\"$PHP_SELF?ADD=0&status=display_all\"><font size=1 color=black>mostrar todos usuários</a>\n";
|
|
}
|
|
|
|
$USERlink='stage=USERIDDOWN';
|
|
$NAMElink='stage=NAMEDOWN';
|
|
$NÍVELlink='stage=NÍVELDOWN';
|
|
$GROUPlink='stage=GROUPDOWN';
|
|
$SQLorder='order by full_name';
|
|
if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';}
|
|
if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';}
|
|
if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';}
|
|
if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';}
|
|
if (eregi("NÍVELUP",$stage)) {$SQLorder='order by user_level asc'; $NÍVELlink='stage=NÍVELDOWN';}
|
|
if (eregi("NÍVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $NÍVELlink='stage=NÍVELUP';}
|
|
if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';}
|
|
if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';}
|
|
$stmt="SELECT user,full_name,user_level,user_group,active from vicidial_users where user_level <= $LOGuser_level $SQLstatus $SQLorder";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$people_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=0&status=$status&$USERlink\"><font size=1 color=white><B>ID DO USUÁRIO</B></a></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=0&status=$status&$NAMElink\"><font size=1 color=white><B>NOME COMPLETO</B></a></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=0&status=$status&$NÍVELlink\"><font size=1 color=white><B>NÍVEL</B></a></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=0&status=$status&$GROUPlink\"><font size=1 color=white><B>GROUP</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>ATIVO</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>LINKS</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($people_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><a href=\"$PHP_SELF?ADD=3&user=$row[0]\"><font size=1 color=black>$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td><font size=1><CENTER><a href=\"$PHP_SELF?ADD=3&user=$row[0]\">ALTERAR</a> | <a href=\"./user_stats.php?user=$row[0]\">ESTATÍSTICAS</a> | <a href=\"./user_status.php?user=$row[0]\">STATUS</a> | <a href=\"./AST_agent_time_sheet.php?agent=$row[0]\">TIME</a></CENTER></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=10 display all campaigns
|
|
######################
|
|
if ($ADD==10)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT campaign_id,campaign_name,active,dial_method,auto_dial_level,lead_order,dial_statuses from vicidial_campaigns order by campaign_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$campaigns_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE CAMPANHAS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID</B></td>";
|
|
echo "<td><font size=1 color=white><CENTER><B>NOME</B></CENTER></td>";
|
|
echo "<td><font size=1 color=white><B>ACTIVE </B></td>";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<td><font size=1 color=white><B>MÉTODO DE DISC. </B></td>";
|
|
echo "<td><font size=1 color=white><B> NÍVEL </B></td>";
|
|
echo "<td><font size=1 color=white><B>ORDEM DOS REG. </B></td>";
|
|
echo "<td><font size=1 color=white><B>STATUS DE DISC. </B></td>";
|
|
}
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($campaigns_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=34&campaign_id=$row[0]\">$row[0]</a> </td>";
|
|
echo "<td><font size=1>$row[1] </td>";
|
|
echo "<td><font size=1>$row[2] </td>";
|
|
if ($SSoutbound_autodial_active > 0)
|
|
{
|
|
echo "<td><font size=1>$row[3] </td>";
|
|
echo "<td><font size=1>$row[4] </td>";
|
|
echo "<td><font size=1>$row[5] </td>";
|
|
echo "<td><font size=1>$row[6]</td>";
|
|
}
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31&campaign_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=100 display all lists
|
|
######################
|
|
if ($ADD==100)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$LISTlink='stage=LISTIDDOWN';
|
|
$TALLYlink='stage=TALLYDOWN';
|
|
$ACTIVElink='stage=ACTIVEDOWN';
|
|
$CAMPANHAlink='stage=CAMPANHADOWN';
|
|
$CALLDATElink='stage=CALLDATEDOWN';
|
|
$SQLorder='order by list_id';
|
|
if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';}
|
|
if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';}
|
|
if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';}
|
|
if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';}
|
|
if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';}
|
|
if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';}
|
|
if (eregi("CAMPANHAUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPANHAlink='stage=CAMPANHADOWN';}
|
|
if (eregi("CAMPANHADOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPANHAlink='stage=CAMPANHAUP';}
|
|
if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
|
|
if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
|
|
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id,reset_time from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id group by list_id $SQLorder";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=100&$LISTlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID DA LISTA</B></a></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>NOME DA LISTA</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</B></TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>RTIME</B></TD>\n";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=100&$TALLYlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TOTAL DE REG.</B></a></TD>\n";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=100&$ACTIVElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ATIVO</B></a></TD>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=100&$CALLDATElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ÚLTIMA CHAMADA</B></a></TD>";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=100&$CAMPANHAlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>CAMPANHA</B></a></TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$lists_printed = '';
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[7]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> $row[6]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$lists_printed .= "'$row[0]',";
|
|
$o++;
|
|
}
|
|
|
|
$stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id,reset_time from vicidial_lists where list_id NOT IN($lists_printed'');";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$lists_to_print = mysql_num_rows($rslt);
|
|
$o=0;
|
|
while ($lists_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[7]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> $row[6]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=311&list_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
|
|
######################
|
|
# ADD=1000 display all inbound groups
|
|
######################
|
|
if ($ADD==1000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color from vicidial_inbound_groups order by group_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$ingroups_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE GRUPOS DE ENTRADA:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><font size=1 color=white>IN-GROUP</TD>";
|
|
echo "<TD><font size=1 color=white>NOME</TD>";
|
|
echo "<TD><font size=1 color=white>PRIORIDADE</TD>\n";
|
|
echo "<TD><font size=1 color=white>ATIVO</TD>";
|
|
echo "<TD><font size=1 color=white>TIME</TD>";
|
|
echo "<TD><font size=1 color=white>COLOR</TD>\n";
|
|
echo "<TD><font size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$o=0;
|
|
while ($ingroups_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td bgcolor=\"$row[5]\"><font size=1> </td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3111&group_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1300 display all inbound dids
|
|
######################
|
|
if ($ADD==1300)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT did_id,did_pattern,did_description,did_active,did_route from vicidial_inbound_dids order by did_pattern";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$dids_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>ENTRANTE DID LISTINGS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><font size=1 color=white>#</TD>";
|
|
echo "<TD><font size=1 color=white>DID</TD>";
|
|
echo "<TD><font size=1 color=white>DESCRIÇÃO</TD>\n";
|
|
echo "<TD><font size=1 color=white>ATIVO</TD>";
|
|
echo "<TD><font size=1 color=white>ROUTE</TD>";
|
|
echo "<TD><font size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$o=0;
|
|
while ($dids_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1500 display all call menus
|
|
######################
|
|
if ($ADD==1500)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT menu_id,menu_name,menu_prompt,menu_timeout from vicidial_call_menu order by menu_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$menus_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE MENUS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><font size=1 color=white>MENU ID</TD>";
|
|
echo "<TD><font size=1 color=white>NOME</TD>";
|
|
echo "<TD><font size=1 color=white>PROMPT</TD>\n";
|
|
echo "<TD><font size=1 color=white>TIMEOUT</TD>";
|
|
echo "<TD><font size=1 color=white>OPTIONS</TD>";
|
|
echo "<TD><font size=1 color=white>ALTERAR</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$o=0;
|
|
$menu_id = $MT;
|
|
|
|
while ($menus_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$menu_id[$o] = $row[0];
|
|
$menu_name[$o] = $row[1];
|
|
$menu_prompt[$o] = $row[2];
|
|
$menu_timeout[$o] = $row[3];
|
|
$o++;
|
|
}
|
|
|
|
$o=0;
|
|
while ($menus_to_print > $o)
|
|
{
|
|
$stmt="SELECT count(*) from vicidial_call_menu_options where menu_id=\"$menu_id[$o]\";";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3511&menu_id=$menu_id[$o]\">$menu_id[$o]</a></td>";
|
|
echo "<td><font size=1> $menu_name[$o]</td>";
|
|
echo "<td><font size=1> $menu_prompt[$o]</td>";
|
|
echo "<td><font size=1> $menu_timeout[$o]</td>";
|
|
echo "<td><font size=1> $row[0]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3511&menu_id=$menu_id[$o]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=10000 display all remote agents
|
|
######################
|
|
if ($ADD==10000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id from vicidial_remote_agents order by server_ip,campaign_id,user_start";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$remoteagents_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE AGENTES REMOTOS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>USER</B></td>";
|
|
echo "<td><font size=1 color=white><B>LINES</B></td>";
|
|
echo "<td><font size=1 color=white><B>SERVIDOR </B></td>";
|
|
echo "<td><font size=1 color=white><B>CONF-EXTEN </B></td>";
|
|
echo "<td><font size=1 color=white><B>STATUS </B></td>";
|
|
echo "<td><font size=1 color=white><B>CAMPANHA </B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($remoteagents_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111&remote_agent_id=$row[0]\">$row[1]</a></td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> $row[6]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=31111&remote_agent_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=100000 display all user groups
|
|
######################
|
|
if ($ADD==100000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT user_group,group_name,forced_timeclock_login from vicidial_user_groups order by user_group";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$usergroups_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>GRUPOS DE USUÁRIOS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>GRUPO DE USUÁRIOS</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO GRUPO</B></td>";
|
|
echo "<td><font size=1 color=white><B>FORÇAR PONTO </B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($usergroups_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311111&user_group=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=311111&user_group=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1000000 display all scripts
|
|
######################
|
|
if ($ADD==1000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT script_id,script_name,active from vicidial_scripts order by script_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$scripts_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE SCRIPTS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID DO SCRIPT</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO SCRIPT</B></td>";
|
|
echo "<td><font size=1 color=white><B>ACTIVE </B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($scripts_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111111&script_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=3111111&script_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=10000000 display all filters
|
|
######################
|
|
if ($ADD==10000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT lead_filter_id,lead_filter_name from vicidial_lead_filters order by lead_filter_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$filters_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>Listagem de Filtros de Registro:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>FILTER ID</B></td>";
|
|
echo "<td><font size=1 color=white><B>FILTER NAME</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($filters_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111&lead_filter_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=31111111&lead_filter_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=100000000 display all call times
|
|
######################
|
|
if ($ADD==100000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT call_time_id,call_time_name,ct_default_start,ct_default_stop from vicidial_call_times order by call_time_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$calltimes_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAGEM DE HORÁRIOS DE CHAMADA:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID DO HORÁRIO</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO HORÁRIO</B></td>";
|
|
echo "<td><font size=1 color=white><B>INÍCIO PADRÃO</B></td>";
|
|
echo "<td><font size=1 color=white><B>FIM PADRÃO</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($calltimes_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2] </td>";
|
|
echo "<td><font size=1> $row[3] </td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=1000000000 display all state call times
|
|
######################
|
|
if ($ADD==1000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,sct_default_start,sct_default_stop from vicidial_state_call_times order by state_call_time_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$statecalltimes_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAGEM DE HORÁRIOS DE CHAMADA POR ESTADO:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID DO HORÁRIO</B></td>";
|
|
echo "<td><font size=1 color=white><B>CALLTIME STATE</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO HORÁRIO</B></td>";
|
|
echo "<td><font size=1 color=white><B>INÍCIO PADRÃO</B></td>";
|
|
echo "<td><font size=1 color=white><B>FIM PADRÃO</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($statecalltimes_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111111111&call_time_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td><font size=1> $row[3] </td>";
|
|
echo "<td><font size=1> $row[4] </td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=3111111111&call_time_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=130000000 display all shifts
|
|
######################
|
|
if ($ADD==130000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays from vicidial_shifts order by shift_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$shifts_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE TURNOS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID DO TURNO</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO TURNO</B></td>";
|
|
echo "<td><font size=1 color=white><B>INÍCIO DO TURNO</B></td>";
|
|
echo "<td><font size=1 color=white><B>FIM DO TURNO</B></td>";
|
|
echo "<td><font size=1 color=white><B>SEMANAL</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($shifts_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=331111111&shift_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2] </td>";
|
|
echo "<td><font size=1> $row[3] </td>";
|
|
echo "<td><font size=1> $row[4] </td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=331111111&shift_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=10000000000 display all phones
|
|
######################
|
|
if ($ADD==10000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$EXTENlink='stage=EXTENDOWN';
|
|
$PROTOlink='stage=PROTODOWN';
|
|
$SERVERlink='stage=SERVERDOWN';
|
|
$STATUSlink='stage=STATUSDOWN';
|
|
$SQLorder='order by extension,server_ip';
|
|
if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';}
|
|
if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';}
|
|
if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';}
|
|
if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';}
|
|
if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';}
|
|
if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';}
|
|
if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';}
|
|
if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';}
|
|
$stmt="SELECT extension,protocol,server_ip,dialplan_number,voicemail_id,status,fullname,messages,old_messages from phones $SQLorder";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$phones_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE RAMAIS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=10000000000&$EXTENlink\"><font size=1 color=white><B>EXTEN</B></a></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=10000000000&$PROTOlink\"><font size=1 color=white><B>PROTO</B></a></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=10000000000&$SERVERlink\"><font size=1 color=white><B>SERVER</B></a></td>";
|
|
echo "<td colspan=2><font size=1 color=white><B>PLANO DE DISC.</B></td>";
|
|
echo "<td><a href=\"$PHP_SELF?ADD=10000000000&$STATUSlink\"><font size=1 color=white><B>STATUS</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>NOME</B></td>";
|
|
echo "<td colspan=2><font size=1 color=white><B>VMAIL</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>LINKS</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($phones_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><a href=\"$PHP_SELF?ADD=31111111111&extension=$row[0]&server_ip=$row[2]\"><font size=1 color=black>$row[0]</font></a></td>
|
|
<td><font size=1>$row[1]</td>
|
|
<td><font size=1>$row[2]</td>
|
|
<td><font size=1>$row[3]</td>
|
|
<td><font size=1>$row[4]</td>
|
|
<td><font size=1>$row[5]</td>
|
|
<td><font size=1>$row[6]</td>
|
|
<td><font size=1>$row[7]</td>
|
|
<td><font size=1>$row[8]</td>";
|
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=31111111111&extension=$row[0]&server_ip=$row[2]\">ALTERAR</a> | <a href=\"./phone_stats.php?extension=$row[0]&server_ip=$row[2]\">ESTATÍSTICAS</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=12000000000 display all phones alias
|
|
######################
|
|
if ($ADD==12000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT alias_id,alias_name,logins_list from phones_alias order by alias_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$phonealias_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAGEM DE ALIAS DE RAMAL:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white><B>ID DO ALIAS</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO ALIAS</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>LISTA DE LOGINS DE RAMAL</B></a></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($phonealias_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><a href=\"$PHP_SELF?ADD=32111111111&alias_id=$row[0]\"><font size=1 color=black>$row[0]</font></a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=32111111111&alias_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=13000000000 display all group alias
|
|
######################
|
|
if ($ADD==13000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active from groups_alias order by group_alias_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$phonealias_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAS DE ALIAS DE GRUPO:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white><B>ID DO ALIAS DE GRUPO</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>NOME DO ALIAS DE GRUPO</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>NÚMERO CID</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>NOME CID</B></a></td>";
|
|
echo "<td><font size=1 color=white><B>ATIVO</B></a></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($phonealias_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><a href=\"$PHP_SELF?ADD=33111111111&group_alias_id=$row[0]\"><font size=1 color=black>$row[0]</font></a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=33111111111&group_alias_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=100000000000 display all servers
|
|
######################
|
|
if ($ADD==100000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,local_gmt from servers order by server_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$servers_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE SERVIDORES:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>SERVIDOR ID</B></td>";
|
|
echo "<td><font size=1 color=white><B>NOME</B></td>";
|
|
echo "<td><font size=1 color=white><B>SERVIDOR IP</B></td>";
|
|
echo "<td><font size=1 color=white><B>ATIVO</B></td>";
|
|
echo "<td><font size=1 color=white><B>ASTERISK</B></td>";
|
|
echo "<td><font size=1 color=white><B>TRUNKS</B></td>";
|
|
echo "<td><font size=1 color=white><B>GMT</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=311111111111&server_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td><font size=1>$row[5]</td>";
|
|
echo "<td><font size=1>$row[6]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=311111111111&server_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=130000000000 display all conf templates
|
|
######################
|
|
if ($ADD==130000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT template_id,template_name from vicidial_conf_templates order by template_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$templates_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DAS TEMPLATES DE CONF:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID do Template</B></td>";
|
|
echo "<td><font size=1 color=white><B>Nome do Template</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($templates_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=331111111111&template_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=331111111111&template_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=140000000000 display all carriers
|
|
######################
|
|
if ($ADD==140000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT carrier_id,carrier_name,server_ip,protocol,registration_string,active from vicidial_server_carriers order by carrier_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$carriers_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTAS DAS OPERADORAS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>ID da Operadora</B></td>";
|
|
echo "<td><font size=1 color=white><B>Nome da Operadora</B></td>";
|
|
echo "<td><font size=1 color=white><B>IP do Servidor</B></td>";
|
|
echo "<td><font size=1 color=white><B>Protocol</B></td>";
|
|
echo "<td><font size=1 color=white><B>Registro</B></td>";
|
|
echo "<td><font size=1 color=white><B>Ativo</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($carriers_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=341111111111&carrier_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td><font size=1>$row[5]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=341111111111&carrier_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=150000000000 display all tts entries
|
|
######################
|
|
if ($ADD==150000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT tts_id,tts_name,active,tts_text from vicidial_tts_prompts order by tts_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$tts_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>TEXT-TO-SPEECH(TTS) LISTINGS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>TTS ID</B></td>";
|
|
echo "<td><font size=1 color=white><B>Nombre TTS</B></td>";
|
|
echo "<td><font size=1 color=white><B>Ativo</B></td>";
|
|
echo "<td><font size=1 color=white><B>TTS Texto</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($tts_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$row[3]=ereg_replace(";|<|>","",$row[3]);
|
|
while(strlen($row[3]) > 50) {$row[3] = substr("$row[3]", 0, -1);}
|
|
if(strlen($row[3]) > 47) {$row[3] = "$row[3]...";}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=351111111111&tts_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=351111111111&tts_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=160000000000 display all music on hold entries
|
|
######################
|
|
if ($ADD==160000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT moh_id,moh_name,active,random from vicidial_music_on_hold where remove='N' order by moh_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$moh_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>MUSIC-ON-HOLD(MOH) LISTINGS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>MOH ID</B></td>";
|
|
echo "<td><font size=1 color=white><B>MOH Name</B></td>";
|
|
echo "<td><font size=1 color=white><B>Ativo</B></td>";
|
|
echo "<td><font size=1 color=white><B>Orden aleatorio</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($moh_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$row[3]=ereg_replace(";|<|>","",$row[3]);
|
|
while(strlen($row[3]) > 50) {$row[3] = substr("$row[3]", 0, -1);}
|
|
if(strlen($row[3]) > 47) {$row[3] = "$row[3]...";}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=361111111111&moh_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=361111111111&moh_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=170000000000 display all voicemail entries
|
|
######################
|
|
if ($ADD==170000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT voicemail_id,fullname,active,messages,old_messages,delete_vm_after_email from vicidial_voicemail order by voicemail_id";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$vm_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>CAJAS DE CORREO DE VOZ:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>VOICEMAIL ID</B></td>";
|
|
echo "<td><font size=1 color=white><B>Name</B></td>";
|
|
echo "<td><font size=1 color=white><B>Ativo</B></td>";
|
|
echo "<td><font size=1 color=white><B>Mensagens Novas</B></td>";
|
|
echo "<td><font size=1 color=white><B>Mensagens Antigas</B></td>";
|
|
echo "<td><font size=1 color=white><B>Delete</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($vm_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=371111111111&voicemail_id=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td><font size=1>$row[3]</td>";
|
|
echo "<td><font size=1>$row[4]</td>";
|
|
echo "<td><font size=1>$row[5]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=371111111111&voicemail_id=$row[0]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=1000000000000 display all conferences
|
|
######################
|
|
if ($ADD==1000000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT conf_exten,server_ip,extension from conferences order by conf_exten";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$conferences_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LISTA DE CONFERÊNCIAS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>CONFERENCE</B></td>";
|
|
echo "<td><font size=1 color=white><B>SERVIDOR IP</B></td>";
|
|
echo "<td><font size=1 color=white><B>EXTENSÃO</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($conferences_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3111111111111&conf_exten=$row[0]&server_ip=$row[1]\">$row[0]</a></td>";
|
|
echo "<td><font size=1>$row[1]</td>";
|
|
echo "<td><font size=1>$row[2]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=3111111111111&conf_exten=$row[0]&server_ip=$row[1]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
######################
|
|
# ADD=10000000000000 display all vicidial conferences
|
|
######################
|
|
if ($ADD==10000000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT conf_exten,server_ip,extension from vicidial_conferences order by conf_exten";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$vicidialconf_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>VICIDIAL LISTA DE CONFERÊNCIAS:\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<tr bgcolor=black>";
|
|
echo "<td><font size=1 color=white align=left><B>CONFERENCE</B></td>";
|
|
echo "<td><font size=1 color=white><B>SERVIDOR IP</B></td>";
|
|
echo "<td><font size=1 color=white><B>EXTENSÃO</B></td>";
|
|
echo "<td align=center><font size=1 color=white><B>ALTERAR</B></td></tr>\n";
|
|
|
|
$o=0;
|
|
while ($vicidialconf_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=31111111111111&conf_exten=$row[0]&server_ip=$row[1]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> $row[2]</td>";
|
|
echo "<td align=center><font size=1><a href=\"$PHP_SELF?ADD=31111111111111&conf_exten=$row[0]&server_ip=$row[1]\">ALTERAR</a></td></tr>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE></center>\n";
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
# ADD=700000000000000 view all activity in the admin log
|
|
######################
|
|
|
|
if ($ADD==700000000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
if ($stage > 9999)
|
|
{
|
|
$next_limit = ($stage + 10000);
|
|
$limitSQL = "10000 offset $stage";
|
|
}
|
|
else
|
|
{
|
|
$next_limit = "10000";
|
|
$limitSQL = "10000";
|
|
}
|
|
|
|
$stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code from vicidial_admin_log order by event_date desc limit $limitSQL;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$logs_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LOG DE ALT. ADMIN: (Últimos 10000 registros)\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DATE TIME</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>USER</B></TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>IP</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>SECTION</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TYPE</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>RECORD ID</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>GOTO</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$logs_printed = '';
|
|
$o=0;
|
|
while ($logs_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
if (eregi("USER|AGENT",$row[4])) {$record_link = "ADD=3&user=$row[6]";}
|
|
if (eregi('CAMPANHA',$row[4])) {$record_link = "ADD=31&campaign_id=$row[6]";}
|
|
if (eregi('LIST',$row[4])) {$record_link = "ADD=311&list_id=$row[6]";}
|
|
if (eregi('SCRIPT',$row[4])) {$record_link = "ADD=3111111&script_id=$row[6]";}
|
|
if (eregi('FILTER',$row[4])) {$record_link = "ADD=31111111&lead_filter_id=$row[6]";}
|
|
if (eregi('INGROUP',$row[4])) {$record_link = "ADD=3111&group_id=$row[6]";}
|
|
if (eregi('DID',$row[4])) {$record_link = "ADD=3311&did_id=$row[6]";}
|
|
if (eregi('USERGROUP',$row[4])) {$record_link = "ADD=311111&user_group=$row[6]";}
|
|
if (eregi('REMOTEAGENT',$row[4])) {$record_link = "ADD=31111&remote_agent_id=$row[6]";}
|
|
if (eregi('PHONE',$row[4])) {$record_link = "ADD=10000000000";}
|
|
if (eregi('CALLTIME',$row[4])) {$record_link = "ADD=311111111&call_time_id=$row[6]";}
|
|
if (eregi('SHIFT',$row[4])) {$record_link = "ADD=331111111&shift_id=$row[6]";}
|
|
if (eregi('CONFTEMPLATE',$row[4])) {$record_link = "ADD=331111111111&template_id=$row[6]";}
|
|
if (eregi('CARRIER',$row[4])) {$record_link = "ADD=341111111111&carrier_id=$row[6]";}
|
|
if (eregi('SERVER',$row[4])) {$record_link = "ADD=311111111111&server_id=$row[6]";}
|
|
if (eregi('CONFERENCE',$row[4])) {$record_link = "ADD=1000000000000";}
|
|
if (eregi('SYSTEM',$row[4])) {$record_link = "ADD=311111111111111";}
|
|
if (eregi('CATEGOR',$row[4])) {$record_link = "ADD=331111111111111";}
|
|
if (eregi('GROUPALIAS',$row[4])) {$record_link = "ADD=33111111111&group_alias_id=$row[6]";}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=730000000000000&stage=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?ADD=710000000000000&stage=$row[2]\">$row[2]</a></td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?ADD=720000000000000&category=$row[4]&stage=$row[6]\">$row[6]</a></td>";
|
|
echo "<td><font size=1> $row[7]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?$record_link\">GOTO</a></td>";
|
|
echo "</tr>\n";
|
|
$logs_printed .= "'$row[0]',";
|
|
$o++;
|
|
}
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "<a href=\"$PHP_SELF?ADD=700000000000000&stage=$next_limit\">NEXT</a>\n";
|
|
echo "</center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=710000000000000 view all activity in the admin log made by one user
|
|
######################
|
|
|
|
if ($ADD==710000000000000)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT full_name from vicidial_users where user='$stage';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$names_to_print = mysql_num_rows($rslt);
|
|
if ($names_to_print > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$user_name = $row[0];
|
|
}
|
|
|
|
$stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code from vicidial_admin_log where user='$stage' order by event_date desc limit 10000;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$logs_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LOG DE ALT. ADMIN: Alterado por $stage - $user_name\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DATE TIME</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>USER</B></TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>IP</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>SECTION</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TYPE</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>RECORD ID</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>GOTO</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$logs_printed = '';
|
|
$o=0;
|
|
while ($logs_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
if (eregi("USER|AGENT",$row[4])) {$record_link = "ADD=3&user=$row[6]";}
|
|
if (eregi('CAMPANHA',$row[4])) {$record_link = "ADD=31&campaign_id=$row[6]";}
|
|
if (eregi('LIST',$row[4])) {$record_link = "ADD=311&list_id=$row[6]";}
|
|
if (eregi('SCRIPT',$row[4])) {$record_link = "ADD=3111111&script_id=$row[6]";}
|
|
if (eregi('FILTER',$row[4])) {$record_link = "ADD=31111111&lead_filter_id=$row[6]";}
|
|
if (eregi('INGROUP',$row[4])) {$record_link = "ADD=3111&group_id=$row[6]";}
|
|
if (eregi('DID',$row[4])) {$record_link = "ADD=3311&did_id=$row[6]";}
|
|
if (eregi('USERGROUP',$row[4])) {$record_link = "ADD=311111&user_group=$row[6]";}
|
|
if (eregi('REMOTEAGENT',$row[4])) {$record_link = "ADD=31111&remote_agent_id=$row[6]";}
|
|
if (eregi('PHONE',$row[4])) {$record_link = "ADD=10000000000";}
|
|
if (eregi('CALLTIME',$row[4])) {$record_link = "ADD=311111111&call_time_id=$row[6]";}
|
|
if (eregi('SHIFT',$row[4])) {$record_link = "ADD=331111111&shift_id=$row[6]";}
|
|
if (eregi('CONFTEMPLATE',$row[4])) {$record_link = "ADD=331111111111&template_id=$row[6]";}
|
|
if (eregi('CARRIER',$row[4])) {$record_link = "ADD=341111111111&carrier_id=$row[6]";}
|
|
if (eregi('SERVER',$row[4])) {$record_link = "ADD=311111111111&server_id=$row[6]";}
|
|
if (eregi('CONFERENCE',$row[4])) {$record_link = "ADD=1000000000000";}
|
|
if (eregi('SYSTEM',$row[4])) {$record_link = "ADD=311111111111111";}
|
|
if (eregi('CATEGOR',$row[4])) {$record_link = "ADD=331111111111111";}
|
|
if (eregi('GROUPALIAS',$row[4])) {$record_link = "ADD=33111111111&group_alias_id=$row[6]";}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=730000000000000&stage=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?ADD=710000000000000&stage=$row[2]\">$row[2]</a></td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?ADD=720000000000000&category=$row[4]&stage=$row[6]\">$row[6]</a></td>";
|
|
echo "<td><font size=1> $row[7]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?$record_link\">GOTO</a></td>";
|
|
echo "</tr>\n";
|
|
$logs_printed .= "'$row[0]',";
|
|
$o++;
|
|
}
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "\n";
|
|
echo "</center>\n";
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=720000000000000 view all activity in the admin log made to one section/value
|
|
######################
|
|
|
|
if ($ADD==720000000000000)
|
|
{
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code from vicidial_admin_log where event_section='$category' and record_id='$stage' order by event_date desc limit 10000;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$logs_to_print = mysql_num_rows($rslt);
|
|
|
|
echo "<br>LOG DE ALT. ADMIN: Registros de Seção - $category - $stage\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
|
echo "<TR BGCOLOR=BLACK>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ID</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DATE TIME</B></TD>";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>USER</B></TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>IP</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>SECTION</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>TYPE</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>RECORD ID</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIÇÃO</TD>\n";
|
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>GOTO</TD>\n";
|
|
echo "</TR>\n";
|
|
|
|
$logs_printed = '';
|
|
$o=0;
|
|
while ($logs_to_print > $o)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
|
|
if (eregi("USER|AGENT",$row[4])) {$record_link = "ADD=3&user=$row[6]";}
|
|
if (eregi('CAMPANHA',$row[4])) {$record_link = "ADD=31&campaign_id=$row[6]";}
|
|
if (eregi('LIST',$row[4])) {$record_link = "ADD=311&list_id=$row[6]";}
|
|
if (eregi('SCRIPT',$row[4])) {$record_link = "ADD=3111111&script_id=$row[6]";}
|
|
if (eregi('FILTER',$row[4])) {$record_link = "ADD=31111111&lead_filter_id=$row[6]";}
|
|
if (eregi('INGROUP',$row[4])) {$record_link = "ADD=3111&group_id=$row[6]";}
|
|
if (eregi('DID',$row[4])) {$record_link = "ADD=3311&did_id=$row[6]";}
|
|
if (eregi('USERGROUP',$row[4])) {$record_link = "ADD=311111&user_group=$row[6]";}
|
|
if (eregi('REMOTEAGENT',$row[4])) {$record_link = "ADD=31111&remote_agent_id=$row[6]";}
|
|
if (eregi('PHONE',$row[4])) {$record_link = "ADD=10000000000";}
|
|
if (eregi('CALLTIME',$row[4])) {$record_link = "ADD=311111111&call_time_id=$row[6]";}
|
|
if (eregi('SHIFT',$row[4])) {$record_link = "ADD=331111111&shift_id=$row[6]";}
|
|
if (eregi('CONFTEMPLATE',$row[4])) {$record_link = "ADD=331111111111&template_id=$row[6]";}
|
|
if (eregi('CARRIER',$row[4])) {$record_link = "ADD=341111111111&carrier_id=$row[6]";}
|
|
if (eregi('SERVER',$row[4])) {$record_link = "ADD=311111111111&server_id=$row[6]";}
|
|
if (eregi('CONFERENCE',$row[4])) {$record_link = "ADD=1000000000000";}
|
|
if (eregi('SYSTEM',$row[4])) {$record_link = "ADD=311111111111111";}
|
|
if (eregi('CATEGOR',$row[4])) {$record_link = "ADD=331111111111111";}
|
|
if (eregi('GROUPALIAS',$row[4])) {$record_link = "ADD=33111111111&group_alias_id=$row[6]";}
|
|
|
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
|
else
|
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=730000000000000&stage=$row[0]\">$row[0]</a></td>";
|
|
echo "<td><font size=1> $row[1]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?ADD=710000000000000&stage=$row[2]\">$row[2]</a></td>";
|
|
echo "<td><font size=1> $row[3]</td>";
|
|
echo "<td><font size=1> $row[4]</td>";
|
|
echo "<td><font size=1> $row[5]</td>";
|
|
echo "<td><font size=1> $row[6]</td>";
|
|
echo "<td><font size=1> $row[7]</td>";
|
|
echo "<td><font size=1> <a href=\"$PHP_SELF?$record_link\">GOTO</a></td>";
|
|
echo "</tr>\n";
|
|
$logs_printed .= "'$row[0]',";
|
|
$o++;
|
|
}
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "\n";
|
|
echo "</center>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=730000000000000 detail view of one admin log entry
|
|
######################
|
|
|
|
if ($ADD==730000000000000)
|
|
{
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="SELECT admin_log_id,event_date,val.user,ip_address,event_section,event_type,record_id,event_code,event_notes,event_sql,full_name from vicidial_admin_log val, vicidial_users vu where admin_log_id='$stage' and val.user=vu.user;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$logs_to_print = mysql_num_rows($rslt);
|
|
|
|
if ($logs_to_print > 0)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
echo "<br>LOG DE ALT. ADMIN: Detalhes do Reg. - $stage<BR><BR>\n";
|
|
echo "<center><TABLE width=$section_width cellspacing=5 cellpadding=0>\n";
|
|
echo "<TR>";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>ID: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[0]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>DATE TIME: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[1]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>USER: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[2] - $row[10]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>IP: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[3]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>SECTION: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[4]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>TYPE: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[5]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>RECORD ID: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=2>$row[6]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>DESCRIPTION: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=1>$row[7]</TD>";
|
|
echo "</TR><TR>\n";
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>NOTES: </B></TD>";
|
|
echo "<TD ALIGN=LEFT><FONT FACE=\"Arial,Helvetica\" size=1>$row[8]</TD>";
|
|
echo "</TR><TR>\n";
|
|
$row[9] = eregi_replace("',","' ,",$row[9]);
|
|
$row[9] = preg_replace("/\|/","<BR>",$row[9]);
|
|
echo "<TD ALIGN=RIGHT><B><FONT FACE=\"Arial,Helvetica\" size=2>SQL: </B></TD>";
|
|
echo "<TD ALIGN=LEFT width=700><p style=\"width: 700; text-wrap: normal; word-wrap: break-word\"><FONT FACE=\"Arial,Helvetica\" size=1>$row[9]</TD>";
|
|
echo "</TR>\n";
|
|
echo "</TABLE><BR><BR>\n";
|
|
echo "\n";
|
|
echo "</center>\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
######################
|
|
# ADD=999999 display reports section
|
|
######################
|
|
if ($ADD==999999)
|
|
{
|
|
if ($LOGview_reports==1)
|
|
{
|
|
echo "<TABLE><TR><TD>\n";
|
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
|
|
|
$stmt="select server_id,server_description,server_ip,active,sysload,channels_total,cpu_idle_percent,disk_usage from servers order by server_id;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
if ($DB) {echo "$stmt\n";}
|
|
$servers_to_print = mysql_num_rows($rslt);
|
|
$i=0;
|
|
while ($i < $servers_to_print)
|
|
{
|
|
$row=mysql_fetch_row($rslt);
|
|
$server_id[$i] = $row[0];
|
|
$server_description[$i] = $row[1];
|
|
$server_ip[$i] = $row[2];
|
|
$active[$i] = $row[3];
|
|
$sysload[$i] = $row[4];
|
|
$channels_total[$i] = $row[5];
|
|
$cpu_idle_percent[$i] = $row[6];
|
|
$disk_usage[$i] = $row[7];
|
|
$i++;
|
|
}
|
|
|
|
$stmt="SELECT queuemetrics_url,vtiger_url from system_settings;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$queuemetrics_url_LU = $row[0];
|
|
$vtiger_url_LU = $row[1];
|
|
|
|
$stmt="SELECT count(*) from vicidial_list_update_log;";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$list_update_count = $row[0];
|
|
?>
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
|
<TITLE>Estatísticas do Servidor e Relatórios</TITLE></HEAD><BODY BGCOLOR=WHITE>
|
|
<FONT SIZE=4><B>Estatísticas do Servidor e Relatórios</B></FONT><BR><BR>
|
|
<TABLE Border=0 CELLPADDING=5 CELLSPACING=0><TR><TD VALIGN=TOP>
|
|
|
|
</TD><TD VALIGN=TOP>
|
|
<B>Tempo Real Relatórios</B><BR>
|
|
<UL>
|
|
<LI><a href="AST_timeonVDADall.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Tempo Real Main Report</a></FONT>
|
|
<!-- <BR> Tempo Real SIP: <a href="AST_timeonVDADall.php?SIPmonitorLINK=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Listen</a></FONT> - <a href="AST_timeonVDADall.php?SIPmonitorLINK=2"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Barge</a></FONT>
|
|
<BR> Tempo Real IAX: <a href="AST_timeonVDADall.php?IAXmonitorLINK=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Listen</a></FONT> - <a href="AST_timeonVDADall.php?IAXmonitorLINK=2"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Barge</a></FONT><BR><BR> -->
|
|
<LI><a href="AST_timeonVDADallSUMMARY.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Tempo Real Campanha Summary</a></FONT>
|
|
</UL><BR>
|
|
<B>Inbound and Outbound Calling Relatórios</B><BR>
|
|
<UL>
|
|
<LI><a href="AST_CLOSERstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Inbound Report</a></FONT>
|
|
<LI><a href="AST_CLOSER_service_level.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Inbound Service Level Report</a></FONT>
|
|
<LI><a href="AST_CLOSERsummary_hourly.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Resumen horario de entrada Informe</a></FONT>
|
|
<LI><a href="AST_DIDstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Inbound DID Report</a></FONT>
|
|
<LI><a href="AST_IVRstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Inbound IVR Report</a></FONT>
|
|
<LI><a href="AST_VDADstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Outbound Calling Report</a></FONT>
|
|
<LI><a href="AST_SAINTEsummary_interval.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Outbound Summary Interval Report</a></FONT>
|
|
|
|
<LI><a href="fcstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Fronter - Closer Report</a></FONT>
|
|
<!-- <LI><a href="vicidial_sales_viewer.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENTE SPREADSHEET PERFORMANCE</a></FONT> -->
|
|
<?php
|
|
if ($LOGexport_reports >= 1)
|
|
{
|
|
echo "<LI><a href=\"call_report_export.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>Exportar Relatórios de Chamadas</a></FONT>\n";
|
|
}
|
|
?>
|
|
</UL>
|
|
|
|
</TD><TD VALIGN=TOP>
|
|
|
|
</TD><TD VALIGN=TOP>
|
|
<B>Agent Relatórios</B><BR>
|
|
<UL>
|
|
<LI><a href="AST_agent_time_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Agente Tiempo Detalle</a></FONT>
|
|
<LI><a href="AST_agent_status_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Agent Status Detalhes</a></FONT>
|
|
<LI><a href="AST_agent_performance_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Agent Performance Detalhes</a></FONT>
|
|
<LI><a href="AST_agent_days_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Single Agent Daily</a></FONT>
|
|
</UL><BR>
|
|
<B>Time Clock Relatórios</B><BR>
|
|
<UL>
|
|
<LI><a href="timeclock_report.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>UsuárioRelógio Ponto Report</a></FONT>
|
|
<LI><a href="timeclock_status.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Grupo do UsuárioRelógio Ponto Status Report</a></FONT>
|
|
<LI><a href="AST_agent_timeclock_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>UsuarioRelógio Ponto Detalle Informe</a></FONT>
|
|
</UL><BR>
|
|
<B>Other Relatórios and Links</B><BR>
|
|
<UL>
|
|
<LI><a href="AST_server_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>Server Perforrmance Report</a></FONT>
|
|
<?php
|
|
if ($LOGuser_level >= 9)
|
|
{
|
|
echo "<LI><a href=\"$PHP_SELF?ADD=700000000000000\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>Administration Change Log</a></FONT>\n";
|
|
}
|
|
if ($SSenable_queuemetrics_logging > 0)
|
|
{
|
|
echo "<LI><a href=\"$queuemetrics_url_LU\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>QueueMetrics Relatórios</a></FONT>\n";
|
|
}
|
|
if ($SSenable_vtiger_integration > 0)
|
|
{
|
|
echo "<LI><a href=\"$vtiger_url_LU\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>VtigerCRM Home</a></FONT>\n";
|
|
}
|
|
if ($list_update_count > 0)
|
|
{
|
|
echo "<LI><a href=\"./AST_LIST_UPDATEstats.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>List Update Stats</a></FONT>\n";
|
|
}
|
|
?>
|
|
</UL>
|
|
</TD></TR></TABLE>
|
|
|
|
<?
|
|
if (file_exists('custom_report_links.html'))
|
|
{
|
|
readfile('custom_report_links.html');
|
|
}
|
|
?>
|
|
<PRE><TABLE Border=1 CELLPADDING=2 cellspacing=0>
|
|
<TR><TD>SERVER</TD><TD>DESCRIÇÃO</TD><TD>IP</TD><TD>ACT</TD><TD>LOAD</TD><TD>CHAN</TD><TD>DISK</TD><TD>SAINTE</TD><TD>ENTRANTE</TD></TR>
|
|
<?php
|
|
|
|
$o=0;
|
|
while ($servers_to_print > $o)
|
|
{
|
|
$cpu = (100 - $cpu_idle_percent[$o]);
|
|
$disk = '';
|
|
$disk_ary = explode('|',$disk_usage[$o]);
|
|
$disk_ary_ct = count($disk_ary);
|
|
$k=0;
|
|
while ($k < $disk_ary_ct)
|
|
{
|
|
$disk_ary[$k] = preg_replace("/^\d* /","",$disk_ary[$k]);
|
|
if ($k<1) {$disk = "$disk_ary[$k]";}
|
|
else
|
|
{
|
|
if ($disk_ary[$k] > $disk) {$disk = "$disk_ary[$k]";}
|
|
}
|
|
$k++;
|
|
}
|
|
$disk = "$disk%";
|
|
echo "<TR>\n";
|
|
echo "<TD><a href=\"$PHP_SELF?ADD=311111111111&server_id=$server_id[$o]\">$server_id[$o]</a></TD>\n";
|
|
echo "<TD>$server_description[$o]</TD>\n";
|
|
echo "<TD>$server_ip[$o]</TD>\n";
|
|
echo "<TD>$active[$o]</TD>\n";
|
|
echo "<TD>$sysload[$o] - $cpu%</TD>\n";
|
|
echo "<TD>$channels_total[$o]</TD>\n";
|
|
echo "<TD ALIGN=RIGHT>$disk</TD>\n";
|
|
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
|
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]&closer_display=1\">LINK</a></TD>\n";
|
|
echo "</TR>\n";
|
|
$o++;
|
|
}
|
|
|
|
echo "</TABLE>\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Você não tem permissão para ver esta página\n";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
|
|
echo "</TD></TR></TABLE></center>\n";
|
|
echo "</TD></TR></TABLE></center>\n";
|
|
|
|
$ENDtime = date("U");
|
|
|
|
$RUNtime = ($ENDtime - $STARTtime);
|
|
|
|
echo "</TD></TR>\n";
|
|
echo "<TR><TD BGCOLOR=#015B91 ALIGN=CENTER>\n";
|
|
echo "<font size=0 color=white><br><br><!-- RUNTIME: $RUNtime seconds<BR> -->";
|
|
echo "VERSÃO: $admin_version<BR>";
|
|
echo "BUILD: $build</font>\n";
|
|
|
|
?>
|
|
|
|
</TD><TD BGCOLOR=#D9E6FE>
|
|
</TD></TR><TABLE>
|
|
</body>
|
|
</html>
|
|
|
|
<?php
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
##### CALCULATE DIALABLE LEADS #####
|
|
function dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL)
|
|
{
|
|
##### BEGIN calculate what gmt_offset_now values are within the allowed local_call_time setting ###
|
|
if (isset($camp_lists))
|
|
{
|
|
if (strlen($camp_lists)>1)
|
|
{
|
|
if (strlen($dial_statuses)>2)
|
|
{
|
|
$g=0;
|
|
$p='13';
|
|
$GMT_gmt[0] = '';
|
|
$GMT_hour[0] = '';
|
|
$GMT_day[0] = '';
|
|
while ($p > -13)
|
|
{
|
|
$pzone=3600 * $p;
|
|
$pmin=(gmdate("i", time() + $pzone));
|
|
$phour=( (gmdate("G", time() + $pzone)) * 100);
|
|
$pday=gmdate("w", time() + $pzone);
|
|
$tz = sprintf("%.2f", $p);
|
|
$GMT_gmt[$g] = "$tz";
|
|
$GMT_day[$g] = "$pday";
|
|
$GMT_hour[$g] = ($phour + $pmin);
|
|
$p = ($p - 0.25);
|
|
$g++;
|
|
}
|
|
|
|
$stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times FROM vicidial_call_times where call_time_id='$local_call_time';";
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$Gct_default_start = "$rowx[3]";
|
|
$Gct_default_stop = "$rowx[4]";
|
|
$Gct_sunday_start = "$rowx[5]";
|
|
$Gct_sunday_stop = "$rowx[6]";
|
|
$Gct_monday_start = "$rowx[7]";
|
|
$Gct_monday_stop = "$rowx[8]";
|
|
$Gct_tuesday_start = "$rowx[9]";
|
|
$Gct_tuesday_stop = "$rowx[10]";
|
|
$Gct_wednesday_start = "$rowx[11]";
|
|
$Gct_wednesday_stop = "$rowx[12]";
|
|
$Gct_thursday_start = "$rowx[13]";
|
|
$Gct_thursday_stop = "$rowx[14]";
|
|
$Gct_friday_start = "$rowx[15]";
|
|
$Gct_friday_stop = "$rowx[16]";
|
|
$Gct_saturday_start = "$rowx[17]";
|
|
$Gct_saturday_stop = "$rowx[18]";
|
|
$Gct_state_call_times = "$rowx[19]";
|
|
|
|
$ct_states = '';
|
|
$ct_state_gmt_SQL = '';
|
|
$ct_srs=0;
|
|
$b=0;
|
|
if (strlen($Gct_state_call_times)>2)
|
|
{
|
|
$state_rules = explode('|',$Gct_state_call_times);
|
|
$ct_srs = ((count($state_rules)) - 2);
|
|
}
|
|
while($ct_srs >= $b)
|
|
{
|
|
if (strlen($state_rules[$b])>1)
|
|
{
|
|
$stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,state_call_time_comments,sct_default_start,sct_default_stop,sct_sunday_start,sct_sunday_stop,sct_monday_start,sct_monday_stop,sct_tuesday_start,sct_tuesday_stop,sct_wednesday_start,sct_wednesday_stop,sct_thursday_start,sct_thursday_stop,sct_friday_start,sct_friday_stop,sct_saturday_start,sct_saturday_stop from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';";
|
|
$rslt=mysql_query($stmt, $link);
|
|
$row=mysql_fetch_row($rslt);
|
|
$Gstate_call_time_id = "$row[0]";
|
|
$Gstate_call_time_state = "$row[1]";
|
|
$Gsct_default_start = "$row[4]";
|
|
$Gsct_default_stop = "$row[5]";
|
|
$Gsct_sunday_start = "$row[6]";
|
|
$Gsct_sunday_stop = "$row[7]";
|
|
$Gsct_monday_start = "$row[8]";
|
|
$Gsct_monday_stop = "$row[9]";
|
|
$Gsct_tuesday_start = "$row[10]";
|
|
$Gsct_tuesday_stop = "$row[11]";
|
|
$Gsct_wednesday_start = "$row[12]";
|
|
$Gsct_wednesday_stop = "$row[13]";
|
|
$Gsct_thursday_start = "$row[14]";
|
|
$Gsct_thursday_stop = "$row[15]";
|
|
$Gsct_friday_start = "$row[16]";
|
|
$Gsct_friday_stop = "$row[17]";
|
|
$Gsct_saturday_start = "$row[18]";
|
|
$Gsct_saturday_stop = "$row[19]";
|
|
|
|
$ct_states .="'$Gstate_call_time_state',";
|
|
|
|
$r=0;
|
|
$state_gmt='';
|
|
while($r < $g)
|
|
{
|
|
if ($GMT_day[$r]==0) #### Domingo horário local
|
|
{
|
|
if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==1) #### Segunda horário local
|
|
{
|
|
if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==2) #### Terça horário local
|
|
{
|
|
if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==3) #### Quarta horário local
|
|
{
|
|
if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==4) #### Quinta horário local
|
|
{
|
|
if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==5) #### Sexta horário local
|
|
{
|
|
if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==6) #### Sábado horário local
|
|
{
|
|
if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) )
|
|
{$state_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
$r++;
|
|
}
|
|
$state_gmt = "$state_gmt'99'";
|
|
$ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) ";
|
|
}
|
|
|
|
$b++;
|
|
}
|
|
if (strlen($ct_states)>2)
|
|
{
|
|
$ct_states = eregi_replace(",$",'',$ct_states);
|
|
$ct_statesSQL = "and state NOT IN($ct_states)";
|
|
}
|
|
else
|
|
{
|
|
$ct_statesSQL = "";
|
|
}
|
|
|
|
$r=0;
|
|
$default_gmt='';
|
|
while($r < $g)
|
|
{
|
|
if ($GMT_day[$r]==0) #### Domingo horário local
|
|
{
|
|
if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==1) #### Segunda horário local
|
|
{
|
|
if (($Gct_monday_start==0) and ($Gct_monday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==2) #### Terça horário local
|
|
{
|
|
if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==3) #### Quarta horário local
|
|
{
|
|
if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==4) #### Quinta horário local
|
|
{
|
|
if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==5) #### Sexta horário local
|
|
{
|
|
if (($Gct_friday_start==0) and ($Gct_friday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
if ($GMT_day[$r]==6) #### Sábado horário local
|
|
{
|
|
if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0))
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
else
|
|
{
|
|
if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) )
|
|
{$default_gmt.="'$GMT_gmt[$r]',";}
|
|
}
|
|
}
|
|
$r++;
|
|
}
|
|
|
|
$default_gmt = "$default_gmt'99'";
|
|
$all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL";
|
|
|
|
$dial_statuses = preg_replace("/ -$/","",$dial_statuses);
|
|
$Dstatuses = explode(" ", $dial_statuses);
|
|
$Ds_to_print = (count($Dstatuses) - 0);
|
|
$Dsql = '';
|
|
$o=0;
|
|
while ($Ds_to_print > $o)
|
|
{
|
|
$o++;
|
|
$Dsql .= "'$Dstatuses[$o]',";
|
|
}
|
|
$Dsql = preg_replace("/,$/","",$Dsql);
|
|
if (strlen($Dsql) < 2) {$Dsql = "''";}
|
|
|
|
$DLTsql='';
|
|
if ($drop_lockout_time > 0)
|
|
{
|
|
$DLseconds = ($drop_lockout_time * 3600);
|
|
$DLseconds = floor($DLseconds);
|
|
$DLseconds = intval("$DLseconds");
|
|
$DLTsql = "and ( ( (status IN('DROP','XDROP')) and (last_local_call_time < CONCAT(DATE_ADD(NOW(), INTERVAL -$DLseconds SECOND),' ',CURTIME()) ) ) or (status NOT IN('DROP','XDROP')) )";
|
|
}
|
|
|
|
$stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) and list_id IN($camp_lists) and ($all_gmtSQL) $DLTsql $fSQL";
|
|
#$DB=1;
|
|
if ($DB) {echo "$stmt\n";}
|
|
$rslt=mysql_query($stmt, $link);
|
|
$rslt_rows = mysql_num_rows($rslt);
|
|
if ($rslt_rows)
|
|
{
|
|
$rowx=mysql_fetch_row($rslt);
|
|
$active_leads = "$rowx[0]";
|
|
}
|
|
else {$active_leads = '0';}
|
|
|
|
echo "|$DB|\n";
|
|
echo "Esta campanha tem$active_leads registros para serem discados nessas listas\n";
|
|
}
|
|
else
|
|
{
|
|
echo "nenhum status de discagem selecionado para essa campanha\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "nenhuma lista ativa para esta campanha\n";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "nenhuma lista ativa para esta campanha\n";
|
|
}
|
|
##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ###
|
|
}
|
|
?>
|