LICENSE: AGPLv2 # $startMS = microtime(); $php_script='admin.php'; require("dbconnect_mysqli.php"); require("functions.php"); ###################################################################################################### ###################################################################################################### ####### static variable settings for display options ###################################################################################################### ###################################################################################################### $page_width='870'; $section_width='850'; $header_font_size='12'; $subheader_font_size='11'; $subcamp_font_size='11'; $header_selected_bold=''; $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'; $label_color = '#FF33FF'; $status_color = '#FF33FF'; $moh_color = '#FF33FF'; $vm_color = '#FF33FF'; $tts_color = '#FF33FF'; $cc_color = '#FF33FF'; $cts_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'; $qc_font = 'BLACK'; $reports_font = 'BLACK'; $times_font = 'BLACK'; $phones_font = 'BLACK'; $conference_font = 'BLACK'; $server_font = 'BLACK'; $settings_font = 'BLACK'; $label_font = 'BLACK'; $status_font = 'BLACK'; $moh_font = 'BLACK'; $vm_font = 'BLACK'; $tts_font = 'BLACK'; $cc_font = 'BLACK'; $cts_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'; $qc_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'; $label_color = '#C6C6C6'; $colors_color = '#C6C6C6'; $status_color = '#C6C6C6'; $moh_color = '#C6C6C6'; $vm_color = '#C6C6C6'; $tts_color = '#C6C6C6'; $cc_color = '#C6C6C6'; $cts_color = '#C6C6C6'; $sc_color = '#C6C6C6'; $sg_color = '#C6C6C6'; $ar_color = '#C6C6C6'; $il_color = '#C6C6C6'; $cg_color = '#C6C6C6'; $vmmg_color = '#C6C6C6'; $subcamp_color = '#C6C6C6'; $Msubhead_color = '#E6E6E6'; $Mselected_color = '#C6C6C6'; $Mhead_color = '#A3C3D6'; $Mmain_bgcolor = '#015B91'; ### $PHP_AUTH_USER=(array_key_exists('PHP_AUTH_USER', $_SERVER) ? $_SERVER['PHP_AUTH_USER'] : ""); $PHP_AUTH_PW=(array_key_exists('PHP_AUTH_PW', $_SERVER) ? $_SERVER['PHP_AUTH_PW'] : ""); $PHP_SELF=$_SERVER['PHP_SELF']; $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF); $QUERY_STRING = getenv("QUERY_STRING"); $Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, VERM Reports, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound DID Detail Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Shared Debug, Asterisk Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report, 3-Way Press Log Report, SIP Event Report, Caller ID Log Report, Quality Control Report, Settings Compare, Phone Stats, Hopper List Report, In-Group User List, Webserver-URL Report, VDAD Debug Log Report, URL Log Report, Medialog Inventory Report, Asterisk Debug, SPH Report, Shared Debug, Process Report, Group Alias Report, Hangup Cause Report, IVR Filter Report, LAGGED Agent Log Report, LAGGED Agent Log Summary Report, Agent Latency Report, Latency Gaps Report, Agent Disposition Report, Agent Performance Report, Carrier Log Report, Dial Log Report, Inbound Extension Stats, Agents Time On Calls, Callbacks Export, User Logins Report, Demographic Quotas Report, DB Schema Compare Utility, Khomp Quick Stats Report, CID SIP 603 Report'; $UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, VERM Reports, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound DID Detail Report, Inbound Email Report, Inbound Chat Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary, Report Page Servers Summary, Admin Utilities Page, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report, 3-Way Press Log Report, SIP Event Report, Caller ID Log Report, Quality Control Report, Settings Compare, Phone Stats, Hopper List Report, In-Group User List, Webserver-URL Report, VDAD Debug Log Report, URL Log Report, Medialog Inventory Report, Asterisk Debug, SPH Report, Shared Debug, Process Report, Group Alias Report, Hangup Cause Report, IVR Filter Report, LAGGED Agent Log Report, LAGGED Agent Log Summary Report, Agent Latency Report, Latency Gaps Report, Agent Disposition Report, Agent Performance Report, Carrier Log Report, Dial Log Report, Inbound Extension Stats, Agents Time On Calls, Callbacks Export, User Logins Report, Demographic Quotas Report, VERM QA Links, DB Schema Compare Utility, Khomp Quick Stats Report, CID SIP 603 Report'; $Vtables = 'NONE,log_noanswer,did_agent_log,contact_information'; $APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_ingroup_availability agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number copy_user copy_phone did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list ingroup_list campaigns_list callmenu_list hopper_list hopper_bulk_insert call_dispo_report agent_campaigns park_call pause_code preview_dial_action ra_call_control recording stereo_recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead batch_update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list vm_message webphone_url webserver logged_in_agents update_campaign update_alt_url update_presets add_did copy_did update_did lead_field_info lead_all_info lead_callback_info phone_number_log switch_lead ccc_lead_info lead_status_search lead_search lead_dearchive call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone delete_dnc_phone add_fpg_phone send_notification refresh_panel update_remote_agent user_details'; $browser_alert_sounds_list = 'bark_dog,beep_double,beep_five,beep_up,bell_double,bell_school,bird,blaster1,blaster2,buzz1,buzz2,cash_register,chat_alert,click_single,click_double,click_quiet,close_encounter,confirmation,ding,droplet,droplet_double,elephant,email_alert,hold_tone,horn_bike,horn_car,horn_car_triple,horn_clown,horn_double,horn_train,meow_cat,scream_wilhelm,silence_quick,siren,slide_down,slide_up,swish,teleport1,teleport2,ticking_two,ticking_four,ticking_six,whip,whistle_up,whistle_two,whistle_three,whoosh,xylophone1,xylophone2,xylophone3,xylophone4,20Hz_tone'; $HTMLcolors = 'IndianRed,CD5C5C|LightCoral,F08080|Salmon,FA8072|DarkSalmon,E9967A|LightSalmon,FFA07A|Crimson,DC143C|Red,FF0000|FireBrick,B22222|DarkRed,8B0000|Pink,FFC0CB|LightPink,FFB6C1|HotPink,FF69B4|DeepPink,FF1493|MediumVioletRed,C71585|PaleVioletRed,DB7093|LightSalmon,FFA07A|Coral,FF7F50|Tomato,FF6347|OrangeRed,FF4500|DarkOrange,FF8C00|Orange,FFA500|Gold,FFD700|Yellow,FFFF00|LightYellow,FFFFE0|LemonChiffon,FFFACD|LightGoldenrodYellow,FAFAD2|PapayaWhip,FFEFD5|Moccasin,FFE4B5|PeachPuff,FFDAB9|PaleGoldenrod,EEE8AA|Khaki,F0E68C|DarkKhaki,BDB76B|Lavender,E6E6FA|Thistle,D8BFD8|Plum,DDA0DD|Violet,EE82EE|Orchid,DA70D6|Fuchsia,FF00FF|Magenta,FF00FF|MediumOrchid,BA55D3|MediumPurple,9370DB|RebeccaPurple,663399|BlueViolet,8A2BE2|DarkViolet,9400D3|DarkOrchid,9932CC|DarkMagenta,8B008B|Purple,800080|Indigo,4B0082|SlateBlue,6A5ACD|DarkSlateBlue,483D8B|MediumSlateBlue,7B68EE|GreenYellow,ADFF2F|Chartreuse,7FFF00|LawnGreen,7CFC00|Lime,00FF00|LimeGreen,32CD32|PaleGreen,98FB98|LightGreen,90EE90|MediumSpringGreen,00FA9A|SpringGreen,00FF7F|MediumSeaGreen,3CB371|SeaGreen,2E8B57|ForestGreen,228B22|Green,008000|DarkGreen,006400|YellowGreen,9ACD32|OliveDrab,6B8E23|Olive,808000|DarkOliveGreen,556B2F|MediumAquamarine,66CDAA|DarkSeaGreen,8FBC8B|LightSeaGreen,20B2AA|DarkCyan,008B8B|Teal,008080|Aqua,00FFFF|Cyan,00FFFF|LightCyan,E0FFFF|PaleTurquoise,AFEEEE|Aquamarine,7FFFD4|Turquoise,40E0D0|MediumTurquoise,48D1CC|DarkTurquoise,00CED1|CadetBlue,5F9EA0|SteelBlue,4682B4|LightSteelBlue,B0C4DE|PowderBlue,B0E0E6|LightBlue,ADD8E6|SkyBlue,87CEEB|LightSkyBlue,87CEFA|DeepSkyBlue,00BFFF|DodgerBlue,1E90FF|CornflowerBlue,6495ED|MediumSlateBlue,7B68EE|RoyalBlue,4169E1|Blue,0000FF|MediumBlue,0000CD|DarkBlue,00008B|Navy,000080|MidnightBlue,191970|Cornsilk,FFF8DC|BlanchedAlmond,FFEBCD|Bisque,FFE4C4|NavajoWhite,FFDEAD|Wheat,F5DEB3|BurlyWood,DEB887|Tan,D2B48C|RosyBrown,BC8F8F|SandyBrown,F4A460|Goldenrod,DAA520|DarkGoldenrod,B8860B|Peru,CD853F|Chocolate,D2691E|SaddleBrown,8B4513|Sienna,A0522D|Brown,A52A2A|Maroon,800000|White,FFFFFF|Snow,FFFAFA|HoneyDew,F0FFF0|MintCream,F5FFFA|Azure,F0FFFF|AliceBlue,F0F8FF|GhostWhite,F8F8FF|WhiteSmoke,F5F5F5|SeaShell,FFF5EE|Beige,F5F5DC|OldLace,FDF5E6|FloralWhite,FFFAF0|Ivory,FFFFF0|AntiqueWhite,FAEBD7|Linen,FAF0E6|LavenderBlush,FFF0F5|MistyRose,FFE4E1|Gainsboro,DCDCDC|LightGray,D3D3D3|Silver,C0C0C0|DarkGray,A9A9A9|Gray,808080|DimGray,696969|LightSlateGray,778899|SlateGray,708090|DarkSlateGray,2F4F4F|Black,000000'; $reserved_extensions = '8159,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310,8320,8352,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8500,8501,138300,138301,138302,138303,138304,138305,138306,138307,138308,138309,138310,138311,138312,138313,138314,138315,138316,138317,138318,138319,138320,138321,138322,138323,138324,138325,138326,138327,138328,138329,138330,138331,138332,138333,138334,138335,138336,138337,138338,138339,138340,138341,138342,138343,138344,138345,138346,138347,138348,138349,138350,138351,138352,138353,138354,138355,138356,138357,138358,138359,138360,138361,138362,138363,138364,138365,138366,138367,138368,138369,138370,138371,138372,138373,138374,138375,138376,138377,138378,138379,138380,138381,138382,138383,138384,138385,138386,138387,138388,138389,138390,138391,138392,138393,138394,138395,138396,138397,138398,138399'; $reserved_extensions = ",$reserved_extensions,"; ### BEGIN housecleaning of old static report files, if not done before ### if (!file_exists('old_clear')) { array_map('unlink', glob("./*.csv")); array_map('unlink', glob("./*.xls")); array_map('unlink', glob("./ploticus/*")); unlink('project_auth_entries.txt'); $clear_file=fopen('old_clear', "w"); fwrite($clear_file, '1'); fclose($clear_file); } if (file_exists('project_auth_entries.txt')) { unlink('project_auth_entries.txt'); } ### END housecleaning of old static report files ### ###################################################################################################### ###################################################################################################### ####### Form variable declaration ###################################################################################################### ###################################################################################################### if (isset($_GET["DB"])) {$DB=$_GET["DB"];} elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} if (isset($_GET["access_recordings"])) {$access_recordings=$_GET["access_recordings"];} elseif (isset($_POST["access_recordings"])) {$access_recordings=$_POST["access_recordings"];} else {$access_recordings=0;} if (isset($_GET["active"])) {$active=$_GET["active"];} elseif (isset($_POST["active"])) {$active=$_POST["active"];} else {$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"];} else {$adaptive_dl_diff_target=0;} 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"];} else {$adaptive_dropped_percentage=3;} if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} else {$adaptive_intensity=0;} 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"];} else {$adaptive_latest_server_time="2359";} 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"];} else {$adaptive_maximum_level="3.0";} if (isset($_GET["SUB"])) {$SUB=$_GET["SUB"];} elseif (isset($_POST["SUB"])) {$SUB=$_POST["SUB"];} else {$SUB="";} if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} else {$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"];} else {$admin_hangup_enabled=0;} 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"];} else {$admin_hijack_enabled=0;} 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"];} else {$admin_monitor_enabled=0;} if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} else {$AFLogging_enabled=0;} 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"];} else {$agent_choose_ingroups=0;} if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} else {$agentcall_manual=0;} if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} else {$agentonly_callbacks=0;} 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"];} else {$AGI_call_logging_enabled=0;} if (isset($_GET["agi_output"])) {$agi_output=$_GET["agi_output"];} elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} else {$agi_output="FILE";} if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} else {$allcalls_delay=0;} if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} else {$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"];} else {$alt_number_dialing="N";} 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"];} else {$alter_agent_interface_options=0;} 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"];} else {$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"];} else {$amd_send_to_vmx="N";} 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"];} else {$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"];} else {$ast_admin_access=0;} 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"];} else {$ast_delete_phones=0;} if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} else {$asterisk_version="";} if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} else {$ASTmgrSECRET="";} if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} else {$ASTmgrUSERNAME="";} if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];} elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];} else {$ASTmgrUSERNAMElisten="";} if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];} elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];} else {$ASTmgrUSERNAMEsend="";} if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} else {$ASTmgrUSERNAMEupdate="";} if (isset($_GET["attempt_delay"])) {$attempt_delay=$_GET["attempt_delay"];} elseif (isset($_POST["attempt_delay"])) {$attempt_delay=$_POST["attempt_delay"];} else {$attempt_delay=1800;} if (isset($_GET["attempt_maximum"])) {$attempt_maximum=$_GET["attempt_maximum"];} elseif (isset($_POST["attempt_maximum"])) {$attempt_maximum=$_POST["attempt_maximum"];} else {$attempt_maximum=0;} 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"];} else {$auto_dial_level=0;} 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"];} else {$auto_dial_next_number=0;} 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"];} else {$available_only_ratio_tally="N";} 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"];} else {$call_out_number_group="Zap/g2/";} 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"];} else {$call_parking_enabled=1;} 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"];} else {$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"];} else {$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"];} else {$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"];} else {$CallerID_popup_enabled=1;} if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} else {$campaign_cid="";} if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} else {$campaign_detail=0;} if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} else {$campaign_id="";} if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];} elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];} else {$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"];} else {$campaign_rec_exten=8309;} 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"];} else {$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"];} else {$ingroup_rec_filename="";} if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} else {$campaign_recording="ONDEMAND";} 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"];} else {$campaign_vdad_exten=8368;} 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"];} else {$change_agent_campaign=0;} if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];} elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} else {$client_browser="/usr/bin/mozilla";} 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"];} else {$closer_default_blended=0;} if (isset($_GET["company"])) {$company=$_GET["company"];} elseif (isset($_POST["company"])) {$company=$_POST["company"];} else {$company="";} if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} else {$computer_ip="";} if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} else {$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"];} else {$conf_on_extension=8302;} if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} else {$conferencing_enabled=1;} if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} else {$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"];} else {$ct_default_start=900;} 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"];} else {$ct_default_stop=2100;} 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"];} else {$ct_friday_start=0;} 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"];} else {$ct_friday_stop=0;} 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"];} else {$ct_monday_start=0;} 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"];} else {$ct_monday_stop=0;} 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"];} else {$ct_saturday_start=0;} 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"];} else {$ct_saturday_stop=0;} 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"];} else {$ct_sunday_start=0;} 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"];} else {$ct_sunday_stop=0;} 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"];} else {$ct_thursday_start=0;} 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"];} else {$ct_thursday_stop=0;} 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"];} else {$ct_tuesday_start=0;} 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"];} else {$ct_tuesday_stop=0;} 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"];} else {$ct_wednesday_start=0;} 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"];} else {$ct_wednesday_stop=0;} if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} else {$DBX_database="";} if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];} elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];} else {$DBX_pass="";} if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];} elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];} else {$DBX_port=3306;} if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} else {$DBX_server="";} if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} else {$DBX_user="";} if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} else {$DBY_database="";} if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];} elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];} else {$DBY_pass="";} if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];} elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];} else {$DBY_port=3306;} if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} else {$DBY_server="";} if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} else {$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"];} else {$delete_call_times=0;} if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} else {$delete_campaigns=0;} if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} else {$delete_filters=0;} if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} else {$delete_ingroups=0;} if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} else {$delete_lists=0;} 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"];} else {$delete_remote_agents=0;} if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} else {$delete_scripts=0;} 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"];} else {$delete_user_groups=0;} if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];} elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} else {$delete_users=0;} if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} else {$dial_method="MANUAL";} if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$dial_status_e="";} if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} else {$dial_timeout=60;} if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} else {$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"];} else {$drop_call_seconds="";} if (isset($_GET["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} else {$drop_exten="8307";} #if (isset($_GET["drop_action"])) {$drop_action=$_GET["drop_action"];} # elseif (isset($_POST["drop_action"])) {$drop_action=$_POST["drop_action"];} if (isset($_GET["drop_action_campaigns"])) {$drop_action_campaigns=$_GET["drop_action_campaigns"];} elseif (isset($_POST["drop_action_campaigns"])) {$drop_action_campaigns=$_POST["drop_action_campaigns"];} else {$drop_action_campaigns="AUDIO";} if (isset($_GET["drop_action_ingroups"])) {$drop_action_ingroups=$_GET["drop_action_ingroups"];} elseif (isset($_POST["drop_action_ingroups"])) {$drop_action_ingroups=$_POST["drop_action_ingroups"];} else {$drop_action_ingroups="MESSAGE";} 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"];} else {$dtmf_send_extension='local/8500998@default';} 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"];} else {$enable_fast_refresh=0;} 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"];} else {$enable_persistant_mysql=0;} 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"];} else {$extension="";} if (isset($_GET["extension_dids"])) {$extension_dids=$_GET["extension_dids"];} elseif (isset($_POST["extension_dids"])) {$extension_dids=$_POST["extension_dids"];} else {$extension_dids="9998811112";} 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"];} else {$fast_refresh_rate=1000;} if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} else {$force_logout=0;} if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} else {$fronter_display="Y";} if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} else {$full_name="";} if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} else {$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"];} else {$get_call_launch="NONE";} if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];} elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} else {$group_color="";} if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];} elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];} else {$group_id="";} if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];} elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];} else {$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"];} else {$HKstatus="";} if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} else {$hopper_level=1;} if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} else {$hotkey="";} if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} else {$hotkeys_active=0;} if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} else {$install_directory="/usr/local/perl_TK";} 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"];} else {$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"];} else {$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"];} else {$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"];} else {$lead_filter_sql="";} if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} else {$lead_order="";} if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} else {$list_id="";} if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];} elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];} else {$list_name="";} if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];} elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} else {$load_leads=0;} 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"];} else {$local_call_time="";} if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} else {$local_gmt="-5";} 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"];} else {$login="";} if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} else {$login_campaign="";} if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} else {$login_pass="";} if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} else {$login_user="";} if (isset($_GET["log_recording_access"])) {$log_recording_access=$_GET["log_recording_access"];} elseif (isset($_POST["log_recording_access"])) {$log_recording_access=$_POST["log_recording_access"];} else {$log_recording_access=0;} 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"];} else {$max_vicidial_trunks=23;} 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"];} else {$modify_call_times=0;} if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} else {$modify_leads=0;} if (isset($_GET["export_gdpr_leads"])) {$export_gdpr_leads=$_GET["export_gdpr_leads"];} elseif (isset($_POST["export_gdpr_leads"])) {$export_gdpr_leads=$_POST["export_gdpr_leads"];} else {$export_gdpr_leads=0;} if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} else {$monitor_prefix=8612;} if (isset($_GET["new_extension"])) {$new_extension=$_GET["new_extension"];} elseif (isset($_POST["new_extension"])) {$new_extension=$_POST["new_extension"];} else {$new_extension="";} if (isset($_GET["new_dialplan_number"])) {$new_dialplan_number=$_GET["new_dialplan_number"];} elseif (isset($_POST["new_dialplan_number"])) {$new_dialplan_number=$_POST["new_dialplan_number"];} else {$new_dialplan_number="";} if (isset($_GET["new_voicemail_id"])) {$new_voicemail_id=$_GET["new_voicemail_id"];} elseif (isset($_POST["new_voicemail_id"])) {$new_voicemail_id=$_POST["new_voicemail_id"];} else {$new_voicemail_id="";} if (isset($_GET["new_outbound_cid"])) {$new_outbound_cid=$_GET["new_outbound_cid"];} elseif (isset($_POST["new_outbound_cid"])) {$new_outbound_cid=$_POST["new_outbound_cid"];} else {$new_outbound_cid="";} if (isset($_GET["new_server_ip"])) {$new_server_ip=$_GET["new_server_ip"];} elseif (isset($_POST["new_server_ip"])) {$new_server_ip=$_POST["new_server_ip"];} else {$new_server_ip="";} if (isset($_GET["new_login"])) {$new_login=$_GET["new_login"];} elseif (isset($_POST["new_login"])) {$new_login=$_POST["new_login"];} else {$new_login="";} if (isset($_GET["new_pass"])) {$new_pass=$_GET["new_pass"];} elseif (isset($_POST["new_pass"])) {$new_pass=$_POST["new_pass"];} else {$new_pass="";} if (isset($_GET["new_conf_secret"])) {$new_conf_secret=$_GET["new_conf_secret"];} elseif (isset($_POST["new_conf_secret"])) {$new_conf_secret=$_POST["new_conf_secret"];} else {$new_conf_secret="";} if (isset($_GET["new_fullname"])) {$new_fullname=$_GET["new_fullname"];} elseif (isset($_POST["new_fullname"])) {$new_fullname=$_POST["new_fullname"];} else {$new_fullname="";} 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"];} else {$next_agent_call="longest_wait_time";} 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"];} else {$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"];} else {$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"];} else {$old_conf_exten="";} if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];} elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} else {$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"];} else {$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"];} else {$old_server_ip="";} if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} else {$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"];} else {$omit_phone_code="N";} if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} else {$outbound_cid="";} if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];} elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];} else {$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"];} else {$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"];} else {$park_on_extension=8301;} if (isset($_GET["pass"])) {$pass=$_GET["pass"];} elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} else {$pass="";} if (isset($_GET["phone_defaults_container"])) {$phone_defaults_container=$_GET["phone_defaults_container"];} elseif (isset($_POST["phone_defaults_container"])) {$phone_defaults_container=$_POST["phone_defaults_container"];} else {$phone_defaults_container="---DISABLED---";} if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} else {$phone_ip="";} if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} else {$phone_login="";} if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} else {$phone_number="";} if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} else {$phone_pass="";} if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} else {$phone_type="";} if (isset($_GET["picture"])) {$picture=$_GET["picture"];} elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];} else {$picture="";} if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} else {$protocol="SIP";} 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"];} else {$QUEUE_ACTION_enabled=1;} 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"];} else {$remote_agent_id="";} if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} else {$reset_hopper="";} if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} else {$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"];} else {$safe_harbor_exten="8307";} if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} else {$scheduled_callbacks="";} if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} else {$script_comments="";} if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];} elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];} else {$script_id="";} if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];} elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];} else {$script_name="";} if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];} elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} else {$script_text="";} if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} else {$selectable="";} if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} else {$server_description="";} if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} else {$server_id="";} if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} else {$server_ip="";} if (isset($_GET["source_phone"])) {$source_phone=$_GET["source_phone"];} elseif (isset($_POST["source_phone"])) {$source_phone=$_POST["source_phone"];} else {$source_phone="";} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} else {$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"];} else {$state_call_time_state="";} if (isset($_GET["state_rule"])) {$state_rule=$_GET["state_rule"];} elseif (isset($_POST["state_rule"])) {$state_rule=$_POST["state_rule"];} else {$state_rule="";} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} else {$status="";} if (isset($_GET["status_id"])) {$status_id=$_GET["status_id"];} elseif (isset($_POST["status_id"])) {$status_id=$_POST["status_id"];} else {$status_id="";} if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} else {$status_name="";} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} else {$submit="";} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} else {$SUBMIT="";} 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"];} else {$sys_perf_log="N";} if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];} elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];} else {$telnet_host="localhost";} if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];} elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];} else {$telnet_port=5038;} 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"];} else {$updater_check_enabled=1;} 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"];} else {$use_internal_dnc="N";} 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"];} else {$use_campaign_dnc="N";} if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} else {$user="";} if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} else {$user_group="";} if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} else {$user_level="";} if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} else {$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"];} else {$user_switching_enabled=1;} 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"];} else {$vd_server_logs="Y";} 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"];} else {$VDstop_rec_after_each_call=1;} 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"];} else {$VICIDIAL_park_on_extension=8301;} 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"];} else {$VICIDIAL_park_on_filename="";} if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];} elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];} else {$vicidial_recording=1;} if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];} elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];} else {$vicidial_transfers=1;} 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"];} else {$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"];} else {$voicemail_button_enabled=1;} 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"];} else {$voicemail_dump_exten=85026666666666;} if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} else {$voicemail_ext="";} if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} else {$voicemail_exten=8501;} if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} else {$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"];} else {$web_form_address="";} if (isset($_GET["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} else {$wrapup_message="";} if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} else {$wrapup_seconds=0;} 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"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$vicidial_balance_active="N";} 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"];} else {$balance_trunks_offlimits=0;} if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} else {$dedicated_trunks="";} if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} else {$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"];} else {$dial_level_override=0;} if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} else {$concurrent_transfers="AUTO";} 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"];} else {$auto_alt_dial="NONE";} if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} else {$modify_users=0;} if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} else {$modify_campaigns=0;} if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} else {$modify_lists=0;} if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} else {$modify_scripts=0;} if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} else {$modify_filters=0;} if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} else {$modify_ingroups=0;} if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} else {$modify_usergroups=0;} if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} else {$modify_remoteagents=0;} if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} else {$modify_servers=0;} if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} else {$view_reports=0;} 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"];} else {$agent_pause_codes_active="N";} if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} else {$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"];} else {$pause_code_name="";} if (isset($_GET["billable"])) {$billable=$_GET["billable"];} elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} else {$billable="NO";} if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} else {$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"];} else {$campaign_stats_refresh="N";} if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} else {$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"];} else {$vicidial_recording_override="DISABLED";} 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"];} else {$use_non_latin=0;} if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} else {$webroot_writable=1;} 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"];} else {$enable_queuemetrics_logging=0;} 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"];} else {$queuemetrics_server_ip="";} if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} else {$queuemetrics_dbname="";} if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} else {$queuemetrics_login="";} if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} else {$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"];} else {$queuemetrics_log_id="VIC";} if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} else {$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"];} else {$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"];} else {$vicidial_agent_disable="ALL";} 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"];} else {$disable_alter_custdata="N";} 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"];} else {$alter_custdata_override="NOT_ACTIVE";} 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"];} else {$no_hopper_leads_logins="N";} 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"];} else {$enable_sipsak_messages=0;} 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"];} else {$allow_sipsak_messages=0;} 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"];} else {$list_order_mix="";} if (isset($_GET["vcl_id"])) {$vcl_id=$_GET["vcl_id"];} elseif (isset($_POST["vcl_id"])) {$vcl_id=$_POST["vcl_id"];} else {$vcl_id="";} if (isset($_GET["vcl_name"])) {$vcl_name=$_GET["vcl_name"];} elseif (isset($_POST["vcl_name"])) {$vcl_name=$_POST["vcl_name"];} else {$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"];} else {$list_mix_container="";} if (isset($_GET["mix_method"])) {$mix_method=$_GET["mix_method"];} elseif (isset($_POST["mix_method"])) {$mix_method=$_POST["mix_method"];} else {$mix_method="IN_ORDER";} if (isset($_GET["human_answered"])) {$human_answered=$_GET["human_answered"];} elseif (isset($_POST["human_answered"])) {$human_answered=$_POST["human_answered"];} else {$human_answered="N";} if (isset($_GET["category"])) {$category=$_GET["category"];} elseif (isset($_POST["category"])) {$category=$_POST["category"];} else {$category="";} if (isset($_GET["vsc_id"])) {$vsc_id=$_GET["vsc_id"];} elseif (isset($_POST["vsc_id"])) {$vsc_id=$_POST["vsc_id"];} else {$vsc_id="";} if (isset($_GET["vsc_name"])) {$vsc_name=$_GET["vsc_name"];} elseif (isset($_POST["vsc_name"])) {$vsc_name=$_POST["vsc_name"];} else {$vsc_name="";} if (isset($_GET["vsc_description"])) {$vsc_description=$_GET["vsc_description"];} elseif (isset($_POST["vsc_description"])) {$vsc_description=$_POST["vsc_description"];} else {$vsc_description="";} if (isset($_GET["tovdad_display"])) {$tovdad_display=$_GET["tovdad_display"];} elseif (isset($_POST["tovdad_display"])) {$tovdad_display=$_POST["tovdad_display"];} else {$tovdad_display="N";} 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"];} else {$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"];} else {$enable_agc_xfer_log=0;} 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"];} else {$after_hours_action="MESSAGE";} 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"];} else {$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"];} else {$after_hours_exten="8300";} 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"];} else {$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"];} else {$welcome_message_filename="";} if (isset($_GET["moh_context"])) {$moh_context=$_GET["moh_context"];} elseif (isset($_POST["moh_context"])) {$moh_context=$_POST["moh_context"];} else {$moh_context="default";} 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"];} else {$onhold_prompt_filename="";} if (isset($_GET["prompt_interval"])) {$prompt_interval=$_GET["prompt_interval"];} elseif (isset($_POST["prompt_interval"])) {$prompt_interval=$_POST["prompt_interval"];} else {$prompt_interval=60;} 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"];} else {$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"];} else {$agent_alert_delay=1000;} if (isset($_GET["group_rank"])) {$group_rank=$_GET["group_rank"];} elseif (isset($_POST["group_rank"])) {$group_rank=$_POST["group_rank"];} else {$group_rank=0;} 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"];} else {$campaign_allow_inbound="N";} if (isset($_GET["old_campaign_allow_inbound"])) {$old_campaign_allow_inbound=$_GET["old_campaign_allow_inbound"];} elseif (isset($_POST["old_campaign_allow_inbound"])) {$old_campaign_allow_inbound=$_POST["old_campaign_allow_inbound"];} else {$old_campaign_allow_inbound="N";} 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"];} else {$manual_dial_list_id=998;} if (isset($_GET["campaign_rank"])) {$campaign_rank=$_GET["campaign_rank"];} elseif (isset($_POST["campaign_rank"])) {$campaign_rank=$_POST["campaign_rank"];} else {$campaign_rank=0;} 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"];} else {$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"];} else {$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"];} else {$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"];} else {$default_xfer_group="";} if (isset($_GET["qc_enabled"])) {$qc_enabled=$_GET["qc_enabled"];} elseif (isset($_POST["qc_enabled"])) {$qc_enabled=$_POST["qc_enabled"];} else {$qc_enabled="N";} 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"];} else {$qc_user_level=1;} if (isset($_GET["qc_pass"])) {$qc_pass=$_GET["qc_pass"];} elseif (isset($_POST["qc_pass"])) {$qc_pass=$_POST["qc_pass"];} else {$qc_pass=0;} if (isset($_GET["qc_finish"])) {$qc_finish=$_GET["qc_finish"];} elseif (isset($_POST["qc_finish"])) {$qc_finish=$_POST["qc_finish"];} else {$qc_finish=0;} if (isset($_GET["qc_commit"])) {$qc_commit=$_GET["qc_commit"];} elseif (isset($_POST["qc_commit"])) {$qc_commit=$_POST["qc_commit"];} else {$qc_commit=0;} 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["qc_display_group_type"])) {$qc_display_group_type=$_GET["qc_display_group_type"];} elseif (isset($_POST["qc_display_group_type"])) {$qc_display_group_type=$_POST["qc_display_group_type"];} else {$qc_display_group_type="";} if (isset($_GET["qc_claim_limit"])) {$qc_claim_limit=$_GET["qc_claim_limit"];} elseif (isset($_POST["qc_claim_limit"])) {$qc_claim_limit=$_POST["qc_claim_limit"];} else {$qc_claim_limit=3;} if (isset($_GET["qc_expire_days"])) {$qc_expire_days=$_GET["qc_expire_days"];} elseif (isset($_POST["qc_expire_days"])) {$qc_expire_days=$_POST["qc_expire_days"];} else {$qc_expire_days="";} if (isset($_GET["queue_priority"])) {$queue_priority=$_GET["queue_priority"];} elseif (isset($_POST["queue_priority"])) {$queue_priority=$_POST["queue_priority"];} else {$queue_priority=0;} 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"];} else {$drop_inbound_group="---NONE---";} 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"];} else {$qc_lists="";} if (isset($_GET["qc_statuses"])) {$qc_statuses=$_GET["qc_statuses"];} elseif (isset($_POST["qc_statuses"])) {$qc_statuses=$_POST["qc_statuses"];} else {$qc_statuses="";} if (isset($_GET["qc_statuses_id"])) {$qc_statuses_id=$_GET["qc_statuses_id"];} elseif (isset($_POST["qc_statuses_id"])) {$qc_statuses_id=$_POST["qc_statuses_id"];} else {$qc_statuses_id="";} 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"];} else {$qc_get_record_launch="NONE";} 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"];} else {$qc_show_recording="Y";} 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"];} else {$qc_shift_id="24HRMIDNIGHT";} 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_scorecard_id"])) {$qc_scorecard_id=$_GET["qc_scorecard_id"];} elseif (isset($_POST["qc_scorecard_id"])) {$qc_scorecard_id=$_POST["qc_scorecard_id"];} else {$qc_scorecard_id="";} if (isset($_GET["qc_script"])) {$qc_script=$_GET["qc_script"];} elseif (isset($_POST["qc_script"])) {$qc_script=$_POST["qc_script"];} else {$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"];} else {$ingroup_recording_override="DISABLED";} if (isset($_GET["code"])) {$code=$_GET["code"];} elseif (isset($_POST["code"])) {$code=$_POST["code"];} else {$code="";} if (isset($_GET["code_name"])) {$code_name=$_GET["code_name"];} elseif (isset($_POST["code_name"])) {$code_name=$_POST["code_name"];} else {$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"];} else {$afterhours_xfer_group="";} if (isset($_GET["alias_id"])) {$alias_id=$_GET["alias_id"];} elseif (isset($_POST["alias_id"])) {$alias_id=$_POST["alias_id"];} else {$alias_id="";} if (isset($_GET["alias_name"])) {$alias_name=$_GET["alias_name"];} elseif (isset($_POST["alias_name"])) {$alias_name=$_POST["alias_name"];} else {$alias_name="";} if (isset($_GET["logins_list"])) {$logins_list=$_GET["logins_list"];} elseif (isset($_POST["logins_list"])) {$logins_list=$_POST["logins_list"];} else {$logins_list="";} if (isset($_GET["shift_id"])) {$shift_id=$_GET["shift_id"];} elseif (isset($_POST["shift_id"])) {$shift_id=$_POST["shift_id"];} else {$shift_id="";} if (isset($_GET["shift_name"])) {$shift_name=$_GET["shift_name"];} elseif (isset($_POST["shift_name"])) {$shift_name=$_POST["shift_name"];} else {$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"];} else {$shift_start_time="";} if (isset($_GET["shift_length"])) {$shift_length=$_GET["shift_length"];} elseif (isset($_POST["shift_length"])) {$shift_length=$_POST["shift_length"];} else {$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"];} else {$group_shifts=array();} 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"];} else {$timeclock_end_of_day="0000";} 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"];} else {$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"];} else {$survey_dtmf_digits="1238";} 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"];} else {$survey_ni_digit="8";} 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"];} else {$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"];} else {$survey_ni_audio_file="";} if (isset($_GET["survey_method"])) {$survey_method=$_GET["survey_method"];} elseif (isset($_POST["survey_method"])) {$survey_method=$_POST["survey_method"];} else {$survey_method="AGENT_XFER";} 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"];} else {$survey_no_response_action="OPTIN";} 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"];} else {$survey_ni_status="NI";} 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"];} else {$survey_response_digit_map="1-DEMOCRAT|2-REPUBLICAN|3-INDEPENDANT|8-OPTOUT|X-NO RESPONSE|";} 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"];} else {$survey_xfer_exten=8300;} 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"];} else {$survey_camp_record_dir="/home/survey";} 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"];} else {$add_timeclock_log=0;} 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"];} else {$modify_timeclock_log=0;} 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"];} else {$delete_timeclock_log=0;} if (isset($_GET["phone_numbers"])) {$phone_numbers=$_GET["phone_numbers"];} elseif (isset($_POST["phone_numbers"])) {$phone_numbers=$_POST["phone_numbers"];} else {$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"];} else {$vdc_header_date_format='MS_DASH_24HR 2008-06-24 23:59:59';} 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"];} else {$vdc_customer_date_format='AL_TEXT_AMPM OCT 24, 2008 11:59:59 PM';} 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"];} else {$vdc_header_phone_format='US_PARN (000)000-0000';} 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"];} else {$disable_alter_custphone="Y";} 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"];} else {$alter_custphone_override="NOT_ACTIVE";} 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"];} else {$vdc_agent_api_access=0;} 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"];} else {$vdc_agent_api_active=0;} 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"];} else {$display_queue_count="Y";} if (isset($_GET["sale_category"])) {$sale_category=$_GET["sale_category"];} elseif (isset($_POST["sale_category"])) {$sale_category=$_POST["sale_category"];} else {$sale_category="N";} 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"];} else {$dead_lead_category="N";} 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"];} else {$manual_dial_filter="DISABLED";} 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"];} else {$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"];} else {$agent_extended_alt_dial="N";} 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"];} else {$play_place_in_line="N";} 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"];} else {$play_estimate_hold_time="N";} 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"];} else {$hold_time_option="NONE";} 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"];} else {$hold_time_option_seconds=360;} 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"];} else {$hold_time_option_exten=8300;} 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"];} else {$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"];} else {$hold_time_option_xfer_group="---NONE---";} 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"];} else {$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"];} else {$hold_time_option_callback_list_id=999;} 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"];} else {$hold_recall_xfer_group="---NONE---";} 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"];} else {$no_delay_call_route="N";} 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"];} else {$play_welcome_message="ALWAYS";} if (isset($_GET["did_id"])) {$did_id=$_GET["did_id"];} elseif (isset($_POST["did_id"])) {$did_id=$_POST["did_id"];} else {$did_id="";} if (isset($_GET["source_did"])) {$source_did=$_GET["source_did"];} elseif (isset($_POST["source_did"])) {$source_did=$_POST["source_did"];} else {$source_did="";} if (isset($_GET["did_pattern"])) {$did_pattern=$_GET["did_pattern"];} elseif (isset($_POST["did_pattern"])) {$did_pattern=$_POST["did_pattern"];} else {$did_pattern="";} if (isset($_GET["did_description"])) {$did_description=$_GET["did_description"];} elseif (isset($_POST["did_description"])) {$did_description=$_POST["did_description"];} else {$did_description="";} if (isset($_GET["did_active"])) {$did_active=$_GET["did_active"];} elseif (isset($_POST["did_active"])) {$did_active=$_POST["did_active"];} else {$did_active="Y";} if (isset($_GET["did_route"])) {$did_route=$_GET["did_route"];} elseif (isset($_POST["did_route"])) {$did_route=$_POST["did_route"];} else {$did_route="EXTEN";} if (isset($_GET["did_pattern_filter"])) {$did_pattern_filter=$_GET["did_pattern_filter"];} elseif (isset($_POST["did_pattern_filter"])) {$did_pattern_filter=$_POST["did_pattern_filter"];} else {$did_pattern_filter="";} if (isset($_GET["exten_context"])) {$exten_context=$_GET["exten_context"];} elseif (isset($_POST["exten_context"])) {$exten_context=$_POST["exten_context"];} else {$exten_context="default";} if (isset($_GET["phone"])) {$phone=$_GET["phone"];} elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} else {$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"];} else {$user_unavailable_action="VOICEMAIL";} 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"];} else {$user_route_settings_ingroup="AGENTDIRECT";} 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"];} else {$call_handle_method="CID";} 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"];} else {$agent_search_method="";} if (isset($_GET["agent_search_method_inbound"])) {$agent_search_method_inbound=$_GET["agent_search_method_inbound"];} elseif (isset($_POST["agent_search_method_inbound"])) {$agent_search_method_inbound=$_POST["agent_search_method_inbound"];} else {$agent_search_method_inbound="LB";} if (isset($_GET["agent_search_method_system"])) {$agent_search_method_system=$_GET["agent_search_method_system"];} elseif (isset($_POST["agent_search_method_system"])) {$agent_search_method_system=$_POST["agent_search_method_system"];} else {$agent_search_method_system=0;} if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} else {$phone_code="";} if (isset($_GET["email"])) {$email=$_GET["email"];} elseif (isset($_POST["email"])) {$email=$_POST["email"];} else {$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"];} else {$modify_inbound_dids=0;} 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"];} else {$delete_inbound_dids=0;} 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"];} else {$three_way_call_cid="CAMPAIGN";} 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"];} else {$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"];} else {$forced_timeclock_login="N";} 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"];} else {$answer_sec_pct_rt_stat_one=20;} 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"];} else {$answer_sec_pct_rt_stat_two=30;} 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"];} else {$web_form_target="vdcwebform";} 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"];} else {$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"];} else {$recording_web_link="SERVER_IP";} 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"];} else {$enable_vtiger_integration=0;} 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"];} else {$vtiger_server_ip="";} if (isset($_GET["vtiger_dbname"])) {$vtiger_dbname=$_GET["vtiger_dbname"];} elseif (isset($_POST["vtiger_dbname"])) {$vtiger_dbname=$_POST["vtiger_dbname"];} else {$vtiger_dbname="";} if (isset($_GET["vtiger_login"])) {$vtiger_login=$_GET["vtiger_login"];} elseif (isset($_POST["vtiger_login"])) {$vtiger_login=$_POST["vtiger_login"];} else {$vtiger_login="";} if (isset($_GET["vtiger_pass"])) {$vtiger_pass=$_GET["vtiger_pass"];} elseif (isset($_POST["vtiger_pass"])) {$vtiger_pass=$_POST["vtiger_pass"];} else {$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"];} else {$vtiger_search_category="LEAD";} 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"];} else {$vtiger_create_call_record="Y";} 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"];} else {$vtiger_create_lead_record="Y";} 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"];} else {$vtiger_screen_login="Y";} 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"];} else {$qc_features_active=0;} 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"];} else {$outbound_autodial_active=1;} 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"];} else {$cpd_amd_action="DISABLED";} if (isset($_GET["download_lists"])) {$download_lists=$_GET["download_lists"];} elseif (isset($_POST["download_lists"])) {$download_lists=$_POST["download_lists"];} else {$download_lists=0;} 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"];} else {$active_asterisk_server="Y";} 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"];} else {$generate_vicidial_conf="Y";} 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"];} else {$rebuild_conf_files="Y";} if (isset($_GET["template_id"])) {$template_id=$_GET["template_id"];} elseif (isset($_POST["template_id"])) {$template_id=$_POST["template_id"];} else {$template_id="";} if (isset($_GET["conf_override"])) {$conf_override=$_GET["conf_override"];} elseif (isset($_POST["conf_override"])) {$conf_override=$_POST["conf_override"];} else {$conf_override="";} if (isset($_GET["template_name"])) {$template_name=$_GET["template_name"];} elseif (isset($_POST["template_name"])) {$template_name=$_POST["template_name"];} else {$template_name="";} if (isset($_GET["template_contents"])) {$template_contents=$_GET["template_contents"];} elseif (isset($_POST["template_contents"])) {$template_contents=$_POST["template_contents"];} else {$template_contents="";} if (isset($_GET["carrier_id"])) {$carrier_id=$_GET["carrier_id"];} elseif (isset($_POST["carrier_id"])) {$carrier_id=$_POST["carrier_id"];} else {$carrier_id="";} if (isset($_GET["carrier_name"])) {$carrier_name=$_GET["carrier_name"];} elseif (isset($_POST["carrier_name"])) {$carrier_name=$_POST["carrier_name"];} else {$carrier_name="";} if (isset($_GET["registration_string"])) {$registration_string=$_GET["registration_string"];} elseif (isset($_POST["registration_string"])) {$registration_string=$_POST["registration_string"];} else {$registration_string="";} if (isset($_GET["account_entry"])) {$account_entry=$_GET["account_entry"];} elseif (isset($_POST["account_entry"])) {$account_entry=$_POST["account_entry"];} else {$account_entry="";} if (isset($_GET["globals_string"])) {$globals_string=$_GET["globals_string"];} elseif (isset($_POST["globals_string"])) {$globals_string=$_POST["globals_string"];} else {$globals_string="";} if (isset($_GET["dialplan_entry"])) {$dialplan_entry=$_GET["dialplan_entry"];} elseif (isset($_POST["dialplan_entry"])) {$dialplan_entry=$_POST["dialplan_entry"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$agent_allow_group_alias="N";} 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"];} else {$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"];} else {$outbound_calls_per_second=5;} if (isset($_GET["shift_enforcement"])) {$shift_enforcement=$_GET["shift_enforcement"];} elseif (isset($_POST["shift_enforcement"])) {$shift_enforcement=$_POST["shift_enforcement"];} else {$shift_enforcement="OFF";} 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"];} else {$agent_shift_enforcement_override="DISABLED";} 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"];} else {$manager_shift_enforcement_override=0;} if (isset($_GET["export_reports"])) {$export_reports=$_GET["export_reports"];} elseif (isset($_POST["export_reports"])) {$export_reports=$_POST["export_reports"];} else {$export_reports=0;} 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"];} else {$delete_from_dnc=0;} 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"];} else {$vtiger_search_dead="ASK";} 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"];} else {$vtiger_status_call="N";} if (isset($_GET["sale"])) {$sale=$_GET["sale"];} elseif (isset($_POST["sale"])) {$sale=$_POST["sale"];} else {$sale="N";} if (isset($_GET["dnc"])) {$dnc=$_GET["dnc"];} elseif (isset($_POST["dnc"])) {$dnc=$_POST["dnc"];} else {$dnc="N";} if (isset($_GET["customer_contact"])) {$customer_contact=$_GET["customer_contact"];} elseif (isset($_POST["customer_contact"])) {$customer_contact=$_POST["customer_contact"];} else {$customer_contact="N";} if (isset($_GET["not_interested"])) {$not_interested=$_GET["not_interested"];} elseif (isset($_POST["not_interested"])) {$not_interested=$_POST["not_interested"];} else {$not_interested="N";} if (isset($_GET["unworkable"])) {$unworkable=$_GET["unworkable"];} elseif (isset($_POST["unworkable"])) {$unworkable=$_POST["unworkable"];} else {$unworkable="N";} if (isset($_GET["user_code"])) {$user_code=$_GET["user_code"];} elseif (isset($_POST["user_code"])) {$user_code=$_POST["user_code"];} else {$user_code="";} if (isset($_GET["territory"])) {$territory=$_GET["territory"];} elseif (isset($_POST["territory"])) {$territory=$_POST["territory"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$survey_third_status="NI";} 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"];} else {$survey_fourth_status="NI";} 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"];} else {$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"];} else {$survey_fourth_exten="";} if (isset($_GET["menu_id"])) {$menu_id=$_GET["menu_id"];} elseif (isset($_POST["menu_id"])) {$menu_id=$_POST["menu_id"];} else {$menu_id="";} if (isset($_GET["menu_name"])) {$menu_name=$_GET["menu_name"];} elseif (isset($_POST["menu_name"])) {$menu_name=$_POST["menu_name"];} else {$menu_name="";} if (isset($_GET["menu_prompt"])) {$menu_prompt=$_GET["menu_prompt"];} elseif (isset($_POST["menu_prompt"])) {$menu_prompt=$_POST["menu_prompt"];} else {$menu_prompt="";} if (isset($_GET["menu_timeout"])) {$menu_timeout=$_GET["menu_timeout"];} elseif (isset($_POST["menu_timeout"])) {$menu_timeout=$_POST["menu_timeout"];} else {$menu_timeout=10;} 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"];} else {$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"];} else {$menu_invalid_prompt="";} if (isset($_GET["menu_repeat"])) {$menu_repeat=$_GET["menu_repeat"];} elseif (isset($_POST["menu_repeat"])) {$menu_repeat=$_POST["menu_repeat"];} else {$menu_repeat=0;} 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"];} else {$menu_time_check=0;} 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"];} else {$track_in_vdac=1;} if (isset($_GET["source_menu"])) {$source_menu=$_GET["source_menu"];} elseif (isset($_POST["source_menu"])) {$source_menu=$_POST["source_menu"];} else {$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"];} else {$agentonly_callback_campaign_lock=1;} 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"];} else {$sounds_central_control_active=0;} 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"];} else {$sounds_web_server="127.0.0.1";} 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"];} else {$sounds_web_directory="";} if (isset($_GET["sounds_update"])) {$sounds_update=$_GET["sounds_update"];} elseif (isset($_POST["sounds_update"])) {$sounds_update=$_POST["sounds_update"];} else {$sounds_update="N";} 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"];} else {$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"];} else {$auto_dial_limit=4;} 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"];} else {$user_territories_active=0;} if (isset($_GET["list_status_modification_confirmation"])) {$list_status_modification_confirmation=$_GET["list_status_modification_confirmation"];} elseif (isset($_POST["list_status_modification_confirmation"])) {$list_status_modification_confirmation=$_POST["list_status_modification_confirmation"];} else {$list_status_modification_confirmation=0;} 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"];} else {$vicidial_recording_limit=60;} if (isset($_GET["phone_context"])) {$phone_context=$_GET["phone_context"];} elseif (isset($_POST["phone_context"])) {$phone_context=$_POST["phone_context"];} else {$phone_context="default";} 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"];} else {$carrier_logging_active="Y";} 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"];} else {$drop_lockout_time=0;} 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"];} else {$allow_custom_dialplan=1;} 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"];} else {$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"];} else {$phone_ring_timeout=60;} if (isset($_GET["conf_secret"])) {$conf_secret=$_GET["conf_secret"];} elseif (isset($_POST["conf_secret"])) {$conf_secret=$_POST["conf_secret"];} else {$conf_secret="test";} if (isset($_GET["tracking_group"])) {$tracking_group=$_GET["tracking_group"];} elseif (isset($_POST["tracking_group"])) {$tracking_group=$_POST["tracking_group"];} else {$tracking_group="CALLMENU";} 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"];} else {$no_agent_no_queue="N";} 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"];} else {$no_agent_action="MESSAGE";} 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"];} else {$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"];} else {$quick_transfer_button="N";} 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"];} else {$prepopulate_transfer_preset="N";} 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"];} else {$enable_tts_integration=0;} if (isset($_GET["tts_id"])) {$tts_id=$_GET["tts_id"];} elseif (isset($_POST["tts_id"])) {$tts_id=$_POST["tts_id"];} else {$tts_id="";} if (isset($_GET["tts_name"])) {$tts_name=$_GET["tts_name"];} elseif (isset($_POST["tts_name"])) {$tts_name=$_POST["tts_name"];} else {$tts_name="";} if (isset($_GET["tts_text"])) {$tts_text=$_GET["tts_text"];} elseif (isset($_POST["tts_text"])) {$tts_text=$_POST["tts_text"];} else {$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"];} else {$drop_rate_group="DISABLED";} 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"];} else {$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"];} else {$agent_status_view_time="N";} 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"];} else {$view_calls_in_queue="NONE";} 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"];} else {$view_calls_in_queue_launch="MANUAL";} 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"];} else {$grab_calls_in_queue="N";} 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"];} else {$call_requeue_button="N";} 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"];} else {$pause_after_each_call="N";} 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"];} else {$no_hopper_dialing="N";} 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"];} else {$agent_dial_owner_only="NONE";} if (isset($_GET["reset_time"])) {$reset_time=$_GET["reset_time"];} elseif (isset($_POST["reset_time"])) {$reset_time=$_POST["reset_time"];} else {$reset_time="";} if (isset($_GET["allow_alerts"])) {$allow_alerts=$_GET["allow_alerts"];} elseif (isset($_POST["allow_alerts"])) {$allow_alerts=$_POST["allow_alerts"];} else {$allow_alerts=0;} 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"];} else {$agent_display_dialable_leads="N";} 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"];} else {$vicidial_balance_rank=0;} 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"];} else {$agent_script_override="";} if (isset($_GET["inbound_list_script_override"])) {$inbound_list_script_override=$_GET["inbound_list_script_override"];} elseif (isset($_POST["inbound_list_script_override"])) {$inbound_list_script_override=$_POST["inbound_list_script_override"];} else {$inbound_list_script_override="";} if (isset($_GET["moh_id"])) {$moh_id=$_GET["moh_id"];} elseif (isset($_POST["moh_id"])) {$moh_id=$_POST["moh_id"];} else {$moh_id="";} if (isset($_GET["moh_name"])) {$moh_name=$_GET["moh_name"];} elseif (isset($_POST["moh_name"])) {$moh_name=$_POST["moh_name"];} else {$moh_name="";} if (isset($_GET["random"])) {$random=$_GET["random"];} elseif (isset($_POST["random"])) {$random=$_POST["random"];} else {$random="N";} if (isset($_GET["filename"])) {$filename=$_GET["filename"];} elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} else {$filename="";} if (isset($_GET["rank"])) {$rank=$_GET["rank"];} elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];} else {$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"];} else {$rebuild_music_on_hold="Y";} 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"];} else {$active_agent_login_server="Y";} 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"];} else {$enable_second_webform=1;} 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"];} else {$web_form_address_two="";} if (isset($_GET["waitforsilence_options"])) {$waitforsilence_options=$_GET["waitforsilence_options"];} elseif (isset($_POST["waitforsilence_options"])) {$waitforsilence_options=$_POST["waitforsilence_options"];} else {$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"];} else {$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"];} else {$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"];} else {$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"];} else {$agent_select_territories="N";} 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"];} else {$agent_choose_territories="";} if (isset($_GET["carrier_description"])) {$carrier_description=$_GET["carrier_description"];} elseif (isset($_POST["carrier_description"])) {$carrier_description=$_POST["carrier_description"];} else {$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"];} else {$delete_vm_after_email="N";} if (isset($_GET["custom_one"])) {$custom_one=$_GET["custom_one"];} elseif (isset($_POST["custom_one"])) {$custom_one=$_POST["custom_one"];} else {$custom_one="";} if (isset($_GET["custom_two"])) {$custom_two=$_GET["custom_two"];} elseif (isset($_POST["custom_two"])) {$custom_two=$_POST["custom_two"];} else {$custom_two="";} if (isset($_GET["custom_three"])) {$custom_three=$_GET["custom_three"];} elseif (isset($_POST["custom_three"])) {$custom_three=$_POST["custom_three"];} else {$custom_three="";} if (isset($_GET["custom_four"])) {$custom_four=$_GET["custom_four"];} elseif (isset($_POST["custom_four"])) {$custom_four=$_POST["custom_four"];} else {$custom_four="";} if (isset($_GET["custom_five"])) {$custom_five=$_GET["custom_five"];} elseif (isset($_POST["custom_five"])) {$custom_five=$_POST["custom_five"];} else {$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"];} else {$crm_popup_login="N";} 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"];} else {$timer_action="NONE";} 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"];} else {$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"];} else {$timer_action_seconds='-1';} 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"];} else {$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"];} else {$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"];} else {$xferconf_e_number="";} if (isset($_GET["record_call"])) {$record_call=$_GET["record_call"];} elseif (isset($_POST["record_call"])) {$record_call=$_POST["record_call"];} else {$record_call="N";} if (isset($_GET["ignore_list_script_override"])) {$ignore_list_script_override=$_GET["ignore_list_script_override"];} elseif (isset($_POST["ignore_list_script_override"])) {$ignore_list_script_override=$_POST["ignore_list_script_override"];} else {$ignore_list_script_override="N";} if (isset($_GET["external_server_ip"])) {$external_server_ip=$_GET["external_server_ip"];} elseif (isset($_POST["external_server_ip"])){$external_server_ip=$_POST["external_server_ip"];} else {$external_server_ip="";} if (isset($_GET["is_webphone"])) {$is_webphone=$_GET["is_webphone"];} elseif (isset($_POST["is_webphone"])) {$is_webphone=$_POST["is_webphone"];} else {$is_webphone="N";} if (isset($_GET["use_external_server_ip"])) {$use_external_server_ip=$_GET["use_external_server_ip"];} elseif (isset($_POST["use_external_server_ip"])){$use_external_server_ip=$_POST["use_external_server_ip"];} else {$use_external_server_ip="N";} if (isset($_GET["default_webphone"])) {$default_webphone=$_GET["default_webphone"];} elseif (isset($_POST["default_webphone"])) {$default_webphone=$_POST["default_webphone"];} else {$default_webphone=0;} if (isset($_GET["default_external_server_ip"])) {$default_external_server_ip=$_GET["default_external_server_ip"];} elseif (isset($_POST["default_external_server_ip"])){$default_external_server_ip=$_POST["default_external_server_ip"];} else {$default_external_server_ip=0;} if (isset($_GET["webphone_url"])) {$webphone_url=$_GET["webphone_url"];} elseif (isset($_POST["webphone_url"])) {$webphone_url=$_POST["webphone_url"];} if (isset($_GET["enable_agc_dispo_log"])) {$enable_agc_dispo_log=$_GET["enable_agc_dispo_log"];} elseif (isset($_POST["enable_agc_dispo_log"])) {$enable_agc_dispo_log=$_POST["enable_agc_dispo_log"];} else {$enable_agc_dispo_log=0;} if (isset($_GET["agent_call_log_view"])) {$agent_call_log_view=$_GET["agent_call_log_view"];} elseif (isset($_POST["agent_call_log_view"])) {$agent_call_log_view=$_POST["agent_call_log_view"];} else {$agent_call_log_view="N";} if (isset($_GET["agent_call_log_view_override"])) {$agent_call_log_view_override=$_GET["agent_call_log_view_override"];} elseif (isset($_POST["agent_call_log_view_override"])) {$agent_call_log_view_override=$_POST["agent_call_log_view_override"];} else {$agent_call_log_view_override="DISABLED";} if (isset($_GET["use_custom_cid"])) {$use_custom_cid=$_GET["use_custom_cid"];} elseif (isset($_POST["use_custom_cid"])) {$use_custom_cid=$_POST["use_custom_cid"];} else {$use_custom_cid="N";} if (isset($_GET["scheduled_callbacks_alert"])) {$scheduled_callbacks_alert=$_GET["scheduled_callbacks_alert"];} elseif (isset($_POST["scheduled_callbacks_alert"])) {$scheduled_callbacks_alert=$_POST["scheduled_callbacks_alert"];} else {$scheduled_callbacks_alert="NONE";} if (isset($_GET["scheduled_callbacks_email_alert"])) {$scheduled_callbacks_email_alert=$_GET["scheduled_callbacks_email_alert"];} elseif (isset($_POST["scheduled_callbacks_email_alert"])) {$scheduled_callbacks_email_alert=$_POST["scheduled_callbacks_email_alert"];} else {$scheduled_callbacks_email_alert="N";} if (isset($_GET["queuemetrics_loginout"])) {$queuemetrics_loginout=$_GET["queuemetrics_loginout"];} elseif (isset($_POST["queuemetrics_loginout"])) {$queuemetrics_loginout=$_POST["queuemetrics_loginout"];} else {$queuemetrics_loginout="STANDARD";} if (isset($_GET["callcard_enabled"])) {$callcard_enabled=$_GET["callcard_enabled"];} elseif (isset($_POST["callcard_enabled"])) {$callcard_enabled=$_POST["callcard_enabled"];} else {$callcard_enabled=0;} if (isset($_GET["callcard_admin"])) {$callcard_admin=$_GET["callcard_admin"];} elseif (isset($_POST["callcard_admin"])) {$callcard_admin=$_POST["callcard_admin"];} else {$callcard_admin=0;} if (isset($_GET["agent_xfer_consultative"])) {$agent_xfer_consultative=$_GET["agent_xfer_consultative"];} elseif (isset($_POST["agent_xfer_consultative"])) {$agent_xfer_consultative=$_POST["agent_xfer_consultative"];} else {$agent_xfer_consultative="Y";} if (isset($_GET["agent_xfer_dial_override"])) {$agent_xfer_dial_override=$_GET["agent_xfer_dial_override"];} elseif (isset($_POST["agent_xfer_dial_override"])) {$agent_xfer_dial_override=$_POST["agent_xfer_dial_override"];} else {$agent_xfer_dial_override="Y";} if (isset($_GET["agent_xfer_vm_transfer"])) {$agent_xfer_vm_transfer=$_GET["agent_xfer_vm_transfer"];} elseif (isset($_POST["agent_xfer_vm_transfer"])) {$agent_xfer_vm_transfer=$_POST["agent_xfer_vm_transfer"];} else {$agent_xfer_vm_transfer="Y";} if (isset($_GET["agent_xfer_blind_transfer"])) {$agent_xfer_blind_transfer=$_GET["agent_xfer_blind_transfer"];} elseif (isset($_POST["agent_xfer_blind_transfer"])) {$agent_xfer_blind_transfer=$_POST["agent_xfer_blind_transfer"];} else {$agent_xfer_blind_transfer="Y";} if (isset($_GET["agent_xfer_dial_with_customer"])) {$agent_xfer_dial_with_customer=$_GET["agent_xfer_dial_with_customer"];} elseif (isset($_POST["agent_xfer_dial_with_customer"])) {$agent_xfer_dial_with_customer=$_POST["agent_xfer_dial_with_customer"];} else {$agent_xfer_dial_with_customer="Y";} if (isset($_GET["agent_xfer_park_customer_dial"])) {$agent_xfer_park_customer_dial=$_GET["agent_xfer_park_customer_dial"];} elseif (isset($_POST["agent_xfer_park_customer_dial"])) {$agent_xfer_park_customer_dial=$_POST["agent_xfer_park_customer_dial"];} else {$agent_xfer_park_customer_dial="Y";} if (isset($_GET["agent_fullscreen"])) {$agent_fullscreen=$_GET["agent_fullscreen"];} elseif (isset($_POST["agent_fullscreen"])) {$agent_fullscreen=$_POST["agent_fullscreen"];} else {$agent_fullscreen="N";} if (isset($_GET["extension_id"])) {$extension_id=$_GET["extension_id"];} elseif (isset($_POST["extension_id"])) {$extension_id=$_POST["extension_id"];} else {$extension_id="";} if (isset($_GET["extension_group_id"])) {$extension_group_id=$_GET["extension_group_id"];} elseif (isset($_POST["extension_group_id"])) {$extension_group_id=$_POST["extension_group_id"];} else {$extension_group_id="";} if (isset($_GET["campaign_groups"])) {$campaign_groups=$_GET["campaign_groups"];} elseif (isset($_POST["campaign_groups"])) {$campaign_groups=$_POST["campaign_groups"];} else {$campaign_groups="";} if (isset($_GET["extension_group"])) {$extension_group=$_GET["extension_group"];} elseif (isset($_POST["extension_group"])) {$extension_group=$_POST["extension_group"];} else {$extension_group="NONE";} if (isset($_GET["agent_choose_blended"])) {$agent_choose_blended=$_GET["agent_choose_blended"];} elseif (isset($_POST["agent_choose_blended"])) {$agent_choose_blended=$_POST["agent_choose_blended"];} else {$agent_choose_blended=1;} if (isset($_GET["queuemetrics_callstatus"])) {$queuemetrics_callstatus=$_GET["queuemetrics_callstatus"];} elseif (isset($_POST["queuemetrics_callstatus"])) {$queuemetrics_callstatus=$_POST["queuemetrics_callstatus"];} else {$queuemetrics_callstatus=1;} if (isset($_GET["extension_appended_cidname"])) {$extension_appended_cidname=$_GET["extension_appended_cidname"];} elseif (isset($_POST["extension_appended_cidname"])) {$extension_appended_cidname=$_POST["extension_appended_cidname"];} else {$extension_appended_cidname="N";} if (isset($_GET["scheduled_callbacks_count"])) {$scheduled_callbacks_count=$_GET["scheduled_callbacks_count"];} elseif (isset($_POST["scheduled_callbacks_count"])) {$scheduled_callbacks_count=$_POST["scheduled_callbacks_count"];} else {$scheduled_callbacks_count="ALL_ACTIVE";} if (isset($_GET["realtime_block_user_info"])) {$realtime_block_user_info=$_GET["realtime_block_user_info"];} elseif (isset($_POST["realtime_block_user_info"])) {$realtime_block_user_info=$_POST["realtime_block_user_info"];} else {$realtime_block_user_info=0;} if (isset($_GET["manual_dial_override"])) {$manual_dial_override=$_GET["manual_dial_override"];} elseif (isset($_POST["manual_dial_override"])) {$manual_dial_override=$_POST["manual_dial_override"];} else {$manual_dial_override="NONE";} if (isset($_GET["blind_monitor_warning"])) {$blind_monitor_warning=$_GET["blind_monitor_warning"];} elseif (isset($_POST["blind_monitor_warning"])) {$blind_monitor_warning=$_POST["blind_monitor_warning"];} else {$blind_monitor_warning="DISABLED";} if (isset($_GET["blind_monitor_message"])) {$blind_monitor_message=$_GET["blind_monitor_message"];} elseif (isset($_POST["blind_monitor_message"])) {$blind_monitor_message=$_POST["blind_monitor_message"];} else {$blind_monitor_message="";} if (isset($_GET["blind_monitor_filename"])) {$blind_monitor_filename=$_GET["blind_monitor_filename"];} elseif (isset($_POST["blind_monitor_filename"])) {$blind_monitor_filename=$_POST["blind_monitor_filename"];} else {$blind_monitor_filename="";} if (isset($_GET["uniqueid_status_display"])) {$uniqueid_status_display=$_GET["uniqueid_status_display"];} elseif (isset($_POST["uniqueid_status_display"])) {$uniqueid_status_display=$_POST["uniqueid_status_display"];} else {$uniqueid_status_display="DISABLED";} if (isset($_GET["uniqueid_status_prefix"])) {$uniqueid_status_prefix=$_GET["uniqueid_status_prefix"];} elseif (isset($_POST["uniqueid_status_prefix"])) {$uniqueid_status_prefix=$_POST["uniqueid_status_prefix"];} else {$uniqueid_status_prefix="";} if (isset($_GET["default_codecs"])) {$default_codecs=$_GET["default_codecs"];} elseif (isset($_POST["default_codecs"])) {$default_codecs=$_POST["default_codecs"];} else {$default_codecs="";} if (isset($_GET["codecs_list"])) {$codecs_list=$_GET["codecs_list"];} elseif (isset($_POST["codecs_list"])) {$codecs_list=$_POST["codecs_list"];} else {$codecs_list="";} if (isset($_GET["codecs_with_template"])) {$codecs_with_template=$_GET["codecs_with_template"];} elseif (isset($_POST["codecs_with_template"])) {$codecs_with_template=$_POST["codecs_with_template"];} else {$codecs_with_template=0;} if (isset($_GET["custom_fields_modify"])) {$custom_fields_modify=$_GET["custom_fields_modify"];} elseif (isset($_POST["custom_fields_modify"])) {$custom_fields_modify=$_POST["custom_fields_modify"];} else {$custom_fields_modify=0;} if (isset($_GET["hold_time_option_minimum"])) {$hold_time_option_minimum=$_GET["hold_time_option_minimum"];} elseif (isset($_POST["hold_time_option_minimum"])) {$hold_time_option_minimum=$_POST["hold_time_option_minimum"];} else {$hold_time_option_minimum=0;} if (isset($_GET["source_carrier"])) {$source_carrier=$_GET["source_carrier"];} elseif (isset($_POST["source_carrier"])) {$source_carrier=$_POST["source_carrier"];} else {$source_carrier="";} if (isset($_GET["hold_time_option_press_filename"])) {$hold_time_option_press_filename=$_GET["hold_time_option_press_filename"];} elseif (isset($_POST["hold_time_option_press_filename"])) {$hold_time_option_press_filename=$_POST["hold_time_option_press_filename"];} else {$hold_time_option_press_filename="";} if (isset($_GET["hold_time_option_callmenu"])) {$hold_time_option_callmenu=$_GET["hold_time_option_callmenu"];} elseif (isset($_POST["hold_time_option_callmenu"])) {$hold_time_option_callmenu=$_POST["hold_time_option_callmenu"];} else {$hold_time_option_callmenu="";} if (isset($_GET["inbound_queue_no_dial"])) {$inbound_queue_no_dial=$_GET["inbound_queue_no_dial"];} elseif (isset($_POST["inbound_queue_no_dial"])) {$inbound_queue_no_dial=$_POST["inbound_queue_no_dial"];} else {$inbound_queue_no_dial="DISABLED";} if (isset($_GET["default_afterhours_filename_override"])) {$default_afterhours_filename_override=$_GET["default_afterhours_filename_override"];} elseif (isset($_POST["default_afterhours_filename_override"])) {$default_afterhours_filename_override=$_POST["default_afterhours_filename_override"];} else {$default_afterhours_filename_override="";} if (isset($_GET["sunday_afterhours_filename_override"])) {$sunday_afterhours_filename_override=$_GET["sunday_afterhours_filename_override"];} elseif (isset($_POST["sunday_afterhours_filename_override"])) {$sunday_afterhours_filename_override=$_POST["sunday_afterhours_filename_override"];} else {$sunday_afterhours_filename_override="";} if (isset($_GET["monday_afterhours_filename_override"])) {$monday_afterhours_filename_override=$_GET["monday_afterhours_filename_override"];} elseif (isset($_POST["monday_afterhours_filename_override"])) {$monday_afterhours_filename_override=$_POST["monday_afterhours_filename_override"];} else {$monday_afterhours_filename_override="";} if (isset($_GET["tuesday_afterhours_filename_override"])) {$tuesday_afterhours_filename_override=$_GET["tuesday_afterhours_filename_override"];} elseif (isset($_POST["tuesday_afterhours_filename_override"])) {$tuesday_afterhours_filename_override=$_POST["tuesday_afterhours_filename_override"];} else {$tuesday_afterhours_filename_override="";} if (isset($_GET["wednesday_afterhours_filename_override"])) {$wednesday_afterhours_filename_override=$_GET["wednesday_afterhours_filename_override"];} elseif (isset($_POST["wednesday_afterhours_filename_override"])) {$wednesday_afterhours_filename_override=$_POST["wednesday_afterhours_filename_override"];} else {$wednesday_afterhours_filename_override="";} if (isset($_GET["thursday_afterhours_filename_override"])) {$thursday_afterhours_filename_override=$_GET["thursday_afterhours_filename_override"];} elseif (isset($_POST["thursday_afterhours_filename_override"])) {$thursday_afterhours_filename_override=$_POST["thursday_afterhours_filename_override"];} else {$thursday_afterhours_filename_override="";} if (isset($_GET["friday_afterhours_filename_override"])) {$friday_afterhours_filename_override=$_GET["friday_afterhours_filename_override"];} elseif (isset($_POST["friday_afterhours_filename_override"])) {$friday_afterhours_filename_override=$_POST["friday_afterhours_filename_override"];} else {$friday_afterhours_filename_override="";} if (isset($_GET["saturday_afterhours_filename_override"])) {$saturday_afterhours_filename_override=$_GET["saturday_afterhours_filename_override"];} elseif (isset($_POST["saturday_afterhours_filename_override"])) {$saturday_afterhours_filename_override=$_POST["saturday_afterhours_filename_override"];} else {$saturday_afterhours_filename_override="";} if (isset($_GET["onhold_prompt_no_block"])) {$onhold_prompt_no_block=$_GET["onhold_prompt_no_block"];} elseif (isset($_POST["onhold_prompt_no_block"])) {$onhold_prompt_no_block=$_POST["onhold_prompt_no_block"];} else {$onhold_prompt_no_block="N";} if (isset($_GET["onhold_prompt_seconds"])) {$onhold_prompt_seconds=$_GET["onhold_prompt_seconds"];} elseif (isset($_POST["onhold_prompt_seconds"])) {$onhold_prompt_seconds=$_POST["onhold_prompt_seconds"];} else {$onhold_prompt_seconds=9;} if (isset($_GET["hold_time_option_no_block"])) {$hold_time_option_no_block=$_GET["hold_time_option_no_block"];} elseif (isset($_POST["hold_time_option_no_block"])) {$hold_time_option_no_block=$_POST["hold_time_option_no_block"];} else {$hold_time_option_no_block="N";} if (isset($_GET["hold_time_option_prompt_seconds"])) {$hold_time_option_prompt_seconds=$_GET["hold_time_option_prompt_seconds"];} elseif (isset($_POST["hold_time_option_prompt_seconds"])) {$hold_time_option_prompt_seconds=$_POST["hold_time_option_prompt_seconds"];} else {$hold_time_option_prompt_seconds=10;} if (isset($_GET["admin_web_directory"])) {$admin_web_directory=$_GET["admin_web_directory"];} elseif (isset($_POST["admin_web_directory"])) {$admin_web_directory=$_POST["admin_web_directory"];} else {$admin_web_directory="";} if (isset($_GET["tts_voice"])) {$tts_voice=$_GET["tts_voice"];} elseif (isset($_POST["tts_voice"])) {$tts_voice=$_POST["tts_voice"];} else {$tts_voice="";} if (isset($_GET["label_title"])) {$label_title=$_GET["label_title"];} elseif (isset($_POST["label_title"])) {$label_title=$_POST["label_title"];} else {$label_title="";} if (isset($_GET["label_first_name"])) {$label_first_name=$_GET["label_first_name"];} elseif (isset($_POST["label_first_name"])) {$label_first_name=$_POST["label_first_name"];} else {$label_first_name="";} if (isset($_GET["label_middle_initial"])) {$label_middle_initial=$_GET["label_middle_initial"];} elseif (isset($_POST["label_middle_initial"])) {$label_middle_initial=$_POST["label_middle_initial"];} else {$label_middle_initial="";} if (isset($_GET["label_last_name"])) {$label_last_name=$_GET["label_last_name"];} elseif (isset($_POST["label_last_name"])) {$label_last_name=$_POST["label_last_name"];} else {$label_last_name="";} if (isset($_GET["label_address1"])) {$label_address1=$_GET["label_address1"];} elseif (isset($_POST["label_address1"])) {$label_address1=$_POST["label_address1"];} else {$label_address1="";} if (isset($_GET["label_address2"])) {$label_address2=$_GET["label_address2"];} elseif (isset($_POST["label_address2"])) {$label_address2=$_POST["label_address2"];} else {$label_address2="";} if (isset($_GET["label_address3"])) {$label_address3=$_GET["label_address3"];} elseif (isset($_POST["label_address3"])) {$label_address3=$_POST["label_address3"];} else {$label_address3="";} if (isset($_GET["label_city"])) {$label_city=$_GET["label_city"];} elseif (isset($_POST["label_city"])) {$label_city=$_POST["label_city"];} else {$label_city="";} if (isset($_GET["label_state"])) {$label_state=$_GET["label_state"];} elseif (isset($_POST["label_state"])) {$label_state=$_POST["label_state"];} else {$label_state="";} if (isset($_GET["label_province"])) {$label_province=$_GET["label_province"];} elseif (isset($_POST["label_province"])) {$label_province=$_POST["label_province"];} else {$label_province="";} if (isset($_GET["label_postal_code"])) {$label_postal_code=$_GET["label_postal_code"];} elseif (isset($_POST["label_postal_code"])) {$label_postal_code=$_POST["label_postal_code"];} else {$label_postal_code="";} if (isset($_GET["label_vendor_lead_code"])) {$label_vendor_lead_code=$_GET["label_vendor_lead_code"];} elseif (isset($_POST["label_vendor_lead_code"])){$label_vendor_lead_code=$_POST["label_vendor_lead_code"];} else {$label_vendor_lead_code="";} if (isset($_GET["label_gender"])) {$label_gender=$_GET["label_gender"];} elseif (isset($_POST["label_gender"])) {$label_gender=$_POST["label_gender"];} else {$label_gender="";} if (isset($_GET["label_phone_number"])) {$label_phone_number=$_GET["label_phone_number"];} elseif (isset($_POST["label_phone_number"])) {$label_phone_number=$_POST["label_phone_number"];} else {$label_phone_number="";} if (isset($_GET["label_phone_code"])) {$label_phone_code=$_GET["label_phone_code"];} elseif (isset($_POST["label_phone_code"])) {$label_phone_code=$_POST["label_phone_code"];} else {$label_phone_code="";} if (isset($_GET["label_alt_phone"])) {$label_alt_phone=$_GET["label_alt_phone"];} elseif (isset($_POST["label_alt_phone"])) {$label_alt_phone=$_POST["label_alt_phone"];} else {$label_alt_phone="";} if (isset($_GET["label_security_phrase"])) {$label_security_phrase=$_GET["label_security_phrase"];} elseif (isset($_POST["label_security_phrase"])) {$label_security_phrase=$_POST["label_security_phrase"];} else {$label_security_phrase="";} if (isset($_GET["label_email"])) {$label_email=$_GET["label_email"];} elseif (isset($_POST["label_email"])) {$label_email=$_POST["label_email"];} else {$label_email="";} if (isset($_GET["label_comments"])) {$label_comments=$_GET["label_comments"];} elseif (isset($_POST["label_comments"])) {$label_comments=$_POST["label_comments"];} else {$label_comments="";} if (isset($_GET["custom_fields_enabled"])) {$custom_fields_enabled=$_GET["custom_fields_enabled"];} elseif (isset($_POST["custom_fields_enabled"])) {$custom_fields_enabled=$_POST["custom_fields_enabled"];} else {$custom_fields_enabled=0;} if (isset($_GET["slave_db_server"])) {$slave_db_server=$_GET["slave_db_server"];} elseif (isset($_POST["slave_db_server"])) {$slave_db_server=$_POST["slave_db_server"];} else {$slave_db_server="";} if (isset($_GET["reports_use_slave_db"])) {$reports_use_slave_db=$_GET["reports_use_slave_db"];} elseif (isset($_POST["reports_use_slave_db"])) {$reports_use_slave_db=$_POST["reports_use_slave_db"];} else {$reports_use_slave_db="";} if (isset($_GET["custom_reports_use_slave_db"])) {$custom_reports_use_slave_db=$_GET["custom_reports_use_slave_db"];} elseif (isset($_POST["custom_reports_use_slave_db"])) {$custom_reports_use_slave_db=$_POST["custom_reports_use_slave_db"];} else {$custom_reports_use_slave_db="";} if (isset($_GET["hold_time_second_option"])) {$hold_time_second_option=$_GET["hold_time_second_option"];} elseif (isset($_POST["hold_time_second_option"])) {$hold_time_second_option=$_POST["hold_time_second_option"];} else {$hold_time_second_option="NONE";} if (isset($_GET["hold_time_third_option"])) {$hold_time_third_option=$_GET["hold_time_third_option"];} elseif (isset($_POST["hold_time_third_option"])) {$hold_time_third_option=$_POST["hold_time_third_option"];} else {$hold_time_third_option="NONE";} if (isset($_GET["wait_hold_option_priority"])) {$wait_hold_option_priority=$_GET["wait_hold_option_priority"];} elseif (isset($_POST["wait_hold_option_priority"])) {$wait_hold_option_priority=$_POST["wait_hold_option_priority"];} else {$wait_hold_option_priority="WAIT";} if (isset($_GET["wait_time_option"])) {$wait_time_option=$_GET["wait_time_option"];} elseif (isset($_POST["wait_time_option"])) {$wait_time_option=$_POST["wait_time_option"];} else {$wait_time_option="NONE";} if (isset($_GET["wait_time_second_option"])) {$wait_time_second_option=$_GET["wait_time_second_option"];} elseif (isset($_POST["wait_time_second_option"])) {$wait_time_second_option=$_POST["wait_time_second_option"];} else {$wait_time_second_option="NONE";} if (isset($_GET["wait_time_third_option"])) {$wait_time_third_option=$_GET["wait_time_third_option"];} elseif (isset($_POST["wait_time_third_option"])) {$wait_time_third_option=$_POST["wait_time_third_option"];} else {$wait_time_third_option="NONE";} if (isset($_GET["wait_time_option_seconds"])) {$wait_time_option_seconds=$_GET["wait_time_option_seconds"];} elseif (isset($_POST["wait_time_option_seconds"])) {$wait_time_option_seconds=$_POST["wait_time_option_seconds"];} else {$wait_time_option_seconds=120;} if (isset($_GET["wait_time_option_exten"])) {$wait_time_option_exten=$_GET["wait_time_option_exten"];} elseif (isset($_POST["wait_time_option_exten"])) {$wait_time_option_exten=$_POST["wait_time_option_exten"];} else {$wait_time_option_exten=8300;} if (isset($_GET["wait_time_option_voicemail"])) {$wait_time_option_voicemail=$_GET["wait_time_option_voicemail"];} elseif (isset($_POST["wait_time_option_voicemail"])) {$wait_time_option_voicemail=$_POST["wait_time_option_voicemail"];} else {$wait_time_option_voicemail="";} if (isset($_GET["wait_time_option_xfer_group"])) {$wait_time_option_xfer_group=$_GET["wait_time_option_xfer_group"];} elseif (isset($_POST["wait_time_option_xfer_group"])) {$wait_time_option_xfer_group=$_POST["wait_time_option_xfer_group"];} else {$wait_time_option_xfer_group="---NONE---";} if (isset($_GET["wait_time_option_callmenu"])) {$wait_time_option_callmenu=$_GET["wait_time_option_callmenu"];} elseif (isset($_POST["wait_time_option_callmenu"])) {$wait_time_option_callmenu=$_POST["wait_time_option_callmenu"];} else {$wait_time_option_callmenu="";} if (isset($_GET["wait_time_option_callback_filename"])) {$wait_time_option_callback_filename=$_GET["wait_time_option_callback_filename"];} elseif (isset($_POST["wait_time_option_callback_filename"])) {$wait_time_option_callback_filename=$_POST["wait_time_option_callback_filename"];} else {$wait_time_option_callback_filename="";} if (isset($_GET["wait_time_option_callback_list_id"])) {$wait_time_option_callback_list_id=$_GET["wait_time_option_callback_list_id"];} elseif (isset($_POST["wait_time_option_callback_list_id"])) {$wait_time_option_callback_list_id=$_POST["wait_time_option_callback_list_id"];} else {$wait_time_option_callback_list_id=999;} if (isset($_GET["wait_time_option_press_filename"])) {$wait_time_option_press_filename=$_GET["wait_time_option_press_filename"];} elseif (isset($_POST["wait_time_option_press_filename"])) {$wait_time_option_press_filename=$_POST["wait_time_option_press_filename"];} else {$wait_time_option_press_filename="";} if (isset($_GET["wait_time_option_no_block"])) {$wait_time_option_no_block=$_GET["wait_time_option_no_block"];} elseif (isset($_POST["wait_time_option_no_block"])) {$wait_time_option_no_block=$_POST["wait_time_option_no_block"];} else {$wait_time_option_no_block="N";} if (isset($_GET["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_GET["wait_time_option_prompt_seconds"];} elseif (isset($_POST["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_POST["wait_time_option_prompt_seconds"];} else {$wait_time_option_prompt_seconds=10;} if (isset($_GET["timer_action_destination"])) {$timer_action_destination=$_GET["timer_action_destination"];} elseif (isset($_POST["timer_action_destination"])) {$timer_action_destination=$_POST["timer_action_destination"];} else {$timer_action_destination="";} if (isset($_GET["allowed_reports"])) {$allowed_reports=$_GET["allowed_reports"];} elseif (isset($_POST["allowed_reports"])) {$allowed_reports=$_POST["allowed_reports"];} if (isset($_GET["allowed_custom_reports"])) {$allowed_custom_reports=$_GET["allowed_custom_reports"];} elseif (isset($_POST["allowed_custom_reports"])) {$allowed_custom_reports=$_POST["allowed_custom_reports"];} if (isset($_GET["filter_phone_group_id"])) {$filter_phone_group_id=$_GET["filter_phone_group_id"];} elseif (isset($_POST["filter_phone_group_id"])) {$filter_phone_group_id=$_POST["filter_phone_group_id"];} else {$filter_phone_group_id="";} if (isset($_GET["filter_phone_group_name"])) {$filter_phone_group_name=$_GET["filter_phone_group_name"];} elseif (isset($_POST["filter_phone_group_name"])) {$filter_phone_group_name=$_POST["filter_phone_group_name"];} else {$filter_phone_group_name="";} if (isset($_GET["filter_phone_group_description"])) {$filter_phone_group_description=$_GET["filter_phone_group_description"];} elseif (isset($_POST["filter_phone_group_description"])) {$filter_phone_group_description=$_POST["filter_phone_group_description"];} else {$filter_phone_group_description="";} if (isset($_GET["filter_inbound_number"])) {$filter_inbound_number=$_GET["filter_inbound_number"];} elseif (isset($_POST["filter_inbound_number"])) {$filter_inbound_number=$_POST["filter_inbound_number"];} else {$filter_inbound_number="DISABLED";} if (isset($_GET["filter_url"])) {$filter_url=$_GET["filter_url"];} elseif (isset($_POST["filter_url"])) {$filter_url=$_POST["filter_url"];} if (isset($_GET["filter_action"])) {$filter_action=$_GET["filter_action"];} elseif (isset($_POST["filter_action"])) {$filter_action=$_POST["filter_action"];} else {$filter_action="EXTEN";} if (isset($_GET["filter_extension"])) {$filter_extension=$_GET["filter_extension"];} elseif (isset($_POST["filter_extension"])) {$filter_extension=$_POST["filter_extension"];} else {$filter_extension="9998811112";} if (isset($_GET["filter_exten_context"])) {$filter_exten_context=$_GET["filter_exten_context"];} elseif (isset($_POST["filter_exten_context"])) {$filter_exten_context=$_POST["filter_exten_context"];} else {$filter_exten_context="";} if (isset($_GET["filter_voicemail_ext"])) {$filter_voicemail_ext=$_GET["filter_voicemail_ext"];} elseif (isset($_POST["filter_voicemail_ext"])) {$filter_voicemail_ext=$_POST["filter_voicemail_ext"];} else {$filter_voicemail_ext="";} if (isset($_GET["filter_phone"])) {$filter_phone=$_GET["filter_phone"];} elseif (isset($_POST["filter_phone"])) {$filter_phone=$_POST["filter_phone"];} else {$filter_phone="";} if (isset($_GET["filter_server_ip"])) {$filter_server_ip=$_GET["filter_server_ip"];} elseif (isset($_POST["filter_server_ip"])) {$filter_server_ip=$_POST["filter_server_ip"];} else {$filter_server_ip="";} if (isset($_GET["filter_user"])) {$filter_user=$_GET["filter_user"];} elseif (isset($_POST["filter_user"])) {$filter_user=$_POST["filter_user"];} else {$filter_user="";} if (isset($_GET["filter_user_unavailable_action"])) {$filter_user_unavailable_action=$_GET["filter_user_unavailable_action"];} elseif (isset($_POST["filter_user_unavailable_action"])) {$filter_user_unavailable_action=$_POST["filter_user_unavailable_action"];} else {$filter_user_unavailable_action="VOICEMAIL";} if (isset($_GET["filter_user_route_settings_ingroup"])) {$filter_user_route_settings_ingroup=$_GET["filter_user_route_settings_ingroup"];} elseif (isset($_POST["filter_user_route_settings_ingroup"])) {$filter_user_route_settings_ingroup=$_POST["filter_user_route_settings_ingroup"];} else {$filter_user_route_settings_ingroup="AGENTDIRECT";} if (isset($_GET["filter_group_id"])) {$filter_group_id=$_GET["filter_group_id"];} elseif (isset($_POST["filter_group_id"])) {$filter_group_id=$_POST["filter_group_id"];} else {$filter_group_id="";} if (isset($_GET["filter_call_handle_method"])) {$filter_call_handle_method=$_GET["filter_call_handle_method"];} elseif (isset($_POST["filter_call_handle_method"])) {$filter_call_handle_method=$_POST["filter_call_handle_method"];} else {$filter_call_handle_method="CID";} if (isset($_GET["filter_agent_search_method"])) {$filter_agent_search_method=$_GET["filter_agent_search_method"];} elseif (isset($_POST["filter_agent_search_method"])) {$filter_agent_search_method=$_POST["filter_agent_search_method"];} else {$filter_agent_search_method="LB";} if (isset($_GET["filter_list_id"])) {$filter_list_id=$_GET["filter_list_id"];} elseif (isset($_POST["filter_list_id"])) {$filter_list_id=$_POST["filter_list_id"];} else {$filter_list_id=999;} if (isset($_GET["filter_campaign_id"])) {$filter_campaign_id=$_GET["filter_campaign_id"];} elseif (isset($_POST["filter_campaign_id"])) {$filter_campaign_id=$_POST["filter_campaign_id"];} else {$filter_campaign_id="";} if (isset($_GET["filter_phone_code"])) {$filter_phone_code=$_GET["filter_phone_code"];} elseif (isset($_POST["filter_phone_code"])) {$filter_phone_code=$_POST["filter_phone_code"];} else {$filter_phone_code="";} if (isset($_GET["filter_menu_id"])) {$filter_menu_id=$_GET["filter_menu_id"];} elseif (isset($_POST["filter_menu_id"])) {$filter_menu_id=$_POST["filter_menu_id"];} else {$filter_menu_id="";} if (isset($_GET["filter_clean_cid_number"])) {$filter_clean_cid_number=$_GET["filter_clean_cid_number"];} elseif (isset($_POST["filter_clean_cid_number"])) {$filter_clean_cid_number=$_POST["filter_clean_cid_number"];} else {$filter_clean_cid_number="";} if (isset($_GET["webphone_url_override"])) {$webphone_url_override=$_GET["webphone_url_override"];} elseif (isset($_POST["webphone_url_override"])) {$webphone_url_override=$_POST["webphone_url_override"];} if (isset($_GET["calculate_estimated_hold_seconds"])) {$calculate_estimated_hold_seconds=$_GET["calculate_estimated_hold_seconds"];} elseif (isset($_POST["calculate_estimated_hold_seconds"])) {$calculate_estimated_hold_seconds=$_POST["calculate_estimated_hold_seconds"];} else {$calculate_estimated_hold_seconds=0;} if (isset($_GET["enable_xfer_presets"])) {$enable_xfer_presets=$_GET["enable_xfer_presets"];} elseif (isset($_POST["enable_xfer_presets"])) {$enable_xfer_presets=$_POST["enable_xfer_presets"];} else {$enable_xfer_presets="DISABLED";} if (isset($_GET["hide_xfer_number_to_dial"])) {$hide_xfer_number_to_dial=$_GET["hide_xfer_number_to_dial"];} elseif (isset($_POST["hide_xfer_number_to_dial"])) {$hide_xfer_number_to_dial=$_POST["hide_xfer_number_to_dial"];} else {$hide_xfer_number_to_dial="DISABLED";} if (isset($_GET["preset_name"])) {$preset_name=$_GET["preset_name"];} elseif (isset($_POST["preset_name"])) {$preset_name=$_POST["preset_name"];} else {$preset_name="";} if (isset($_GET["preset_number"])) {$preset_number=$_GET["preset_number"];} elseif (isset($_POST["preset_number"])) {$preset_number=$_POST["preset_number"];} else {$preset_number="";} if (isset($_GET["preset_dtmf"])) {$preset_dtmf=$_GET["preset_dtmf"];} elseif (isset($_POST["preset_dtmf"])) {$preset_dtmf=$_POST["preset_dtmf"];} else {$preset_dtmf="";} if (isset($_GET["preset_hide_number"])) {$preset_hide_number=$_GET["preset_hide_number"];} elseif (isset($_POST["preset_hide_number"])) {$preset_hide_number=$_POST["preset_hide_number"];} else {$preset_hide_number="N";} if (isset($_GET["manual_dial_prefix"])) {$manual_dial_prefix=$_GET["manual_dial_prefix"];} elseif (isset($_POST["manual_dial_prefix"])) {$manual_dial_prefix=$_POST["manual_dial_prefix"];} else {$manual_dial_prefix="";} if (isset($_GET["webphone_systemkey"])) {$webphone_systemkey=$_GET["webphone_systemkey"];} elseif (isset($_POST["webphone_systemkey"])) {$webphone_systemkey=$_POST["webphone_systemkey"];} else {$webphone_systemkey="";} if (isset($_GET["webphone_dialpad"])) {$webphone_dialpad=$_GET["webphone_dialpad"];} elseif (isset($_POST["webphone_dialpad"])) {$webphone_dialpad=$_POST["webphone_dialpad"];} else {$webphone_dialpad="Y";} if (isset($_GET["webphone_systemkey_override"])) {$webphone_systemkey_override=$_GET["webphone_systemkey_override"];} elseif (isset($_POST["webphone_systemkey_override"])) {$webphone_systemkey_override=$_POST["webphone_systemkey_override"];} else {$webphone_systemkey_override="";} if (isset($_GET["webphone_dialpad_override"])) {$webphone_dialpad_override=$_GET["webphone_dialpad_override"];} elseif (isset($_POST["webphone_dialpad_override"])) {$webphone_dialpad_override=$_POST["webphone_dialpad_override"];} else {$webphone_dialpad_override="DISABLED";} if (isset($_GET["force_change_password"])) {$force_change_password=$_GET["force_change_password"];} elseif (isset($_POST["force_change_password"])) {$force_change_password=$_POST["force_change_password"];} else {$force_change_password="N";} if (isset($_GET["first_login_trigger"])) {$first_login_trigger=$_GET["first_login_trigger"];} elseif (isset($_POST["first_login_trigger"])) {$first_login_trigger=$_POST["first_login_trigger"];} else {$first_login_trigger="N";} if (isset($_GET["default_phone_registration_password"])) {$default_phone_registration_password=$_GET["default_phone_registration_password"];} elseif (isset($_POST["default_phone_registration_password"])) {$default_phone_registration_password=$_POST["default_phone_registration_password"];} else {$default_phone_registration_password="";} if (isset($_GET["default_phone_login_password"])) {$default_phone_login_password=$_GET["default_phone_login_password"];} elseif (isset($_POST["default_phone_login_password"])) {$default_phone_login_password=$_POST["default_phone_login_password"];} else {$default_phone_login_password="";} if (isset($_GET["default_server_password"])) {$default_server_password=$_GET["default_server_password"];} elseif (isset($_POST["default_server_password"])) {$default_server_password=$_POST["default_server_password"];} else {$default_server_password="";} if (isset($_GET["customer_3way_hangup_logging"])) {$customer_3way_hangup_logging=$_GET["customer_3way_hangup_logging"];} elseif (isset($_POST["customer_3way_hangup_logging"])) {$customer_3way_hangup_logging=$_POST["customer_3way_hangup_logging"];} else {$customer_3way_hangup_logging="ENABLED";} if (isset($_GET["customer_3way_hangup_seconds"])) {$customer_3way_hangup_seconds=$_GET["customer_3way_hangup_seconds"];} elseif (isset($_POST["customer_3way_hangup_seconds"])) {$customer_3way_hangup_seconds=$_POST["customer_3way_hangup_seconds"];} else {$customer_3way_hangup_seconds=5;} if (isset($_GET["customer_3way_hangup_action"])) {$customer_3way_hangup_action=$_GET["customer_3way_hangup_action"];} elseif (isset($_POST["customer_3way_hangup_action"])) {$customer_3way_hangup_action=$_POST["customer_3way_hangup_action"];} else {$customer_3way_hangup_action="NONE";} if (isset($_GET["add_lead_url"])) {$add_lead_url=$_GET["add_lead_url"];} elseif (isset($_POST["add_lead_url"])) {$add_lead_url=$_POST["add_lead_url"];} else {$add_lead_url="";} if (isset($_GET["ivr_park_call"])) {$ivr_park_call=$_GET["ivr_park_call"];} elseif (isset($_POST["ivr_park_call"])) {$ivr_park_call=$_POST["ivr_park_call"];} else {$ivr_park_call="DISABLED";} if (isset($_GET["ivr_park_call_agi"])) {$ivr_park_call_agi=$_GET["ivr_park_call_agi"];} elseif (isset($_POST["ivr_park_call_agi"])) {$ivr_park_call_agi=$_POST["ivr_park_call_agi"];} else {$ivr_park_call_agi="";} if (isset($_GET["manual_preview_dial"])) {$manual_preview_dial=$_GET["manual_preview_dial"];} elseif (isset($_POST["manual_preview_dial"])) {$manual_preview_dial=$_POST["manual_preview_dial"];} else {$manual_preview_dial="PREVIEW_AND_SKIP";} if (isset($_GET["eht_minimum_prompt_filename"])) {$eht_minimum_prompt_filename=$_GET["eht_minimum_prompt_filename"];} elseif (isset($_POST["eht_minimum_prompt_filename"])) {$eht_minimum_prompt_filename=$_POST["eht_minimum_prompt_filename"];} else {$eht_minimum_prompt_filename="";} if (isset($_GET["eht_minimum_prompt_no_block"])) {$eht_minimum_prompt_no_block=$_GET["eht_minimum_prompt_no_block"];} elseif (isset($_POST["eht_minimum_prompt_no_block"])) {$eht_minimum_prompt_no_block=$_POST["eht_minimum_prompt_no_block"];} else {$eht_minimum_prompt_no_block="N";} if (isset($_GET["eht_minimum_prompt_seconds"])) {$eht_minimum_prompt_seconds=$_GET["eht_minimum_prompt_seconds"];} elseif (isset($_POST["eht_minimum_prompt_seconds"])) {$eht_minimum_prompt_seconds=$_POST["eht_minimum_prompt_seconds"];} else {$eht_minimum_prompt_seconds=10;} if (isset($_GET["realtime_agent_time_stats"])) {$realtime_agent_time_stats=$_GET["realtime_agent_time_stats"];} elseif (isset($_POST["realtime_agent_time_stats"])) {$realtime_agent_time_stats=$_POST["realtime_agent_time_stats"];} else {$realtime_agent_time_stats="CALLS_WAIT_CUST_ACW_PAUSE";} if (isset($_GET["admin_modify_refresh"])) {$admin_modify_refresh=$_GET["admin_modify_refresh"];} elseif (isset($_POST["admin_modify_refresh"])) {$admin_modify_refresh=$_POST["admin_modify_refresh"];} else {$admin_modify_refresh=0;} if (isset($_GET["nocache_admin"])) {$nocache_admin=$_GET["nocache_admin"];} elseif (isset($_POST["nocache_admin"])) {$nocache_admin=$_POST["nocache_admin"];} else {$nocache_admin=1;} if (isset($_GET["generate_cross_server_exten"])) {$generate_cross_server_exten=$_GET["generate_cross_server_exten"];} elseif (isset($_POST["generate_cross_server_exten"])) {$generate_cross_server_exten=$_POST["generate_cross_server_exten"];} else {$generate_cross_server_exten=0;} if (isset($_GET["queuemetrics_addmember_enabled"])) {$queuemetrics_addmember_enabled=$_GET["queuemetrics_addmember_enabled"];} elseif (isset($_POST["queuemetrics_addmember_enabled"])) {$queuemetrics_addmember_enabled=$_POST["queuemetrics_addmember_enabled"];} else {$queuemetrics_addmember_enabled=0;} # if (isset($_GET["modify_page"])) {$modify_page=$_GET["modify_page"];} # elseif (isset($_POST["modify_page"])) {$modify_page=$_POST["modify_page"];} if (isset($_GET["modify_url"])) {$modify_url=$_GET["modify_url"];} elseif (isset($_POST["modify_url"])) {$modify_url=$_POST["modify_url"];} else {$modify_url="";} if (isset($_GET["use_auto_hopper"])) {$use_auto_hopper=$_GET["use_auto_hopper"];} elseif (isset($_POST["use_auto_hopper"])) {$use_auto_hopper=$_POST["use_auto_hopper"];} else {$use_auto_hopper="Y";} if (isset($_GET["auto_hopper_multi"])) {$auto_hopper_multi=$_GET["auto_hopper_multi"];} elseif (isset($_POST["auto_hopper_multi"])) {$auto_hopper_multi=$_POST["auto_hopper_multi"];} else {$auto_hopper_multi=1;} if (isset($_GET["auto_trim_hopper"])) {$auto_trim_hopper=$_GET["auto_trim_hopper"];} elseif (isset($_POST["auto_trim_hopper"])) {$auto_trim_hopper=$_POST["auto_trim_hopper"];} else {$auto_trim_hopper="Y";} if (isset($_GET["api_manual_dial"])) {$api_manual_dial=$_GET["api_manual_dial"];} elseif (isset($_POST["api_manual_dial"])) {$api_manual_dial=$_POST["api_manual_dial"];} else {$api_manual_dial="STANDARD";} if (isset($_GET["manual_dial_call_time_check"])) {$manual_dial_call_time_check=$_GET["manual_dial_call_time_check"];} elseif (isset($_POST["manual_dial_call_time_check"])) {$manual_dial_call_time_check=$_POST["manual_dial_call_time_check"];} else {$manual_dial_call_time_check="DISABLED";} if (isset($_GET["queuemetrics_dispo_pause"])) {$queuemetrics_dispo_pause=$_GET["queuemetrics_dispo_pause"];} elseif (isset($_POST["queuemetrics_dispo_pause"])) {$queuemetrics_dispo_pause=$_POST["queuemetrics_dispo_pause"];} else {$queuemetrics_dispo_pause="";} if (isset($_GET["lead_order_randomize"])) {$lead_order_randomize=$_GET["lead_order_randomize"];} elseif (isset($_POST["lead_order_randomize"])) {$lead_order_randomize=$_POST["lead_order_randomize"];} else {$lead_order_randomize="N";} if (isset($_GET["lead_order_secondary"])) {$lead_order_secondary=$_GET["lead_order_secondary"];} elseif (isset($_POST["lead_order_secondary"])) {$lead_order_secondary=$_POST["lead_order_secondary"];} else {$lead_order_secondary="LEAD_ASCEND";} if (isset($_GET["per_call_notes"])) {$per_call_notes=$_GET["per_call_notes"];} elseif (isset($_POST["per_call_notes"])) {$per_call_notes=$_POST["per_call_notes"];} else {$per_call_notes="DISABLED";} if (isset($_GET["my_callback_option"])) {$my_callback_option=$_GET["my_callback_option"];} elseif (isset($_POST["my_callback_option"])) {$my_callback_option=$_POST["my_callback_option"];} else {$my_callback_option="UNCHECKED";} if (isset($_GET["agent_lead_search"])) {$agent_lead_search=$_GET["agent_lead_search"];} elseif (isset($_POST["agent_lead_search"])) {$agent_lead_search=$_POST["agent_lead_search"];} else {$agent_lead_search="DISABLED";} if (isset($_GET["agent_lead_search_method"])) {$agent_lead_search_method=$_GET["agent_lead_search_method"];} elseif (isset($_POST["agent_lead_search_method"])) {$agent_lead_search_method=$_POST["agent_lead_search_method"];} else {$agent_lead_search_method="CAMPLISTS_ALL";} if (isset($_GET["queuemetrics_phone_environment"])) {$queuemetrics_phone_environment=$_GET["queuemetrics_phone_environment"];} elseif (isset($_POST["queuemetrics_phone_environment"])) {$queuemetrics_phone_environment=$_POST["queuemetrics_phone_environment"];} else {$queuemetrics_phone_environment="";} if (isset($_GET["active_twin_server_ip"])) {$active_twin_server_ip=$_GET["active_twin_server_ip"];} elseif (isset($_POST["active_twin_server_ip"])) {$active_twin_server_ip=$_POST["active_twin_server_ip"];} else {$active_twin_server_ip="";} if (isset($_GET["on_hook_agent"])) {$on_hook_agent=$_GET["on_hook_agent"];} elseif (isset($_POST["on_hook_agent"])) {$on_hook_agent=$_POST["on_hook_agent"];} else {$on_hook_agent="N";} if (isset($_GET["on_hook_ring_time"])) {$on_hook_ring_time=$_GET["on_hook_ring_time"];} elseif (isset($_POST["on_hook_ring_time"])) {$on_hook_ring_time=$_POST["on_hook_ring_time"];} else {$on_hook_ring_time=15;} if (isset($_GET["auto_pause_precall"])) {$auto_pause_precall=$_GET["auto_pause_precall"];} elseif (isset($_POST["auto_pause_precall"])) {$auto_pause_precall=$_POST["auto_pause_precall"];} else {$auto_pause_precall="N";} if (isset($_GET["auto_resume_precall"])) {$auto_resume_precall=$_GET["auto_resume_precall"];} elseif (isset($_POST["auto_resume_precall"])) {$auto_resume_precall=$_POST["auto_resume_precall"];} else {$auto_resume_precall="N";} if (isset($_GET["auto_pause_precall_code"])) {$auto_pause_precall_code=$_GET["auto_pause_precall_code"];} elseif (isset($_POST["auto_pause_precall_code"])) {$auto_pause_precall_code=$_POST["auto_pause_precall_code"];} else {$auto_pause_precall_code="PRECAL";} if (isset($_GET["audit_comments"])) {$audit_comments=$_GET["audit_comments"];} elseif (isset($_POST["audit_comments"])) {$audit_comments=$_POST["audit_comments"];} if (isset($_GET["reload_dialplan_on_servers"])) {$reload_dialplan_on_servers=$_GET["reload_dialplan_on_servers"];} elseif (isset($_POST["reload_dialplan_on_servers"])) {$reload_dialplan_on_servers=$_POST["reload_dialplan_on_servers"];} else {$reload_dialplan_on_servers=0;} if (isset($_GET["manual_dial_cid"])) {$manual_dial_cid=$_GET["manual_dial_cid"];} elseif (isset($_POST["manual_dial_cid"])) {$manual_dial_cid=$_POST["manual_dial_cid"];} else {$manual_dial_cid="CAMPAIGN";} if (isset($_GET["post_phone_time_diff_alert"])) {$post_phone_time_diff_alert=$_GET["post_phone_time_diff_alert"];} elseif (isset($_POST["post_phone_time_diff_alert"])) {$post_phone_time_diff_alert=$_POST["post_phone_time_diff_alert"];} else {$post_phone_time_diff_alert="DISABLED";} if (isset($_GET["custom_3way_button_transfer"])) {$custom_3way_button_transfer=$_GET["custom_3way_button_transfer"];} elseif (isset($_POST["custom_3way_button_transfer"])) {$custom_3way_button_transfer=$_POST["custom_3way_button_transfer"];} else {$custom_3way_button_transfer="DISABLED";} if (isset($_GET["available_only_tally_threshold"])) {$available_only_tally_threshold=$_GET["available_only_tally_threshold"];} elseif (isset($_POST["available_only_tally_threshold"])) {$available_only_tally_threshold=$_POST["available_only_tally_threshold"];} else {$available_only_tally_threshold="DISABLED";} if (isset($_GET["available_only_tally_threshold_agents"])) {$available_only_tally_threshold_agents=$_GET["available_only_tally_threshold_agents"];} elseif (isset($_POST["available_only_tally_threshold_agents"])) {$available_only_tally_threshold_agents=$_POST["available_only_tally_threshold_agents"];} else {$available_only_tally_threshold_agents=0;} if (isset($_GET["dial_level_threshold"])) {$dial_level_threshold=$_GET["dial_level_threshold"];} elseif (isset($_POST["dial_level_threshold"])) {$dial_level_threshold=$_POST["dial_level_threshold"];} else {$dial_level_threshold="DISABLED";} if (isset($_GET["dial_level_threshold_agents"])) {$dial_level_threshold_agents=$_GET["dial_level_threshold_agents"];} elseif (isset($_POST["dial_level_threshold_agents"])) {$dial_level_threshold_agents=$_POST["dial_level_threshold_agents"];} else {$dial_level_threshold_agents=0;} if (isset($_GET["time_zone_setting"])) {$time_zone_setting=$_GET["time_zone_setting"];} elseif (isset($_POST["time_zone_setting"])) {$time_zone_setting=$_POST["time_zone_setting"];} else {$time_zone_setting="COUNTRY_AND_AREA_CODE";} if (isset($_GET["safe_harbor_audio"])) {$safe_harbor_audio=$_GET["safe_harbor_audio"];} elseif (isset($_POST["safe_harbor_audio"])) {$safe_harbor_audio=$_POST["safe_harbor_audio"];} else {$safe_harbor_audio="";} if (isset($_GET["safe_harbor_menu_id"])) {$safe_harbor_menu_id=$_GET["safe_harbor_menu_id"];} elseif (isset($_POST["safe_harbor_menu_id"])) {$safe_harbor_menu_id=$_POST["safe_harbor_menu_id"];} else {$safe_harbor_menu_id="";} if (isset($_GET["dtmf_log"])) {$dtmf_log=$_GET["dtmf_log"];} elseif (isset($_POST["dtmf_log"])) {$dtmf_log=$_POST["dtmf_log"];} else {$dtmf_log=0;} if (isset($_GET["webphone_auto_answer"])) {$webphone_auto_answer=$_GET["webphone_auto_answer"];} elseif (isset($_POST["webphone_auto_answer"])) {$webphone_auto_answer=$_POST["webphone_auto_answer"];} else {$webphone_auto_answer="Y";} if (isset($_GET["survey_menu_id"])) {$survey_menu_id=$_GET["survey_menu_id"];} elseif (isset($_POST["survey_menu_id"])) {$survey_menu_id=$_POST["survey_menu_id"];} else {$survey_menu_id="";} if (isset($_GET["callback_days_limit"])) {$callback_days_limit=$_GET["callback_days_limit"];} elseif (isset($_POST["callback_days_limit"])) {$callback_days_limit=$_POST["callback_days_limit"];} else {$callback_days_limit=0;} if (isset($_GET["dl_diff_target_method"])) {$dl_diff_target_method=$_GET["dl_diff_target_method"];} elseif (isset($_POST["dl_diff_target_method"])) {$dl_diff_target_method=$_POST["dl_diff_target_method"];} else {$dl_diff_target_method="ADAPT_CALC_ONLY";} if (isset($_GET["disable_dispo_screen"])) {$disable_dispo_screen=$_GET["disable_dispo_screen"];} elseif (isset($_POST["disable_dispo_screen"])) {$disable_dispo_screen=$_POST["disable_dispo_screen"];} else {$disable_dispo_screen="DISPO_ENABLED";} if (isset($_GET["disable_dispo_status"])) {$disable_dispo_status=$_GET["disable_dispo_status"];} elseif (isset($_POST["disable_dispo_status"])) {$disable_dispo_status=$_POST["disable_dispo_status"];} else {$disable_dispo_status="";} if (isset($_GET["screen_labels"])) {$screen_labels=$_GET["screen_labels"];} elseif (isset($_POST["screen_labels"])) {$screen_labels=$_POST["screen_labels"];} else {$screen_labels="--SYSTEM-SETTINGS--";} if (isset($_GET["label_hide_field_logs"])) {$label_hide_field_logs=$_GET["label_hide_field_logs"];} elseif (isset($_POST["label_hide_field_logs"])) {$label_hide_field_logs=$_POST["label_hide_field_logs"];} else {$label_hide_field_logs="Y";} if (isset($_GET["label_id"])) {$label_id=$_GET["label_id"];} elseif (isset($_POST["label_id"])) {$label_id=$_POST["label_id"];} else {$label_id="";} if (isset($_GET["label_name"])) {$label_name=$_GET["label_name"];} elseif (isset($_POST["label_name"])) {$label_name=$_POST["label_name"];} else {$label_name="";} if (isset($_GET["status_display_fields"])) {$status_display_fields=$_GET["status_display_fields"];} elseif (isset($_POST["status_display_fields"])) {$status_display_fields=$_POST["status_display_fields"];} else {$status_display_fields="CALLID";} if (isset($_GET["queuemetrics_pe_phone_append"])) {$queuemetrics_pe_phone_append=$_GET["queuemetrics_pe_phone_append"];} elseif (isset($_POST["queuemetrics_pe_phone_append"])) {$queuemetrics_pe_phone_append=$_POST["queuemetrics_pe_phone_append"];} else {$queuemetrics_pe_phone_append=0;} if (isset($_GET["test_campaign_calls"])) {$test_campaign_calls=$_GET["test_campaign_calls"];} elseif (isset($_POST["test_campaign_calls"])) {$test_campaign_calls=$_POST["test_campaign_calls"];} else {$test_campaign_calls=0;} if (isset($_GET["agents_calls_reset"])) {$agents_calls_reset=$_GET["agents_calls_reset"];} elseif (isset($_POST["agents_calls_reset"])) {$agents_calls_reset=$_POST["agents_calls_reset"];} else {$agents_calls_reset=1;} if (isset($_GET["voicemail_timezone"])) {$voicemail_timezone=$_GET["voicemail_timezone"];} elseif (isset($_POST["voicemail_timezone"])) {$voicemail_timezone=$_POST["voicemail_timezone"];} else {$voicemail_timezone="eastern";} if (isset($_GET["voicemail_options"])) {$voicemail_options=$_GET["voicemail_options"];} elseif (isset($_POST["voicemail_options"])) {$voicemail_options=$_POST["voicemail_options"];} else {$voicemail_options="";} if (isset($_GET["default_voicemail_timezone"])) {$default_voicemail_timezone=$_GET["default_voicemail_timezone"];} elseif (isset($_POST["default_voicemail_timezone"])) {$default_voicemail_timezone=$_POST["default_voicemail_timezone"];} else {$default_voicemail_timezone="";} if (isset($_GET["default_local_gmt"])) {$default_local_gmt=$_GET["default_local_gmt"];} elseif (isset($_POST["default_local_gmt"])) {$default_local_gmt=$_POST["default_local_gmt"];} else {$default_local_gmt="-5.00";} if (isset($_GET["na_call_url"])) {$na_call_url=$_GET["na_call_url"];} elseif (isset($_POST["na_call_url"])) {$na_call_url=$_POST["na_call_url"];} if (isset($_GET["on_hook_cid"])) {$on_hook_cid=$_GET["on_hook_cid"];} elseif (isset($_POST["on_hook_cid"])) {$on_hook_cid=$_POST["on_hook_cid"];} else {$on_hook_cid="CUSTOMER_PHONE_RINGAGENT";} if (isset($_GET["form_end"])) {$form_end=$_GET["form_end"];} elseif (isset($_POST["form_end"])) {$form_end=$_POST["form_end"];} else {$form_end="";} if (isset($_GET["noanswer_log"])) {$noanswer_log=$_GET["noanswer_log"];} elseif (isset($_POST["noanswer_log"])) {$noanswer_log=$_POST["noanswer_log"];} else {$noanswer_log="N";} if (isset($_GET["alt_log_server_ip"])) {$alt_log_server_ip=$_GET["alt_log_server_ip"];} elseif (isset($_POST["alt_log_server_ip"])) {$alt_log_server_ip=$_POST["alt_log_server_ip"];} else {$alt_log_server_ip="";} if (isset($_GET["alt_log_dbname"])) {$alt_log_dbname=$_GET["alt_log_dbname"];} elseif (isset($_POST["alt_log_dbname"])) {$alt_log_dbname=$_POST["alt_log_dbname"];} else {$alt_log_dbname="";} if (isset($_GET["alt_log_login"])) {$alt_log_login=$_GET["alt_log_login"];} elseif (isset($_POST["alt_log_login"])) {$alt_log_login=$_POST["alt_log_login"];} else {$alt_log_login="";} if (isset($_GET["alt_log_pass"])) {$alt_log_pass=$_GET["alt_log_pass"];} elseif (isset($_POST["alt_log_pass"])) {$alt_log_pass=$_POST["alt_log_pass"];} else {$alt_log_pass="";} if (isset($_GET["tables_use_alt_log_db"])) {$tables_use_alt_log_db=$_GET["tables_use_alt_log_db"];} elseif (isset($_POST["tables_use_alt_log_db"])) {$tables_use_alt_log_db=$_POST["tables_use_alt_log_db"];} else {$tables_use_alt_log_db="";} if (isset($_GET["did_agent_log"])) {$did_agent_log=$_GET["did_agent_log"];} elseif (isset($_POST["did_agent_log"])) {$did_agent_log=$_POST["did_agent_log"];} else {$did_agent_log="N";} if (isset($_GET["survey_recording"])) {$survey_recording=$_GET["survey_recording"];} elseif (isset($_POST["survey_recording"])) {$survey_recording=$_POST["survey_recording"];} else {$survey_recording="N";} if (isset($_GET["campaign_cid_areacodes_enabled"])) {$campaign_cid_areacodes_enabled=$_GET["campaign_cid_areacodes_enabled"];} elseif (isset($_POST["campaign_cid_areacodes_enabled"])) {$campaign_cid_areacodes_enabled=$_POST["campaign_cid_areacodes_enabled"];} else {$campaign_cid_areacodes_enabled=1;} if (isset($_GET["areacode"])) {$areacode=$_GET["areacode"];} elseif (isset($_POST["areacode"])) {$areacode=$_POST["areacode"];} else {$areacode="";} if (isset($_GET["cid_description"])) {$cid_description=$_GET["cid_description"];} elseif (isset($_POST["cid_description"])) {$cid_description=$_POST["cid_description"];} else {$cid_description="";} if (isset($_GET["pllb_grouping"])) {$pllb_grouping=$_GET["pllb_grouping"];} elseif (isset($_POST["pllb_grouping"])) {$pllb_grouping=$_POST["pllb_grouping"];} else {$pllb_grouping="DISABLED";} if (isset($_GET["pllb_grouping_limit"])) {$pllb_grouping_limit=$_GET["pllb_grouping_limit"];} elseif (isset($_POST["pllb_grouping_limit"])) {$pllb_grouping_limit=$_POST["pllb_grouping_limit"];} else {$pllb_grouping_limit=50;} if (isset($_GET["description"])) {$description=$_GET["description"];} elseif (isset($_POST["description"])) {$description=$_POST["description"];} else {$description="";} if (isset($_GET["did_ra_extensions_enabled"])) {$did_ra_extensions_enabled=$_GET["did_ra_extensions_enabled"];} elseif (isset($_POST["did_ra_extensions_enabled"])) {$did_ra_extensions_enabled=$_POST["did_ra_extensions_enabled"];} else {$did_ra_extensions_enabled=0;} if (isset($_GET["modify_shifts"])) {$modify_shifts=$_GET["modify_shifts"];} elseif (isset($_POST["modify_shifts"])) {$modify_shifts=$_POST["modify_shifts"];} else {$modify_shifts=0;} if (isset($_GET["modify_phones"])) {$modify_phones=$_GET["modify_phones"];} elseif (isset($_POST["modify_phones"])) {$modify_phones=$_POST["modify_phones"];} else {$modify_phones=0;} if (isset($_GET["modify_carriers"])) {$modify_carriers=$_GET["modify_carriers"];} elseif (isset($_POST["modify_carriers"])) {$modify_carriers=$_POST["modify_carriers"];} else {$modify_carriers=0;} if (isset($_GET["modify_labels"])) {$modify_labels=$_GET["modify_labels"];} elseif (isset($_POST["modify_labels"])) {$modify_labels=$_POST["modify_labels"];} else {$modify_labels=0;} if (isset($_GET["modify_statuses"])) {$modify_statuses=$_GET["modify_statuses"];} elseif (isset($_POST["modify_statuses"])) {$modify_statuses=$_POST["modify_statuses"];} else {$modify_statuses=0;} if (isset($_GET["modify_voicemail"])) {$modify_voicemail=$_GET["modify_voicemail"];} elseif (isset($_POST["modify_voicemail"])) {$modify_voicemail=$_POST["modify_voicemail"];} else {$modify_voicemail=0;} if (isset($_GET["modify_audiostore"])) {$modify_audiostore=$_GET["modify_audiostore"];} elseif (isset($_POST["modify_audiostore"])) {$modify_audiostore=$_POST["modify_audiostore"];} else {$modify_audiostore=0;} if (isset($_GET["modify_moh"])) {$modify_moh=$_GET["modify_moh"];} elseif (isset($_POST["modify_moh"])) {$modify_moh=$_POST["modify_moh"];} else {$modify_moh=0;} if (isset($_GET["modify_tts"])) {$modify_tts=$_GET["modify_tts"];} elseif (isset($_POST["modify_tts"])) {$modify_tts=$_POST["modify_tts"];} else {$modify_tts=0;} if (isset($_GET["action_xfer_cid"])) {$action_xfer_cid=$_GET["action_xfer_cid"];} elseif (isset($_POST["action_xfer_cid"])) {$action_xfer_cid=$_POST["action_xfer_cid"];} else {$action_xfer_cid="CUSTOMER";} if (isset($_GET["drop_callmenu"])) {$drop_callmenu=$_GET["drop_callmenu"];} elseif (isset($_POST["drop_callmenu"])) {$drop_callmenu=$_POST["drop_callmenu"];} else {$drop_callmenu="";} if (isset($_GET["after_hours_callmenu"])) {$after_hours_callmenu=$_GET["after_hours_callmenu"];} elseif (isset($_POST["after_hours_callmenu"])) {$after_hours_callmenu=$_POST["after_hours_callmenu"];} else {$after_hours_callmenu="";} if (isset($_GET["dtmf_field"])) {$dtmf_field=$_GET["dtmf_field"];} elseif (isset($_POST["dtmf_field"])) {$dtmf_field=$_POST["dtmf_field"];} else {$dtmf_field="NONE";} if (isset($_GET["call_count_limit"])) {$call_count_limit=$_GET["call_count_limit"];} elseif (isset($_POST["call_count_limit"])) {$call_count_limit=$_POST["call_count_limit"];} else {$call_count_limit=0;} if (isset($_GET["call_count_target"])) {$call_count_target=$_GET["call_count_target"];} elseif (isset($_POST["call_count_target"])) {$call_count_target=$_POST["call_count_target"];} else {$call_count_target=3;} if (isset($_GET["completed"])) {$completed=$_GET["completed"];} elseif (isset($_POST["completed"])) {$completed=$_POST["completed"];} else {$completed="N";} if (isset($_GET["expanded_list_stats"])) {$expanded_list_stats=$_GET["expanded_list_stats"];} elseif (isset($_POST["expanded_list_stats"])) {$expanded_list_stats=$_POST["expanded_list_stats"];} else {$expanded_list_stats=1;} if (isset($_GET["report_option"])) {$report_option=$_GET["report_option"];} elseif (isset($_POST["report_option"])) {$report_option=$_POST["report_option"];} else {$report_option="N";} if (isset($_GET["preset_contact_search"])) {$preset_contact_search=$_GET["preset_contact_search"];} elseif (isset($_POST["preset_contact_search"])) {$preset_contact_search=$_POST["preset_contact_search"];} else {$preset_contact_search="NOT_ACTIVE";} if (isset($_GET["contacts_enabled"])) {$contacts_enabled=$_GET["contacts_enabled"];} elseif (isset($_POST["contacts_enabled"])) {$contacts_enabled=$_POST["contacts_enabled"];} else {$contacts_enabled=0;} if (isset($_GET["contact_id"])) {$contact_id=$_GET["contact_id"];} elseif (isset($_POST["contact_id"])) {$contact_id=$_POST["contact_id"];} else {$contact_id="";} if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} else {$first_name="";} if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} else {$last_name="";} if (isset($_GET["office_num"])) {$office_num=$_GET["office_num"];} elseif (isset($_POST["office_num"])) {$office_num=$_POST["office_num"];} else {$office_num="";} if (isset($_GET["cell_num"])) {$cell_num=$_GET["cell_num"];} elseif (isset($_POST["cell_num"])) {$cell_num=$_POST["cell_num"];} else {$cell_num="";} if (isset($_GET["other_num1"])) {$other_num1=$_GET["other_num1"];} elseif (isset($_POST["other_num1"])) {$other_num1=$_POST["other_num1"];} else {$other_num1="";} if (isset($_GET["other_num2"])) {$other_num2=$_GET["other_num2"];} elseif (isset($_POST["other_num2"])) {$other_num2=$_POST["other_num2"];} else {$other_num2="";} if (isset($_GET["modify_contacts"])) {$modify_contacts=$_GET["modify_contacts"];} elseif (isset($_POST["modify_contacts"])) {$modify_contacts=$_POST["modify_contacts"];} else {$modify_contacts=0;} if (isset($_GET["bu_name"])) {$bu_name=$_GET["bu_name"];} elseif (isset($_POST["bu_name"])) {$bu_name=$_POST["bu_name"];} else {$bu_name="";} if (isset($_GET["department"])) {$department=$_GET["department"];} elseif (isset($_POST["department"])) {$department=$_POST["department"];} else {$department="";} if (isset($_GET["job_title"])) {$job_title=$_GET["job_title"];} elseif (isset($_POST["job_title"])) {$job_title=$_POST["job_title"];} else {$job_title="";} if (isset($_GET["location"])) {$location=$_GET["location"];} elseif (isset($_POST["location"])) {$location=$_POST["location"];} else {$location="";} if (isset($_GET["callback_hours_block"])) {$callback_hours_block=$_GET["callback_hours_block"];} elseif (isset($_POST["callback_hours_block"])) {$callback_hours_block=$_POST["callback_hours_block"];} else {$callback_hours_block=0;} if (isset($_GET["callback_list_calltime"])) {$callback_list_calltime=$_GET["callback_list_calltime"];} elseif (isset($_POST["callback_list_calltime"])) {$callback_list_calltime=$_POST["callback_list_calltime"];} else {$callback_list_calltime="DISABLED";} if (isset($_GET["modify_same_user_level"])) {$modify_same_user_level=$_GET["modify_same_user_level"];} elseif (isset($_POST["modify_same_user_level"])) {$modify_same_user_level=$_POST["modify_same_user_level"];} else {$modify_same_user_level=1;} if (isset($_GET["admin_hide_lead_data"])) {$admin_hide_lead_data=$_GET["admin_hide_lead_data"];} elseif (isset($_POST["admin_hide_lead_data"])) {$admin_hide_lead_data=$_POST["admin_hide_lead_data"];} else {$admin_hide_lead_data=0;} if (isset($_GET["admin_hide_phone_data"])) {$admin_hide_phone_data=$_GET["admin_hide_phone_data"];} elseif (isset($_POST["admin_hide_phone_data"])) {$admin_hide_phone_data=$_POST["admin_hide_phone_data"];} else {$admin_hide_phone_data=0;} if (isset($_GET["admin_viewable_groups"])) {$admin_viewable_groups=$_GET["admin_viewable_groups"];} elseif (isset($_POST["admin_viewable_groups"])) {$admin_viewable_groups=$_POST["admin_viewable_groups"];} if (isset($_GET["admin_viewable_call_times"])) {$admin_viewable_call_times=$_GET["admin_viewable_call_times"];} elseif (isset($_POST["admin_viewable_call_times"])) {$admin_viewable_call_times=$_POST["admin_viewable_call_times"];} if (isset($_GET["max_calls_method"])) {$max_calls_method=$_GET["max_calls_method"];} elseif (isset($_POST["max_calls_method"])) {$max_calls_method=$_POST["max_calls_method"];} else {$max_calls_method="DISABLED";} if (isset($_GET["max_calls_count"])) {$max_calls_count=$_GET["max_calls_count"];} elseif (isset($_POST["max_calls_count"])) {$max_calls_count=$_POST["max_calls_count"];} else {$max_calls_count=0;} if (isset($_GET["max_calls_action"])) {$max_calls_action=$_GET["max_calls_action"];} elseif (isset($_POST["max_calls_action"])) {$max_calls_action=$_POST["max_calls_action"];} else {$max_calls_action="NO_AGENT_NO_QUEUE";} if (isset($_GET["territory_reset"])) {$territory_reset=$_GET["territory_reset"];} elseif (isset($_POST["territory_reset"])) {$territory_reset=$_POST["territory_reset"];} if (isset($_GET["hopper_vlc_dup_check"])) {$hopper_vlc_dup_check=$_GET["hopper_vlc_dup_check"];} elseif (isset($_POST["hopper_vlc_dup_check"])) {$hopper_vlc_dup_check=$_POST["hopper_vlc_dup_check"];} else {$hopper_vlc_dup_check="N";} if (isset($_GET["download_max_system_stats_metric"])) {$download_max_system_stats_metric=$_GET["download_max_system_stats_metric"];} elseif (isset($_POST["download_max_system_stats_metric"])) {$download_max_system_stats_metric=$_POST["download_max_system_stats_metric"];} else {$download_max_system_stats_metric="";} if (isset($_GET["download_max_system_stats_metric_name"])) {$download_max_system_stats_metric_name=$_GET["download_max_system_stats_metric_name"];} elseif (isset($_POST["download_max_system_stats_metric_name"])) {$download_max_system_stats_metric_name=$_POST["download_max_system_stats_metric_name"];} else {$download_max_system_stats_metric_name="";} if (isset($_GET["inventory_report"])) {$inventory_report=$_GET["inventory_report"];} elseif (isset($_POST["inventory_report"])) {$inventory_report=$_POST["inventory_report"];} else {$inventory_report="Y";} if (isset($_GET["report_rank"])) {$report_rank=$_GET["report_rank"];} elseif (isset($_POST["report_rank"])) {$report_rank=$_POST["report_rank"];} else {$report_rank=1;} if (isset($_GET["in_group_dial"])) {$in_group_dial=$_GET["in_group_dial"];} elseif (isset($_POST["in_group_dial"])) {$in_group_dial=$_POST["in_group_dial"];} else {$in_group_dial="DISABLED";} if (isset($_GET["in_group_dial_select"])) {$in_group_dial_select=$_GET["in_group_dial_select"];} elseif (isset($_POST["in_group_dial_select"])) {$in_group_dial_select=$_POST["in_group_dial_select"];} else {$in_group_dial_select="CAMPAIGN_SELECTED";} if (isset($_GET["dial_ingroup_cid"])) {$dial_ingroup_cid=$_GET["dial_ingroup_cid"];} elseif (isset($_POST["dial_ingroup_cid"])) {$dial_ingroup_cid=$_POST["dial_ingroup_cid"];} else {$dial_ingroup_cid="";} if (isset($_GET["allow_emails"])) {$allow_emails=$_GET["allow_emails"];} elseif (isset($_POST["allow_emails"])) {$allow_emails=$_POST["allow_emails"];} else {$allow_emails="";} if (isset($_GET["allow_chats"])) {$allow_chats=$_GET["allow_chats"];} elseif (isset($_POST["allow_chats"])) {$allow_chats=$_POST["allow_chats"];} else {$allow_chats="";} if (isset($_GET["chat_url"])) {$chat_url=$_GET["chat_url"];} elseif (isset($_POST["chat_url"])) {$chat_url=$_POST["chat_url"];} if (isset($_GET["chat_timeout"])) {$chat_timeout=$_GET["chat_timeout"];} elseif (isset($_POST["chat_timeout"])) {$chat_timeout=$_POST["chat_timeout"];} else {$chat_timeout="";} if (isset($_GET["manager_chat_id"])) {$manager_chat_id=$_GET["manager_chat_id"];} elseif (isset($_POST["manager_chat_id"])) {$manager_chat_id=$_POST["manager_chat_id"];} else {$manager_chat_id="";} if (isset($_GET["group_handling"])) {$group_handling=$_GET["group_handling"];} elseif (isset($_POST["group_handling"])) {$group_handling=$_POST["group_handling"];} else {$group_handling="PHONE";} if (isset($_GET["agentcall_email"])) {$agentcall_email=$_GET["agentcall_email"];} elseif (isset($_POST["agentcall_email"])) {$agentcall_email=$_POST["agentcall_email"];} else {$agentcall_email=0;} if (isset($_GET["agentcall_chat"])) {$agentcall_chat=$_GET["agentcall_chat"];} elseif (isset($_POST["agentcall_chat"])) {$agentcall_chat=$_POST["agentcall_chat"];} else {$agentcall_chat=0;} if (isset($_GET["modify_email_accounts"])) {$modify_email_accounts=$_GET["modify_email_accounts"];} elseif (isset($_POST["modify_email_accounts"])) {$modify_email_accounts=$_POST["modify_email_accounts"];} else {$modify_email_accounts=0;} if (isset($_GET["safe_harbor_audio_field"])) {$safe_harbor_audio_field=$_GET["safe_harbor_audio_field"];} elseif (isset($_POST["safe_harbor_audio_field"])) {$safe_harbor_audio_field=$_POST["safe_harbor_audio_field"];} else {$safe_harbor_audio_field="DISABLED";} if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} else {$query_date="";} if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} else {$end_date="";} if (isset($_GET["call_menu_qualify_enabled"])) {$call_menu_qualify_enabled=$_GET["call_menu_qualify_enabled"];} elseif (isset($_POST["call_menu_qualify_enabled"])) {$call_menu_qualify_enabled=$_POST["call_menu_qualify_enabled"];} else {$call_menu_qualify_enabled=0;} if (isset($_GET["qualify_sql"])) {$qualify_sql=$_GET["qualify_sql"];} elseif (isset($_POST["qualify_sql"])) {$qualify_sql=$_POST["qualify_sql"];} else {$qualify_sql="";} if (isset($_GET["admin_list_counts"])) {$admin_list_counts=$_GET["admin_list_counts"];} elseif (isset($_POST["admin_list_counts"])) {$admin_list_counts=$_POST["admin_list_counts"];} else {$admin_list_counts=1;} if (isset($_GET["voicemail_greeting"])) {$voicemail_greeting=$_GET["voicemail_greeting"];} elseif (isset($_POST["voicemail_greeting"])) {$voicemail_greeting=$_POST["voicemail_greeting"];} else {$voicemail_greeting="";} if (isset($_GET["old_voicemail_greeting"])) {$old_voicemail_greeting=$_GET["old_voicemail_greeting"];} elseif (isset($_POST["old_voicemail_greeting"])) {$old_voicemail_greeting=$_POST["old_voicemail_greeting"];} else {$old_voicemail_greeting="";} if (isset($_GET["allow_voicemail_greeting"])) {$allow_voicemail_greeting=$_GET["allow_voicemail_greeting"];} elseif (isset($_POST["allow_voicemail_greeting"])) {$allow_voicemail_greeting=$_POST["allow_voicemail_greeting"];} else {$allow_voicemail_greeting=0;} if (isset($_GET["show_vm_on_summary"])) {$show_vm_on_summary=$_GET["show_vm_on_summary"];} elseif (isset($_POST["show_vm_on_summary"])) {$show_vm_on_summary=$_POST["show_vm_on_summary"];} else {$show_vm_on_summary="";} if (isset($_GET["pause_after_next_call"])) {$pause_after_next_call=$_GET["pause_after_next_call"];} elseif (isset($_POST["pause_after_next_call"])) {$pause_after_next_call=$_POST["pause_after_next_call"];} else {$pause_after_next_call="DISABLED";} if (isset($_GET["owner_populate"])) {$owner_populate=$_GET["owner_populate"];} elseif (isset($_POST["owner_populate"])) {$owner_populate=$_POST["owner_populate"];} else {$owner_populate="DISABLED";} if (isset($_GET["queuemetrics_socket"])) {$queuemetrics_socket=$_GET["queuemetrics_socket"];} elseif (isset($_POST["queuemetrics_socket"])) {$queuemetrics_socket=$_POST["queuemetrics_socket"];} else {$queuemetrics_socket="NONE";} if (isset($_GET["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_GET["queuemetrics_socket_url"];} elseif (isset($_POST["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_POST["queuemetrics_socket_url"];} else {$queuemetrics_socket_url="";} if (isset($_GET["holiday_id"])) {$holiday_id=$_GET["holiday_id"];} elseif (isset($_POST["holiday_id"])) {$holiday_id=$_POST["holiday_id"];} else {$holiday_id="";} if (isset($_GET["holiday_name"])) {$holiday_name=$_GET["holiday_name"];} elseif (isset($_POST["holiday_name"])) {$holiday_name=$_POST["holiday_name"];} else {$holiday_name="";} if (isset($_GET["holiday_comments"])) {$holiday_comments=$_GET["holiday_comments"];} elseif (isset($_POST["holiday_comments"])) {$holiday_comments=$_POST["holiday_comments"];} else {$holiday_comments="";} if (isset($_GET["holiday_date"])) {$holiday_date=$_GET["holiday_date"];} elseif (isset($_POST["holiday_date"])) {$holiday_date=$_POST["holiday_date"];} else {$holiday_date="";} if (isset($_GET["holiday_status"])) {$holiday_status=$_GET["holiday_status"];} elseif (isset($_POST["holiday_status"])) {$holiday_status=$_POST["holiday_status"];} else {$holiday_status="INACTIVE";} if (isset($_GET["holiday_rule"])) {$holiday_rule=$_GET["holiday_rule"];} elseif (isset($_POST["holiday_rule"])) {$holiday_rule=$_POST["holiday_rule"];} else {$holiday_rule="";} if (isset($_GET["expiration_date"])) {$expiration_date=$_GET["expiration_date"];} elseif (isset($_POST["expiration_date"])) {$expiration_date=$_POST["expiration_date"];} else {$expiration_date="2099-12-31";} if (isset($_GET["use_other_campaign_dnc"])) {$use_other_campaign_dnc=$_GET["use_other_campaign_dnc"];} elseif (isset($_POST["use_other_campaign_dnc"])) {$use_other_campaign_dnc=$_POST["use_other_campaign_dnc"];} else {$use_other_campaign_dnc="";} if (isset($_GET["enhanced_disconnect_logging"])) {$enhanced_disconnect_logging=$_GET["enhanced_disconnect_logging"];} elseif (isset($_POST["enhanced_disconnect_logging"])) {$enhanced_disconnect_logging=$_POST["enhanced_disconnect_logging"];} else {$enhanced_disconnect_logging=0;} if (isset($_GET["amd_inbound_group"])) {$amd_inbound_group=$_GET["amd_inbound_group"];} elseif (isset($_POST["amd_inbound_group"])) {$amd_inbound_group=$_POST["amd_inbound_group"];} else {$amd_inbound_group="";} if (isset($_GET["amd_callmenu"])) {$amd_callmenu=$_GET["amd_callmenu"];} elseif (isset($_POST["amd_callmenu"])) {$amd_callmenu=$_POST["amd_callmenu"];} else {$amd_callmenu="";} if (isset($_GET["level_8_disable_add"])) {$level_8_disable_add=$_GET["level_8_disable_add"];} elseif (isset($_POST["level_8_disable_add"])) {$level_8_disable_add=$_POST["level_8_disable_add"];} else {$level_8_disable_add=0;} if (isset($_GET["survey_wait_sec"])) {$survey_wait_sec=$_GET["survey_wait_sec"];} elseif (isset($_POST["survey_wait_sec"])) {$survey_wait_sec=$_POST["survey_wait_sec"];} else {$survey_wait_sec=10;} if (isset($_GET["queuemetrics_record_hold"])) {$queuemetrics_record_hold=$_GET["queuemetrics_record_hold"];} elseif (isset($_POST["queuemetrics_record_hold"])) {$queuemetrics_record_hold=$_POST["queuemetrics_record_hold"];} else {$queuemetrics_record_hold=0;} if (isset($_GET["country_code_list_stats"])) {$country_code_list_stats=$_GET["country_code_list_stats"];} elseif (isset($_POST["country_code_list_stats"])) {$country_code_list_stats=$_POST["country_code_list_stats"];} else {$country_code_list_stats=0;} if (isset($_GET["manual_dial_lead_id"])) {$manual_dial_lead_id=$_GET["manual_dial_lead_id"];} elseif (isset($_POST["manual_dial_lead_id"])) {$manual_dial_lead_id=$_POST["manual_dial_lead_id"];} else {$manual_dial_lead_id="N";} if (isset($_GET["auto_restart_asterisk"])) {$auto_restart_asterisk=$_GET["auto_restart_asterisk"];} elseif (isset($_POST["auto_restart_asterisk"])) {$auto_restart_asterisk=$_POST["auto_restart_asterisk"];} else {$auto_restart_asterisk="N";} if (isset($_GET["asterisk_temp_no_restart"])) {$asterisk_temp_no_restart=$_GET["asterisk_temp_no_restart"];} elseif (isset($_POST["asterisk_temp_no_restart"])) {$asterisk_temp_no_restart=$_POST["asterisk_temp_no_restart"];} else {$asterisk_temp_no_restart="N";} if (isset($_GET["dead_max"])) {$dead_max=$_GET["dead_max"];} elseif (isset($_POST["dead_max"])) {$dead_max=$_POST["dead_max"];} else {$dead_max=0;} if (isset($_GET["dispo_max"])) {$dispo_max=$_GET["dispo_max"];} elseif (isset($_POST["dispo_max"])) {$dispo_max=$_POST["dispo_max"];} else {$dispo_max=0;} if (isset($_GET["pause_max"])) {$pause_max=$_GET["pause_max"];} elseif (isset($_POST["pause_max"])) {$pause_max=$_POST["pause_max"];} else {$pause_max=0;} if (isset($_GET["dead_max_dispo"])) {$dead_max_dispo=$_GET["dead_max_dispo"];} elseif (isset($_POST["dead_max_dispo"])) {$dead_max_dispo=$_POST["dead_max_dispo"];} else {$dead_max_dispo="DCMX";} if (isset($_GET["dispo_max_dispo"])) {$dispo_max_dispo=$_GET["dispo_max_dispo"];} elseif (isset($_POST["dispo_max_dispo"])) {$dispo_max_dispo=$_POST["dispo_max_dispo"];} else {$dispo_max_dispo="DISMX";} if (isset($_GET["voicemail_dump_exten_no_inst"])) {$voicemail_dump_exten_no_inst=$_GET["voicemail_dump_exten_no_inst"];} elseif (isset($_POST["voicemail_dump_exten_no_inst"])) {$voicemail_dump_exten_no_inst=$_POST["voicemail_dump_exten_no_inst"];} else {$voicemail_dump_exten_no_inst=85026666666667;} if (isset($_GET["voicemail_instructions"])) {$voicemail_instructions=$_GET["voicemail_instructions"];} elseif (isset($_POST["voicemail_instructions"])) {$voicemail_instructions=$_POST["voicemail_instructions"];} else {$voicemail_instructions="Y";} if (isset($_GET["alter_admin_interface_options"])) {$alter_admin_interface_options=$_GET["alter_admin_interface_options"];} elseif (isset($_POST["alter_admin_interface_options"])) {$alter_admin_interface_options=$_POST["alter_admin_interface_options"];} else {$alter_admin_interface_options=1;} if (isset($_GET["filter_dnc_campaign"])) {$filter_dnc_campaign=$_GET["filter_dnc_campaign"];} elseif (isset($_POST["filter_dnc_campaign"])) {$filter_dnc_campaign=$_POST["filter_dnc_campaign"];} else {$filter_dnc_campaign="";} if (isset($_GET["filter_url_did_redirect"])) {$filter_url_did_redirect=$_GET["filter_url_did_redirect"];} elseif (isset($_POST["filter_url_did_redirect"])) {$filter_url_did_redirect=$_POST["filter_url_did_redirect"];} else {$filter_url_did_redirect="N";} if (isset($_GET["max_inbound_calls"])) {$max_inbound_calls=$_GET["max_inbound_calls"];} elseif (isset($_POST["max_inbound_calls"])) {$max_inbound_calls=$_POST["max_inbound_calls"];} else {$max_inbound_calls=0;} if (isset($_GET["max_inbound_calls_old"])) {$max_inbound_calls_old=$_GET["max_inbound_calls_old"];} elseif (isset($_POST["max_inbound_calls_old"])) {$max_inbound_calls_old=$_POST["max_inbound_calls_old"];} else {$max_inbound_calls_old=0;} if (isset($_GET["manual_dial_search_checkbox"])) {$manual_dial_search_checkbox=$_GET["manual_dial_search_checkbox"];} elseif (isset($_POST["manual_dial_search_checkbox"])) {$manual_dial_search_checkbox=$_POST["manual_dial_search_checkbox"];} else {$manual_dial_search_checkbox="SELECTED";} if (isset($_GET["hide_call_log_info"])) {$hide_call_log_info=$_GET["hide_call_log_info"];} elseif (isset($_POST["hide_call_log_info"])) {$hide_call_log_info=$_POST["hide_call_log_info"];} else {$hide_call_log_info="N";} if (isset($_GET["hide_call_log_info_users"])) {$hide_call_log_info_users=$_GET["hide_call_log_info_users"];} elseif (isset($_POST["hide_call_log_info_users"])) {$hide_call_log_info_users=$_POST["hide_call_log_info_users"];} else {$hide_call_log_info_users="DISABLED";} if (isset($_GET["modify_custom_dialplans"])) {$modify_custom_dialplans=$_GET["modify_custom_dialplans"];} elseif (isset($_POST["modify_custom_dialplans"])) {$modify_custom_dialplans=$_POST["modify_custom_dialplans"];} else {$modify_custom_dialplans=0;} if (isset($_GET["queuemetrics_pause_type"])) {$queuemetrics_pause_type=$_GET["queuemetrics_pause_type"];} elseif (isset($_POST["queuemetrics_pause_type"])) {$queuemetrics_pause_type=$_POST["queuemetrics_pause_type"];} else {$queuemetrics_pause_type=0;} if (isset($_GET["frozen_server_call_clear"])) {$frozen_server_call_clear=$_GET["frozen_server_call_clear"];} elseif (isset($_POST["frozen_server_call_clear"])) {$frozen_server_call_clear=$_POST["frozen_server_call_clear"];} else {$frozen_server_call_clear=0;} if (isset($_GET["timer_alt_seconds"])) {$timer_alt_seconds=$_GET["timer_alt_seconds"];} elseif (isset($_POST["timer_alt_seconds"])) {$timer_alt_seconds=$_POST["timer_alt_seconds"];} else {$timer_alt_seconds=0;} if (isset($_GET["wrapup_seconds_override"])) {$wrapup_seconds_override=$_GET["wrapup_seconds_override"];} elseif (isset($_POST["wrapup_seconds_override"])) {$wrapup_seconds_override=$_POST["wrapup_seconds_override"];} else {$wrapup_seconds_override="-1";} if (isset($_GET["no_agent_ingroup_redirect"])) {$no_agent_ingroup_redirect=$_GET["no_agent_ingroup_redirect"];} elseif (isset($_POST["no_agent_ingroup_redirect"])) {$no_agent_ingroup_redirect=$_POST["no_agent_ingroup_redirect"];} else {$no_agent_ingroup_redirect="DISABLED";} if (isset($_GET["no_agent_ingroup_id"])) {$no_agent_ingroup_id=$_GET["no_agent_ingroup_id"];} elseif (isset($_POST["no_agent_ingroup_id"])) {$no_agent_ingroup_id=$_POST["no_agent_ingroup_id"];} else {$no_agent_ingroup_id="";} if (isset($_GET["no_agent_ingroup_extension"])) {$no_agent_ingroup_extension=$_GET["no_agent_ingroup_extension"];} elseif (isset($_POST["no_agent_ingroup_extension"])) {$no_agent_ingroup_extension=$_POST["no_agent_ingroup_extension"];} else {$no_agent_ingroup_extension="9998811112";} if (isset($_GET["pre_filter_phone_group_id"])) {$pre_filter_phone_group_id=$_GET["pre_filter_phone_group_id"];} elseif (isset($_POST["pre_filter_phone_group_id"])) {$pre_filter_phone_group_id=$_POST["pre_filter_phone_group_id"];} else {$pre_filter_phone_group_id="";} if (isset($_GET["pre_filter_extension"])) {$pre_filter_extension=$_GET["pre_filter_extension"];} elseif (isset($_POST["pre_filter_extension"])) {$pre_filter_extension=$_POST["pre_filter_extension"];} else {$pre_filter_extension="";} if (isset($_GET["wrapup_bypass"])) {$wrapup_bypass=$_GET["wrapup_bypass"];} elseif (isset($_POST["wrapup_bypass"])) {$wrapup_bypass=$_POST["wrapup_bypass"];} else {$wrapup_bypass="ENABLED";} if (isset($_GET["wrapup_after_hotkey"])) {$wrapup_after_hotkey=$_GET["wrapup_after_hotkey"];} elseif (isset($_POST["wrapup_after_hotkey"])) {$wrapup_after_hotkey=$_POST["wrapup_after_hotkey"];} else {$wrapup_after_hotkey="DISABLED";} if (isset($_GET["callback_time_24hour"])) {$callback_time_24hour=$_GET["callback_time_24hour"];} elseif (isset($_POST["callback_time_24hour"])) {$callback_time_24hour=$_POST["callback_time_24hour"];} else {$callback_time_24hour=0;} if (isset($_GET["callback_active_limit"])) {$callback_active_limit=$_GET["callback_active_limit"];} elseif (isset($_POST["callback_active_limit"])) {$callback_active_limit=$_POST["callback_active_limit"];} else {$callback_active_limit=0;} if (isset($_GET["callback_active_limit_override"])) {$callback_active_limit_override=$_GET["callback_active_limit_override"];} elseif (isset($_POST["callback_active_limit_override"])) {$callback_active_limit_override=$_POST["callback_active_limit_override"];} else {$callback_active_limit_override="N";} if (isset($_GET["comments_all_tabs"])) {$comments_all_tabs=$_GET["comments_all_tabs"];} elseif (isset($_POST["comments_all_tabs"])) {$comments_all_tabs=$_POST["comments_all_tabs"];} else {$comments_all_tabs="DISABLED";} if (isset($_GET["comments_dispo_screen"])) {$comments_dispo_screen=$_GET["comments_dispo_screen"];} elseif (isset($_POST["comments_dispo_screen"])) {$comments_dispo_screen=$_POST["comments_dispo_screen"];} else {$comments_dispo_screen="DISABLED";} if (isset($_GET["comments_callback_screen"])) {$comments_callback_screen=$_GET["comments_callback_screen"];} elseif (isset($_POST["comments_callback_screen"])) {$comments_callback_screen=$_POST["comments_callback_screen"];} else {$comments_callback_screen="DISABLED";} if (isset($_GET["qc_comment_history"])) {$qc_comment_history=$_GET["qc_comment_history"];} elseif (isset($_POST["qc_comment_history"])) {$qc_comment_history=$_POST["qc_comment_history"];} else {$qc_comment_history="CLICK";} if (isset($_GET["show_previous_callback"])) {$show_previous_callback=$_GET["show_previous_callback"];} elseif (isset($_POST["show_previous_callback"])) {$show_previous_callback=$_POST["show_previous_callback"];} else {$show_previous_callback="ENABLED";} if (isset($_GET["clear_script"])) {$clear_script=$_GET["clear_script"];} elseif (isset($_POST["clear_script"])) {$clear_script=$_POST["clear_script"];} else {$clear_script="DISABLED";} if (isset($_GET["modify_languages"])) {$modify_languages=$_GET["modify_languages"];} elseif (isset($_POST["modify_languages"])) {$modify_languages=$_POST["modify_languages"];} else {$modify_languages=0;} if (isset($_GET["enable_languages"])) {$enable_languages=$_GET["enable_languages"];} elseif (isset($_POST["enable_languages"])) {$enable_languages=$_POST["enable_languages"];} else {$enable_languages=0;} if (isset($_GET["cpd_unknown_action"])) {$cpd_unknown_action=$_GET["cpd_unknown_action"];} elseif (isset($_POST["cpd_unknown_action"])) {$cpd_unknown_action=$_POST["cpd_unknown_action"];} else {$cpd_unknown_action="DISABLED";} if (isset($_GET["selected_language"])) {$selected_language=$_GET["selected_language"];} elseif (isset($_POST["selected_language"])) {$selected_language=$_POST["selected_language"];} else {$selected_language="default English";} if (isset($_GET["user_choose_language"])) {$user_choose_language=$_GET["user_choose_language"];} elseif (isset($_POST["user_choose_language"])) {$user_choose_language=$_POST["user_choose_language"];} else {$user_choose_language=0;} if (isset($_GET["language_method"])) {$language_method=$_GET["language_method"];} elseif (isset($_POST["language_method"])) {$language_method=$_POST["language_method"];} else {$language_method="DISABLED";} if (isset($_GET["ignore_group_on_search"])) {$ignore_group_on_search=$_GET["ignore_group_on_search"];} elseif (isset($_POST["ignore_group_on_search"])) {$ignore_group_on_search=$_POST["ignore_group_on_search"];} else {$ignore_group_on_search=0;} if (isset($_GET["manual_dial_search_filter"])) {$manual_dial_search_filter=$_GET["manual_dial_search_filter"];} elseif (isset($_POST["manual_dial_search_filter"])) {$manual_dial_search_filter=$_POST["manual_dial_search_filter"];} else {$manual_dial_search_filter="NONE";} if (isset($_GET["meetme_enter_login_filename"])) {$meetme_enter_login_filename=$_GET["meetme_enter_login_filename"];} elseif (isset($_POST["meetme_enter_login_filename"])) {$meetme_enter_login_filename=$_POST["meetme_enter_login_filename"];} else {$meetme_enter_login_filename="";} if (isset($_GET["meetme_enter_leave3way_filename"])) {$meetme_enter_leave3way_filename=$_GET["meetme_enter_leave3way_filename"];} elseif (isset($_POST["meetme_enter_leave3way_filename"])) {$meetme_enter_leave3way_filename=$_POST["meetme_enter_leave3way_filename"];} else {$meetme_enter_leave3way_filename="";} if (isset($_GET["enable_did_entry_list_id"])) {$enable_did_entry_list_id=$_GET["enable_did_entry_list_id"];} elseif (isset($_POST["enable_did_entry_list_id"])) {$enable_did_entry_list_id=$_POST["enable_did_entry_list_id"];} else {$enable_did_entry_list_id=0;} if (isset($_GET["entry_list_id"])) {$entry_list_id=$_GET["entry_list_id"];} elseif (isset($_POST["entry_list_id"])) {$entry_list_id=$_POST["entry_list_id"];} else {$entry_list_id=0;} if (isset($_GET["filter_entry_list_id"])) {$filter_entry_list_id=$_GET["filter_entry_list_id"];} elseif (isset($_POST["filter_entry_list_id"])) {$filter_entry_list_id=$_POST["filter_entry_list_id"];} else {$filter_entry_list_id=0;} if (isset($_GET["allow_chats"])) {$allow_chats=$_GET["allow_chats"];} elseif (isset($_POST["allow_chats"])) {$allow_chats=$_POST["allow_chats"];} if (isset($_GET["enable_third_webform"])) {$enable_third_webform=$_GET["enable_third_webform"];} elseif (isset($_POST["enable_third_webform"])) {$enable_third_webform=$_POST["enable_third_webform"];} else {$enable_third_webform=0;} if (isset($_GET["web_form_address_three"])) {$web_form_address_three=$_GET["web_form_address_three"];} elseif (isset($_POST["web_form_address_three"])) {$web_form_address_three=$_POST["web_form_address_three"];} else {$web_form_address_three="";} if (isset($_GET["enable_international_dncs"])) {$enable_international_dncs=$_GET["enable_international_dncs"];} elseif (isset($_POST["enable_international_dncs"])) {$enable_international_dncs=$_POST["enable_international_dncs"];} else {$enable_international_dncs=0;} if (isset($_GET["api_list_restrict"])) {$api_list_restrict=$_GET["api_list_restrict"];} elseif (isset($_POST["api_list_restrict"])) {$api_list_restrict=$_POST["api_list_restrict"];} else {$api_list_restrict=0;} if (isset($_GET["api_allowed_functions"])) {$api_allowed_functions=$_GET["api_allowed_functions"];} elseif (isset($_POST["api_allowed_functions"])) {$api_allowed_functions=$_POST["api_allowed_functions"];} else {$api_allowed_functions=' ALL FUNCTIONS ';} if (isset($_GET["manual_dial_override_field"])) {$manual_dial_override_field=$_GET["manual_dial_override_field"];} elseif (isset($_POST["manual_dial_override_field"])) {$manual_dial_override_field=$_POST["manual_dial_override_field"];} else {$manual_dial_override_field="ENABLED";} if (isset($_GET["status_display_ingroup"])) {$status_display_ingroup=$_GET["status_display_ingroup"];} elseif (isset($_POST["status_display_ingroup"])) {$status_display_ingroup=$_POST["status_display_ingroup"];} else {$status_display_ingroup="ENABLED";} if (isset($_GET["populate_lead_ingroup"])) {$populate_lead_ingroup=$_GET["populate_lead_ingroup"];} elseif (isset($_POST["populate_lead_ingroup"])) {$populate_lead_ingroup=$_POST["populate_lead_ingroup"];} else {$populate_lead_ingroup="ENABLED";} if (isset($_GET["script_color"])) {$script_color=$_GET["script_color"];} elseif (isset($_POST["script_color"])) {$script_color=$_POST["script_color"];} else {$script_color="";} if (isset($_GET["customer_gone_seconds"])) {$customer_gone_seconds=$_GET["customer_gone_seconds"];} elseif (isset($_POST["customer_gone_seconds"])) {$customer_gone_seconds=$_POST["customer_gone_seconds"];} else {$customer_gone_seconds=30;} if (isset($_GET["max_queue_ingroup_calls"])) {$max_queue_ingroup_calls=$_GET["max_queue_ingroup_calls"];} elseif (isset($_POST["max_queue_ingroup_calls"])) {$max_queue_ingroup_calls=$_POST["max_queue_ingroup_calls"];} else {$max_queue_ingroup_calls=0;} if (isset($_GET["max_queue_ingroup_id"])) {$max_queue_ingroup_id=$_GET["max_queue_ingroup_id"];} elseif (isset($_POST["max_queue_ingroup_id"])) {$max_queue_ingroup_id=$_POST["max_queue_ingroup_id"];} else {$max_queue_ingroup_id="";} if (isset($_GET["max_queue_ingroup_extension"])) {$max_queue_ingroup_extension=$_GET["max_queue_ingroup_extension"];} elseif (isset($_POST["max_queue_ingroup_extension"])) {$max_queue_ingroup_extension=$_POST["max_queue_ingroup_extension"];} else {$max_queue_ingroup_extension=9998811112;} if (isset($_GET["max_system_stats_submit"])) {$max_system_stats_submit=$_GET["max_system_stats_submit"];} elseif (isset($_POST["max_system_stats_submit"])) {$max_system_stats_submit=$_POST["max_system_stats_submit"];} else {$max_system_stats_submit="";} if (isset($_GET["agent_debug_logging"])) {$agent_debug_logging=$_GET["agent_debug_logging"];} elseif (isset($_POST["agent_debug_logging"])) {$agent_debug_logging=$_POST["agent_debug_logging"];} else {$agent_debug_logging=0;} if (isset($_GET["agent_display_fields"])) {$agent_display_fields=$_GET["agent_display_fields"];} elseif (isset($_POST["agent_display_fields"])) {$agent_display_fields=$_POST["agent_display_fields"];} else {$agent_display_fields="";} if (isset($_GET["default_language"])) {$default_language=$_GET["default_language"];} elseif (isset($_POST["default_language"])) {$default_language=$_POST["default_language"];} else {$default_language="default English";} if (isset($_GET["agent_whisper_enabled"])) {$agent_whisper_enabled=$_GET["agent_whisper_enabled"];} elseif (isset($_POST["agent_whisper_enabled"])) {$agent_whisper_enabled=$_POST["agent_whisper_enabled"];} else {$agent_whisper_enabled=0;} if (isset($_GET["drop_lead_reset"])) {$drop_lead_reset=$_GET["drop_lead_reset"];} elseif (isset($_POST["drop_lead_reset"])) {$drop_lead_reset=$_POST["drop_lead_reset"];} else {$drop_lead_reset="N";} if (isset($_GET["after_hours_lead_reset"])) {$after_hours_lead_reset=$_GET["after_hours_lead_reset"];} elseif (isset($_POST["after_hours_lead_reset"])) {$after_hours_lead_reset=$_POST["after_hours_lead_reset"];} else {$after_hours_lead_reset="N";} if (isset($_GET["nanq_lead_reset"])) {$nanq_lead_reset=$_GET["nanq_lead_reset"];} elseif (isset($_POST["nanq_lead_reset"])) {$nanq_lead_reset=$_POST["nanq_lead_reset"];} else {$nanq_lead_reset="N";} if (isset($_GET["wait_time_lead_reset"])) {$wait_time_lead_reset=$_GET["wait_time_lead_reset"];} elseif (isset($_POST["wait_time_lead_reset"])) {$wait_time_lead_reset=$_POST["wait_time_lead_reset"];} else {$wait_time_lead_reset="N";} if (isset($_GET["hold_time_lead_reset"])) {$hold_time_lead_reset=$_GET["hold_time_lead_reset"];} elseif (isset($_POST["hold_time_lead_reset"])) {$hold_time_lead_reset=$_POST["hold_time_lead_reset"];} else {$hold_time_lead_reset="N";} if (isset($_GET["container_id"])) {$container_id=$_GET["container_id"];} elseif (isset($_POST["container_id"])) {$container_id=$_POST["container_id"];} else {$container_id="";} if (isset($_GET["container_notes"])) {$container_notes=$_GET["container_notes"];} elseif (isset($_POST["container_notes"])) {$container_notes=$_POST["container_notes"];} else {$container_notes="";} if (isset($_GET["container_type"])) {$container_type=$_GET["container_type"];} elseif (isset($_POST["container_type"])) {$container_type=$_POST["container_type"];} else {$container_type="OTHER";} if (isset($_GET["container_entry"])) {$container_entry=$_GET["container_entry"];} elseif (isset($_POST["container_entry"])) {$container_entry=$_POST["container_entry"];} if (isset($_GET["admin_cf_show_hidden"])) {$admin_cf_show_hidden=$_GET["admin_cf_show_hidden"];} elseif (isset($_POST["admin_cf_show_hidden"])) {$admin_cf_show_hidden=$_POST["admin_cf_show_hidden"];} else {$admin_cf_show_hidden=0;} if (isset($_GET["user_hide_realtime_enabled"])) {$user_hide_realtime_enabled=$_GET["user_hide_realtime_enabled"];} elseif (isset($_POST["user_hide_realtime_enabled"])) {$user_hide_realtime_enabled=$_POST["user_hide_realtime_enabled"];} else {$user_hide_realtime_enabled=0;} if (isset($_GET["user_hide_realtime"])) {$user_hide_realtime=$_GET["user_hide_realtime"];} elseif (isset($_POST["user_hide_realtime"])) {$user_hide_realtime=$_POST["user_hide_realtime"];} else {$user_hide_realtime=0;} if (isset($_GET["did_carrier_description"])) {$did_carrier_description=$_GET["did_carrier_description"];} elseif (isset($_POST["did_carrier_description"])) {$did_carrier_description=$_POST["did_carrier_description"];} else {$did_carrier_description="";} if (isset($_GET["status_group_id"])) {$status_group_id=$_GET["status_group_id"];} elseif (isset($_POST["status_group_id"])) {$status_group_id=$_POST["status_group_id"];} else {$status_group_id="";} if (isset($_GET["status_group_notes"])) {$status_group_notes=$_GET["status_group_notes"];} elseif (isset($_POST["status_group_notes"])) {$status_group_notes=$_POST["status_group_notes"];} else {$status_group_notes="";} if (isset($_GET["min_sec"])) {$min_sec=$_GET["min_sec"];} elseif (isset($_POST["min_sec"])) {$min_sec=$_POST["min_sec"];} else {$min_sec=0;} if (isset($_GET["max_sec"])) {$max_sec=$_GET["max_sec"];} elseif (isset($_POST["max_sec"])) {$max_sec=$_POST["max_sec"];} else {$max_sec=0;} if (isset($_GET["usacan_phone_dialcode_fix"])) {$usacan_phone_dialcode_fix=$_GET["usacan_phone_dialcode_fix"];} elseif (isset($_POST["usacan_phone_dialcode_fix"])) {$usacan_phone_dialcode_fix=$_POST["usacan_phone_dialcode_fix"];} else {$usacan_phone_dialcode_fix=0;} if (isset($_GET["am_message_wildcards"])) {$am_message_wildcards=$_GET["am_message_wildcards"];} elseif (isset($_POST["am_message_wildcards"])) {$am_message_wildcards=$_POST["am_message_wildcards"];} else {$am_message_wildcards="N";} if (isset($_GET["cache_carrier_stats_realtime"])) {$cache_carrier_stats_realtime=$_GET["cache_carrier_stats_realtime"];} elseif (isset($_POST["cache_carrier_stats_realtime"])) {$cache_carrier_stats_realtime=$_POST["cache_carrier_stats_realtime"];} else {$cache_carrier_stats_realtime=0;} if (isset($_GET["unavail_dialplan_fwd_exten"])) {$unavail_dialplan_fwd_exten=$_GET["unavail_dialplan_fwd_exten"];} elseif (isset($_POST["unavail_dialplan_fwd_exten"])) {$unavail_dialplan_fwd_exten=$_POST["unavail_dialplan_fwd_exten"];} else {$unavail_dialplan_fwd_exten="";} if (isset($_GET["unavail_dialplan_fwd_context"])) {$unavail_dialplan_fwd_context=$_GET["unavail_dialplan_fwd_context"];} elseif (isset($_POST["unavail_dialplan_fwd_context"])) {$unavail_dialplan_fwd_context=$_POST["unavail_dialplan_fwd_context"];} else {$unavail_dialplan_fwd_context="";} if (isset($_GET["nva_call_url"])) {$nva_call_url=$_GET["nva_call_url"];} elseif (isset($_POST["nva_call_url"])) {$nva_call_url=$_POST["nva_call_url"];} if (isset($_GET["nva_search_method"])) {$nva_search_method=$_GET["nva_search_method"];} elseif (isset($_POST["nva_search_method"])) {$nva_search_method=$_POST["nva_search_method"];} else {$nva_search_method="";} if (isset($_GET["nva_error_filename"])) {$nva_error_filename=$_GET["nva_error_filename"];} elseif (isset($_POST["nva_error_filename"])) {$nva_error_filename=$_POST["nva_error_filename"];} else {$nva_error_filename="";} if (isset($_GET["nva_new_list_id"])) {$nva_new_list_id=$_GET["nva_new_list_id"];} elseif (isset($_POST["nva_new_list_id"])) {$nva_new_list_id=$_POST["nva_new_list_id"];} else {$nva_new_list_id=995;} if (isset($_GET["nva_new_phone_code"])) {$nva_new_phone_code=$_GET["nva_new_phone_code"];} elseif (isset($_POST["nva_new_phone_code"])) {$nva_new_phone_code=$_POST["nva_new_phone_code"];} else {$nva_new_phone_code=1;} if (isset($_GET["nva_new_status"])) {$nva_new_status=$_GET["nva_new_status"];} elseif (isset($_POST["nva_new_status"])) {$nva_new_status=$_POST["nva_new_status"];} else {$nva_new_status="";} if (isset($_GET["gather_asterisk_output"])) {$gather_asterisk_output=$_GET["gather_asterisk_output"];} elseif (isset($_POST["gather_asterisk_output"])) {$gather_asterisk_output=$_POST["gather_asterisk_output"];} else {$gather_asterisk_output="N";} if (isset($_GET["manual_dial_timeout"])) {$manual_dial_timeout=$_GET["manual_dial_timeout"];} elseif (isset($_POST["manual_dial_timeout"])) {$manual_dial_timeout=$_POST["manual_dial_timeout"];} else {$manual_dial_timeout="";} if (isset($_GET["agent_allowed_chat_groups"])) {$agent_allowed_chat_groups=$_GET["agent_allowed_chat_groups"];} elseif (isset($_POST["agent_allowed_chat_groups"])) {$agent_allowed_chat_groups=$_POST["agent_allowed_chat_groups"];} else {$agent_allowed_chat_groups="";} if (isset($_GET["routing_initiated_recordings"])) {$routing_initiated_recordings=$_GET["routing_initiated_recordings"];} elseif (isset($_POST["routing_initiated_recordings"])) {$routing_initiated_recordings=$_POST["routing_initiated_recordings"];} else {$routing_initiated_recordings="N";} if (isset($_GET["on_hook_cid_number"])) {$on_hook_cid_number=$_GET["on_hook_cid_number"];} elseif (isset($_POST["on_hook_cid_number"])) {$on_hook_cid_number=$_POST["on_hook_cid_number"];} else {$on_hook_cid_number="";} if (isset($_GET["manual_dial_hopper_check"])) {$manual_dial_hopper_check=$_GET["manual_dial_hopper_check"];} elseif (isset($_POST["manual_dial_hopper_check"])) {$manual_dial_hopper_check=$_POST["manual_dial_hopper_check"];} else {$manual_dial_hopper_check="N";} if (isset($_GET["report_default_format"])) {$report_default_format=$_GET["report_default_format"];} elseif (isset($_POST["report_default_format"])) {$report_default_format=$_POST["report_default_format"];} else {$report_default_format="TEXT";} if (isset($_GET["alt_ivr_logging"])) {$alt_ivr_logging=$_GET["alt_ivr_logging"];} elseif (isset($_POST["alt_ivr_logging"])) {$alt_ivr_logging=$_POST["alt_ivr_logging"];} else {$alt_ivr_logging=0;} if (isset($_GET["question"])) {$question=$_GET["question"];} elseif (isset($_POST["question"])) {$question=$_POST["question"];} else {$question="";} if (isset($_GET["alt_dtmf_log"])) {$alt_dtmf_log=$_GET["alt_dtmf_log"];} elseif (isset($_POST["alt_dtmf_log"])) {$alt_dtmf_log=$_POST["alt_dtmf_log"];} else {$alt_dtmf_log=0;} if (isset($_GET["web_socket_url"])) {$web_socket_url=$_GET["web_socket_url"];} elseif (isset($_POST["web_socket_url"])) {$web_socket_url=$_POST["web_socket_url"];} if (isset($_GET["webphone_dialbox"])) {$webphone_dialbox=$_GET["webphone_dialbox"];} elseif (isset($_POST["webphone_dialbox"])) {$webphone_dialbox=$_POST["webphone_dialbox"];} else {$webphone_dialbox="Y";} if (isset($_GET["webphone_mute"])) {$webphone_mute=$_GET["webphone_mute"];} elseif (isset($_POST["webphone_mute"])) {$webphone_mute=$_POST["webphone_mute"];} else {$webphone_mute="Y";} if (isset($_GET["webphone_volume"])) {$webphone_volume=$_GET["webphone_volume"];} elseif (isset($_POST["webphone_volume"])) {$webphone_volume=$_POST["webphone_volume"];} else {$webphone_volume="Y";} if (isset($_GET["webphone_debug"])) {$webphone_debug=$_GET["webphone_debug"];} elseif (isset($_POST["webphone_debug"])) {$webphone_debug=$_POST["webphone_debug"];} else {$webphone_debug="N";} if (isset($_GET["callback_useronly_move_minutes"])) {$callback_useronly_move_minutes=$_GET["callback_useronly_move_minutes"];} elseif (isset($_POST["callback_useronly_move_minutes"])) {$callback_useronly_move_minutes=$_POST["callback_useronly_move_minutes"];} else {$callback_useronly_move_minutes=0;} if (isset($_GET["default_phone_code"])) {$default_phone_code=$_GET["default_phone_code"];} elseif (isset($_POST["default_phone_code"])) {$default_phone_code=$_POST["default_phone_code"];} else {$default_phone_code=1;} if (isset($_GET["admin_row_click"])) {$admin_row_click=$_GET["admin_row_click"];} elseif (isset($_POST["admin_row_click"])) {$admin_row_click=$_POST["admin_row_click"];} else {$admin_row_click=1;} if (isset($_GET["colors_id"])) {$colors_id=$_GET["colors_id"];} elseif (isset($_POST["colors_id"])) {$colors_id=$_POST["colors_id"];} else {$colors_id="";} if (isset($_GET["colors_name"])) {$colors_name=$_GET["colors_name"];} elseif (isset($_POST["colors_name"])) {$colors_name=$_POST["colors_name"];} else {$colors_name="";} if (isset($_GET["menu_background"])) {$menu_background=$_GET["menu_background"];} elseif (isset($_POST["menu_background"])) {$menu_background=$_POST["menu_background"];} else {$menu_background="";} if (isset($_GET["frame_background"])) {$frame_background=$_GET["frame_background"];} elseif (isset($_POST["frame_background"])) {$frame_background=$_POST["frame_background"];} else {$frame_background="";} if (isset($_GET["std_row1_background"])) {$std_row1_background=$_GET["std_row1_background"];} elseif (isset($_POST["std_row1_background"])) {$std_row1_background=$_POST["std_row1_background"];} else {$std_row1_background="";} if (isset($_GET["std_row2_background"])) {$std_row2_background=$_GET["std_row2_background"];} elseif (isset($_POST["std_row2_background"])) {$std_row2_background=$_POST["std_row2_background"];} else {$std_row2_background="";} if (isset($_GET["std_row3_background"])) {$std_row3_background=$_GET["std_row3_background"];} elseif (isset($_POST["std_row3_background"])) {$std_row3_background=$_POST["std_row3_background"];} else {$std_row3_background="";} if (isset($_GET["std_row4_background"])) {$std_row4_background=$_GET["std_row4_background"];} elseif (isset($_POST["std_row4_background"])) {$std_row4_background=$_POST["std_row4_background"];} else {$std_row4_background="";} if (isset($_GET["std_row5_background"])) {$std_row5_background=$_GET["std_row5_background"];} elseif (isset($_POST["std_row5_background"])) {$std_row5_background=$_POST["std_row5_background"];} else {$std_row5_background="";} if (isset($_GET["alt_row1_background"])) {$alt_row1_background=$_GET["alt_row1_background"];} elseif (isset($_POST["alt_row1_background"])) {$alt_row1_background=$_POST["alt_row1_background"];} else {$alt_row1_background="";} if (isset($_GET["alt_row2_background"])) {$alt_row2_background=$_GET["alt_row2_background"];} elseif (isset($_POST["alt_row2_background"])) {$alt_row2_background=$_POST["alt_row2_background"];} else {$alt_row2_background="";} if (isset($_GET["alt_row3_background"])) {$alt_row3_background=$_GET["alt_row3_background"];} elseif (isset($_POST["alt_row3_background"])) {$alt_row3_background=$_POST["alt_row3_background"];} else {$alt_row3_background="";} if (isset($_GET["button_color"])) {$button_color=$_GET["button_color"];} elseif (isset($_POST["button_color"])) {$button_color=$_POST["button_color"];} else {$button_color="";} if (isset($_GET["modify_colors"])) {$modify_colors=$_GET["modify_colors"];} elseif (isset($_POST["modify_colors"])) {$modify_colors=$_POST["modify_colors"];} else {$modify_colors=0;} if (isset($_GET["admin_screen_colors"])) {$admin_screen_colors=$_GET["admin_screen_colors"];} elseif (isset($_POST["admin_screen_colors"])) {$admin_screen_colors=$_POST["admin_screen_colors"];} else {$admin_screen_colors="default";} if (isset($_GET["web_logo"])) {$web_logo=$_GET["web_logo"];} elseif (isset($_POST["web_logo"])) {$web_logo=$_POST["web_logo"];} else {$web_logo="default_new";} if (isset($_GET["ofcom_uk_drop_calc"])) {$ofcom_uk_drop_calc=$_GET["ofcom_uk_drop_calc"];} elseif (isset($_POST["ofcom_uk_drop_calc"])) {$ofcom_uk_drop_calc=$_POST["ofcom_uk_drop_calc"];} else {$ofcom_uk_drop_calc="";} if (isset($_GET["answering_machine"])) {$answering_machine=$_GET["answering_machine"];} elseif (isset($_POST["answering_machine"])) {$answering_machine=$_POST["answering_machine"];} else {$answering_machine="N";} if (isset($_GET["outbound_alt_cid"])) {$outbound_alt_cid=$_GET["outbound_alt_cid"];} elseif (isset($_POST["outbound_alt_cid"])) {$outbound_alt_cid=$_POST["outbound_alt_cid"];} else {$outbound_alt_cid="";} if (isset($_GET["agent_screen_colors"])) {$agent_screen_colors=$_GET["agent_screen_colors"];} elseif (isset($_POST["agent_screen_colors"])) {$agent_screen_colors=$_POST["agent_screen_colors"];} else {$agent_screen_colors="default";} if (isset($_GET["script_remove_js"])) {$script_remove_js=$_GET["script_remove_js"];} elseif (isset($_POST["script_remove_js"])) {$script_remove_js=$_POST["script_remove_js"];} else {$script_remove_js=1;} if (isset($_GET["user_nickname"])) {$user_nickname=$_GET["user_nickname"];} elseif (isset($_POST["user_nickname"])) {$user_nickname=$_POST["user_nickname"];} else {$user_nickname="";} if (isset($_GET["manual_auto_next"])) {$manual_auto_next=$_GET["manual_auto_next"];} elseif (isset($_POST["manual_auto_next"])) {$manual_auto_next=$_POST["manual_auto_next"];} else {$manual_auto_next=0;} if (isset($_GET["manual_auto_show"])) {$manual_auto_show=$_GET["manual_auto_show"];} elseif (isset($_POST["manual_auto_show"])) {$manual_auto_show=$_POST["manual_auto_show"];} else {$manual_auto_show="N";} if (isset($_GET["customer_chat_screen_colors"])) {$customer_chat_screen_colors=$_GET["customer_chat_screen_colors"];} elseif (isset($_POST["customer_chat_screen_colors"])) {$customer_chat_screen_colors=$_POST["customer_chat_screen_colors"];} else {$customer_chat_screen_colors="default";} if (isset($_GET["customer_chat_survey_link"])) {$customer_chat_survey_link=$_GET["customer_chat_survey_link"];} elseif (isset($_POST["customer_chat_survey_link"])) {$customer_chat_survey_link=$_POST["customer_chat_survey_link"];} else {$customer_chat_survey_link="";} if (isset($_GET["customer_chat_survey_text"])) {$customer_chat_survey_text=$_GET["customer_chat_survey_text"];} elseif (isset($_POST["customer_chat_survey_text"])) {$customer_chat_survey_text=$_POST["customer_chat_survey_text"];} else {$customer_chat_survey_text="";} if (isset($_GET["user_new_lead_limit"])) {$user_new_lead_limit=$_GET["user_new_lead_limit"];} elseif (isset($_POST["user_new_lead_limit"])) {$user_new_lead_limit=$_POST["user_new_lead_limit"];} else {$user_new_lead_limit="";} if (isset($_GET["allow_required_fields"])) {$allow_required_fields=$_GET["allow_required_fields"];} elseif (isset($_POST["allow_required_fields"])) {$allow_required_fields=$_POST["allow_required_fields"];} else {$allow_required_fields="N";} if (isset($_GET["agent_xfer_park_3way"])) {$agent_xfer_park_3way=$_GET["agent_xfer_park_3way"];} elseif (isset($_POST["agent_xfer_park_3way"])) {$agent_xfer_park_3way=$_POST["agent_xfer_park_3way"];} else {$agent_xfer_park_3way="";} if (isset($_GET["agent_soundboards"])) {$agent_soundboards=$_GET["agent_soundboards"];} elseif (isset($_POST["agent_soundboards"])) {$agent_soundboards=$_POST["agent_soundboards"];} else {$agent_soundboards=0;} if (isset($_GET["web_loader_phone_length"])) {$web_loader_phone_length=$_GET["web_loader_phone_length"];} elseif (isset($_POST["web_loader_phone_length"])) {$web_loader_phone_length=$_POST["web_loader_phone_length"];} else {$web_loader_phone_length="DISABLED";} if (isset($_GET["agent_script"])) {$agent_script=$_GET["agent_script"];} elseif (isset($_POST["agent_script"])) {$agent_script=$_POST["agent_script"];} else {$agent_script="vicidial.php";} if (isset($_GET["agent_chat_screen_colors"])) {$agent_chat_screen_colors=$_GET["agent_chat_screen_colors"];} elseif (isset($_POST["agent_chat_screen_colors"])) {$agent_chat_screen_colors=$_POST["agent_chat_screen_colors"];} else {$agent_chat_screen_colors="default";} if (isset($_GET["conf_qualify"])) {$conf_qualify=$_GET["conf_qualify"];} elseif (isset($_POST["conf_qualify"])) {$conf_qualify=$_POST["conf_qualify"];} else {$conf_qualify="Y";} if (isset($_GET["populate_lead_province"])) {$populate_lead_province=$_GET["populate_lead_province"];} elseif (isset($_POST["populate_lead_province"])) {$populate_lead_province=$_POST["populate_lead_province"];} else {$populate_lead_province="DISABLED";} if (isset($_GET["api_only_user"])) {$api_only_user=$_GET["api_only_user"];} elseif (isset($_POST["api_only_user"])) {$api_only_user=$_POST["api_only_user"];} else {$api_only_user=0;} if (isset($_GET["dead_to_dispo"])) {$dead_to_dispo=$_GET["dead_to_dispo"];} elseif (isset($_POST["dead_to_dispo"])) {$dead_to_dispo=$_POST["dead_to_dispo"];} else {$dead_to_dispo="DISABLED";} if (isset($_GET["areacode_filter"])) {$areacode_filter=$_GET["areacode_filter"];} elseif (isset($_POST["areacode_filter"])) {$areacode_filter=$_POST["areacode_filter"];} else {$areacode_filter="DISABLED";} if (isset($_GET["areacode_filter_seconds"])) {$areacode_filter_seconds=$_GET["areacode_filter_seconds"];} elseif (isset($_POST["areacode_filter_seconds"])) {$areacode_filter_seconds=$_POST["areacode_filter_seconds"];} else {$areacode_filter_seconds=10;} if (isset($_GET["areacode_filter_action"])) {$areacode_filter_action=$_GET["areacode_filter_action"];} elseif (isset($_POST["areacode_filter_action"])) {$areacode_filter_action=$_POST["areacode_filter_action"];} else {$areacode_filter_action="MESSAGE";} if (isset($_GET["areacode_list"])) {$areacode_list=$_GET["areacode_list"];} elseif (isset($_POST["areacode_list"])) {$areacode_list=$_POST["areacode_list"];} else {$areacode_list="";} if (isset($_GET["areacode_filter_action_value"])) {$areacode_filter_action_value=$_GET["areacode_filter_action_value"];} elseif (isset($_POST["areacode_filter_action_value"])) {$areacode_filter_action_value=$_POST["areacode_filter_action_value"];} else {$areacode_filter_action_value="";} if (isset($_GET["enable_auto_reports"])) {$enable_auto_reports=$_GET["enable_auto_reports"];} elseif (isset($_POST["enable_auto_reports"])) {$enable_auto_reports=$_POST["enable_auto_reports"];} else {$enable_auto_reports=0;} if (isset($_GET["modify_auto_reports"])) {$modify_auto_reports=$_GET["modify_auto_reports"];} elseif (isset($_POST["modify_auto_reports"])) {$modify_auto_reports=$_POST["modify_auto_reports"];} else {$modify_auto_reports=0;} if (isset($_GET["report_id"])) {$report_id=$_GET["report_id"];} elseif (isset($_POST["report_id"])) {$report_id=$_POST["report_id"];} else {$report_id="";} if (isset($_GET["report_name"])) {$report_name=$_GET["report_name"];} elseif (isset($_POST["report_name"])) {$report_name=$_POST["report_name"];} else {$report_name="";} if (isset($_GET["report_server"])) {$report_server=$_GET["report_server"];} elseif (isset($_POST["report_server"])) {$report_server=$_POST["report_server"];} else {$report_server="active_voicemail_server";} if (isset($_GET["report_times"])) {$report_times=$_GET["report_times"];} elseif (isset($_POST["report_times"])) {$report_times=$_POST["report_times"];} else {$report_times="";} if (isset($_GET["report_weekdays"])) {$report_weekdays=$_GET["report_weekdays"];} elseif (isset($_POST["report_weekdays"])) {$report_weekdays=$_POST["report_weekdays"];} else {$report_weekdays="";} if (isset($_GET["report_monthdays"])) {$report_monthdays=$_GET["report_monthdays"];} elseif (isset($_POST["report_monthdays"])) {$report_monthdays=$_POST["report_monthdays"];} else {$report_monthdays="";} if (isset($_GET["report_destination"])) {$report_destination=$_GET["report_destination"];} elseif (isset($_POST["report_destination"])) {$report_destination=$_POST["report_destination"];} else {$report_destination="EMAIL";} if (isset($_GET["email_from"])) {$email_from=$_GET["email_from"];} elseif (isset($_POST["email_from"])) {$email_from=$_POST["email_from"];} else {$email_from="";} if (isset($_GET["email_to"])) {$email_to=$_GET["email_to"];} elseif (isset($_POST["email_to"])) {$email_to=$_POST["email_to"];} else {$email_to="";} if (isset($_GET["email_subject"])) {$email_subject=$_GET["email_subject"];} elseif (isset($_POST["email_subject"])) {$email_subject=$_POST["email_subject"];} else {$email_subject="";} if (isset($_GET["ftp_server"])) {$ftp_server=$_GET["ftp_server"];} elseif (isset($_POST["ftp_server"])) {$ftp_server=$_POST["ftp_server"];} else {$ftp_server="";} if (isset($_GET["ftp_user"])) {$ftp_user=$_GET["ftp_user"];} elseif (isset($_POST["ftp_user"])) {$ftp_user=$_POST["ftp_user"];} if (isset($_GET["ftp_pass"])) {$ftp_pass=$_GET["ftp_pass"];} elseif (isset($_POST["ftp_pass"])) {$ftp_pass=$_POST["ftp_pass"];} if (isset($_GET["ftp_directory"])) {$ftp_directory=$_GET["ftp_directory"];} elseif (isset($_POST["ftp_directory"])) {$ftp_directory=$_POST["ftp_directory"];} else {$ftp_directory="";} if (isset($_GET["report_url"])) {$report_url=$_GET["report_url"];} elseif (isset($_POST["report_url"])) {$report_url=$_POST["report_url"];} else {$report_url="";} if (isset($_GET["run_now_trigger"])) {$run_now_trigger=$_GET["run_now_trigger"];} elseif (isset($_POST["run_now_trigger"])) {$run_now_trigger=$_POST["run_now_trigger"];} else {$run_now_trigger="N";} if (isset($_GET["agent_xfer_validation"])) {$agent_xfer_validation=$_GET["agent_xfer_validation"];} elseif (isset($_POST["agent_xfer_validation"])) {$agent_xfer_validation=$_POST["agent_xfer_validation"];} else {$agent_xfer_validation="N";} if (isset($_GET["populate_state_areacode"])) {$populate_state_areacode=$_GET["populate_state_areacode"];} elseif (isset($_POST["populate_state_areacode"])) {$populate_state_areacode=$_POST["populate_state_areacode"];} else {$populate_state_areacode="DISABLED";} if (isset($_GET["enable_pause_code_limits"])) {$enable_pause_code_limits=$_GET["enable_pause_code_limits"];} elseif (isset($_POST["enable_pause_code_limits"])) {$enable_pause_code_limits=$_POST["enable_pause_code_limits"];} else {$enable_pause_code_limits=0;} if (isset($_GET["time_limit"])) {$time_limit=$_GET["time_limit"];} elseif (isset($_POST["time_limit"])) {$time_limit=$_POST["time_limit"];} else {$time_limit="";} if (isset($_GET["enable_drop_lists"])) {$enable_drop_lists=$_GET["enable_drop_lists"];} elseif (isset($_POST["enable_drop_lists"])) {$enable_drop_lists=$_POST["enable_drop_lists"];} else {$enable_drop_lists=0;} if (isset($_GET["dl_id"])) {$dl_id=$_GET["dl_id"];} elseif (isset($_POST["dl_id"])) {$dl_id=$_POST["dl_id"];} else {$dl_id="";} if (isset($_GET["dl_name"])) {$dl_name=$_GET["dl_name"];} elseif (isset($_POST["dl_name"])) {$dl_name=$_POST["dl_name"];} else {$dl_name="";} if (isset($_GET["last_run"])) {$last_run=$_GET["last_run"];} elseif (isset($_POST["last_run"])) {$last_run=$_POST["last_run"];} else {$last_run="";} if (isset($_GET["dl_server"])) {$dl_server=$_GET["dl_server"];} elseif (isset($_POST["dl_server"])) {$dl_server=$_POST["dl_server"];} else {$dl_server="active_voicemail_server";} if (isset($_GET["dl_times"])) {$dl_times=$_GET["dl_times"];} elseif (isset($_POST["dl_times"])) {$dl_times=$_POST["dl_times"];} else {$dl_times="";} if (isset($_GET["dl_weekdays"])) {$dl_weekdays=$_GET["dl_weekdays"];} elseif (isset($_POST["dl_weekdays"])) {$dl_weekdays=$_POST["dl_weekdays"];} else {$dl_weekdays="";} if (isset($_GET["dl_monthdays"])) {$dl_monthdays=$_GET["dl_monthdays"];} elseif (isset($_POST["dl_monthdays"])) {$dl_monthdays=$_POST["dl_monthdays"];} else {$dl_monthdays="";} if (isset($_GET["drop_status"])) {$drop_status=$_GET["drop_status"];} elseif (isset($_POST["drop_status"])) {$drop_status=$_POST["drop_status"];} else {$drop_status="";} if (isset($_GET["duplicate_check"])) {$duplicate_check=$_GET["duplicate_check"];} elseif (isset($_POST["duplicate_check"])) {$duplicate_check=$_POST["duplicate_check"];} else {$duplicate_check="NONE";} if (isset($_GET["allow_ip_lists"])) {$allow_ip_lists=$_GET["allow_ip_lists"];} elseif (isset($_POST["allow_ip_lists"])) {$allow_ip_lists=$_POST["allow_ip_lists"];} else {$allow_ip_lists=0;} if (isset($_GET["system_ip_blacklist"])) {$system_ip_blacklist=$_GET["system_ip_blacklist"];} elseif (isset($_POST["system_ip_blacklist"])) {$system_ip_blacklist=$_POST["system_ip_blacklist"];} else {$system_ip_blacklist="";} if (isset($_GET["modify_ip_lists"])) {$modify_ip_lists=$_GET["modify_ip_lists"];} elseif (isset($_POST["modify_ip_lists"])) {$modify_ip_lists=$_POST["modify_ip_lists"];} else {$modify_ip_lists=0;} if (isset($_GET["ignore_ip_list"])) {$ignore_ip_list=$_GET["ignore_ip_list"];} elseif (isset($_POST["ignore_ip_list"])) {$ignore_ip_list=$_POST["ignore_ip_list"];} else {$ignore_ip_list=0;} if (isset($_GET["admin_ip_list"])) {$admin_ip_list=$_GET["admin_ip_list"];} elseif (isset($_POST["admin_ip_list"])) {$admin_ip_list=$_POST["admin_ip_list"];} else {$admin_ip_list="";} if (isset($_GET["agent_ip_list"])) {$agent_ip_list=$_GET["agent_ip_list"];} elseif (isset($_POST["agent_ip_list"])) {$agent_ip_list=$_POST["agent_ip_list"];} else {$agent_ip_list="";} if (isset($_GET["api_ip_list"])) {$api_ip_list=$_GET["api_ip_list"];} elseif (isset($_POST["api_ip_list"])) {$api_ip_list=$_POST["api_ip_list"];} else {$api_ip_list="";} if (isset($_GET["ip_list_id"])) {$ip_list_id=$_GET["ip_list_id"];} elseif (isset($_POST["ip_list_id"])) {$ip_list_id=$_POST["ip_list_id"];} else {$ip_list_id="";} if (isset($_GET["ip_list_name"])) {$ip_list_name=$_GET["ip_list_name"];} elseif (isset($_POST["ip_list_name"])) {$ip_list_name=$_POST["ip_list_name"];} else {$ip_list_name="";} if (isset($_GET["ip_address"])) {$ip_address=$_GET["ip_address"];} elseif (isset($_POST["ip_address"])) {$ip_address=$_POST["ip_address"];} else {$ip_address="";} if (isset($_GET["dl_minutes"])) {$dl_minutes=$_GET["dl_minutes"];} elseif (isset($_POST["dl_minutes"])) {$dl_minutes=$_POST["dl_minutes"];} else {$dl_minutes=0;} if (isset($_GET["ready_max_logout"])) {$ready_max_logout=$_GET["ready_max_logout"];} elseif (isset($_POST["ready_max_logout"])) {$ready_max_logout=$_POST["ready_max_logout"];} else {$ready_max_logout="";} if (isset($_GET["routing_prefix"])) {$routing_prefix=$_GET["routing_prefix"];} elseif (isset($_POST["routing_prefix"])) {$routing_prefix=$_POST["routing_prefix"];} else {$routing_prefix="";} if (isset($_GET["callback_display_days"])) {$callback_display_days=$_GET["callback_display_days"];} elseif (isset($_POST["callback_display_days"])) {$callback_display_days=$_POST["callback_display_days"];} else {$callback_display_days=0;} if (isset($_GET["three_way_record_stop"])) {$three_way_record_stop=$_GET["three_way_record_stop"];} elseif (isset($_POST["three_way_record_stop"])) {$three_way_record_stop=$_POST["three_way_record_stop"];} else {$three_way_record_stop="N";} if (isset($_GET["hangup_xfer_record_start"])) {$hangup_xfer_record_start=$_GET["hangup_xfer_record_start"];} elseif (isset($_POST["hangup_xfer_record_start"])) {$hangup_xfer_record_start=$_POST["hangup_xfer_record_start"];} else {$hangup_xfer_record_start="N";} if (isset($_GET["agent_push_events"])) {$agent_push_events=$_GET["agent_push_events"];} elseif (isset($_POST["agent_push_events"])) {$agent_push_events=$_POST["agent_push_events"];} else {$agent_push_events=0;} if (isset($_GET["agent_push_url"])) {$agent_push_url=$_GET["agent_push_url"];} elseif (isset($_POST["agent_push_url"])) {$agent_push_url=$_POST["agent_push_url"];} else {$agent_push_url="";} if (isset($_GET["hide_inactive_lists"])) {$hide_inactive_lists=$_GET["hide_inactive_lists"];} elseif (isset($_POST["hide_inactive_lists"])) {$hide_inactive_lists=$_POST["hide_inactive_lists"];} else {$hide_inactive_lists=0;} if (isset($_GET["inbound_survey"])) {$inbound_survey=$_GET["inbound_survey"];} elseif (isset($_POST["inbound_survey"])) {$inbound_survey=$_POST["inbound_survey"];} else {$inbound_survey="DISABLED";} if (isset($_GET["inbound_survey_filename"])) {$inbound_survey_filename=$_GET["inbound_survey_filename"];} elseif (isset($_POST["inbound_survey_filename"])) {$inbound_survey_filename=$_POST["inbound_survey_filename"];} else {$inbound_survey_filename="";} if (isset($_GET["inbound_survey_accept_digit"])) {$inbound_survey_accept_digit=$_GET["inbound_survey_accept_digit"];} elseif (isset($_POST["inbound_survey_accept_digit"])) {$inbound_survey_accept_digit=$_POST["inbound_survey_accept_digit"];} else {$inbound_survey_accept_digit="";} if (isset($_GET["inbound_survey_question_filename"])) {$inbound_survey_question_filename=$_GET["inbound_survey_question_filename"];} elseif (isset($_POST["inbound_survey_question_filename"])) {$inbound_survey_question_filename=$_POST["inbound_survey_question_filename"];} else {$inbound_survey_question_filename="";} if (isset($_GET["inbound_survey_callmenu"])) {$inbound_survey_callmenu=$_GET["inbound_survey_callmenu"];} elseif (isset($_POST["inbound_survey_callmenu"])) {$inbound_survey_callmenu=$_POST["inbound_survey_callmenu"];} else {$inbound_survey_callmenu="";} if (isset($_GET["allow_manage_active_lists"])) {$allow_manage_active_lists=$_GET["allow_manage_active_lists"];} elseif (isset($_POST["allow_manage_active_lists"])) {$allow_manage_active_lists=$_POST["allow_manage_active_lists"];} else {$allow_manage_active_lists=0;} if (isset($_GET["filename_override"])) {$filename_override=$_GET["filename_override"];} elseif (isset($_POST["filename_override"])) {$filename_override=$_POST["filename_override"];} else {$filename_override="";} if (isset($_GET["expired_lists_inactive"])) {$expired_lists_inactive=$_GET["expired_lists_inactive"];} elseif (isset($_POST["expired_lists_inactive"])) {$expired_lists_inactive=$_POST["expired_lists_inactive"];} else {$expired_lists_inactive=0;} if (isset($_GET["enable_gdpr_download_deletion"])) {$enable_gdpr_download_deletion=$_GET["enable_gdpr_download_deletion"];} elseif (isset($_POST["enable_gdpr_download_deletion"])) {$enable_gdpr_download_deletion=$_POST["enable_gdpr_download_deletion"];} else {$enable_gdpr_download_deletion=0;} if (isset($_GET["did_system_filter"])) {$did_system_filter=$_GET["did_system_filter"];} elseif (isset($_POST["did_system_filter"])) {$did_system_filter=$_POST["did_system_filter"];} else {$did_system_filter=0;} if (isset($_GET["webphone_layout"])) {$webphone_layout=$_GET["webphone_layout"];} elseif (isset($_POST["webphone_layout"])) {$webphone_layout=$_POST["webphone_layout"];} if (isset($_GET["max_inbound_calls_outcome"])) {$max_inbound_calls_outcome=$_GET["max_inbound_calls_outcome"];} elseif (isset($_POST["max_inbound_calls_outcome"])) {$max_inbound_calls_outcome=$_POST["max_inbound_calls_outcome"];} else {$max_inbound_calls_outcome="DEFAULT";} if (isset($_GET["manual_auto_next_options"])) {$manual_auto_next_options=$_GET["manual_auto_next_options"];} elseif (isset($_POST["manual_auto_next_options"])) {$manual_auto_next_options=$_POST["manual_auto_next_options"];} else {$manual_auto_next_options="DEFAULT";} if (isset($_GET["agent_screen_time_display"])) {$agent_screen_time_display=$_GET["agent_screen_time_display"];} elseif (isset($_POST["agent_screen_time_display"])) {$agent_screen_time_display=$_POST["agent_screen_time_display"];} else {$agent_screen_time_display="DISABLED";} if (isset($_GET["next_dial_my_callbacks"])) {$next_dial_my_callbacks=$_GET["next_dial_my_callbacks"];} elseif (isset($_POST["next_dial_my_callbacks"])) {$next_dial_my_callbacks=$_POST["next_dial_my_callbacks"];} else {$next_dial_my_callbacks="DISABLED";} if (isset($_GET["anyone_callback_inactive_lists"])) {$anyone_callback_inactive_lists=$_GET["anyone_callback_inactive_lists"];} elseif (isset($_POST["anyone_callback_inactive_lists"])) {$anyone_callback_inactive_lists=$_POST["anyone_callback_inactive_lists"];} else {$anyone_callback_inactive_lists="default";} if (isset($_GET["inbound_no_agents_no_dial_container"])) {$inbound_no_agents_no_dial_container=$_GET["inbound_no_agents_no_dial_container"];} elseif (isset($_POST["inbound_no_agents_no_dial_container"])) {$inbound_no_agents_no_dial_container=$_POST["inbound_no_agents_no_dial_container"];} else {$inbound_no_agents_no_dial_container="---DISABLED---";} if (isset($_GET["inbound_no_agents_no_dial_threshold"])) {$inbound_no_agents_no_dial_threshold=$_GET["inbound_no_agents_no_dial_threshold"];} elseif (isset($_POST["inbound_no_agents_no_dial_threshold"])) {$inbound_no_agents_no_dial_threshold=$_POST["inbound_no_agents_no_dial_threshold"];} else {$inbound_no_agents_no_dial_threshold=0;} if (isset($_GET["icbq_expiration_hours"])) {$icbq_expiration_hours=$_GET["icbq_expiration_hours"];} elseif (isset($_POST["icbq_expiration_hours"])) {$icbq_expiration_hours=$_POST["icbq_expiration_hours"];} else {$icbq_expiration_hours=96;} if (isset($_GET["closing_time_action"])) {$closing_time_action=$_GET["closing_time_action"];} elseif (isset($_POST["closing_time_action"])) {$closing_time_action=$_POST["closing_time_action"];} else {$closing_time_action="DISABLED";} if (isset($_GET["closing_time_now_trigger"])) {$closing_time_now_trigger=$_GET["closing_time_now_trigger"];} elseif (isset($_POST["closing_time_now_trigger"])) {$closing_time_now_trigger=$_POST["closing_time_now_trigger"];} else {$closing_time_now_trigger="N";} if (isset($_GET["closing_time_filename"])) {$closing_time_filename=$_GET["closing_time_filename"];} elseif (isset($_POST["closing_time_filename"])) {$closing_time_filename=$_POST["closing_time_filename"];} else {$closing_time_filename="";} if (isset($_GET["closing_time_end_filename"])) {$closing_time_end_filename=$_GET["closing_time_end_filename"];} elseif (isset($_POST["closing_time_end_filename"])) {$closing_time_end_filename=$_POST["closing_time_end_filename"];} else {$closing_time_end_filename="";} if (isset($_GET["closing_time_lead_reset"])) {$closing_time_lead_reset=$_GET["closing_time_lead_reset"];} elseif (isset($_POST["closing_time_lead_reset"])) {$closing_time_lead_reset=$_POST["closing_time_lead_reset"];} else {$closing_time_lead_reset="N";} if (isset($_GET["closing_time_option_exten"])) {$closing_time_option_exten=$_GET["closing_time_option_exten"];} elseif (isset($_POST["closing_time_option_exten"])) {$closing_time_option_exten=$_POST["closing_time_option_exten"];} else {$closing_time_option_exten="8300";} if (isset($_GET["closing_time_option_callmenu"])) {$closing_time_option_callmenu=$_GET["closing_time_option_callmenu"];} elseif (isset($_POST["closing_time_option_callmenu"])) {$closing_time_option_callmenu=$_POST["closing_time_option_callmenu"];} else {$closing_time_option_callmenu="";} if (isset($_GET["closing_time_option_voicemail"])) {$closing_time_option_voicemail=$_GET["closing_time_option_voicemail"];} elseif (isset($_POST["closing_time_option_voicemail"])) {$closing_time_option_voicemail=$_POST["closing_time_option_voicemail"];} else {$closing_time_option_voicemail="";} if (isset($_GET["closing_time_option_xfer_group"])) {$closing_time_option_xfer_group=$_GET["closing_time_option_xfer_group"];} elseif (isset($_POST["closing_time_option_xfer_group"])) {$closing_time_option_xfer_group=$_POST["closing_time_option_xfer_group"];} else {$closing_time_option_xfer_group="---NONE---";} if (isset($_GET["closing_time_option_callback_list_id"])) {$closing_time_option_callback_list_id=$_GET["closing_time_option_callback_list_id"];} elseif (isset($_POST["closing_time_option_callback_list_id"])) {$closing_time_option_callback_list_id=$_POST["closing_time_option_callback_list_id"];} else {$closing_time_option_callback_list_id="";} if (isset($_GET["icbq_call_time_id"])) {$icbq_call_time_id=$_GET["icbq_call_time_id"];} elseif (isset($_POST["icbq_call_time_id"])) {$icbq_call_time_id=$_POST["icbq_call_time_id"];} else {$icbq_call_time_id="24hours";} if (isset($_GET["add_lead_timezone"])) {$add_lead_timezone=$_GET["add_lead_timezone"];} elseif (isset($_POST["add_lead_timezone"])) {$add_lead_timezone=$_POST["add_lead_timezone"];} else {$add_lead_timezone="SERVER";} if (isset($_GET["icbq_dial_filter"])) {$icbq_dial_filter=$_GET["icbq_dial_filter"];} elseif (isset($_POST["icbq_dial_filter"])) {$icbq_dial_filter=$_POST["icbq_dial_filter"];} else {$icbq_dial_filter="NONE";} if (isset($_GET["cid_group_id"])) {$cid_group_id=$_GET["cid_group_id"];} elseif (isset($_POST["cid_group_id"])) {$cid_group_id=$_POST["cid_group_id"];} else {$cid_group_id="";} if (isset($_GET["cid_group_notes"])) {$cid_group_notes=$_GET["cid_group_notes"];} elseif (isset($_POST["cid_group_notes"])) {$cid_group_notes=$_POST["cid_group_notes"];} else {$cid_group_notes="";} if (isset($_GET["cid_group_type"])) {$cid_group_type=$_GET["cid_group_type"];} elseif (isset($_POST["cid_group_type"])) {$cid_group_type=$_POST["cid_group_type"];} else {$cid_group_type="AREACODE";} if (isset($_GET["pause_max_dispo"])) {$pause_max_dispo=$_GET["pause_max_dispo"];} elseif (isset($_POST["pause_max_dispo"])) {$pause_max_dispo=$_POST["pause_max_dispo"];} else {$pause_max_dispo="";} if (isset($_GET["script_top_dispo"])) {$script_top_dispo=$_GET["script_top_dispo"];} elseif (isset($_POST["script_top_dispo"])) {$script_top_dispo=$_POST["script_top_dispo"];} else {$script_top_dispo="N";} if (isset($_GET["source_id_display"])) {$source_id_display=$_GET["source_id_display"];} elseif (isset($_POST["source_id_display"])) {$source_id_display=$_POST["source_id_display"];} else {$source_id_display=0;} if (isset($_GET["require_mgr_approval"])) {$require_mgr_approval=$_GET["require_mgr_approval"];} elseif (isset($_POST["require_mgr_approval"])) {$require_mgr_approval=$_POST["require_mgr_approval"];} else {$require_mgr_approval="NO";} if (isset($_GET["pause_code_approval"])) {$pause_code_approval=$_GET["pause_code_approval"];} elseif (isset($_POST["pause_code_approval"])) {$pause_code_approval=$_POST["pause_code_approval"];} else {$pause_code_approval=0;} if (isset($_GET["populate_lead_source"])) {$populate_lead_source=$_GET["populate_lead_source"];} elseif (isset($_POST["populate_lead_source"])) {$populate_lead_source=$_POST["populate_lead_source"];} else {$populate_lead_source="DISABLED";} if (isset($_GET["populate_lead_vendor"])) {$populate_lead_vendor=$_GET["populate_lead_vendor"];} elseif (isset($_POST["populate_lead_vendor"])) {$populate_lead_vendor=$_POST["populate_lead_vendor"];} else {$populate_lead_vendor="";} if (isset($_GET["max_hopper_calls"])) {$max_hopper_calls=$_GET["max_hopper_calls"];} elseif (isset($_POST["max_hopper_calls"])) {$max_hopper_calls=$_POST["max_hopper_calls"];} else {$max_hopper_calls=0;} if (isset($_GET["max_hopper_calls_hour"])) {$max_hopper_calls_hour=$_GET["max_hopper_calls_hour"];} elseif (isset($_POST["max_hopper_calls_hour"])) {$max_hopper_calls_hour=$_POST["max_hopper_calls_hour"];} else {$max_hopper_calls_hour=0;} if (isset($_GET["waiting_call_url_on"])) {$waiting_call_url_on=$_GET["waiting_call_url_on"];} elseif (isset($_POST["waiting_call_url_on"])) {$waiting_call_url_on=$_POST["waiting_call_url_on"];} else {$waiting_call_url_on="";} if (isset($_GET["waiting_call_url_off"])) {$waiting_call_url_off=$_GET["waiting_call_url_off"];} elseif (isset($_POST["waiting_call_url_off"])) {$waiting_call_url_off=$_POST["waiting_call_url_off"];} else {$waiting_call_url_off="";} if (isset($_GET["enter_ingroup_url"])) {$enter_ingroup_url=$_GET["enter_ingroup_url"];} elseif (isset($_POST["enter_ingroup_url"])) {$enter_ingroup_url=$_POST["enter_ingroup_url"];} else {$enter_ingroup_url="";} if (isset($_GET["dead_trigger_seconds"])) {$dead_trigger_seconds=$_GET["dead_trigger_seconds"];} elseif (isset($_POST["dead_trigger_seconds"])) {$dead_trigger_seconds=$_POST["dead_trigger_seconds"];} else {$dead_trigger_seconds=0;} if (isset($_GET["dead_trigger_action"])) {$dead_trigger_action=$_GET["dead_trigger_action"];} elseif (isset($_POST["dead_trigger_action"])) {$dead_trigger_action=$_POST["dead_trigger_action"];} else {$dead_trigger_action="DISABLED";} if (isset($_GET["dead_trigger_repeat"])) {$dead_trigger_repeat=$_GET["dead_trigger_repeat"];} elseif (isset($_POST["dead_trigger_repeat"])) {$dead_trigger_repeat=$_POST["dead_trigger_repeat"];} else {$dead_trigger_repeat="NO";} if (isset($_GET["dead_trigger_filename"])) {$dead_trigger_filename=$_GET["dead_trigger_filename"];} elseif (isset($_POST["dead_trigger_filename"])) {$dead_trigger_filename=$_POST["dead_trigger_filename"];} else {$dead_trigger_filename="";} if (isset($_GET["dead_trigger_url"])) {$dead_trigger_url=$_GET["dead_trigger_url"];} elseif (isset($_POST["dead_trigger_url"])) {$dead_trigger_url=$_POST["dead_trigger_url"];} if (isset($_GET["cid_cb_confirm_number"])) {$cid_cb_confirm_number=$_GET["cid_cb_confirm_number"];} elseif (isset($_POST["cid_cb_confirm_number"])) {$cid_cb_confirm_number=$_POST["cid_cb_confirm_number"];} else {$cid_cb_confirm_number="NO";} if (isset($_GET["cid_cb_invalid_filter_phone_group"])) {$cid_cb_invalid_filter_phone_group=$_GET["cid_cb_invalid_filter_phone_group"];} elseif (isset($_POST["cid_cb_invalid_filter_phone_group"])) {$cid_cb_invalid_filter_phone_group=$_POST["cid_cb_invalid_filter_phone_group"];} else {$cid_cb_invalid_filter_phone_group="";} if (isset($_GET["cid_cb_valid_length"])) {$cid_cb_valid_length=$_GET["cid_cb_valid_length"];} elseif (isset($_POST["cid_cb_valid_length"])) {$cid_cb_valid_length=$_POST["cid_cb_valid_length"];} {$cid_cb_valid_length=10;} if (isset($_GET["cid_cb_valid_filename"])) {$cid_cb_valid_filename=$_GET["cid_cb_valid_filename"];} elseif (isset($_POST["cid_cb_valid_filename"])) {$cid_cb_valid_filename=$_POST["cid_cb_valid_filename"];} else {$cid_cb_valid_filename="";} if (isset($_GET["cid_cb_confirmed_filename"])) {$cid_cb_confirmed_filename=$_GET["cid_cb_confirmed_filename"];} elseif (isset($_POST["cid_cb_confirmed_filename"])) {$cid_cb_confirmed_filename=$_POST["cid_cb_confirmed_filename"];} else {$cid_cb_confirmed_filename="";} if (isset($_GET["cid_cb_enter_filename"])) {$cid_cb_enter_filename=$_GET["cid_cb_enter_filename"];} elseif (isset($_POST["cid_cb_enter_filename"])) {$cid_cb_enter_filename=$_POST["cid_cb_enter_filename"];} else {$cid_cb_enter_filename="";} if (isset($_GET["cid_cb_you_entered_filename"])) {$cid_cb_you_entered_filename=$_GET["cid_cb_you_entered_filename"];} elseif (isset($_POST["cid_cb_you_entered_filename"])) {$cid_cb_you_entered_filename=$_POST["cid_cb_you_entered_filename"];} else {$cid_cb_you_entered_filename="";} if (isset($_GET["cid_cb_press_to_confirm_filename"])) {$cid_cb_press_to_confirm_filename=$_GET["cid_cb_press_to_confirm_filename"];} elseif (isset($_POST["cid_cb_press_to_confirm_filename"])) {$cid_cb_press_to_confirm_filename=$_POST["cid_cb_press_to_confirm_filename"];} else {$cid_cb_press_to_confirm_filename="";} if (isset($_GET["cid_cb_invalid_filename"])) {$cid_cb_invalid_filename=$_GET["cid_cb_invalid_filename"];} elseif (isset($_POST["cid_cb_invalid_filename"])) {$cid_cb_invalid_filename=$_POST["cid_cb_invalid_filename"];} else {$cid_cb_invalid_filename="";} if (isset($_GET["cid_cb_reenter_filename"])) {$cid_cb_reenter_filename=$_GET["cid_cb_reenter_filename"];} elseif (isset($_POST["cid_cb_reenter_filename"])) {$cid_cb_reenter_filename=$_POST["cid_cb_reenter_filename"];} else {$cid_cb_reenter_filename="";} if (isset($_GET["cid_cb_error_filename"])) {$cid_cb_error_filename=$_GET["cid_cb_error_filename"];} elseif (isset($_POST["cid_cb_error_filename"])) {$cid_cb_error_filename=$_POST["cid_cb_error_filename"];} else {$cid_cb_error_filename="";} if (isset($_GET["agent_logout_link"])) {$agent_logout_link=$_GET["agent_logout_link"];} elseif (isset($_POST["agent_logout_link"])) {$agent_logout_link=$_POST["agent_logout_link"];} else {$agent_logout_link=1;} if (isset($_GET["scheduled_callbacks_force_dial"])) {$scheduled_callbacks_force_dial=$_GET["scheduled_callbacks_force_dial"];} elseif (isset($_POST["scheduled_callbacks_force_dial"])) {$scheduled_callbacks_force_dial=$_POST["scheduled_callbacks_force_dial"];} else {$scheduled_callbacks_force_dial="N";} if (isset($_GET["scheduled_callbacks_auto_reschedule"])) {$scheduled_callbacks_auto_reschedule=$_GET["scheduled_callbacks_auto_reschedule"];} elseif (isset($_POST["scheduled_callbacks_auto_reschedule"])) {$scheduled_callbacks_auto_reschedule=$_POST["scheduled_callbacks_auto_reschedule"];} else {$scheduled_callbacks_auto_reschedule="DISABLED";} if (isset($_GET["scheduled_callbacks_timezones_container"])) {$scheduled_callbacks_timezones_container=$_GET["scheduled_callbacks_timezones_container"];} elseif (isset($_POST["scheduled_callbacks_timezones_container"])) {$scheduled_callbacks_timezones_container=$_POST["scheduled_callbacks_timezones_container"];} else {$scheduled_callbacks_timezones_container="DISABLED";} if (isset($_GET["daily_reset_limit"])) {$daily_reset_limit=$_GET["daily_reset_limit"];} elseif (isset($_POST["daily_reset_limit"])) {$daily_reset_limit=$_POST["daily_reset_limit"];} else {$daily_reset_limit="-1";} if (isset($_GET["three_way_volume_buttons"])) {$three_way_volume_buttons=$_GET["three_way_volume_buttons"];} elseif (isset($_POST["three_way_volume_buttons"])) {$three_way_volume_buttons=$_POST["three_way_volume_buttons"];} else {$three_way_volume_buttons="ENABLED";} if (isset($_GET["callback_dnc"])) {$callback_dnc=$_GET["callback_dnc"];} elseif (isset($_POST["callback_dnc"])) {$callback_dnc=$_POST["callback_dnc"];} else {$callback_dnc="DISABLED";} if (isset($_GET["external_web_socket_url"])) {$external_web_socket_url=$_GET["external_web_socket_url"];} elseif (isset($_POST["external_web_socket_url"])) {$external_web_socket_url=$_POST["external_web_socket_url"];} if (isset($_GET["manual_dial_validation"])) {$manual_dial_validation=$_GET["manual_dial_validation"];} elseif (isset($_POST["manual_dial_validation"])) {$manual_dial_validation=$_POST["manual_dial_validation"];} else {$manual_dial_validation="";} if (isset($_GET["place_in_line_caller_number_filename"])) {$place_in_line_caller_number_filename=$_GET["place_in_line_caller_number_filename"];} elseif (isset($_POST["place_in_line_caller_number_filename"])) {$place_in_line_caller_number_filename=$_POST["place_in_line_caller_number_filename"];} else {$place_in_line_caller_number_filename="";} if (isset($_GET["place_in_line_you_next_filename"])) {$place_in_line_you_next_filename=$_GET["place_in_line_you_next_filename"];} elseif (isset($_POST["place_in_line_you_next_filename"])) {$place_in_line_you_next_filename=$_POST["place_in_line_you_next_filename"];} else {$place_in_line_you_next_filename="";} if (isset($_GET["mute_recordings_users"])) {$mute_recordings_users=$_GET["mute_recordings_users"];} elseif (isset($_POST["mute_recordings_users"])) {$mute_recordings_users=$_POST["mute_recordings_users"];} else {$mute_recordings_users='DISABLED';} if (isset($_GET["mute_recordings_campaigns"])) {$mute_recordings_campaigns=$_GET["mute_recordings_campaigns"];} elseif (isset($_POST["mute_recordings_campaigns"])) {$mute_recordings_campaigns=$_POST["mute_recordings_campaigns"];} else {$mute_recordings_campaigns="N";} if (isset($_GET["mute_recordings_system"])) {$mute_recordings_system=$_GET["mute_recordings_system"];} elseif (isset($_POST["mute_recordings_system"])) {$mute_recordings_system=$_POST["mute_recordings_system"];} else {$mute_recordings_system=0;} if (isset($_GET["user_admin_redirect"])) {$user_admin_redirect=$_GET["user_admin_redirect"];} elseif (isset($_POST["user_admin_redirect"])) {$user_admin_redirect=$_POST["user_admin_redirect"];} else {$user_admin_redirect=0;} if (isset($_GET["user_admin_redirect_url"])) {$user_admin_redirect_url=$_GET["user_admin_redirect_url"];} elseif (isset($_POST["user_admin_redirect_url"])) {$user_admin_redirect_url=$_POST["user_admin_redirect_url"];} #if (isset($_GET["sip_event_logging"])) {$sip_event_logging=$_GET["sip_event_logging"];} # elseif (isset($_POST["sip_event_logging"])) {$sip_event_logging=$_POST["sip_event_logging"];} if (isset($_GET["sip_event_logging_system"])) {$sip_event_logging_system=$_GET["sip_event_logging_system"];} elseif (isset($_POST["sip_event_logging_system"])) {$sip_event_logging_system=$_POST["sip_event_logging_system"];} else {$sip_event_logging_system=0;} if (isset($_GET["sip_event_logging_campaigns"])) {$sip_event_logging_campaigns=$_GET["sip_event_logging_campaigns"];} elseif (isset($_POST["sip_event_logging_campaigns"])) {$sip_event_logging_campaigns=$_POST["sip_event_logging_campaigns"];} else {$sip_event_logging_campaigns="DISABLED";} #if (isset($_GET["call_quota_lead_ranking"])) {$call_quota_lead_ranking=$_GET["call_quota_lead_ranking"];} # elseif (isset($_POST["call_quota_lead_ranking"])) {$call_quota_lead_ranking=$_POST["call_quota_lead_ranking"];} if (isset($_GET["call_quota_lead_ranking_campaigns"])) {$call_quota_lead_ranking_campaigns=$_GET["call_quota_lead_ranking_campaigns"];} elseif (isset($_POST["call_quota_lead_ranking_campaigns"])) {$call_quota_lead_ranking_campaigns=$_POST["call_quota_lead_ranking_campaigns"];} else {$call_quota_lead_ranking_campaigns="DISABLED";} if (isset($_GET["call_quota_lead_ranking_system"])) {$call_quota_lead_ranking_system=$_GET["call_quota_lead_ranking_system"];} elseif (isset($_POST["call_quota_lead_ranking_system"])) {$call_quota_lead_ranking_system=$_POST["call_quota_lead_ranking_system"];} else {$call_quota_lead_ranking_system=0;} if (isset($_GET["auto_active_list_new"])) {$auto_active_list_new=$_GET["auto_active_list_new"];} elseif (isset($_POST["auto_active_list_new"])) {$auto_active_list_new=$_POST["auto_active_list_new"];} else {$auto_active_list_new="DISABLED";} if (isset($_GET["auto_active_list_rank"])) {$auto_active_list_rank=$_GET["auto_active_list_rank"];} elseif (isset($_POST["auto_active_list_rank"])) {$auto_active_list_rank=$_POST["auto_active_list_rank"];} else {$auto_active_list_rank=0;} if (isset($_GET["max_inbound_filter_enabled"])) {$max_inbound_filter_enabled=$_GET["max_inbound_filter_enabled"];} elseif (isset($_POST["max_inbound_filter_enabled"])) {$max_inbound_filter_enabled=$_POST["max_inbound_filter_enabled"];} else {$max_inbound_filter_enabled=0;} if (isset($_GET["max_inbound_filter_statuses"])) {$max_inbound_filter_statuses=$_GET["max_inbound_filter_statuses"];} elseif (isset($_POST["max_inbound_filter_statuses"])) {$max_inbound_filter_statuses=$_POST["max_inbound_filter_statuses"];} else {$max_inbound_filter_statuses=array();} if (isset($_GET["max_inbound_filter_ingroups"])) {$max_inbound_filter_ingroups=$_GET["max_inbound_filter_ingroups"];} elseif (isset($_POST["max_inbound_filter_ingroups"])) {$max_inbound_filter_ingroups=$_POST["max_inbound_filter_ingroups"];} else {$max_inbound_filter_ingroups=array();} if (isset($_GET["max_inbound_filter_min_sec"])) {$max_inbound_filter_min_sec=$_GET["max_inbound_filter_min_sec"];} elseif (isset($_POST["max_inbound_filter_min_sec"])) {$max_inbound_filter_min_sec=$_POST["max_inbound_filter_min_sec"];} else {$max_inbound_filter_min_sec="-1";} if (isset($_GET["enable_second_script"])) {$enable_second_script=$_GET["enable_second_script"];} elseif (isset($_POST["enable_second_script"])) {$enable_second_script=$_POST["enable_second_script"];} else {$enable_second_script=0;} if (isset($_GET["ingroup_script"])) {$ingroup_script=$_GET["ingroup_script"];} elseif (isset($_POST["ingroup_script"])) {$ingroup_script=$_POST["ingroup_script"];} else {$ingroup_script="";} if (isset($_GET["ingroup_script_two"])) {$ingroup_script_two=$_GET["ingroup_script_two"];} elseif (isset($_POST["ingroup_script_two"])) {$ingroup_script_two=$_POST["ingroup_script_two"];} else {$ingroup_script_two="";} if (isset($_GET["campaign_script"])) {$campaign_script=$_GET["campaign_script"];} elseif (isset($_POST["campaign_script"])) {$campaign_script=$_POST["campaign_script"];} else {$campaign_script="";} if (isset($_GET["campaign_script_two"])) {$campaign_script_two=$_GET["campaign_script_two"];} elseif (isset($_POST["campaign_script_two"])) {$campaign_script_two=$_POST["campaign_script_two"];} else {$campaign_script_two="";} if (isset($_GET["leave_vm_message_group_id"])) {$leave_vm_message_group_id=$_GET["leave_vm_message_group_id"];} elseif (isset($_POST["leave_vm_message_group_id"])) {$leave_vm_message_group_id=$_POST["leave_vm_message_group_id"];} if (isset($_GET["leave_vm_message_group_notes"])) {$leave_vm_message_group_notes=$_GET["leave_vm_message_group_notes"];} elseif (isset($_POST["leave_vm_message_group_notes"])) {$leave_vm_message_group_notes=$_POST["leave_vm_message_group_notes"];} else {$leave_vm_message_group_notes="";} if (isset($_GET["audio_filename"])) {$audio_filename=$_GET["audio_filename"];} elseif (isset($_POST["audio_filename"])) {$audio_filename=$_POST["audio_filename"];} else {$audio_filename="";} if (isset($_GET["audio_name"])) {$audio_name=$_GET["audio_name"];} elseif (isset($_POST["audio_name"])) {$audio_name=$_POST["audio_name"];} else {$audio_name="";} if (isset($_GET["time_start"])) {$time_start=$_GET["time_start"];} elseif (isset($_POST["time_start"])) {$time_start=$_POST["time_start"];} else {$time_start="0000";} if (isset($_GET["time_end"])) {$time_end=$_GET["time_end"];} elseif (isset($_POST["time_end"])) {$time_end=$_POST["time_end"];} else {$time_end="2400";} if (isset($_GET["leave_vm_no_dispo"])) {$leave_vm_no_dispo=$_GET["leave_vm_no_dispo"];} elseif (isset($_POST["leave_vm_no_dispo"])) {$leave_vm_no_dispo=$_POST["leave_vm_no_dispo"];} else {$leave_vm_no_dispo="DISABLED";} if (isset($_GET["leave_vm_message_group_id"])) {$leave_vm_message_group_id=$_GET["leave_vm_message_group_id"];} elseif (isset($_POST["leave_vm_message_group_id"])) {$leave_vm_message_group_id=$_POST["leave_vm_message_group_id"];} else {$leave_vm_message_group_id="";} if (isset($_GET["dial_timeout_lead_container"])) {$dial_timeout_lead_container=$_GET["dial_timeout_lead_container"];} elseif (isset($_POST["dial_timeout_lead_container"])) {$dial_timeout_lead_container=$_POST["dial_timeout_lead_container"];} else {$dial_timeout_lead_container="DISABLED";} if (isset($_GET["amd_type"])) {$amd_type=$_GET["amd_type"];} elseif (isset($_POST["amd_type"])) {$amd_type=$_POST["amd_type"];} else {$amd_type="AMD";} if (isset($_GET["recording_buttons"])) {$recording_buttons=$_GET["recording_buttons"];} elseif (isset($_POST["recording_buttons"])) {$recording_buttons=$_POST["recording_buttons"];} else {$recording_buttons="START_STOP";} if (isset($_GET["enable_first_webform"])) {$enable_first_webform=$_GET["enable_first_webform"];} elseif (isset($_POST["enable_first_webform"])) {$enable_first_webform=$_POST["enable_first_webform"];} else {$enable_first_webform=1;} if (isset($_GET["vmm_daily_limit"])) {$vmm_daily_limit=$_GET["vmm_daily_limit"];} elseif (isset($_POST["vmm_daily_limit"])) {$vmm_daily_limit=$_POST["vmm_daily_limit"];} else {$vmm_daily_limit=0;} if (isset($_GET["cid_auto_rotate_minutes"])) {$cid_auto_rotate_minutes=$_GET["cid_auto_rotate_minutes"];} elseif (isset($_POST["cid_auto_rotate_minutes"])) {$cid_auto_rotate_minutes=$_POST["cid_auto_rotate_minutes"];} else {$cid_auto_rotate_minutes=0;} if (isset($_GET["cid_auto_rotate_minimum"])) {$cid_auto_rotate_minimum=$_GET["cid_auto_rotate_minimum"];} elseif (isset($_POST["cid_auto_rotate_minimum"])) {$cid_auto_rotate_minimum=$_POST["cid_auto_rotate_minimum"];} else {$cid_auto_rotate_minimum=0;} #if (isset($_GET["opensips_cid_name"])) {$opensips_cid_name=$_GET["opensips_cid_name"];} # elseif (isset($_POST["opensips_cid_name"])) {$opensips_cid_name=$_POST["opensips_cid_name"];} if (isset($_GET["opensips_cid_name_campaigns"])) {$opensips_cid_name_campaigns=$_GET["opensips_cid_name_campaigns"];} elseif (isset($_POST["opensips_cid_name_campaigns"])) {$opensips_cid_name_campaigns=$_POST["opensips_cid_name_campaigns"];} else {$opensips_cid_name_campaigns="";} if (isset($_GET["opensips_cid_name_system"])) {$opensips_cid_name_system=$_GET["opensips_cid_name_system"];} elseif (isset($_POST["opensips_cid_name_system"])) {$opensips_cid_name_system=$_POST["opensips_cid_name_system"];} else {$opensips_cid_name_system=0;} if (isset($_GET["require_password_length"])) {$require_password_length=$_GET["require_password_length"];} elseif (isset($_POST["require_password_length"])) {$require_password_length=$_POST["require_password_length"];} else {$require_password_length=0;} if (isset($_GET["amd_agent_route_options"])) {$amd_agent_route_options=$_GET["amd_agent_route_options"];} elseif (isset($_POST["amd_agent_route_options"])) {$amd_agent_route_options=$_POST["amd_agent_route_options"];} else {$amd_agent_route_options="DISABLED";} if (isset($_GET["user_account_emails"])) {$user_account_emails=$_GET["user_account_emails"];} elseif (isset($_POST["user_account_emails"])) {$user_account_emails=$_POST["user_account_emails"];} else {$user_account_emails="DISABLED";} if (isset($_GET["outbound_cid_any"])) {$outbound_cid_any=$_GET["outbound_cid_any"];} elseif (isset($_POST["outbound_cid_any"])) {$outbound_cid_any=$_POST["outbound_cid_any"];} else {$outbound_cid_any="DISABLED";} if (isset($_GET["entries_per_page"])) {$entries_per_page=$_GET["entries_per_page"];} elseif (isset($_POST["entries_per_page"])) {$entries_per_page=$_POST["entries_per_page"];} else {$entries_per_page=0;} if (isset($_GET["start_count"])) {$start_count=$_GET["start_count"];} elseif (isset($_POST["start_count"])) {$start_count=$_POST["start_count"];} else {$start_count="";} if (isset($_GET["browser_call_alerts"])) {$browser_call_alerts=$_GET["browser_call_alerts"];} elseif (isset($_POST["browser_call_alerts"])) {$browser_call_alerts=$_POST["browser_call_alerts"];} else {$browser_call_alerts=0;} #if (isset($_GET["browser_alert_sound"])) {$browser_alert_sound=$_GET["browser_alert_sound"];} # elseif (isset($_POST["browser_alert_sound"])) {$browser_alert_sound=$_POST["browser_alert_sound"];} if (isset($_GET["browser_alert_sound_campaigns"])) {$browser_alert_sound_campaigns=$_GET["browser_alert_sound_campaigns"];} elseif (isset($_POST["browser_alert_sound_campaigns"])) {$browser_alert_sound_campaigns=$_POST["browser_alert_sound_campaigns"];} else {$browser_alert_sound_campaigns="---NONE---";} if (isset($_GET["browser_alert_sound_ingroups"])) {$browser_alert_sound_ingroups=$_GET["browser_alert_sound_ingroups"];} elseif (isset($_POST["browser_alert_sound_ingroups"])) {$browser_alert_sound_ingroups=$_POST["browser_alert_sound_ingroups"];} else {$browser_alert_sound_ingroups="---DISABLED---";} if (isset($_GET["browser_alert_volume"])) {$browser_alert_volume=$_GET["browser_alert_volume"];} elseif (isset($_POST["browser_alert_volume"])) {$browser_alert_volume=$_POST["browser_alert_volume"];} else {$browser_alert_volume=50;} if (isset($_GET["three_way_record_stop_exception"])) {$three_way_record_stop_exception=$_GET["three_way_record_stop_exception"];} elseif (isset($_POST["three_way_record_stop_exception"])) {$three_way_record_stop_exception=$_POST["three_way_record_stop_exception"];} else {$three_way_record_stop_exception="DISABLED";} if (isset($_GET["queuemetrics_pausereason"])) {$queuemetrics_pausereason=$_GET["queuemetrics_pausereason"];} elseif (isset($_POST["queuemetrics_pausereason"])) {$queuemetrics_pausereason=$_POST["queuemetrics_pausereason"];} else {$queuemetrics_pausereason="STANDARD";} if (isset($_GET["inbound_answer_config"])) {$inbound_answer_config=$_GET["inbound_answer_config"];} elseif (isset($_POST["inbound_answer_config"])) {$inbound_answer_config=$_POST["inbound_answer_config"];} else {$inbound_answer_config=0;} if (isset($_GET["inbound_route_answer"])) {$inbound_route_answer=$_GET["inbound_route_answer"];} elseif (isset($_POST["inbound_route_answer"])) {$inbound_route_answer=$_POST["inbound_route_answer"];} else {$inbound_route_answer="Y";} #if (isset($_GET["answer_signal"])) {$answer_signal=$_GET["answer_signal"];} # elseif (isset($_POST["answer_signal"])) {$answer_signal=$_POST["answer_signal"];} if (isset($_GET["answer_signal_callmenus"])) {$answer_signal_callmenus=$_GET["answer_signal_callmenus"];} elseif (isset($_POST["answer_signal_callmenus"])) {$answer_signal_callmenus=$_POST["answer_signal_callmenus"];} else {$answer_signal_callmenus="Y";} if (isset($_GET["answer_signal_ingroups"])) {$answer_signal_ingroups=$_GET["answer_signal_ingroups"];} elseif (isset($_POST["answer_signal_ingroups"])) {$answer_signal_ingroups=$_POST["answer_signal_ingroups"];} else {$answer_signal_ingroups="START";} if (isset($_GET["inbound_drop_voicemail"])) {$inbound_drop_voicemail=$_GET["inbound_drop_voicemail"];} elseif (isset($_POST["inbound_drop_voicemail"])) {$inbound_drop_voicemail=$_POST["inbound_drop_voicemail"];} else {$inbound_drop_voicemail="";} if (isset($_GET["inbound_after_hours_voicemail"])) {$inbound_after_hours_voicemail=$_GET["inbound_after_hours_voicemail"];} elseif (isset($_POST["inbound_after_hours_voicemail"])) {$inbound_after_hours_voicemail=$_POST["inbound_after_hours_voicemail"];} else {$inbound_after_hours_voicemail="";} if (isset($_GET["web_loader_phone_strip"])) {$web_loader_phone_strip=$_GET["web_loader_phone_strip"];} elseif (isset($_POST["web_loader_phone_strip"])) {$web_loader_phone_strip=$_POST["web_loader_phone_strip"];} else {$web_loader_phone_strip="";} if (isset($_GET["manual_dial_phone_strip"])) {$manual_dial_phone_strip=$_GET["manual_dial_phone_strip"];} elseif (isset($_POST["manual_dial_phone_strip"])) {$manual_dial_phone_strip=$_POST["manual_dial_phone_strip"];} else {$manual_dial_phone_strip="";} if (isset($_GET["pause_max_exceptions"])) {$pause_max_exceptions=$_GET["pause_max_exceptions"];} elseif (isset($_POST["pause_max_exceptions"])) {$pause_max_exceptions=$_POST["pause_max_exceptions"];} else {$pause_max_exceptions="";} if (isset($_GET["no_agent_delay"])) {$no_agent_delay=$_GET["no_agent_delay"];} elseif (isset($_POST["no_agent_delay"])) {$no_agent_delay=$_POST["no_agent_delay"];} else {$no_agent_delay=0;} if (isset($_GET["hopper_drop_run_trigger"])) {$hopper_drop_run_trigger=$_GET["hopper_drop_run_trigger"];} elseif (isset($_POST["hopper_drop_run_trigger"])) {$hopper_drop_run_trigger=$_POST["hopper_drop_run_trigger"];} else {$hopper_drop_run_trigger="N";} if (isset($_GET["hopper_drop_run_trigger_all"])) {$hopper_drop_run_trigger_all=$_GET["hopper_drop_run_trigger_all"];} elseif (isset($_POST["hopper_drop_run_trigger_all"])) {$hopper_drop_run_trigger_all=$_POST["hopper_drop_run_trigger_all"];} else {$hopper_drop_run_trigger_all="";} if (isset($_GET["daily_call_count_limit"])) {$daily_call_count_limit=$_GET["daily_call_count_limit"];} elseif (isset($_POST["daily_call_count_limit"])) {$daily_call_count_limit=$_POST["daily_call_count_limit"];} else {$daily_call_count_limit=0;} if (isset($_GET["daily_limit_manual"])) {$daily_limit_manual=$_GET["daily_limit_manual"];} elseif (isset($_POST["daily_limit_manual"])) {$daily_limit_manual=$_POST["daily_limit_manual"];} else {$daily_limit_manual="DISABLED";} if (isset($_GET["transfer_button_launch"])) {$transfer_button_launch=$_GET["transfer_button_launch"];} elseif (isset($_POST["transfer_button_launch"])) {$transfer_button_launch=$_POST["transfer_button_launch"];} else {$transfer_button_launch="NONE";} if (isset($_GET["allow_shared_dial"])) {$allow_shared_dial=$_GET["allow_shared_dial"];} elseif (isset($_POST["allow_shared_dial"])) {$allow_shared_dial=$_POST["allow_shared_dial"];} else {$allow_shared_dial=0;} if (isset($_GET["shared_dial_rank"])) {$shared_dial_rank=$_GET["shared_dial_rank"];} elseif (isset($_POST["shared_dial_rank"])) {$shared_dial_rank=$_POST["shared_dial_rank"];} else {$shared_dial_rank=99;} if (isset($_GET["mobile_number"])) {$mobile_number=$_GET["mobile_number"];} elseif (isset($_POST["mobile_number"])) {$mobile_number=$_POST["mobile_number"];} else {$mobile_number="";} if (isset($_GET["two_factor_auth_hours"])) {$two_factor_auth_hours=$_GET["two_factor_auth_hours"];} elseif (isset($_POST["two_factor_auth_hours"])) {$two_factor_auth_hours=$_POST["two_factor_auth_hours"];} else {$two_factor_auth_hours=0;} if (isset($_GET["two_factor_auth_agent_hours"])) {$two_factor_auth_agent_hours=$_GET["two_factor_auth_agent_hours"];} elseif (isset($_POST["two_factor_auth_agent_hours"])) {$two_factor_auth_agent_hours=$_POST["two_factor_auth_agent_hours"];} else {$two_factor_auth_agent_hours=0;} if (isset($_GET["two_factor_container"])) {$two_factor_container=$_GET["two_factor_container"];} elseif (isset($_POST["two_factor_container"])) {$two_factor_container=$_POST["two_factor_container"];} else {$two_factor_container="---DISABLED---";} if (isset($_GET["two_factor_override"])) {$two_factor_override=$_GET["two_factor_override"];} elseif (isset($_POST["two_factor_override"])) {$two_factor_override=$_POST["two_factor_override"];} else {$two_factor_override="NOT_ACTIVE";} if (isset($_GET["auth_entry"])) {$auth_entry=$_GET["auth_entry"];} elseif (isset($_POST["auth_entry"])) {$auth_entry=$_POST["auth_entry"];} else {$auth_entry=0;} if (isset($_GET["clear_form"])) {$clear_form=$_GET["clear_form"];} elseif (isset($_POST["clear_form"])) {$clear_form=$_POST["clear_form"];} else {$clear_form="ACKNOWLEDGE";} if (isset($_GET["agent_hidden_sound"])) {$agent_hidden_sound=$_GET["agent_hidden_sound"];} elseif (isset($_POST["agent_hidden_sound"])) {$agent_hidden_sound=$_POST["agent_hidden_sound"];} else {$agent_hidden_sound="click_quiet";} if (isset($_GET["agent_hidden_sound_volume"])) {$agent_hidden_sound_volume=$_GET["agent_hidden_sound_volume"];} elseif (isset($_POST["agent_hidden_sound_volume"])) {$agent_hidden_sound_volume=$_POST["agent_hidden_sound_volume"];} else {$agent_hidden_sound_volume=25;} if (isset($_GET["agent_hidden_sound_seconds"])) {$agent_hidden_sound_seconds=$_GET["agent_hidden_sound_seconds"];} elseif (isset($_POST["agent_hidden_sound_seconds"])) {$agent_hidden_sound_seconds=$_POST["agent_hidden_sound_seconds"];} else {$agent_hidden_sound_seconds=0;} if (isset($_GET["leave_3way_start_recording"])) {$leave_3way_start_recording=$_GET["leave_3way_start_recording"];} elseif (isset($_POST["leave_3way_start_recording"])) {$leave_3way_start_recording=$_POST["leave_3way_start_recording"];} else {$leave_3way_start_recording="DISABLED";} if (isset($_GET["leave_3way_start_recording_exception"])) {$leave_3way_start_recording_exception=$_GET["leave_3way_start_recording_exception"];} elseif (isset($_POST["leave_3way_start_recording_exception"])) {$leave_3way_start_recording_exception=$_POST["leave_3way_start_recording_exception"];} else {$leave_3way_start_recording_exception="DISABLED";} if (isset($_GET["populate_lead_comments"])) {$populate_lead_comments=$_GET["populate_lead_comments"];} elseif (isset($_POST["populate_lead_comments"])) {$populate_lead_comments=$_POST["populate_lead_comments"];} else {$populate_lead_comments="";} if (isset($_GET["agent_screen_timer"])) {$agent_screen_timer=$_GET["agent_screen_timer"];} elseif (isset($_POST["agent_screen_timer"])) {$agent_screen_timer=$_POST["agent_screen_timer"];} else {$agent_screen_timer="setTimeout";} if (isset($_GET["calls_waiting_vl_one"])) {$calls_waiting_vl_one=$_GET["calls_waiting_vl_one"];} elseif (isset($_POST["calls_waiting_vl_one"])) {$calls_waiting_vl_one=$_POST["calls_waiting_vl_one"];} else {$calls_waiting_vl_one="DISABLED";} if (isset($_GET["calls_waiting_vl_two"])) {$calls_waiting_vl_two=$_GET["calls_waiting_vl_two"];} elseif (isset($_POST["calls_waiting_vl_two"])) {$calls_waiting_vl_two=$_POST["calls_waiting_vl_two"];} else {$calls_waiting_vl_two="DISABLED";} if (isset($_GET["label_lead_id"])) {$label_lead_id=$_GET["label_lead_id"];} elseif (isset($_POST["label_lead_id"])) {$label_lead_id=$_POST["label_lead_id"];} else {$label_lead_id="";} if (isset($_GET["label_list_id"])) {$label_list_id=$_GET["label_list_id"];} elseif (isset($_POST["label_list_id"])) {$label_list_id=$_POST["label_list_id"];} else {$label_list_id="";} if (isset($_GET["label_entry_date"])) {$label_entry_date=$_GET["label_entry_date"];} elseif (isset($_POST["label_entry_date"])) {$label_entry_date=$_POST["label_entry_date"];} else {$label_entry_date="";} if (isset($_GET["label_gmt_offset_now"])) {$label_gmt_offset_now=$_GET["label_gmt_offset_now"];} elseif (isset($_POST["label_gmt_offset_now"])) {$label_gmt_offset_now=$_POST["label_gmt_offset_now"];} else {$label_gmt_offset_now="";} if (isset($_GET["label_source_id"])) {$label_source_id=$_GET["label_source_id"];} elseif (isset($_POST["label_source_id"])) {$label_source_id=$_POST["label_source_id"];} else {$label_source_id="";} if (isset($_GET["label_called_since_last_reset"])) {$label_called_since_last_reset=$_GET["label_called_since_last_reset"];} elseif (isset($_POST["label_called_since_last_reset"])) {$label_called_since_last_reset=$_POST["label_called_since_last_reset"];} else {$label_called_since_last_reset="";} if (isset($_GET["label_status"])) {$label_status=$_GET["label_status"];} elseif (isset($_POST["label_status"])) {$label_status=$_POST["label_status"];} else {$label_status="";} if (isset($_GET["label_user"])) {$label_user=$_GET["label_user"];} elseif (isset($_POST["label_user"])) {$label_user=$_POST["label_user"];} else {$label_user="";} if (isset($_GET["label_date_of_birth"])) {$label_date_of_birth=$_GET["label_date_of_birth"];} elseif (isset($_POST["label_date_of_birth"])) {$label_date_of_birth=$_POST["label_date_of_birth"];} else {$label_date_of_birth="";} if (isset($_GET["label_country_code"])) {$label_country_code=$_GET["label_country_code"];} elseif (isset($_POST["label_country_code"])) {$label_country_code=$_POST["label_country_code"];} else {$label_country_code="";} if (isset($_GET["label_last_local_call_time"])) {$label_last_local_call_time=$_GET["label_last_local_call_time"];} elseif (isset($_POST["label_last_local_call_time"])) {$label_last_local_call_time=$_POST["label_last_local_call_time"];} else {$label_last_local_call_time="";} if (isset($_GET["label_called_count"])) {$label_called_count=$_GET["label_called_count"];} elseif (isset($_POST["label_called_count"])) {$label_called_count=$_POST["label_called_count"];} else {$label_called_count="";} if (isset($_GET["label_rank"])) {$label_rank=$_GET["label_rank"];} elseif (isset($_POST["label_rank"])) {$label_rank=$_POST["label_rank"];} else {$label_rank="";} if (isset($_GET["label_owner"])) {$label_owner=$_GET["label_owner"];} elseif (isset($_POST["label_owner"])) {$label_owner=$_POST["label_owner"];} else {$label_owner="";} if (isset($_GET["label_entry_list_id"])) {$label_entry_list_id=$_GET["label_entry_list_id"];} elseif (isset($_POST["label_entry_list_id"])) {$label_entry_list_id=$_POST["label_entry_list_id"];} else {$label_entry_list_id="";} if (isset($_GET["calls_inqueue_count_one"])) {$calls_inqueue_count_one=$_GET["calls_inqueue_count_one"];} elseif (isset($_POST["calls_inqueue_count_one"])) {$calls_inqueue_count_one=$_POST["calls_inqueue_count_one"];} else {$calls_inqueue_count_one="DISABLED";} if (isset($_GET["calls_inqueue_count_two"])) {$calls_inqueue_count_two=$_GET["calls_inqueue_count_two"];} elseif (isset($_POST["calls_inqueue_count_two"])) {$calls_inqueue_count_two=$_POST["calls_inqueue_count_two"];} else {$calls_inqueue_count_two="DISABLED";} if (isset($_GET["mohsuggest"])) {$mohsuggest=$_GET["mohsuggest"];} elseif (isset($_POST["mohsuggest"])) {$mohsuggest=$_POST["mohsuggest"];} else {$mohsuggest="";} if (isset($_GET["drop_call_seconds_override"])) {$drop_call_seconds_override=$_GET["drop_call_seconds_override"];} elseif (isset($_POST["drop_call_seconds_override"])) {$drop_call_seconds_override=$_POST["drop_call_seconds_override"];} else {$drop_call_seconds_override="DISABLED";} if (isset($_GET["in_man_dial_next_ready_seconds"])) {$in_man_dial_next_ready_seconds=$_GET["in_man_dial_next_ready_seconds"];} elseif (isset($_POST["in_man_dial_next_ready_seconds"])) {$in_man_dial_next_ready_seconds=$_POST["in_man_dial_next_ready_seconds"];} else {$in_man_dial_next_ready_seconds=0;} if (isset($_GET["in_man_dial_next_ready_seconds_override"])) {$in_man_dial_next_ready_seconds_override=$_GET["in_man_dial_next_ready_seconds_override"];} elseif (isset($_POST["in_man_dial_next_ready_seconds_override"])) {$in_man_dial_next_ready_seconds_override=$_POST["in_man_dial_next_ready_seconds_override"];} else {$in_man_dial_next_ready_seconds_override="DISABLED";} if (isset($_GET["transfer_no_dispo"])) {$transfer_no_dispo=$_GET["transfer_no_dispo"];} elseif (isset($_POST["transfer_no_dispo"])) {$transfer_no_dispo=$_POST["transfer_no_dispo"];} else {$transfer_no_dispo="DISABLED";} if (isset($_GET["call_limit_24hour_method"])) {$call_limit_24hour_method=$_GET["call_limit_24hour_method"];} elseif (isset($_POST["call_limit_24hour_method"])) {$call_limit_24hour_method=$_POST["call_limit_24hour_method"];} else {$call_limit_24hour_method="DISABLED";} if (isset($_GET["call_limit_24hour_scope"])) {$call_limit_24hour_scope=$_GET["call_limit_24hour_scope"];} elseif (isset($_POST["call_limit_24hour_scope"])) {$call_limit_24hour_scope=$_POST["call_limit_24hour_scope"];} else {$call_limit_24hour_scope="SYSTEM_WIDE";} if (isset($_GET["call_limit_24hour"])) {$call_limit_24hour=$_GET["call_limit_24hour"];} elseif (isset($_POST["call_limit_24hour"])) {$call_limit_24hour=$_POST["call_limit_24hour"];} else {$call_limit_24hour=0;} if (isset($_GET["call_limit_24hour_override"])) {$call_limit_24hour_override=$_GET["call_limit_24hour_override"];} elseif (isset($_POST["call_limit_24hour_override"])) {$call_limit_24hour_override=$_POST["call_limit_24hour_override"];} else {$call_limit_24hour_override="DISABLED";} if (isset($_GET["cid_group_id_two"])) {$cid_group_id_two=$_GET["cid_group_id_two"];} elseif (isset($_POST["cid_group_id_two"])) {$cid_group_id_two=$_POST["cid_group_id_two"];} else {$cid_group_id_two="---DISABLED---";} if (isset($_GET["allowed_sip_stacks"])) {$allowed_sip_stacks=$_GET["allowed_sip_stacks"];} elseif (isset($_POST["allowed_sip_stacks"])) {$allowed_sip_stacks=$_POST["allowed_sip_stacks"];} else {$allowed_sip_stacks="SIP";} if (isset($_GET["populate_lead_owner"])) {$populate_lead_owner=$_GET["populate_lead_owner"];} elseif (isset($_POST["populate_lead_owner"])) {$populate_lead_owner=$_POST["populate_lead_owner"];} else {$populate_lead_owner="DISABLED";} if (isset($_GET["incall_tally_threshold_seconds"])) {$incall_tally_threshold_seconds=$_GET["incall_tally_threshold_seconds"];} elseif (isset($_POST["incall_tally_threshold_seconds"])) {$incall_tally_threshold_seconds=$_POST["incall_tally_threshold_seconds"];} else {$incall_tally_threshold_seconds=0;} if (isset($_GET["in_queue_nanque"])) {$in_queue_nanque=$_GET["in_queue_nanque"];} elseif (isset($_POST["in_queue_nanque"])) {$in_queue_nanque=$_POST["in_queue_nanque"];} else {$in_queue_nanque="N";} if (isset($_GET["in_queue_nanque_exceptions"])) {$in_queue_nanque_exceptions=$_GET["in_queue_nanque_exceptions"];} elseif (isset($_POST["in_queue_nanque_exceptions"])) {$in_queue_nanque_exceptions=$_POST["in_queue_nanque_exceptions"];} else {$in_queue_nanque_exceptions="";} if (isset($_GET["user_location"])) {$user_location=$_GET["user_location"];} elseif (isset($_POST["user_location"])) {$user_location=$_POST["user_location"];} else {$user_location="";} if (isset($_GET["queue_group"])) {$queue_group=$_GET["queue_group"];} elseif (isset($_POST["queue_group"])) {$queue_group=$_POST["queue_group"];} else {$queue_group="";} if (isset($_GET["queue_group_name"])) {$queue_group_name=$_GET["queue_group_name"];} elseif (isset($_POST["queue_group_name"])) {$queue_group_name=$_POST["queue_group_name"];} else {$queue_group_name="";} if (isset($_GET["included_campaigns"])) {$included_campaigns=$_GET["included_campaigns"];} elseif (isset($_POST["included_campaigns"])) {$included_campaigns=$_POST["included_campaigns"];} if (isset($_GET["included_inbound_groups"])) {$included_inbound_groups=$_GET["included_inbound_groups"];} elseif (isset($_POST["included_inbound_groups"])) {$included_inbound_groups=$_POST["included_inbound_groups"];} if (isset($_GET["allowed_queue_groups"])) {$allowed_queue_groups=$_GET["allowed_queue_groups"];} elseif (isset($_POST["allowed_queue_groups"])) {$allowed_queue_groups=$_POST["allowed_queue_groups"];} if (isset($_GET["reports_header_override"])) {$reports_header_override=$_GET["reports_header_override"];} elseif (isset($_POST["reports_header_override"])) {$reports_header_override=$_POST["reports_header_override"];} else {$reports_header_override="DISABLED";} if (isset($_GET["queue_groups"])) {$queue_groups=$_GET["queue_groups"];} elseif (isset($_POST["queue_groups"])) {$queue_groups=$_POST["queue_groups"];} if (isset($_GET["auto_alt_threshold"])) {$auto_alt_threshold=$_GET["auto_alt_threshold"];} elseif (isset($_POST["auto_alt_threshold"])) {$auto_alt_threshold=$_POST["auto_alt_threshold"];} else {$auto_alt_threshold="";} if (isset($_GET["download_invalid_files"])) {$download_invalid_files=$_GET["download_invalid_files"];} elseif (isset($_POST["download_invalid_files"])) {$download_invalid_files=$_POST["download_invalid_files"];} else {$download_invalid_files=0;} if (isset($_GET["pause_max_url"])) {$pause_max_url=$_GET["pause_max_url"];} elseif (isset($_POST["pause_max_url"])) {$pause_max_url=$_POST["pause_max_url"];} else {$pause_max_url="";} if (isset($_GET["agent_hide_hangup"])) {$agent_hide_hangup=$_GET["agent_hide_hangup"];} elseif (isset($_POST["agent_hide_hangup"])) {$agent_hide_hangup=$_POST["agent_hide_hangup"];} else {$agent_hide_hangup="";} if (isset($_GET["allow_web_debug"])) {$allow_web_debug=$_GET["allow_web_debug"];} elseif (isset($_POST["allow_web_debug"])) {$allow_web_debug=$_POST["allow_web_debug"];} else {$allow_web_debug=0;} if (isset($_GET["ig_xfer_list_sort"])) {$ig_xfer_list_sort=$_GET["ig_xfer_list_sort"];} elseif (isset($_POST["ig_xfer_list_sort"])) {$ig_xfer_list_sort=$_POST["ig_xfer_list_sort"];} else {$ig_xfer_list_sort="GROUP_ID_UP";} if (isset($_GET["pre_filter_recent_call"])) {$pre_filter_recent_call=$_GET["pre_filter_recent_call"];} elseif (isset($_POST["pre_filter_recent_call"])) {$pre_filter_recent_call=$_POST["pre_filter_recent_call"];} else {$pre_filter_recent_call="";} if (isset($_GET["pre_filter_recent_extension"])) {$pre_filter_recent_extension=$_GET["pre_filter_recent_extension"];} elseif (isset($_POST["pre_filter_recent_extension"])) {$pre_filter_recent_extension=$_POST["pre_filter_recent_extension"];} else {$pre_filter_recent_extension="";} if (isset($_GET["script_tab_frame_size"])) {$script_tab_frame_size=$_GET["script_tab_frame_size"];} elseif (isset($_POST["script_tab_frame_size"])) {$script_tab_frame_size=$_POST["script_tab_frame_size"];} else {$script_tab_frame_size="DEFAULT";} if (isset($_GET["user_group_two"])) {$user_group_two=$_GET["user_group_two"];} elseif (isset($_POST["user_group_two"])) {$user_group_two=$_POST["user_group_two"];} else {$user_group_two="";} if (isset($_GET["max_logged_in_agents"])) {$max_logged_in_agents=$_GET["max_logged_in_agents"];} elseif (isset($_POST["max_logged_in_agents"])) {$max_logged_in_agents=$_POST["max_logged_in_agents"];} else {$max_logged_in_agents=0;} if (isset($_GET["user_codes_admin"])) {$user_codes_admin=$_GET["user_codes_admin"];} elseif (isset($_POST["user_codes_admin"])) {$user_codes_admin=$_POST["user_codes_admin"];} else {$user_codes_admin=0;} if (isset($_GET["conf_engine"])) {$conf_engine=$_GET["conf_engine"];} elseif (isset($_POST["conf_engine"])) {$conf_engine=$_POST["conf_engine"];} else {$conf_engine="MEETME";} if (isset($_GET["conf_update_interval"])) {$conf_update_interval=$_GET["conf_update_interval"];} elseif (isset($_POST["conf_update_interval"])) {$conf_update_interval=$_POST["conf_update_interval"];} else {$conf_update_interval=60;} if (isset($_GET["user_group_script"])) {$user_group_script=$_GET["user_group_script"];} elseif (isset($_POST["user_group_script"])) {$user_group_script=$_POST["user_group_script"];} else {$user_group_script="DISABLED";} if (isset($_GET["login_kickall"])) {$login_kickall=$_GET["login_kickall"];} elseif (isset($_POST["login_kickall"])) {$login_kickall=$_POST["login_kickall"];} else {$login_kickall=0;} if (isset($_GET["city_rule"])) {$city_rule=$_GET["city_rule"];} elseif (isset($_POST["city_rule"])) {$city_rule=$_POST["city_rule"];} else {$city_rule="";} if (isset($_GET["county_rule"])) {$county_rule=$_GET["county_rule"];} elseif (isset($_POST["county_rule"])) {$county_rule=$_POST["county_rule"];} else {$county_rule="";} if (isset($_GET["ac_rule"])) {$ac_rule=$_GET["ac_rule"];} elseif (isset($_POST["ac_rule"])) {$ac_rule=$_POST["ac_rule"];} else {$ac_rule="";} if (isset($_GET["agent_hangup_route"])) {$agent_hangup_route=$_GET["agent_hangup_route"];} elseif (isset($_POST["agent_hangup_route"])) {$agent_hangup_route=$_POST["agent_hangup_route"];} else {$agent_hangup_route="HANGUP";} if (isset($_GET["agent_hangup_value"])) {$agent_hangup_value=$_GET["agent_hangup_value"];} elseif (isset($_POST["agent_hangup_value"])) {$agent_hangup_value=$_POST["agent_hangup_value"];} else {$agent_hangup_value="";} if (isset($_GET["agent_hangup_ig_override"])) {$agent_hangup_ig_override=$_GET["agent_hangup_ig_override"];} elseif (isset($_POST["agent_hangup_ig_override"])) {$agent_hangup_ig_override=$_POST["agent_hangup_ig_override"];} else {$agent_hangup_ig_override="N";} if (isset($_GET["abandon_check_queue"])) {$abandon_check_queue=$_GET["abandon_check_queue"];} elseif (isset($_POST["abandon_check_queue"])) {$abandon_check_queue=$_POST["abandon_check_queue"];} else {$abandon_check_queue=0;} if (isset($_GET["ara_url"])) {$ara_url=$_GET["ara_url"];} elseif (isset($_POST["ara_url"])) {$ara_url=$_POST["ara_url"];} if (isset($_GET["show_confetti"])) {$show_confetti=$_GET["show_confetti"];} elseif (isset($_POST["show_confetti"])) {$show_confetti=$_POST["show_confetti"];} else {$show_confetti="DISABLED";} if (isset($_GET["webphone_settings"])) {$webphone_settings=$_GET["webphone_settings"];} elseif (isset($_POST["webphone_settings"])) {$webphone_settings=$_POST["webphone_settings"];} else {$webphone_settings="";} if (isset($_GET["agent_notifications"])) {$agent_notifications=$_GET["agent_notifications"];} elseif (isset($_POST["agent_notifications"])) {$agent_notifications=$_POST["agent_notifications"];} else {$agent_notifications=0;} #if (isset($_GET["demographic_quotas"])) {$demographic_quotas=$_GET["demographic_quotas"];} # elseif (isset($_POST["demographic_quotas"])) {$demographic_quotas=$_POST["demographic_quotas"];} if (isset($_GET["demographic_quotas_system"])) {$demographic_quotas_system=$_GET["demographic_quotas_system"];} elseif (isset($_POST["demographic_quotas_system"])) {$demographic_quotas_system=$_POST["demographic_quotas_system"];} else {$demographic_quotas_system=0;} if (isset($_GET["demographic_quotas_campaigns"])) {$demographic_quotas_campaigns=$_GET["demographic_quotas_campaigns"];} elseif (isset($_POST["demographic_quotas_campaigns"])) {$demographic_quotas_campaigns=$_POST["demographic_quotas_campaigns"];} else {$demographic_quotas_campaigns="DISABLED";} if (isset($_GET["demographic_quotas_container"])) {$demographic_quotas_container=$_GET["demographic_quotas_container"];} elseif (isset($_POST["demographic_quotas_container"])) {$demographic_quotas_container=$_POST["demographic_quotas_container"];} else {$demographic_quotas_container="DISABLED";} if (isset($_GET["demographic_quotas_rerank"])) {$demographic_quotas_rerank=$_GET["demographic_quotas_rerank"];} elseif (isset($_POST["demographic_quotas_rerank"])) {$demographic_quotas_rerank=$_POST["demographic_quotas_rerank"];} else {$demographic_quotas_rerank="NO";} if (isset($_GET["demographic_quotas_list_resets"])) {$demographic_quotas_list_resets=$_GET["demographic_quotas_list_resets"];} elseif (isset($_POST["demographic_quotas_list_resets"])) {$demographic_quotas_list_resets=$_POST["demographic_quotas_list_resets"];} else {$demographic_quotas_list_resets="MANUAL";} if (isset($_GET["log_latency_gaps"])) {$log_latency_gaps=$_GET["log_latency_gaps"];} elseif (isset($_POST["log_latency_gaps"])) {$log_latency_gaps=$_POST["log_latency_gaps"];} else {$log_latency_gaps=1;} if (isset($_GET["modify_dial_prefix"])) {$modify_dial_prefix=$_GET["modify_dial_prefix"];} elseif (isset($_POST["modify_dial_prefix"])) {$modify_dial_prefix=$_POST["modify_dial_prefix"];} else {$modify_dial_prefix=0;} if (isset($_GET["inbound_credits"])) {$inbound_credits=$_GET["inbound_credits"];} elseif (isset($_POST["inbound_credits"])) {$inbound_credits=$_POST["inbound_credits"];} else {$inbound_credits="";} if (isset($_GET["weekday_resets"])) {$weekday_resets=$_GET["weekday_resets"];} elseif (isset($_POST["weekday_resets"])) {$weekday_resets=$_POST["weekday_resets"];} else {$weekday_resets=0;} if (isset($_GET["weekday_resets_container"])) {$weekday_resets_container=$_GET["weekday_resets_container"];} elseif (isset($_POST["weekday_resets_container"])) {$weekday_resets_container=$_POST["weekday_resets_container"];} else {$weekday_resets_container="DISABLED";} if (isset($_GET["second_alert_trigger"])) {$second_alert_trigger=$_GET["second_alert_trigger"];} elseif (isset($_POST["second_alert_trigger"])) {$second_alert_trigger=$_POST["second_alert_trigger"];} else {$second_alert_trigger="DISABLED";} if (isset($_GET["second_alert_trigger_seconds"])) {$second_alert_trigger_seconds=$_GET["second_alert_trigger_seconds"];} elseif (isset($_POST["second_alert_trigger_seconds"])) {$second_alert_trigger_seconds=$_POST["second_alert_trigger_seconds"];} else {$second_alert_trigger_seconds=600;} if (isset($_GET["second_alert_filename"])) {$second_alert_filename=$_GET["second_alert_filename"];} elseif (isset($_POST["second_alert_filename"])) {$second_alert_filename=$_POST["second_alert_filename"];} else {$second_alert_filename="";} if (isset($_GET["second_alert_delay"])) {$second_alert_delay=$_GET["second_alert_delay"];} elseif (isset($_POST["second_alert_delay"])) {$second_alert_delay=$_POST["second_alert_delay"];} else {$second_alert_delay=1000;} if (isset($_GET["second_alert_container"])) {$second_alert_container=$_GET["second_alert_container"];} elseif (isset($_POST["second_alert_container"])) {$second_alert_container=$_POST["second_alert_container"];} else {$second_alert_container="DISABLED";} if (isset($_GET["second_alert_only"])) {$second_alert_only=$_GET["second_alert_only"];} elseif (isset($_POST["second_alert_only"])) {$second_alert_only=$_POST["second_alert_only"];} else {$second_alert_only="DISABLED";} if (isset($_GET["dead_stop_recording"])) {$dead_stop_recording=$_GET["dead_stop_recording"];} elseif (isset($_POST["dead_stop_recording"])) {$dead_stop_recording=$_POST["dead_stop_recording"];} else {$dead_stop_recording="DISABLED";} if (isset($_GET["manual_vm_status_updates"])) {$manual_vm_status_updates=$_GET["manual_vm_status_updates"];} elseif (isset($_POST["manual_vm_status_updates"])) {$manual_vm_status_updates=$_POST["manual_vm_status_updates"];} else {$manual_vm_status_updates="ENABLED";} if (isset($_GET["force_per_call_notes"])) {$force_per_call_notes=$_GET["force_per_call_notes"];} elseif (isset($_POST["force_per_call_notes"])) {$force_per_call_notes=$_POST["force_per_call_notes"];} else {$force_per_call_notes="DISABLED";} if (isset($_GET["third_alert_trigger"])) {$third_alert_trigger=$_GET["third_alert_trigger"];} elseif (isset($_POST["third_alert_trigger"])) {$third_alert_trigger=$_POST["third_alert_trigger"];} else {$third_alert_trigger="DISABLED";} if (isset($_GET["third_alert_trigger_seconds"])) {$third_alert_trigger_seconds=$_GET["third_alert_trigger_seconds"];} elseif (isset($_POST["third_alert_trigger_seconds"])) {$third_alert_trigger_seconds=$_POST["third_alert_trigger_seconds"];} else {$third_alert_trigger_seconds=600;} if (isset($_GET["third_alert_filename"])) {$third_alert_filename=$_GET["third_alert_filename"];} elseif (isset($_POST["third_alert_filename"])) {$third_alert_filename=$_POST["third_alert_filename"];} else {$third_alert_filename="";} if (isset($_GET["third_alert_delay"])) {$third_alert_delay=$_GET["third_alert_delay"];} elseif (isset($_POST["third_alert_delay"])) {$third_alert_delay=$_POST["third_alert_delay"];} else {$third_alert_delay=1000;} if (isset($_GET["third_alert_container"])) {$third_alert_container=$_GET["third_alert_container"];} elseif (isset($_POST["third_alert_container"])) {$third_alert_container=$_POST["third_alert_container"];} else {$third_alert_container="DISABLED";} if (isset($_GET["third_alert_only"])) {$third_alert_only=$_GET["third_alert_only"];} elseif (isset($_POST["third_alert_only"])) {$third_alert_only=$_POST["third_alert_only"];} else {$third_alert_only="DISABLED";} if (isset($_GET["agent_search_ingroup_list"])) {$agent_search_ingroup_list=$_GET["agent_search_ingroup_list"];} elseif (isset($_POST["agent_search_ingroup_list"])) {$agent_search_ingroup_list=$_POST["agent_search_ingroup_list"];} else {$agent_search_ingroup_list="DISABLED";} if (isset($_GET["agent_search_list"])) {$agent_search_list=$_GET["agent_search_list"];} elseif (isset($_POST["agent_search_list"])) {$agent_search_list=$_POST["agent_search_list"];} else {$agent_search_list="";} if (isset($_GET["hopper_hold_inserts"])) {$hopper_hold_inserts=$_GET["hopper_hold_inserts"];} elseif (isset($_POST["hopper_hold_inserts"])) {$hopper_hold_inserts=$_POST["hopper_hold_inserts"];} else {$hopper_hold_inserts="";} if (isset($_GET["hci_enabled"])) {$hci_enabled=$_GET["hci_enabled"];} elseif (isset($_POST["hci_enabled"])) {$hci_enabled=$_POST["hci_enabled"];} else {$hci_enabled=0;} if (isset($_GET["daily_phone_number_call_limit"])) {$daily_phone_number_call_limit=$_GET["daily_phone_number_call_limit"];} elseif (isset($_POST["daily_phone_number_call_limit"])) {$daily_phone_number_call_limit=$_POST["daily_phone_number_call_limit"];} else {$daily_phone_number_call_limit=0;} if (isset($_GET["state_descriptions"])) {$state_descriptions=$_GET["state_descriptions"];} elseif (isset($_POST["state_descriptions"])) {$state_descriptions=$_POST["state_descriptions"];} else {$state_descriptions="---DISABLED---";} if (isset($_GET["holiday_method"])) {$holiday_method=$_GET["holiday_method"];} elseif (isset($_POST["holiday_method"])) {$holiday_method=$_POST["holiday_method"];} else {$holiday_method="REPLACE";} if (isset($_GET["script_tab_height"])) {$script_tab_height=$_GET["script_tab_height"];} elseif (isset($_POST["script_tab_height"])) {$script_tab_height=$_POST["script_tab_height"];} else {$script_tab_height=0;} if (isset($_GET["call_log_days"])) {$call_log_days=$_GET["call_log_days"];} elseif (isset($_POST["call_log_days"])) {$call_log_days=$_POST["call_log_days"];} else {$call_log_days=0;} if (isset($_GET["leave_3way_stop_recording"])) {$leave_3way_stop_recording=$_GET["leave_3way_stop_recording"];} elseif (isset($_POST["leave_3way_stop_recording"])) {$leave_3way_stop_recording=$_POST["leave_3way_stop_recording"];} else {$leave_3way_stop_recording="DISABLED";} if (isset($_GET["coldstorage_server_ip"])) {$coldstorage_server_ip=$_GET["coldstorage_server_ip"];} elseif (isset($_POST["coldstorage_server_ip"])) {$coldstorage_server_ip=$_POST["coldstorage_server_ip"];} else {$coldstorage_server_ip="";} if (isset($_GET["coldstorage_dbname"])) {$coldstorage_dbname=$_GET["coldstorage_dbname"];} elseif (isset($_POST["coldstorage_dbname"])) {$coldstorage_dbname=$_POST["coldstorage_dbname"];} else {$coldstorage_dbname="";} if (isset($_GET["coldstorage_login"])) {$coldstorage_login=$_GET["coldstorage_login"];} elseif (isset($_POST["coldstorage_login"])) {$coldstorage_login=$_POST["coldstorage_login"];} else {$coldstorage_login="";} if (isset($_GET["coldstorage_pass"])) {$coldstorage_pass=$_GET["coldstorage_pass"];} elseif (isset($_POST["coldstorage_pass"])) {$coldstorage_pass=$_POST["coldstorage_pass"];} else {$coldstorage_pass="";} if (isset($_GET["coldstorage_port"])) {$coldstorage_port=$_GET["coldstorage_port"];} elseif (isset($_POST["coldstorage_port"])) {$coldstorage_port=$_POST["coldstorage_port"];} else {$coldstorage_port="";} if (isset($_GET["manual_minimum_ring_seconds"])) {$manual_minimum_ring_seconds=$_GET["manual_minimum_ring_seconds"];} elseif (isset($_POST["manual_minimum_ring_seconds"])) {$manual_minimum_ring_seconds=$_POST["manual_minimum_ring_seconds"];} else {$manual_minimum_ring_seconds=0;} if (isset($_GET["manual_minimum_attempt_seconds"])) {$manual_minimum_attempt_seconds=$_GET["manual_minimum_attempt_seconds"];} elseif (isset($_POST["manual_minimum_attempt_seconds"])) {$manual_minimum_attempt_seconds=$_POST["manual_minimum_attempt_seconds"];} else {$manual_minimum_attempt_seconds=0;} if (isset($_GET["manual_minimum_answer_seconds"])) {$manual_minimum_answer_seconds=$_GET["manual_minimum_answer_seconds"];} elseif (isset($_POST["manual_minimum_answer_seconds"])) {$manual_minimum_answer_seconds=$_POST["manual_minimum_answer_seconds"];} else {$manual_minimum_answer_seconds=0;} if (isset($_GET["khomp_settings_container"])) {$khomp_settings_container=$_GET["khomp_settings_container"];} elseif (isset($_POST["khomp_settings_container"])) {$khomp_settings_container=$_POST["khomp_settings_container"];} else {$khomp_settings_container="KHOMPSETTINGS";} if (isset($_GET["enhanced_agent_monitoring"])) {$enhanced_agent_monitoring=$_GET["enhanced_agent_monitoring"];} elseif (isset($_POST["enhanced_agent_monitoring"])) {$enhanced_agent_monitoring=$_POST["enhanced_agent_monitoring"];} else {$enhanced_agent_monitoring=0;} if (isset($_GET["agent_hide_dial_fail"])) {$agent_hide_dial_fail=$_GET["agent_hide_dial_fail"];} elseif (isset($_POST["agent_hide_dial_fail"])) {$agent_hide_dial_fail=$_POST["agent_hide_dial_fail"];} else {$agent_hide_dial_fail=0;} if (isset($_GET["apinewlead_url"])) {$apinewlead_url=$_GET["apinewlead_url"];} elseif (isset($_POST["apinewlead_url"])) {$apinewlead_url=$_POST["apinewlead_url"];} else {$apinewlead_url="";} if (isset($_GET["agent_man_dial_filter"])) {$agent_man_dial_filter=$_GET["agent_man_dial_filter"];} elseif (isset($_POST["agent_man_dial_filter"])) {$agent_man_dial_filter=$_POST["agent_man_dial_filter"];} else {$agent_man_dial_filter="";} if (isset($_GET["agent_3way_dial_filter"])) {$agent_3way_dial_filter=$_GET["agent_3way_dial_filter"];} elseif (isset($_POST["agent_3way_dial_filter"])) {$agent_3way_dial_filter=$_POST["agent_3way_dial_filter"];} else {$agent_3way_dial_filter="";} if (isset($_GET["stereo_recording"])) {$stereo_recording=$_GET["stereo_recording"];} elseif (isset($_POST["stereo_recording"])) {$stereo_recording=$_POST["stereo_recording"];} else {$stereo_recording="";} if (isset($_GET["recording_dtmf_detection"])) {$recording_dtmf_detection=$_GET["recording_dtmf_detection"];} elseif (isset($_POST["recording_dtmf_detection"])) {$recording_dtmf_detection=$_POST["recording_dtmf_detection"];} else {$recording_dtmf_detection=0;} if (isset($_GET["recording_dtmf_muting"])) {$recording_dtmf_muting=$_GET["recording_dtmf_muting"];} elseif (isset($_POST["recording_dtmf_muting"])) {$recording_dtmf_muting=$_POST["recording_dtmf_muting"];} else {$recording_dtmf_muting=0;} if (isset($_GET["stereo_parallel_recording"])) {$stereo_parallel_recording=$_GET["stereo_parallel_recording"];} elseif (isset($_POST["stereo_parallel_recording"])) {$stereo_parallel_recording=$_POST["stereo_parallel_recording"];} else {$stereo_parallel_recording="";} if (isset($_GET["stereo_rec_filename"])) {$stereo_rec_filename=$_GET["stereo_rec_filename"];} elseif (isset($_POST["stereo_rec_filename"])) {$stereo_rec_filename=$_POST["stereo_rec_filename"];} else {$stereo_rec_filename="";} if (isset($_GET["stereo_recording_agent"])) {$stereo_recording_agent=$_GET["stereo_recording_agent"];} elseif (isset($_POST["stereo_recording_agent"])) {$stereo_recording_agent=$_POST["stereo_recording_agent"];} else {$stereo_recording_agent="";} if (isset($_GET["parallel_rec_co_filename"])) {$parallel_rec_co_filename=$_GET["parallel_rec_co_filename"];} elseif (isset($_POST["parallel_rec_co_filename"])) {$parallel_rec_co_filename=$_POST["parallel_rec_co_filename"];} else {$parallel_rec_co_filename="";} if (isset($_GET["parallel_rec_cm_filename"])) {$parallel_rec_cm_filename=$_GET["parallel_rec_cm_filename"];} elseif (isset($_POST["parallel_rec_cm_filename"])) {$parallel_rec_cm_filename=$_POST["parallel_rec_cm_filename"];} else {$parallel_rec_cm_filename="";} if (isset($_GET["parallel_rec_fr_filename"])) {$parallel_rec_fr_filename=$_GET["parallel_rec_fr_filename"];} elseif (isset($_POST["parallel_rec_fr_filename"])) {$parallel_rec_fr_filename=$_POST["parallel_rec_fr_filename"];} else {$parallel_rec_fr_filename="";} if (isset($_GET["call_count_limit_restrict"])) {$call_count_limit_restrict=$_GET["call_count_limit_restrict"];} elseif (isset($_POST["call_count_limit_restrict"])) {$call_count_limit_restrict=$_POST["call_count_limit_restrict"];} else {$call_count_limit_restrict="";} if (isset($_GET["db_crashed_tables_check"])) {$db_crashed_tables_check=$_GET["db_crashed_tables_check"];} elseif (isset($_POST["db_crashed_tables_check"])) {$db_crashed_tables_check=$_POST["db_crashed_tables_check"];} else {$db_crashed_tables_check=0;} if (isset($_GET["alter_cid_name"])) {$alter_cid_name=$_GET["alter_cid_name"];} elseif (isset($_POST["alter_cid_name"])) {$alter_cid_name=$_POST["alter_cid_name"];} else {$alter_cid_name="";} if (isset($_GET["adaptive_percentmax_percentage"])) {$adaptive_percentmax_percentage=$_GET["adaptive_percentmax_percentage"];} elseif (isset($_POST["adaptive_percentmax_percentage"])) {$adaptive_percentmax_percentage=$_POST["adaptive_percentmax_percentage"];} else {$adaptive_percentmax_percentage="";} if (isset($_GET["xfer_min_container"])) {$xfer_min_container=$_GET["xfer_min_container"];} elseif (isset($_POST["xfer_min_container"])) {$xfer_min_container=$_POST["xfer_min_container"];} else {$xfer_min_container="";} if (isset($_GET["xfer_talk_minimum"])) {$xfer_talk_minimum=$_GET["xfer_talk_minimum"];} elseif (isset($_POST["xfer_talk_minimum"])) {$xfer_talk_minimum=$_POST["xfer_talk_minimum"];} else {$xfer_talk_minimum="";} if (isset($_GET["xfer_talk_minimum_sec"])) {$xfer_talk_minimum_sec=$_GET["xfer_talk_minimum_sec"];} elseif (isset($_POST["xfer_talk_minimum_sec"])) {$xfer_talk_minimum_sec=$_POST["xfer_talk_minimum_sec"];} else {$xfer_talk_minimum_sec=0;} if (isset($_GET["hangup_again_link"])) {$hangup_again_link=$_GET["hangup_again_link"];} elseif (isset($_POST["hangup_again_link"])) {$hangup_again_link=$_POST["hangup_again_link"];} if (isset($_GET["max_inbound_auto_reenable"])) {$max_inbound_auto_reenable=$_GET["max_inbound_auto_reenable"];} elseif (isset($_POST["max_inbound_auto_reenable"])) {$max_inbound_auto_reenable=$_POST["max_inbound_auto_reenable"];} if (isset($_GET["modify_settings_containers"])) {$modify_settings_containers=$_GET["modify_settings_containers"];} elseif (isset($_POST["modify_settings_containers"])) {$modify_settings_containers=$_POST["modify_settings_containers"];} if (isset($_GET["amd_agent_display"])) {$amd_agent_display=$_GET["amd_agent_display"];} elseif (isset($_POST["amd_agent_display"])) {$amd_agent_display=$_POST["amd_agent_display"];} if (isset($_GET["amd_status_map"])) {$amd_status_map=$_GET["amd_status_map"];} elseif (isset($_POST["amd_status_map"])) {$amd_status_map=$_POST["amd_status_map"];} if (isset($script_id)) {$script_id= mb_strtoupper($script_id,'utf-8');} if (isset($lead_filter_id)) {$lead_filter_id = mb_strtoupper($lead_filter_id,'utf-8');} if (!isset($groups)) {$groups=array();} 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,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,allow_emails,level_8_disable_add,pass_key,pass_hash_enabled,disable_auto_dial,country_code_list_stats,frozen_server_call_clear,active_modules,allow_chats,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,default_language,user_hide_realtime_enabled,log_recording_access,alt_ivr_logging,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,agent_soundboards,web_loader_phone_length,agent_script,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,enable_gdpr_download_deletion,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,inbound_answer_config,enable_international_dncs,daily_call_count_limit,allow_shared_dial,agent_search_method,admin_home_url,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin,abandon_check_queue,agent_notifications,demographic_quotas,inbound_credits,weekday_resets,two_factor_auth_agent_hours,hopper_hold_inserts,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port,enhanced_agent_monitoring,stereo_recording,recording_dtmf_detection,recording_dtmf_muting,stereo_parallel_recording,max_inbound_auto_reenable,viciamd_enabled,amd_status_map FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); #if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); if ($qm_conf_ct > 0) { $row=mysqli_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]; $SScustom_fields_enabled = $row[8]; $SSadmin_web_directory = $row[9]; $SSwebphone_url = $row[10]; $SSfirst_login_trigger = $row[11]; $SShosted_settings = $row[12]; $SSdefault_phone_registration_password =$row[13]; $SSdefault_phone_login_password = $row[14]; $SSdefault_server_password = $row[15]; $SStest_campaign_calls = $row[16]; $SSactive_voicemail_server = $row[17]; $SSvoicemail_timezones = $row[18]; $SSdefault_voicemail_timezone = $row[19]; $SSdefault_local_gmt = $row[20]; $SScampaign_cid_areacodes_enabled = $row[21]; $SSpllb_grouping_limit = $row[22]; $SSdid_ra_extensions_enabled = $row[23]; $SSexpanded_list_stats = $row[24]; $SScontacts_enabled = $row[25]; $SSalt_log_server_ip = $row[26]; $SSalt_log_dbname = $row[27]; $SSalt_log_login = $row[28]; $SSalt_log_pass = $row[29]; $SStables_use_alt_log_db = $row[30]; $SScall_menu_qualify_enabled = $row[31]; $SSadmin_list_counts = $row[32]; $SSallow_voicemail_greeting = $row[33]; $SSsvn_revision = $row[34]; $SSallow_emails = $row[35]; $SSlevel_8_disable_add = $row[36]; $SSpass_key = $row[37]; $SSpass_hash_enabled = $row[38]; $SSdisable_auto_dial = $row[39]; $SScountry_code_list_stats = $row[40]; $SSfrozen_server_call_clear = $row[41]; $SSactive_modules = $row[42]; $SSallow_chats = $row[43]; $SSenable_languages = $row[44]; $SSlanguage_method = $row[45]; $SSmeetme_enter_login_filename = $row[46]; $SSmeetme_enter_leave3way_filename = $row[47]; $SSenable_did_entry_list_id = $row[48]; $SSenable_third_webform = $row[49]; $SSdefault_language = $row[50]; $SSuser_hide_realtime_enabled = $row[51]; $SSlog_recording_access = $row[52]; $SSalt_ivr_logging = $row[53]; $SSadmin_row_click = $row[54]; $SSadmin_screen_colors = $row[55]; $SSofcom_uk_drop_calc = $row[56]; $SSagent_screen_colors = $row[57]; $SSscript_remove_js = $row[58]; $SSmanual_auto_next = $row[59]; $SSuser_new_lead_limit = $row[60]; $SSagent_xfer_park_3way = $row[61]; $SSagent_soundboards = $row[62]; $SSweb_loader_phone_length = $row[63]; $SSagent_script = $row[64]; $SSenable_auto_reports = $row[65]; $SSenable_pause_code_limits = $row[66]; $SSenable_drop_lists = $row[67]; $SSallow_ip_lists = $row[68]; $SSsystem_ip_blacklist = $row[69]; $SShide_inactive_lists = $row[70]; $SSallow_manage_active_lists = $row[71]; $SSexpired_lists_inactive = $row[72]; $SSdid_system_filter = $row[73]; $SSenable_gdpr_download_deletion = $row[74]; $SSmute_recordings = $row[75]; $SSuser_admin_redirect = $row[76]; $SSlist_status_modification_confirmation = $row[77]; $SSsip_event_logging = $row[78]; $SScall_quota_lead_ranking = $row[79]; $SSenable_second_script = $row[80]; $SSenable_first_webform = $row[81]; $SSrecording_buttons = $row[82]; $SSopensips_cid_name = $row[83]; $SSrequire_password_length = $row[84]; $SSuser_account_emails = $row[85]; $SSoutbound_cid_any = $row[86]; $SSentries_per_page = $row[87]; $SSbrowser_call_alerts = $row[88]; $SSinbound_answer_config = $row[89]; $SSenable_international_dncs = $row[90]; $SSdaily_call_count_limit = $row[91]; $SSallow_shared_dial = $row[92]; $SSagent_search_method = $row[93]; $SSadmin_home_url = $row[94]; $SSqc_claim_limit = $row[95]; $SSqc_expire_days = $row[96]; $SStwo_factor_auth_hours = $row[97]; $SStwo_factor_container = $row[98]; $SScall_limit_24hour = $row[99]; $SSallowed_sip_stacks = $row[100]; $SSagent_hide_hangup = $row[101]; $SSallow_web_debug = $row[102]; $SSmax_logged_in_agents = $row[103]; $SSuser_codes_admin = $row[104]; $SSabandon_check_queue = $row[105]; $SSagent_notifications = $row[106]; $SSdemographic_quotas = $row[107]; $SSinbound_credits = $row[108]; $SSweekday_resets = $row[109]; $SStwo_factor_auth_agent_hours = $row[110]; $SShopper_hold_inserts = $row[111]; $SScoldstorage_server_ip = $row[112]; $SScoldstorage_dbname = $row[113]; $SScoldstorage_login = $row[114]; $SScoldstorage_pass = $row[115]; $SScoldstorage_port = $row[116]; $SSenhanced_agent_monitoring = $row[117]; $SSstereo_recording = $row[118]; $SSrecording_dtmf_detection = $row[119]; $SSrecording_dtmf_muting = $row[120]; $SSstereo_parallel_recording = $row[121]; $SSmax_inbound_auto_reenable = $row[122]; $SSviciamd_enabled = $row[123]; $SSamd_status_map = $row[124]; } if ($SSallow_web_debug < 1 || !isset($DB)) {$DB=0;} $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); ##### END SETTINGS LOOKUP ##### ########################################### $KHOMP_enabled=0; $stmt="SELECT count(*) from vicidial_settings_containers where container_id='KHOMPSETTINGS';"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $KHOMP_enabled = $rowx[0]; } ### populate pass_key if not set if ( ($qm_conf_ct > 0) and (strlen($SSpass_key)<16) ) { $SSpass_key = ''; $possible = "0123456789abcdefghijklmnpqrstvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ"; $i = 0; $length = 16; while ($i < $length) { $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); $SSpass_key .= $char; $i++; } $stmt="UPDATE system_settings set pass_key='$SSpass_key' where ( (pass_key is NULL) or (pass_key='') );"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if ($non_latin > 0) { if (!mysqli_set_charset($link,"utf8")) {printf("Error loading character set utf8: %s\n", mysqli_error());} # else {printf("Current character set: %s\n", mysqli_character_set_name($link));} $rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link); } ###################################################################################################### ###################################################################################################### ####### Form variable filtering for security and data integrity ###################################################################################################### ###################################################################################################### ### DIGITS ONLY ### $adaptive_latest_server_time = preg_replace('/[^0-9]/','',$adaptive_latest_server_time); $admin_hangup_enabled = preg_replace('/[^0-9]/','',$admin_hangup_enabled); $admin_hijack_enabled = preg_replace('/[^0-9]/','',$admin_hijack_enabled); $admin_monitor_enabled = preg_replace('/[^0-9]/','',$admin_monitor_enabled); $AFLogging_enabled = preg_replace('/[^0-9]/','',$AFLogging_enabled); $agent_choose_ingroups = preg_replace('/[^0-9]/','',$agent_choose_ingroups); $agentcall_manual = preg_replace('/[^0-9]/','',$agentcall_manual); $agentonly_callbacks = preg_replace('/[^0-9]/','',$agentonly_callbacks); $AGI_call_logging_enabled = preg_replace('/[^0-9]/','',$AGI_call_logging_enabled); $allcalls_delay = preg_replace('/[^0-9]/','',$allcalls_delay); $alter_agent_interface_options = preg_replace('/[^0-9]/','',$alter_agent_interface_options); $answer_transfer_agent = preg_replace('/[^0-9]/','',$answer_transfer_agent); $ast_admin_access = preg_replace('/[^0-9]/','',$ast_admin_access); $ast_delete_phones = preg_replace('/[^0-9]/','',$ast_delete_phones); $attempt_delay = preg_replace('/[^0-9]/','',$attempt_delay); $attempt_maximum = preg_replace('/[^0-9]/','',$attempt_maximum); $auto_dial_next_number = preg_replace('/[^0-9]/','',$auto_dial_next_number); $balance_trunks_offlimits = preg_replace('/[^0-9]/','',$balance_trunks_offlimits); $call_parking_enabled = preg_replace('/[^0-9]/','',$call_parking_enabled); $CallerID_popup_enabled = preg_replace('/[^0-9]/','',$CallerID_popup_enabled); $campaign_detail = preg_replace('/[^0-9]/','',$campaign_detail); $campaign_rec_exten = preg_replace('/[^0-9]/','',$campaign_rec_exten); $campaign_vdad_exten = preg_replace('/[^0-9]/','',$campaign_vdad_exten); $change_agent_campaign = preg_replace('/[^0-9]/','',$change_agent_campaign); $closer_default_blended = preg_replace('/[^0-9]/','',$closer_default_blended); $conf_exten = preg_replace('/[^0-9]/','',$conf_exten); $conf_on_extension = preg_replace('/[^0-9]/','',$conf_on_extension); $conferencing_enabled = preg_replace('/[^0-9]/','',$conferencing_enabled); $ct_default_start = preg_replace('/[^0-9]/','',$ct_default_start); $ct_default_stop = preg_replace('/[^0-9]/','',$ct_default_stop); $ct_friday_start = preg_replace('/[^0-9]/','',$ct_friday_start); $ct_friday_stop = preg_replace('/[^0-9]/','',$ct_friday_stop); $ct_monday_start = preg_replace('/[^0-9]/','',$ct_monday_start); $ct_monday_stop = preg_replace('/[^0-9]/','',$ct_monday_stop); $ct_saturday_start = preg_replace('/[^0-9]/','',$ct_saturday_start); $ct_saturday_stop = preg_replace('/[^0-9]/','',$ct_saturday_stop); $ct_sunday_start = preg_replace('/[^0-9]/','',$ct_sunday_start); $ct_sunday_stop = preg_replace('/[^0-9]/','',$ct_sunday_stop); $ct_thursday_start = preg_replace('/[^0-9]/','',$ct_thursday_start); $ct_thursday_stop = preg_replace('/[^0-9]/','',$ct_thursday_stop); $ct_tuesday_start = preg_replace('/[^0-9]/','',$ct_tuesday_start); $ct_tuesday_stop = preg_replace('/[^0-9]/','',$ct_tuesday_stop); $ct_wednesday_start = preg_replace('/[^0-9]/','',$ct_wednesday_start); $ct_wednesday_stop = preg_replace('/[^0-9]/','',$ct_wednesday_stop); $DBX_port = preg_replace('/[^0-9]/','',$DBX_port); $DBY_port = preg_replace('/[^0-9]/','',$DBY_port); $dedicated_trunks = preg_replace('/[^0-9]/','',$dedicated_trunks); $delete_call_times = preg_replace('/[^0-9]/','',$delete_call_times); $delete_campaigns = preg_replace('/[^0-9]/','',$delete_campaigns); $delete_filters = preg_replace('/[^0-9]/','',$delete_filters); $delete_ingroups = preg_replace('/[^0-9]/','',$delete_ingroups); $delete_lists = preg_replace('/[^0-9]/','',$delete_lists); $delete_remote_agents = preg_replace('/[^0-9]/','',$delete_remote_agents); $delete_scripts = preg_replace('/[^0-9]/','',$delete_scripts); $delete_user_groups = preg_replace('/[^0-9]/','',$delete_user_groups); $delete_users = preg_replace('/[^0-9]/','',$delete_users); $dial_timeout = preg_replace('/[^0-9]/','',$dial_timeout); $dialplan_number = preg_replace('/[^0-9]/','',$dialplan_number); $enable_fast_refresh = preg_replace('/[^0-9]/','',$enable_fast_refresh); $enable_persistant_mysql = preg_replace('/[^0-9]/','',$enable_persistant_mysql); $fast_refresh_rate = preg_replace('/[^0-9]/','',$fast_refresh_rate); $hopper_level = preg_replace('/[^0-9]/','',$hopper_level); $hotkey = preg_replace('/[^0-9]/','',$hotkey); $hotkeys_active = preg_replace('/[^0-9]/','',$hotkeys_active); $list_id = preg_replace('/[^0-9]/','',$list_id); $load_leads = preg_replace('/[^0-9]/','',$load_leads); $max_vicidial_trunks = preg_replace('/[^0-9]/','',$max_vicidial_trunks); $modify_call_times = preg_replace('/[^0-9]/','',$modify_call_times); $modify_users = preg_replace('/[^0-9]/','',$modify_users); $modify_campaigns = preg_replace('/[^0-9]/','',$modify_campaigns); $modify_lists = preg_replace('/[^0-9]/','',$modify_lists); $modify_scripts = preg_replace('/[^0-9]/','',$modify_scripts); $modify_filters = preg_replace('/[^0-9]/','',$modify_filters); $modify_ingroups = preg_replace('/[^0-9]/','',$modify_ingroups); $modify_usergroups = preg_replace('/[^0-9]/','',$modify_usergroups); $modify_remoteagents = preg_replace('/[^0-9]/','',$modify_remoteagents); $modify_servers = preg_replace('/[^0-9]/','',$modify_servers); $view_reports = preg_replace('/[^0-9]/','',$view_reports); $modify_leads = preg_replace('/[^0-9]/','',$modify_leads); $export_gdpr_leads = preg_replace('/[^0-9]/','',$export_gdpr_leads); $monitor_prefix = preg_replace('/[^0-9]/','',$monitor_prefix); $new_dialplan_number = preg_replace('/[^0-9]/','',$new_dialplan_number); $new_outbound_cid = preg_replace('/[^0-9]/','',$new_outbound_cid); $number_of_lines = preg_replace('/[^0-9]/','',$number_of_lines); $old_conf_exten = preg_replace('/[^0-9]/','',$old_conf_exten); $outbound_cid = preg_replace('/[^0-9]/','',$outbound_cid); $park_ext = preg_replace('/[^0-9]/','',$park_ext); $park_on_extension = preg_replace('/[^0-9]/','',$park_on_extension); $phone_number = preg_replace('/[^0-9]/','',$phone_number); $QUEUE_ACTION_enabled = preg_replace('/[^0-9]/','',$QUEUE_ACTION_enabled); $recording_exten = preg_replace('/[^0-9]/','',$recording_exten); $remote_agent_id = preg_replace('/[^0-9]/','',$remote_agent_id); $telnet_port = preg_replace('/[^0-9]/','',$telnet_port); $updater_check_enabled = preg_replace('/[^0-9]/','',$updater_check_enabled); $user_level = preg_replace('/[^0-9]/','',$user_level); $user_switching_enabled = preg_replace('/[^0-9]/','',$user_switching_enabled); $VDstop_rec_after_each_call = preg_replace('/[^0-9]/','',$VDstop_rec_after_each_call); $VICIDIAL_park_on_extension = preg_replace('/[^0-9]/','',$VICIDIAL_park_on_extension); $vicidial_recording = preg_replace('/[^0-9]/','',$vicidial_recording); $vicidial_transfers = preg_replace('/[^0-9]/','',$vicidial_transfers); $voicemail_button_enabled = preg_replace('/[^0-9]/','',$voicemail_button_enabled); $voicemail_dump_exten = preg_replace('/[^0-9]/','',$voicemail_dump_exten); $voicemail_dump_exten_no_inst = preg_replace('/[^0-9]/','',$voicemail_dump_exten_no_inst); $voicemail_exten = preg_replace('/[^0-9]/','',$voicemail_exten); $wrapup_seconds = preg_replace('/[^0-9]/','',$wrapup_seconds); $use_non_latin = preg_replace('/[^0-9]/','',$use_non_latin); $webroot_writable = preg_replace('/[^0-9]/','',$webroot_writable); $enable_queuemetrics_logging = preg_replace('/[^0-9]/','',$enable_queuemetrics_logging); $enable_sipsak_messages = preg_replace('/[^0-9]/','',$enable_sipsak_messages); $allow_sipsak_messages = preg_replace('/[^0-9]/','',$allow_sipsak_messages); $mix_container_item = preg_replace('/[^0-9]/','',$mix_container_item); $prompt_interval = preg_replace('/[^0-9]/','',$prompt_interval); $agent_alert_delay = preg_replace('/[^0-9]/','',$agent_alert_delay); $manual_dial_list_id = preg_replace('/[^0-9]/','',$manual_dial_list_id); $qc_user_level = preg_replace('/[^0-9]/','',$qc_user_level); $qc_pass = preg_replace('/[^0-9]/','',$qc_pass); $qc_finish = preg_replace('/[^0-9]/','',$qc_finish); $qc_commit = preg_replace('/[^0-9]/','',$qc_commit); $shift_start_time = preg_replace('/[^0-9]/','',$shift_start_time); $timeclock_end_of_day = preg_replace('/[^0-9]/','',$timeclock_end_of_day); $survey_xfer_exten = preg_replace('/[^0-9]/','',$survey_xfer_exten); $add_timeclock_log = preg_replace('/[^0-9]/','',$add_timeclock_log); $modify_timeclock_log = preg_replace('/[^0-9]/','',$modify_timeclock_log); $delete_timeclock_log = preg_replace('/[^0-9]/','',$delete_timeclock_log); $vdc_agent_api_access = preg_replace('/[^0-9]/','',$vdc_agent_api_access); $vdc_agent_api_active = preg_replace('/[^0-9]/','',$vdc_agent_api_active); $hold_time_option_seconds = preg_replace('/[^0-9]/','',$hold_time_option_seconds); $hold_time_option_callback_list_id = preg_replace('/[^0-9]/','',$hold_time_option_callback_list_id); $source_did = preg_replace('/[^0-9]/','',$source_did); $modify_inbound_dids = preg_replace('/[^0-9]/','',$modify_inbound_dids); $delete_inbound_dids = preg_replace('/[^0-9]/','',$delete_inbound_dids); $answer_sec_pct_rt_stat_one = preg_replace('/[^0-9]/','',$answer_sec_pct_rt_stat_one); $answer_sec_pct_rt_stat_two = preg_replace('/[^0-9]/','',$answer_sec_pct_rt_stat_two); $enable_vtiger_integration = preg_replace('/[^0-9]/','',$enable_vtiger_integration); $qc_features_active = preg_replace('/[^0-9]/','',$qc_features_active); $outbound_autodial_active = preg_replace('/[^0-9]/','',$outbound_autodial_active); $download_lists = preg_replace('/[^0-9]/','',$download_lists); $caller_id_number = preg_replace('/[^0-9]/','',$caller_id_number); $outbound_calls_per_second = preg_replace('/[^0-9]/','',$outbound_calls_per_second); $manager_shift_enforcement_override = preg_replace('/[^0-9]/','',$manager_shift_enforcement_override); $export_reports = preg_replace('/[^0-9]/','',$export_reports); $delete_from_dnc = preg_replace('/[^0-9]/','',$delete_from_dnc); $menu_timeout = preg_replace('/[^0-9]/','',$menu_timeout); $menu_time_check = preg_replace('/[^0-9]/','',$menu_time_check); $track_in_vdac = preg_replace('/[^0-9]/','',$track_in_vdac); $menu_repeat = preg_replace('/[^0-9]/','',$menu_repeat); $agentonly_callback_campaign_lock = preg_replace('/[^0-9]/','',$agentonly_callback_campaign_lock); $sounds_central_control_active = preg_replace('/[^0-9]/','',$sounds_central_control_active); $user_territories_active = preg_replace('/[^0-9]/','',$user_territories_active); $vicidial_recording_limit = preg_replace('/[^0-9]/','',$vicidial_recording_limit); $allow_custom_dialplan = preg_replace('/[^0-9]/','',$allow_custom_dialplan); $phone_ring_timeout = preg_replace('/[^0-9]/','',$phone_ring_timeout); $enable_tts_integration = preg_replace('/[^0-9]/','',$enable_tts_integration); $allow_alerts = preg_replace('/[^0-9]/','',$allow_alerts); $vicidial_balance_rank = preg_replace('/[^0-9]/','',$vicidial_balance_rank); $rank = preg_replace('/[^0-9]/','',$rank); $enable_second_webform = preg_replace('/[^0-9]/','',$enable_second_webform); $campaign_cid_override = preg_replace('/[^0-9]/','',$campaign_cid_override); $agent_choose_territories = preg_replace('/[^0-9]/','',$agent_choose_territories); $timer_action_seconds = preg_replace('/[^0-9]/','',$timer_action_seconds); $default_webphone = preg_replace('/[^0-9]/','',$default_webphone); $default_external_server_ip = preg_replace('/[^0-9]/','',$default_external_server_ip); $enable_agc_xfer_log = preg_replace('/[^0-9]/','',$enable_agc_xfer_log); $enable_agc_dispo_log = preg_replace('/[^0-9]/','',$enable_agc_dispo_log); $callcard_enabled = preg_replace('/[^0-9]/','',$callcard_enabled); $callcard_admin = preg_replace('/[^0-9]/','',$callcard_admin); $extension_id = preg_replace('/[^0-9]/','',$extension_id); $agent_choose_blended = preg_replace('/[^0-9]/','',$agent_choose_blended); $realtime_block_user_info = preg_replace('/[^0-9]/','',$realtime_block_user_info); $codecs_with_template = preg_replace('/[^0-9]/','',$codecs_with_template); $custom_fields_modify = preg_replace('/[^0-9]/','',$custom_fields_modify); $hold_time_option_minimum = preg_replace('/[^0-9]/','',$hold_time_option_minimum); $onhold_prompt_seconds = preg_replace('/[^0-9]/','',$onhold_prompt_seconds); $hold_time_option_prompt_seconds = preg_replace('/[^0-9]/','',$hold_time_option_prompt_seconds); $custom_fields_enabled = preg_replace('/[^0-9]/','',$custom_fields_enabled); $wait_time_option_seconds = preg_replace('/[^0-9]/','',$wait_time_option_seconds); $wait_time_option_callback_list_id = preg_replace('/[^0-9]/','',$wait_time_option_callback_list_id); $wait_time_option_prompt_seconds = preg_replace('/[^0-9]/','',$wait_time_option_prompt_seconds); $filter_list_id = preg_replace('/[^0-9]/','',$filter_list_id); $calculate_estimated_hold_seconds = preg_replace('/[^0-9]/','',$calculate_estimated_hold_seconds); $customer_3way_hangup_seconds = preg_replace('/[^0-9]/','',$customer_3way_hangup_seconds); $eht_minimum_prompt_seconds = preg_replace('/[^0-9]/','',$eht_minimum_prompt_seconds); $admin_modify_refresh = preg_replace('/[^0-9]/','',$admin_modify_refresh); $nocache_admin = preg_replace('/[^0-9]/','',$nocache_admin); $generate_cross_server_exten = preg_replace('/[^0-9]/','',$generate_cross_server_exten); $queuemetrics_addmember_enabled = preg_replace('/[^0-9]/','',$queuemetrics_addmember_enabled); # $modify_page = preg_replace('/[^0-9]/','',$modify_page); $on_hook_ring_time = preg_replace('/[^0-9]/','',$on_hook_ring_time); $reload_dialplan_on_servers = preg_replace('/[^0-9]/','',$reload_dialplan_on_servers); $available_only_tally_threshold_agents = preg_replace('/[^0-9]/','',$available_only_tally_threshold_agents); $incall_tally_threshold_seconds = preg_replace('/[^0-9]/','',$incall_tally_threshold_seconds); $dial_level_threshold_agents = preg_replace('/[^0-9]/','',$dial_level_threshold_agents); $dtmf_log = preg_replace('/[^0-9]/','',$dtmf_log); $callback_days_limit = preg_replace('/[^0-9]/','',$callback_days_limit); $queuemetrics_pe_phone_append = preg_replace('/[^0-9]/','',$queuemetrics_pe_phone_append); $test_campaign_calls = preg_replace('/[^0-9]/','',$test_campaign_calls); $agents_calls_reset = preg_replace('/[^0-9]/','',$agents_calls_reset); $campaign_cid_areacodes_enabled = preg_replace('/[^0-9]/','',$campaign_cid_areacodes_enabled); $pllb_grouping_limit = preg_replace('/[^0-9]/','',$pllb_grouping_limit); $did_ra_extensions_enabled = preg_replace('/[^0-9]/','',$did_ra_extensions_enabled); $modify_shifts = preg_replace('/[^0-9]/','',$modify_shifts); $modify_phones = preg_replace('/[^0-9]/','',$modify_phones); $modify_carriers = preg_replace('/[^0-9]/','',$modify_carriers); $modify_labels = preg_replace('/[^0-9]/','',$modify_labels); $modify_colors = preg_replace('/[^0-9]/','',$modify_colors); $modify_statuses = preg_replace('/[^0-9]/','',$modify_statuses); $modify_voicemail = preg_replace('/[^0-9]/','',$modify_voicemail); $modify_audiostore = preg_replace('/[^0-9]/','',$modify_audiostore); $modify_moh = preg_replace('/[^0-9]/','',$modify_moh); $modify_tts = preg_replace('/[^0-9]/','',$modify_tts); $call_count_limit = preg_replace('/[^0-9]/','',$call_count_limit); $call_count_target = preg_replace('/[^0-9]/','',$call_count_target); $expanded_list_stats = preg_replace('/[^0-9]/','',$expanded_list_stats); $contacts_enabled = preg_replace('/[^0-9]/','',$contacts_enabled); $contact_id = preg_replace('/[^0-9]/','',$contact_id); $office_num = preg_replace('/[^0-9]/','',$office_num); $cell_num = preg_replace('/[^0-9]/','',$cell_num); $other_num1 = preg_replace('/[^0-9]/','',$other_num1); $other_num2 = preg_replace('/[^0-9]/','',$other_num2); $modify_contacts = preg_replace('/[^0-9]/','',$modify_contacts); $callback_hours_block = preg_replace('/[^0-9]/','',$callback_hours_block); $modify_same_user_level = preg_replace('/[^0-9]/','',$modify_same_user_level); $admin_hide_lead_data = preg_replace('/[^0-9]/','',$admin_hide_lead_data); $max_calls_count = preg_replace('/[^0-9]/','',$max_calls_count); $report_rank = preg_replace('/[^0-9]/','',$report_rank); $dial_ingroup_cid = preg_replace('/[^0-9]/','',$dial_ingroup_cid); $call_menu_qualify_enabled = preg_replace('/[^0-9]/','',$call_menu_qualify_enabled); $admin_list_counts = preg_replace('/[^0-9]/','',$admin_list_counts); $allow_voicemail_greeting = preg_replace('/[^0-9]/','',$allow_voicemail_greeting); $enhanced_disconnect_logging = preg_replace('/[^0-9]/','',$enhanced_disconnect_logging); $level_8_disable_add = preg_replace('/[^0-9]/','',$level_8_disable_add); $survey_wait_sec = preg_replace('/[^0-9]/','',$survey_wait_sec); $queuemetrics_record_hold = preg_replace('/[^0-9]/','',$queuemetrics_record_hold); $country_code_list_stats = preg_replace('/[^0-9]/','',$country_code_list_stats); $dead_max = preg_replace('/[^0-9]/','',$dead_max); $dispo_max = preg_replace('/[^0-9]/','',$dispo_max); $pause_max = preg_replace('/[^0-9]/','',$pause_max); $alter_admin_interface_options = preg_replace('/[^0-9]/','',$alter_admin_interface_options); $max_inbound_calls = preg_replace('/[^0-9]/','',$max_inbound_calls); $max_inbound_calls_old = preg_replace('/[^0-9]/','',$max_inbound_calls_old); $modify_custom_dialplans = preg_replace('/[^0-9]/','',$modify_custom_dialplans); $queuemetrics_pause_type = preg_replace('/[^0-9]/','',$queuemetrics_pause_type); $frozen_server_call_clear = preg_replace('/[^0-9]/','',$frozen_server_call_clear); $callback_time_24hour = preg_replace('/[^0-9]/','',$callback_time_24hour); $callback_active_limit = preg_replace('/[^0-9]/','',$callback_active_limit); $modify_languages = preg_replace('/[^0-9]/','',$modify_languages); $enable_languages = preg_replace('/[^0-9]/','',$enable_languages); $user_choose_language = preg_replace('/[^0-9]/','',$user_choose_language); $ignore_group_on_search = preg_replace('/[^0-9]/','',$ignore_group_on_search); $enable_did_entry_list_id = preg_replace('/[^0-9]/','',$enable_did_entry_list_id); $entry_list_id = preg_replace('/[^0-9]/','',$entry_list_id); $filter_entry_list_id = preg_replace('/[^0-9]/','',$filter_entry_list_id); $enable_third_webform = preg_replace('/[^0-9]/','',$enable_third_webform); $api_list_restrict = preg_replace('/[^0-9]/','',$api_list_restrict); $customer_gone_seconds = preg_replace('/[^0-9]/','',$customer_gone_seconds); $agent_whisper_enabled = preg_replace('/[^0-9]/','',$agent_whisper_enabled); $admin_cf_show_hidden = preg_replace('/[^0-9]/','',$admin_cf_show_hidden); $agentcall_chat = preg_replace('/[^0-9]/','',$agentcall_chat); $user_hide_realtime_enabled = preg_replace('/[^0-9]/','',$user_hide_realtime_enabled); $user_hide_realtime = preg_replace('/[^0-9]/','',$user_hide_realtime); $min_sec = preg_replace('/[^0-9]/','',$min_sec); $max_sec = preg_replace('/[^0-9]/','',$max_sec); $usacan_phone_dialcode_fix = preg_replace('/[^0-9]/','',$usacan_phone_dialcode_fix); $cache_carrier_stats_realtime = preg_replace('/[^0-9]/','',$cache_carrier_stats_realtime); $nva_new_list_id = preg_replace('/[^0-9]/','',$nva_new_list_id); $nva_new_phone_code = preg_replace('/[^0-9]/','',$nva_new_phone_code); $manual_dial_timeout = preg_replace('/[^0-9]/','',$manual_dial_timeout); $alt_ivr_logging = preg_replace('/[^0-9]/','',$alt_ivr_logging); $question = preg_replace('/[^0-9]/','',$question); $alt_dtmf_log = preg_replace('/[^0-9]/','',$alt_dtmf_log); $callback_useronly_move_minutes = preg_replace('/[^0-9]/','',$callback_useronly_move_minutes); $default_phone_code = preg_replace('/[^0-9]/','',$default_phone_code); $admin_row_click = preg_replace('/[^0-9]/','',$admin_row_click); $outbound_alt_cid = preg_replace('/[^0-9]/','',$outbound_alt_cid); $script_remove_js = preg_replace('/[^0-9]/','',$script_remove_js); $manual_auto_next = preg_replace('/[^0-9]/','',$manual_auto_next); $agent_soundboards = preg_replace('/[^0-9]/','',$agent_soundboards); $api_only_user = preg_replace('/[^0-9]/','',$api_only_user); $areacode_filter_seconds = preg_replace('/[^0-9]/','',$areacode_filter_seconds); $enable_auto_reports = preg_replace('/[^0-9]/','',$enable_auto_reports); $modify_auto_reports = preg_replace('/[^0-9]/','',$modify_auto_reports); $report_weekdays = preg_replace('/[^0-9]/','',$report_weekdays); $enable_pause_code_limits = preg_replace('/[^0-9]/','',$enable_pause_code_limits); $time_limit = preg_replace('/[^0-9]/','',$time_limit); $enable_drop_lists = preg_replace('/[^0-9]/','',$enable_drop_lists); $dl_weekdays = preg_replace('/[^0-9]/','',$dl_weekdays); $allow_ip_lists = preg_replace('/[^0-9]/','',$allow_ip_lists); $modify_ip_lists = preg_replace('/[^0-9]/','',$modify_ip_lists); $ignore_ip_list = preg_replace('/[^0-9]/','',$ignore_ip_list); $dl_minutes = preg_replace('/[^0-9]/','',$dl_minutes); $callback_display_days = preg_replace('/[^0-9]/','',$callback_display_days); $agent_push_events = preg_replace('/[^0-9]/','',$agent_push_events); $hide_inactive_lists = preg_replace('/[^0-9]/','',$hide_inactive_lists); $inbound_survey_accept_digit = preg_replace('/[^0-9]/','',$inbound_survey_accept_digit); $allow_manage_active_lists = preg_replace('/[^0-9]/','',$allow_manage_active_lists); $expired_lists_inactive = preg_replace('/[^0-9]/','',$expired_lists_inactive); $enable_gdpr_download_deletion = preg_replace('/[^0-9]/','',$enable_gdpr_download_deletion); $did_system_filter = preg_replace('/[^0-9]/','',$did_system_filter); $icbq_expiration_hours = preg_replace('/[^0-9]/','',$icbq_expiration_hours); $source_id_display = preg_replace('/[^0-9]/','',$source_id_display); $pause_code_approval = preg_replace('/[^0-9]/','',$pause_code_approval); $max_hopper_calls = preg_replace('/[^0-9]/','',$max_hopper_calls); $max_hopper_calls_hour = preg_replace('/[^0-9]/','',$max_hopper_calls_hour); $agent_logout_link = preg_replace('/[^0-9]/','',$agent_logout_link); $user_admin_redirect = preg_replace('/[^0-9]/','',$user_admin_redirect); $list_status_modification_confirmation = preg_replace('/[^0-9]/','',$list_status_modification_confirmation); $max_inbound_filter_enabled = preg_replace('/[^0-9]/','',$max_inbound_filter_enabled); $enable_second_script = preg_replace('/[^0-9]/','',$enable_second_script); $time_start = preg_replace('/[^0-9]/','',$time_start); $time_end = preg_replace('/[^0-9]/','',$time_end); $enable_first_webform = preg_replace('/[^0-9]/','',$enable_first_webform); $vmm_daily_limit = preg_replace('/[^0-9]/','',$vmm_daily_limit); $cid_auto_rotate_minutes = preg_replace('/[^0-9]/','',$cid_auto_rotate_minutes); $cid_auto_rotate_minimum = preg_replace('/[^0-9]/','',$cid_auto_rotate_minimum); $require_password_length = preg_replace('/[^0-9]/','',$require_password_length); $entries_per_page = preg_replace('/[^0-9]/','',$entries_per_page); $start_count = preg_replace('/[^0-9]/','',$start_count); $browser_call_alerts = preg_replace('/[^0-9]/','',$browser_call_alerts); $browser_alert_volume = preg_replace('/[^0-9]/','',$browser_alert_volume); $inbound_answer_config = preg_replace('/[^0-9]/','',$inbound_answer_config); $enable_international_dncs = preg_replace('/[^0-9]/','',$enable_international_dncs); $daily_call_count_limit = preg_replace('/[^0-9]/','',$daily_call_count_limit); $allow_shared_dial = preg_replace('/[^0-9]/','',$allow_shared_dial); $shared_dial_rank = preg_replace('/[^0-9]/','',$shared_dial_rank); $qc_claim_limit = preg_replace('/[^0-9]/','',$qc_claim_limit); $qc_expire_days = preg_replace('/[^0-9]/','',$qc_expire_days); $auth_entry = preg_replace('/[^0-9]/','',$auth_entry); $agent_hidden_sound_volume = preg_replace('/[^0-9]/','',$agent_hidden_sound_volume); $agent_hidden_sound_seconds = preg_replace('/[^0-9]/','',$agent_hidden_sound_seconds); $in_man_dial_next_ready_seconds = preg_replace('/[^0-9]/','',$in_man_dial_next_ready_seconds); $call_limit_24hour = preg_replace('/[^0-9]/','',$call_limit_24hour); $download_invalid_files = preg_replace('/[^0-9]/','',$download_invalid_files); $modify_email_accounts = preg_replace('/[^0-9]/','',$modify_email_accounts); $access_recordings = preg_replace('/[^0-9]/','',$access_recordings); $agentcall_email = preg_replace('/[^0-9]/','',$agentcall_email); $allow_web_debug = preg_replace('/[^0-9]/','',$allow_web_debug); $force_logout = preg_replace('/[^0-9]/','',$force_logout); $log_recording_access = preg_replace('/[^0-9]/','',$log_recording_access); $dial_level_override = preg_replace('/[^0-9]/','',$dial_level_override); $conf_update_interval = preg_replace('/[^0-9]/','',$conf_update_interval); $login_kickall = preg_replace('/[^0-9]/','',$login_kickall); $agent_notifications = preg_replace('/[^0-9]/','',$agent_notifications); $modify_dial_prefix = preg_replace('/[^0-9]/','',$modify_dial_prefix); $weekday_resets = preg_replace('/[^0-9]/','',$weekday_resets); $second_alert_trigger_seconds = preg_replace('/[^0-9]/','',$second_alert_trigger_seconds); $second_alert_delay = preg_replace('/[^0-9]/','',$second_alert_delay); $third_alert_trigger_seconds = preg_replace('/[^0-9]/','',$third_alert_trigger_seconds); $third_alert_delay = preg_replace('/[^0-9]/','',$third_alert_delay); $agent_search_list = preg_replace('/[^0-9]/','',$agent_search_list); $hci_enabled = preg_replace('/[^0-9]/','',$hci_enabled); $daily_phone_number_call_limit = preg_replace('/[^0-9]/','',$daily_phone_number_call_limit); $manual_minimum_ring_seconds = preg_replace('/[^0-9]/','',$manual_minimum_ring_seconds); $manual_minimum_attempt_seconds = preg_replace('/[^0-9]/','',$manual_minimum_attempt_seconds); $manual_minimum_answer_seconds = preg_replace('/[^0-9]/','',$manual_minimum_answer_seconds); $enhanced_agent_monitoring = preg_replace('/[^0-9]/','',$enhanced_agent_monitoring); $agent_hide_dial_fail = preg_replace('/[^0-9]/','',$agent_hide_dial_fail); $recording_dtmf_detection = preg_replace('/[^0-9]/','',$recording_dtmf_detection); $recording_dtmf_muting = preg_replace('/[^0-9]/','',$recording_dtmf_muting); $db_crashed_tables_check = preg_replace('/[^0-9]/','',$db_crashed_tables_check); $xfer_talk_minimum_sec = preg_replace('/[^0-9]/','',$xfer_talk_minimum_sec); $modify_settings_containers = preg_replace('/[^0-9]/','',$modify_settings_containers); $timer_action_seconds = preg_replace('/[^-0-9]/','',$timer_action_seconds); $user_new_lead_limit = preg_replace('/[^-0-9]/','',$user_new_lead_limit); $drop_call_seconds = preg_replace('/[^-0-9]/','',$drop_call_seconds); $timer_alt_seconds = preg_replace('/[^-0-9]/','',$timer_alt_seconds); $wrapup_seconds_override = preg_replace('/[^-0-9]/','',$wrapup_seconds_override); $max_queue_ingroup_calls = preg_replace('/[^-0-9]/','',$max_queue_ingroup_calls); $ready_max_logout = preg_replace('/[^-0-9]/','',$ready_max_logout); $inbound_no_agents_no_dial_threshold = preg_replace('/[^-0-9]/','',$inbound_no_agents_no_dial_threshold); $dead_trigger_seconds = preg_replace('/[^-0-9]/','',$dead_trigger_seconds); $cid_cb_valid_length = preg_replace('/[^-0-9]/','',$cid_cb_valid_length); $daily_reset_limit = preg_replace('/[^-0-9]/','',$daily_reset_limit); $auto_active_list_rank = preg_replace('/[^-0-9]/','',$auto_active_list_rank); $max_inbound_filter_min_sec = preg_replace('/[^-0-9]/','',$max_inbound_filter_min_sec); $no_agent_delay = preg_replace('/[^-0-9]/','',$no_agent_delay); $two_factor_auth_hours = preg_replace('/[^-0-9]/','',$two_factor_auth_hours); $two_factor_auth_agent_hours = preg_replace('/[^-0-9]/','',$two_factor_auth_agent_hours); $auto_alt_threshold = preg_replace('/[^-0-9]/','',$auto_alt_threshold); $inbound_credits = preg_replace('/[^-0-9]/','',$inbound_credits); $script_tab_height = preg_replace('/[^-0-9]/','',$script_tab_height); $call_log_days = preg_replace('/[^-0-9]/','',$call_log_days); $max_inbound_auto_reenable = preg_replace('/[^-0-9]/','',$max_inbound_auto_reenable); ### DIGITS and COLONS $shift_length = preg_replace('/[^\:0-9]/','',$shift_length); ### DIGITS and HASHES and STARS $survey_dtmf_digits = preg_replace('/[^\#\*0-9]/','',$survey_dtmf_digits); $survey_ni_digit = preg_replace('/[^\#\*0-9]/','',$survey_ni_digit); ### DIGITS and DASHES $group_rank = preg_replace('/[^-0-9]/','',$group_rank); $campaign_rank = preg_replace('/[^-0-9]/','',$campaign_rank); $queue_priority = preg_replace('/[^-0-9]/','',$queue_priority); ### Y or N ONLY ### $allow_closers = preg_replace('/[^NY]/','',$allow_closers); $reset_hopper = preg_replace('/[^NY]/','',$reset_hopper); $amd_send_to_vmx = preg_replace('/[^NY]/','',$amd_send_to_vmx); $selectable = preg_replace('/[^NY]/','',$selectable); $reset_list = preg_replace('/[^NY]/','',$reset_list); $fronter_display = preg_replace('/[^NY]/','',$fronter_display); $omit_phone_code = preg_replace('/[^NY]/','',$omit_phone_code); $available_only_ratio_tally = preg_replace('/[^NY]/','',$available_only_ratio_tally); $sys_perf_log = preg_replace('/[^NY]/','',$sys_perf_log); $vicidial_balance_active = preg_replace('/[^NY]/','',$vicidial_balance_active); $vd_server_logs = preg_replace('/[^NY]/','',$vd_server_logs); $campaign_stats_refresh = preg_replace('/[^NY]/','',$campaign_stats_refresh); $disable_alter_custdata = preg_replace('/[^NY]/','',$disable_alter_custdata); $no_hopper_leads_logins = preg_replace('/[^NY]/','',$no_hopper_leads_logins); $human_answered = preg_replace('/[^NY]/','',$human_answered); $tovdad_display = preg_replace('/[^NY]/','',$tovdad_display); $campaign_allow_inbound = preg_replace('/[^NY]/','',$campaign_allow_inbound); $old_campaign_allow_inbound = preg_replace('/[^NY]/','',$old_campaign_allow_inbound); $display_queue_count = preg_replace('/[^NY]/','',$display_queue_count); $qc_show_recording = preg_replace('/[^NY]/','',$qc_show_recording); $sale_category = preg_replace('/[^NY]/','',$sale_category); $dead_lead_category = preg_replace('/[^NY]/','',$dead_lead_category); $agent_extended_alt_dial = preg_replace('/[^NY]/','',$agent_extended_alt_dial); $play_place_in_line = preg_replace('/[^NY]/','',$play_place_in_line); $play_estimate_hold_time = preg_replace('/[^NY]/','',$play_estimate_hold_time); $no_delay_call_route = preg_replace('/[^NY]/','',$no_delay_call_route); $did_active = preg_replace('/[^NY]/','',$did_active); $active_asterisk_server = preg_replace('/[^NY]/','',$active_asterisk_server); $generate_vicidial_conf = preg_replace('/[^NY]/','',$generate_vicidial_conf); $rebuild_conf_files = preg_replace('/[^NY]/','',$rebuild_conf_files); $agent_allow_group_alias = preg_replace('/[^NY]/','',$agent_allow_group_alias); $vtiger_status_call = preg_replace('/[^NY]/','',$vtiger_status_call); $sale = preg_replace('/[^NY]/','',$sale); $dnc = preg_replace('/[^NY]/','',$dnc); $customer_contact = preg_replace('/[^NY]/','',$customer_contact); $not_interested = preg_replace('/[^NY]/','',$not_interested); $unworkable = preg_replace('/[^NY]/','',$unworkable); $sounds_update = preg_replace('/[^NY]/','',$sounds_update); $carrier_logging_active = preg_replace('/[^NY]/','',$carrier_logging_active); $agent_status_view_time = preg_replace('/[^NY]/','',$agent_status_view_time); $no_hopper_dialing = preg_replace('/[^NY]/','',$no_hopper_dialing); $agent_display_dialable_leads = preg_replace('/[^NY]/','',$agent_display_dialable_leads); $random = preg_replace('/[^NY]/','',$random); $rebuild_music_on_hold = preg_replace('/[^NY]/','',$rebuild_music_on_hold); $active_agent_login_server = preg_replace('/[^NY]/','',$active_agent_login_server); $agent_select_territories = preg_replace('/[^NY]/','',$agent_select_territories); $delete_vm_after_email = preg_replace('/[^NY]/','',$delete_vm_after_email); $crm_popup_login = preg_replace('/[^NY]/','',$crm_popup_login); $ignore_list_script_override = preg_replace('/[^NY]/','',$ignore_list_script_override); $use_external_server_ip = preg_replace('/[^NY]/','',$use_external_server_ip); $agent_xfer_consultative = preg_replace('/[^NY]/','',$agent_xfer_consultative); $agent_xfer_dial_override = preg_replace('/[^NY]/','',$agent_xfer_dial_override); $agent_xfer_vm_transfer = preg_replace('/[^NY]/','',$agent_xfer_vm_transfer); $agent_xfer_blind_transfer = preg_replace('/[^NY]/','',$agent_xfer_blind_transfer); $agent_xfer_dial_with_customer = preg_replace('/[^NY]/','',$agent_xfer_dial_with_customer); $agent_xfer_park_customer_dial = preg_replace('/[^NY]/','',$agent_xfer_park_customer_dial); $agent_fullscreen = preg_replace('/[^NY]/','',$agent_fullscreen); $onhold_prompt_no_block = preg_replace('/[^NY]/','',$onhold_prompt_no_block); $hold_time_option_no_block = preg_replace('/[^NY]/','',$hold_time_option_no_block); $wait_time_option_no_block = preg_replace('/[^NY]/','',$wait_time_option_no_block); $preset_hide_number = preg_replace('/[^NY]/','',$preset_hide_number); $use_auto_hopper = preg_replace('/[^NY]/','',$use_auto_hopper); $auto_trim_hopper = preg_replace('/[^NY]/','',$auto_trim_hopper); $force_change_password = preg_replace('/[^NY]/','',$force_change_password); $first_login_trigger = preg_replace('/[^NY]/','',$first_login_trigger); $eht_minimum_prompt_no_block = preg_replace('/[^NY]/','',$eht_minimum_prompt_no_block); $lead_order_randomize = preg_replace('/[^NY]/','',$lead_order_randomize); $on_hook_agent = preg_replace('/[^NY]/','',$on_hook_agent); $auto_pause_precall = preg_replace('/[^NY]/','',$auto_pause_precall); $auto_resume_precall = preg_replace('/[^NY]/','',$auto_resume_precall); $webphone_auto_answer = preg_replace('/[^NY]/','',$webphone_auto_answer); $noanswer_log = preg_replace('/[^NY]/','',$noanswer_log); $did_agent_log = preg_replace('/[^NY]/','',$did_agent_log); $completed = preg_replace('/[^NY]/','',$completed); $report_option = preg_replace('/[^NY]/','',$report_option); $hopper_vlc_dup_check = preg_replace('/[^NY]/','',$hopper_vlc_dup_check); $inventory_report = preg_replace('/[^NY]/','',$inventory_report); $auto_restart_asterisk = preg_replace('/[^NY]/','',$auto_restart_asterisk); $asterisk_temp_no_restart = preg_replace('/[^NY]/','',$asterisk_temp_no_restart); $voicemail_instructions = preg_replace('/[^NY]/','',$voicemail_instructions); $filter_url_did_redirect = preg_replace('/[^NY]/','',$filter_url_did_redirect); $callback_active_limit_override = preg_replace('/[^NY]/','',$callback_active_limit_override); $drop_lead_reset = preg_replace('/[^NY]/','',$drop_lead_reset); $after_hours_lead_reset = preg_replace('/[^NY]/','',$after_hours_lead_reset); $nanq_lead_reset = preg_replace('/[^NY]/','',$nanq_lead_reset); $wait_time_lead_reset = preg_replace('/[^NY]/','',$wait_time_lead_reset); $hold_time_lead_reset = preg_replace('/[^NY]/','',$hold_time_lead_reset); $am_message_wildcards = preg_replace('/[^NY]/','',$am_message_wildcards); $gather_asterisk_output = preg_replace('/[^NY]/','',$gather_asterisk_output); $routing_initiated_recordings = preg_replace('/[^NY]/','',$routing_initiated_recordings); $manual_dial_hopper_check = preg_replace('/[^NY]/','',$manual_dial_hopper_check); $webphone_dialbox = preg_replace('/[^NY]/','',$webphone_dialbox); $webphone_mute = preg_replace('/[^NY]/','',$webphone_mute); $webphone_volume = preg_replace('/[^NY]/','',$webphone_volume); $webphone_debug = preg_replace('/[^NY]/','',$webphone_debug); $answering_machine = preg_replace('/[^NY]/','',$answering_machine); $manual_auto_show = preg_replace('/[^NY]/','',$manual_auto_show); $allow_required_fields = preg_replace('/[^NY]/','',$allow_required_fields); $conf_qualify = preg_replace('/[^NY]/','',$conf_qualify); $run_now_trigger = preg_replace('/[^NY]/','',$run_now_trigger); $agent_xfer_validation = preg_replace('/[^NY]/','',$agent_xfer_validation); $three_way_record_stop = preg_replace('/[^NY]/','',$three_way_record_stop); $hangup_xfer_record_start = preg_replace('/[^NY]/','',$hangup_xfer_record_start); $scheduled_callbacks_email_alert = preg_replace('/[^NY]/','',$scheduled_callbacks_email_alert); $closing_time_now_trigger = preg_replace('/[^NY]/','',$closing_time_now_trigger); $closing_time_lead_reset = preg_replace('/[^NY]/','',$closing_time_lead_reset); $script_top_dispo = preg_replace('/[^NY]/','',$script_top_dispo); $scheduled_callbacks_force_dial = preg_replace('/[^NY]/','',$scheduled_callbacks_force_dial); $inbound_route_answer = preg_replace('/[^NY]/','',$inbound_route_answer); $agent_hangup_ig_override = preg_replace('/[^NY]/','',$agent_hangup_ig_override); $qc_enabled = preg_replace('/[^0-9NY]/','',$qc_enabled); $active = preg_replace('/[^0-9NY]/','',$active); $ofcom_uk_drop_calc = preg_replace('/[^0-9NY]/','',$ofcom_uk_drop_calc); $agent_xfer_park_3way = preg_replace('/[^0-9NY]/','',$agent_xfer_park_3way); $manual_dial_validation = preg_replace('/[^0-9NY]/','',$manual_dial_validation); ### ALPHACAPS-NUMERIC $xferconf_a_number = preg_replace('/[^0-9A-Z]/','',$xferconf_a_number); $xferconf_b_number = preg_replace('/[^0-9A-Z]/','',$xferconf_b_number); $xferconf_c_number = preg_replace('/[^0-9A-Z]/','',$xferconf_c_number); $xferconf_d_number = preg_replace('/[^0-9A-Z]/','',$xferconf_d_number); $xferconf_e_number = preg_replace('/[^0-9A-Z]/','',$xferconf_e_number); ### DIGITS and Dots $new_server_ip = preg_replace('/[^\.0-9]/','',$new_server_ip); $server_ip = preg_replace('/[^\.0-9]/','',$server_ip); $auto_dial_level = preg_replace('/[^\.0-9]/','',$auto_dial_level); $adaptive_maximum_level = preg_replace('/[^\.0-9]/','',$adaptive_maximum_level); $phone_ip = preg_replace('/[^\.0-9]/','',$phone_ip); $old_server_ip = preg_replace('/[^\.0-9]/','',$old_server_ip); $computer_ip = preg_replace('/[^\.0-9]/','',$computer_ip); $queuemetrics_server_ip = preg_replace('/[^\.0-9]/','',$queuemetrics_server_ip); $vtiger_server_ip = preg_replace('/[^\.0-9]/','',$vtiger_server_ip); $active_voicemail_server = preg_replace('/[^\.0-9]/','',$active_voicemail_server); $auto_dial_limit = preg_replace('/[^\.0-9]/','',$auto_dial_limit); $adaptive_dropped_percentage = preg_replace('/[^\.0-9]/','',$adaptive_dropped_percentage); $drop_lockout_time = preg_replace('/[^\.0-9]/','',$drop_lockout_time); $filter_server_ip = preg_replace('/[^\.0-9]/','',$filter_server_ip); $auto_hopper_multi = preg_replace('/[^\.0-9]/','',$auto_hopper_multi); # Settings alphanumeric, dash, underscore $daily_limit_manual = preg_replace('/[^-_0-9a-zA-Z]/','',$daily_limit_manual); $transfer_button_launch = preg_replace('/[^-_0-9a-zA-Z]/','',$transfer_button_launch); $two_factor_override = preg_replace('/[^-_0-9a-zA-Z]/','',$two_factor_override); $clear_form = preg_replace('/[^-_0-9a-zA-Z]/','',$clear_form); $agent_hidden_sound = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_hidden_sound); $leave_3way_start_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$leave_3way_start_recording); $leave_3way_start_recording_exception = preg_replace('/[^-_0-9a-zA-Z]/','',$leave_3way_start_recording_exception); $agent_screen_timer = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_screen_timer); $hopper_drop_run_trigger = preg_replace('/[^0-9a-zA-Z]/','',$hopper_drop_run_trigger); $hopper_drop_run_trigger_all = preg_replace('/[^0-9a-zA-Z]/','',$hopper_drop_run_trigger_all); $calls_waiting_vl_one = preg_replace('/[^-_0-9a-zA-Z]/','',$calls_waiting_vl_one); $calls_waiting_vl_two = preg_replace('/[^-_0-9a-zA-Z]/','',$calls_waiting_vl_two); $transfer_no_dispo = preg_replace('/[^-_0-9a-zA-Z]/','',$transfer_no_dispo); $allowed_sip_stacks = preg_replace('/[^-_0-9a-zA-Z]/','',$allowed_sip_stacks); $in_queue_nanque = preg_replace('/[^-_0-9a-zA-Z]/','',$in_queue_nanque); $reports_header_override = preg_replace('/[^-_0-9a-zA-Z]/','',$reports_header_override); $agent_hide_hangup = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_hide_hangup); $SUB = preg_replace('/[^-_0-9a-zA-Z]/','',$SUB); $SUBMIT = preg_replace('/[^-_0-9a-zA-Z]/','',$SUBMIT); $qc_display_group_type = preg_replace('/[^-_0-9a-zA-Z]/','',$qc_display_group_type); $available_only_tally_threshold = preg_replace('/[^-_0-9a-zA-Z]/','',$available_only_tally_threshold); $dial_level_threshold = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_level_threshold); $form_end = preg_replace('/[^-_0-9a-zA-Z]/','',$form_end); $download_max_system_stats_metric = preg_replace('/[^- \+_0-9a-zA-Z]/','',$download_max_system_stats_metric); $download_max_system_stats_metric_name = preg_replace('/[^- \+_0-9a-zA-Z]/','',$download_max_system_stats_metric_name); $chat_timeout = preg_replace('/[^-_0-9a-zA-Z]/','',$chat_timeout); $manager_chat_id = preg_replace('/[^-\._0-9a-zA-Z]/','',$manager_chat_id); $group_handling = preg_replace('/[^-_0-9a-zA-Z]/','',$group_handling); $query_date = preg_replace('/[^-_0-9a-zA-Z]/','',$query_date); $end_date = preg_replace('/[^-_0-9a-zA-Z]/','',$end_date); $show_vm_on_summary = preg_replace('/[^-_0-9a-zA-Z]/','',$show_vm_on_summary); $admin_screen_colors = preg_replace('/[^-_0-9a-zA-Z]/','',$admin_screen_colors); $last_run = preg_replace('/[^-_0-9a-zA-Z]/','',$last_run); $closing_time_option_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_option_xfer_group); $user_account_emails = preg_replace('/[^-_0-9a-zA-Z]/','',$user_account_emails); $outbound_cid_any = preg_replace('/[^-_0-9a-zA-Z]/','',$outbound_cid_any); $enable_xfer_presets = preg_replace('/[^0-9a-zA-Z]/','',$enable_xfer_presets); $ig_xfer_list_sort = preg_replace('/[^-_0-9a-zA-Z]/','',$ig_xfer_list_sort); $script_tab_frame_size = preg_replace('/[^-_0-9a-zA-Z]/','',$script_tab_frame_size); $max_logged_in_agents = preg_replace('/[^-_0-9a-zA-Z]/','',$max_logged_in_agents); $user_codes_admin = preg_replace('/[^-_0-9a-zA-Z]/','',$user_codes_admin); $conf_engine = preg_replace('/[^-_0-9a-zA-Z]/','',$conf_engine); $user_group_script = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group_script); $abandon_check_queue = preg_replace('/[^-_0-9a-zA-Z]/','',$abandon_check_queue); $demographic_quotas_rerank = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas_rerank); $demographic_quotas_list_resets = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas_list_resets); $log_latency_gaps = preg_replace('/[^-_0-9a-zA-Z]/','',$log_latency_gaps); $second_alert_trigger = preg_replace('/[^-_0-9a-zA-Z]/','',$second_alert_trigger); $dead_stop_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$dead_stop_recording); $manual_vm_status_updates = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_vm_status_updates); $force_per_call_notes = preg_replace('/[^-_0-9a-zA-Z]/','',$force_per_call_notes); $third_alert_trigger = preg_replace('/[^-_0-9a-zA-Z]/','',$third_alert_trigger); $agent_search_ingroup_list = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_search_ingroup_list); $hopper_hold_inserts = preg_replace('/[^-_0-9a-zA-Z]/','',$hopper_hold_inserts); $holiday_method = preg_replace('/[^-_0-9a-zA-Z]/','',$holiday_method); $leave_3way_stop_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$leave_3way_stop_recording); $manual_dial_lead_id = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_lead_id); $stereo_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$stereo_recording); $stereo_parallel_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$stereo_parallel_recording); $stereo_recording_agent = preg_replace('/[^-_0-9a-zA-Z]/','',$stereo_recording_agent); $call_count_limit_restrict = preg_replace('/[^-_0-9a-zA-Z]/','',$call_count_limit_restrict); $alter_cid_name = preg_replace('/[^-_0-9a-zA-Z]/','',$alter_cid_name); $adaptive_percentmax_percentage = preg_replace('/[^-_0-9a-zA-Z]/','',$adaptive_percentmax_percentage); $xfer_talk_minimum = preg_replace('/[^-_0-9a-zA-Z]/','',$xfer_talk_minimum); $hangup_again_link = preg_replace('/[^-_0-9a-zA-Z]/','',$hangup_again_link); $amd_agent_display = preg_replace('/[^-_0-9a-zA-Z]/','',$amd_agent_display); if ($non_latin < 1) { ### ALPHA-NUMERIC ONLY ### $is_webphone = preg_replace('/[^-_0-9a-zA-Z]/','',$is_webphone); # $campaign_script = preg_replace('/[^0-9a-zA-Z]/','',$campaign_script); $submit = preg_replace('/[^0-9a-zA-Z]/','',$submit); $campaign_cid = preg_replace('/[^0-9a-zA-Z]/','',$campaign_cid); $campaign_recording = preg_replace('/[^0-9a-zA-Z]/','',$campaign_recording); $ADD = preg_replace('/[^0-9a-zA-Z]/','',$ADD); $dial_prefix = preg_replace('/[^0-9a-zA-Z]/','',$dial_prefix); $state_call_time_state = preg_replace('/[^0-9a-zA-Z]/','',$state_call_time_state); $scheduled_callbacks = preg_replace('/[^0-9a-zA-Z]/','',$scheduled_callbacks); $concurrent_transfers = preg_replace('/[^0-9a-zA-Z]/','',$concurrent_transfers); $billable = preg_replace('/[^0-9a-zA-Z]/','',$billable); $pause_code = preg_replace('/[^0-9a-zA-Z]/','',$pause_code); $vicidial_recording_override = preg_replace('/[^0-9a-zA-Z]/','',$vicidial_recording_override); $ingroup_recording_override = preg_replace('/[^0-9a-zA-Z]/','',$ingroup_recording_override); $queuemetrics_log_id = preg_replace('/[^0-9a-zA-Z]/','',$queuemetrics_log_id); $after_hours_exten = preg_replace('/[^0-9a-zA-Z]/','',$after_hours_exten); $after_hours_voicemail = preg_replace('/[^0-9a-zA-Z]/','',$after_hours_voicemail); $qc_script = preg_replace('/[^0-9a-zA-Z]/','',$qc_script); $code = preg_replace('/[^0-9a-zA-Z]/','',$code); $survey_no_response_action = preg_replace('/[^0-9a-zA-Z]/','',$survey_no_response_action); $survey_ni_status = preg_replace('/[^0-9a-zA-Z]/','',$survey_ni_status); $qc_get_record_launch = preg_replace('/[^0-9a-zA-Z]/','',$qc_get_record_launch); $agent_pause_codes_active = preg_replace('/[^0-9a-zA-Z]/','',$agent_pause_codes_active); $three_way_dial_prefix = preg_replace('/[^0-9a-zA-Z]/','',$three_way_dial_prefix); $agent_shift_enforcement_override = preg_replace('/[^0-9a-zA-Z]/','',$agent_shift_enforcement_override); $survey_third_status = preg_replace('/[^0-9a-zA-Z]/','',$survey_third_status); $survey_fourth_status = preg_replace('/[^0-9a-zA-Z]/','',$survey_fourth_status); $sounds_web_directory = preg_replace('/[^0-9a-zA-Z]/','',$sounds_web_directory); $disable_alter_custphone = preg_replace('/[^0-9a-zA-Z]/','',$disable_alter_custphone); $view_calls_in_queue = preg_replace('/[^0-9a-zA-Z]/','',$view_calls_in_queue); $view_calls_in_queue_launch = preg_replace('/[^0-9a-zA-Z]/','',$view_calls_in_queue_launch); $grab_calls_in_queue = preg_replace('/[^0-9a-zA-Z]/','',$grab_calls_in_queue); $call_requeue_button = preg_replace('/[^0-9a-zA-Z]/','',$call_requeue_button); $pause_after_each_call = preg_replace('/[^0-9a-zA-Z]/','',$pause_after_each_call); $use_internal_dnc = preg_replace('/[^0-9a-zA-Z]/','',$use_internal_dnc); $use_campaign_dnc = preg_replace('/[^0-9a-zA-Z]/','',$use_campaign_dnc); $voicemail_id = preg_replace('/[^0-9a-zA-Z]/','',$voicemail_id); $new_voicemail_id = preg_replace('/[^0-9a-zA-Z]/','',$new_voicemail_id); $status_id = preg_replace('/[^0-9a-zA-Z]/','',$status_id); $agent_call_log_view = preg_replace('/[^0-9a-zA-Z]/','',$agent_call_log_view); $agent_call_log_view_override = preg_replace('/[^0-9a-zA-Z]/','',$agent_call_log_view_override); $queuemetrics_loginout = preg_replace('/[^0-9a-zA-Z]/','',$queuemetrics_loginout); $queuemetrics_callstatus = preg_replace('/[^0-9a-zA-Z]/','',$queuemetrics_callstatus); $hide_xfer_number_to_dial = preg_replace('/[^0-9a-zA-Z]/','',$hide_xfer_number_to_dial); $manual_dial_prefix = preg_replace('/[^0-9a-zA-Z]/','',$manual_dial_prefix); $customer_3way_hangup_logging = preg_replace('/[^0-9a-zA-Z]/','',$customer_3way_hangup_logging); $customer_3way_hangup_action = preg_replace('/[^0-9a-zA-Z]/','',$customer_3way_hangup_action); $queuemetrics_dispo_pause = preg_replace('/[^0-9a-zA-Z]/','',$queuemetrics_dispo_pause); $per_call_notes = preg_replace('/[^0-9a-zA-Z]/','',$per_call_notes); $my_callback_option = preg_replace('/[^0-9a-zA-Z]/','',$my_callback_option); $auto_pause_precall_code = preg_replace('/[^0-9a-zA-Z]/','',$auto_pause_precall_code); $disable_dispo_status = preg_replace('/[^0-9a-zA-Z]/','',$disable_dispo_status); $action_xfer_cid = preg_replace('/[^0-9a-zA-Z]/','',$action_xfer_cid); $callback_list_calltime = preg_replace('/[^0-9a-zA-Z]/','',$callback_list_calltime); $pause_after_next_call = preg_replace('/[^0-9a-zA-Z]/','',$pause_after_next_call); $owner_populate = preg_replace('/[^0-9a-zA-Z]/','',$owner_populate); $dead_max_dispo = preg_replace('/[^0-9a-zA-Z]/','',$dead_max_dispo); $dispo_max_dispo = preg_replace('/[^0-9a-zA-Z]/','',$dispo_max_dispo); $wrapup_bypass = preg_replace('/[^0-9a-zA-Z]/','',$wrapup_bypass); $wrapup_after_hotkey = preg_replace('/[^0-9a-zA-Z]/','',$wrapup_after_hotkey); $show_previous_callback = preg_replace('/[^0-9a-zA-Z]/','',$show_previous_callback); $clear_script = preg_replace('/[^0-9a-zA-Z]/','',$clear_script); $allow_chats = preg_replace('/[^0-9a-zA-Z]/','',$allow_chats); $allow_emails = preg_replace('/[^0-9a-zA-Z]/','',$allow_emails); $status_display_ingroup = preg_replace('/[^0-9a-zA-Z]/','',$status_display_ingroup); $populate_lead_ingroup = preg_replace('/[^0-9a-zA-Z]/','',$populate_lead_ingroup); $nva_new_status = preg_replace('/[^0-9a-zA-Z]/','',$nva_new_status); $report_default_format = preg_replace('/[^0-9a-zA-Z]/','',$report_default_format); $menu_background = preg_replace('/[^0-9a-zA-Z]/','',$menu_background); $frame_background = preg_replace('/[^0-9a-zA-Z]/','',$frame_background); $std_row1_background = preg_replace('/[^0-9a-zA-Z]/','',$std_row1_background); $std_row2_background = preg_replace('/[^0-9a-zA-Z]/','',$std_row2_background); $std_row3_background = preg_replace('/[^0-9a-zA-Z]/','',$std_row3_background); $std_row4_background = preg_replace('/[^0-9a-zA-Z]/','',$std_row4_background); $std_row5_background = preg_replace('/[^0-9a-zA-Z]/','',$std_row5_background); $alt_row1_background = preg_replace('/[^0-9a-zA-Z]/','',$alt_row1_background); $alt_row2_background = preg_replace('/[^0-9a-zA-Z]/','',$alt_row2_background); $alt_row3_background = preg_replace('/[^0-9a-zA-Z]/','',$alt_row3_background); $button_color = preg_replace('/[^0-9a-zA-Z]/','',$button_color); $dead_to_dispo = preg_replace('/[^0-9a-zA-Z]/','',$dead_to_dispo); $routing_prefix = preg_replace('/[^0-9a-zA-Z]/','',$routing_prefix); $inbound_survey = preg_replace('/[^0-9a-zA-Z]/','',$inbound_survey); $pause_max_dispo = preg_replace('/[^0-9a-zA-Z]/','',$pause_max_dispo); $areacode = preg_replace('/[^0-9a-zA-Z]/','',$areacode); $require_mgr_approval = preg_replace('/[^0-9a-zA-Z]/','',$require_mgr_approval); # $mute_recordings = preg_replace('/[^0-9a-zA-Z]/','',$mute_recordings); $mute_recordings_users = preg_replace('/[^0-9a-zA-Z]/','',$mute_recordings_users); $mute_recordings_campaigns = preg_replace('/[^0-9a-zA-Z]/','',$mute_recordings_campaigns); $mute_recordings_system = preg_replace('/[^0-9a-zA-Z]/','',$mute_recordings_system); $leave_vm_no_dispo = preg_replace('/[^0-9a-zA-Z]/','',$leave_vm_no_dispo); $amd_agent_route_options = preg_replace('/[^0-9a-zA-Z]/','',$amd_agent_route_options); $did_pattern_filter = preg_replace('/[^0-9a-zA-Z]/','',$did_pattern_filter); ### ALPHA-NUMERIC and spaces and hash and star and comma $xferconf_a_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',trim($xferconf_a_dtmf)); $xferconf_b_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',trim($xferconf_b_dtmf)); # $xferconf_c_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',trim($xferconf_c_dtmf)); # $xferconf_d_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',trim($xferconf_d_dtmf)); # $xferconf_e_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',trim($xferconf_e_dtmf)); $survey_third_digit = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',$survey_third_digit); $survey_fourth_digit = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',$survey_fourth_digit); $survey_third_exten = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',$survey_third_exten); $survey_fourth_exten = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',$survey_fourth_exten); $preset_dtmf = preg_replace('/[^ \,\*\#0-9a-zA-Z]/','',$preset_dtmf); ### ALPHA-NUMERIC and underscore and dash $agi_output = preg_replace('/[^-_0-9a-zA-Z]/','',$agi_output); $ASTmgrSECRET = preg_replace('/[^-_0-9a-zA-Z]/','',$ASTmgrSECRET); $ASTmgrUSERNAME = preg_replace('/[^-_0-9a-zA-Z]/','',$ASTmgrUSERNAME); $ASTmgrUSERNAMElisten = preg_replace('/[^-_0-9a-zA-Z]/','',$ASTmgrUSERNAMElisten); $ASTmgrUSERNAMEsend = preg_replace('/[^-_0-9a-zA-Z]/','',$ASTmgrUSERNAMEsend); $ASTmgrUSERNAMEupdate = preg_replace('/[^-_0-9a-zA-Z]/','',$ASTmgrUSERNAMEupdate); $call_time_id = preg_replace('/[^-_0-9a-zA-Z]/','',$call_time_id); $campaign_id = preg_replace('/[^-_0-9a-zA-Z]/','',$campaign_id); $CoNfIrM = preg_replace('/[^-_0-9a-zA-Z]/','',$CoNfIrM); $DBX_database = preg_replace('/[^-_0-9a-zA-Z]/','',$DBX_database); $DBX_pass = preg_replace('/[^-_0-9a-zA-Z]/','',$DBX_pass); $DBX_user = preg_replace('/[^-_0-9a-zA-Z]/','',$DBX_user); $DBY_database = preg_replace('/[^-_0-9a-zA-Z]/','',$DBY_database); $DBY_pass = preg_replace('/[^-_0-9a-zA-Z]/','',$DBY_pass); $DBY_user = preg_replace('/[^-_0-9a-zA-Z]/','',$DBY_user); $dial_method = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_method); $dial_status_a = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status_a); $dial_status_b = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status_b); $dial_status_c = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status_c); $dial_status_d = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status_d); $dial_status_e = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status_e); $ext_context = preg_replace('/[^-_0-9a-zA-Z]/','',$ext_context); $group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$group_id); $lead_filter_id = preg_replace('/[^-_0-9a-zA-Z]/','',$lead_filter_id); $local_call_time = preg_replace('/[^-_0-9a-zA-Z]/','',$local_call_time); $login = preg_replace('/[^-_0-9a-zA-Z]/','',$login); $login_campaign = preg_replace('/[^-_0-9a-zA-Z]/','',$login_campaign); $login_pass = preg_replace('/[^-_0-9a-zA-Z]/','',$login_pass); $login_user = preg_replace('/[^-_0-9a-zA-Z]/','',$login_user); $new_login = preg_replace('/[^-_0-9a-zA-Z]/','',$new_login); $new_pass = preg_replace('/[^-_0-9a-zA-Z]/','',$new_pass); $next_agent_call = preg_replace('/[^-_0-9a-zA-Z]/','',$next_agent_call); $old_campaign_id = preg_replace('/[^-_0-9a-zA-Z]/','',$old_campaign_id); $old_server_id = preg_replace('/[^-_0-9a-zA-Z]/','',$old_server_id); $OLDuser_group = preg_replace('/[^-_0-9a-zA-Z]/','',$OLDuser_group); $park_file_name = preg_replace('/[^-_0-9a-zA-Z]/','',$park_file_name); $pass = preg_replace('/[^-_0-9a-zA-Z]/','',$pass); $phone_login = preg_replace('/[^-_0-9a-zA-Z]/','',$phone_login); $phone_pass = preg_replace('/[^-_0-9a-zA-Z]/','',$phone_pass); $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_PW); $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_USER); $protocol = preg_replace('/[^-_0-9a-zA-Z]/','',$protocol); $server_id = preg_replace('/[^-_0-9a-zA-Z]/','',$server_id); $state_rule = preg_replace('/[^-_0-9a-zA-Z]/','',$state_rule); $holiday_rule = preg_replace('/[^-_0-9a-zA-Z]/','',$holiday_rule); $trunk_restriction = preg_replace('/[^-_0-9a-zA-Z]/','',$trunk_restriction); $user = preg_replace('/[^-_0-9a-zA-Z]/','',$user); $user_group = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group); $VICIDIAL_park_on_filename = preg_replace('/[^-_0-9a-zA-Z]/','',$VICIDIAL_park_on_filename); $auto_alt_dial = preg_replace('/[^-_0-9a-zA-Z]/','',$auto_alt_dial); $dial_status = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_status); $queuemetrics_eq_prepend = preg_replace('/[^-_0-9a-zA-Z]/','',$queuemetrics_eq_prepend); $vicidial_agent_disable = preg_replace('/[^-_0-9a-zA-Z]/','',$vicidial_agent_disable); $alter_custdata_override = preg_replace('/[^-_0-9a-zA-Z]/','',$alter_custdata_override); $list_order_mix = preg_replace('/[^-_0-9a-zA-Z]/','',$list_order_mix); $vcl_id = preg_replace('/[^-_0-9a-zA-Z]/','',$vcl_id); $mix_method = preg_replace('/[^-_0-9a-zA-Z]/','',$mix_method); $category = preg_replace('/[^-_0-9a-zA-Z]/','',$category); $vsc_id = preg_replace('/[^-_0-9a-zA-Z]/','',$vsc_id); $moh_context = preg_replace('/[^-_0-9a-zA-Z]/','',$moh_context); $source_campaign_id = preg_replace('/[^-_0-9a-zA-Z]/','',$source_campaign_id); $source_user_id = preg_replace('/[^-_0-9a-zA-Z]/','',$source_user_id); $source_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$source_group_id); $default_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$default_xfer_group); $drop_exten = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_exten); $safe_harbor_exten = preg_replace('/[^-_0-9a-zA-Z]/','',$safe_harbor_exten); # $drop_action = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_action); $drop_action_campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_action_campaigns); $drop_action_ingroups = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_action_ingroups); $drop_inbound_group = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_inbound_group); $afterhours_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$afterhours_xfer_group); $after_hours_action = preg_replace('/[^-_0-9a-zA-Z]/','',$after_hours_action); $alias_id = preg_replace('/[^-_0-9a-zA-Z]/','',$alias_id); $shift_id = preg_replace('/[^-_0-9a-zA-Z]/','',$shift_id); $qc_shift_id = preg_replace('/[^-_0-9a-zA-Z]/','',$qc_shift_id); $survey_method = preg_replace('/[^-_0-9a-zA-Z]/','',$survey_method); $alter_custphone_override = preg_replace('/[^-_0-9a-zA-Z]/','',$alter_custphone_override); $manual_dial_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_filter); $manual_dial_search_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_search_filter); $agent_clipboard_copy = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_clipboard_copy); $hold_time_option = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_option); $hold_time_option_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_option_xfer_group); $hold_recall_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_recall_xfer_group); $play_welcome_message = preg_replace('/[^-_0-9a-zA-Z]/','',$play_welcome_message); $did_route = preg_replace('/[^-_0-9a-zA-Z]/','',$did_route); $user_unavailable_action = preg_replace('/[^-_0-9a-zA-Z]/','',$user_unavailable_action); $user_route_settings_ingroup = preg_replace('/[^-_0-9a-zA-Z]/','',$user_route_settings_ingroup); $call_handle_method = preg_replace('/[^-_0-9a-zA-Z]/','',$call_handle_method); $agent_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_search_method); $agent_search_method_inbound = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_search_method_inbound); $agent_search_method_system = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_search_method_system); $hold_time_option_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_option_voicemail); $exten_context = preg_replace('/[^-_0-9a-zA-Z]/','',$exten_context); $three_way_call_cid = preg_replace('/[^-_0-9a-zA-Z]/','',$three_way_call_cid); $web_form_target = preg_replace('/[^-_0-9a-zA-Z]/','',$web_form_target); $recording_web_link = preg_replace('/[^-_0-9a-zA-Z]/','',$recording_web_link); $vtiger_search_category = preg_replace('/[^-_0-9a-zA-Z]/','',$vtiger_search_category); $vtiger_create_call_record = preg_replace('/[^-_0-9a-zA-Z]/','',$vtiger_create_call_record); $vtiger_create_lead_record = preg_replace('/[^-_0-9a-zA-Z]/','',$vtiger_create_lead_record); $vtiger_screen_login = preg_replace('/[^-_0-9a-zA-Z]/','',$vtiger_screen_login); $cpd_amd_action = preg_replace('/[^-_0-9a-zA-Z]/','',$cpd_amd_action); $cpd_unknown_action = preg_replace('/[^-_0-9a-zA-Z]/','',$cpd_unknown_action); $template_id = preg_replace('/[^-_0-9a-zA-Z]/','',$template_id); $carrier_id = preg_replace('/[^-_0-9a-zA-Z]/','',$carrier_id); $source_carrier = preg_replace('/[^-_0-9a-zA-Z]/','',$source_carrier); $group_alias_id = preg_replace('/[^-_0-9a-zA-Z]/','',$group_alias_id); $default_group_alias = preg_replace('/[^-_0-9a-zA-Z]/','',$default_group_alias); $vtiger_search_dead = preg_replace('/[^-_0-9a-zA-Z]/','',$vtiger_search_dead); $menu_id = preg_replace('/[^-_0-9a-zA-Z]/','',$menu_id); $source_menu = preg_replace('/[^-_0-9a-zA-Z]/','',$source_menu); $call_time_id = preg_replace('/[^-_0-9a-zA-Z]/','',$call_time_id); $phone_context = preg_replace('/[^-_0-9a-zA-Z]/','',$phone_context); $new_conf_secret = preg_replace('/[^-_0-9a-zA-Z]/','',$new_conf_secret); $conf_secret = preg_replace('/[^-_0-9a-zA-Z]/','',$conf_secret); $tracking_group = preg_replace('/[^-_0-9a-zA-Z]/','',$tracking_group); $no_agent_no_queue = preg_replace('/[^-_0-9a-zA-Z]/','',$no_agent_no_queue); $no_agent_action = preg_replace('/[^-_0-9a-zA-Z]/','',$no_agent_action); $quick_transfer_button = preg_replace('/[^-_0-9a-zA-Z]/','',$quick_transfer_button); $prepopulate_transfer_preset = preg_replace('/[^-_0-9a-zA-Z]/','',$prepopulate_transfer_preset); $tts_id = preg_replace('/[^-_0-9a-zA-Z]/','',$tts_id); $drop_rate_group = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_rate_group); $agent_dial_owner_only = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_dial_owner_only); $reset_time = preg_replace('/[^-_0-9a-zA-Z]/','',$reset_time); $moh_id = preg_replace('/[^-_0-9a-zA-Z]/','',$moh_id); $mohsuggest = preg_replace('/[^-_0-9a-zA-Z]/','',$mohsuggest); $drop_inbound_group_override = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_inbound_group_override); $timer_action = preg_replace('/[^-_0-9a-zA-Z]/','',$timer_action); $record_call = preg_replace('/[^-_0-9a-zA-Z]/','',$record_call); $scheduled_callbacks_alert = preg_replace('/[^-_0-9a-zA-Z]/','',$scheduled_callbacks_alert); $extension_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$extension_group_id); $extension_group = preg_replace('/[^-_0-9a-zA-Z]/','',$extension_group); $scheduled_callbacks_count = preg_replace('/[^-_0-9a-zA-Z]/','',$scheduled_callbacks_count); $manual_dial_override = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_override); $blind_monitor_warning = preg_replace('/[^-_0-9a-zA-Z]/','',$blind_monitor_warning); $uniqueid_status_display = preg_replace('/[^-_0-9a-zA-Z]/','',$uniqueid_status_display); $hold_time_option_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_option_callmenu); $inbound_queue_no_dial = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_queue_no_dial); $hold_time_second_option = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_second_option); $hold_time_third_option = preg_replace('/[^-_0-9a-zA-Z]/','',$hold_time_third_option); $wait_hold_option_priority = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_hold_option_priority); $wait_time_option = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_option); $wait_time_second_option = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_second_option); $wait_time_third_option = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_third_option); $wait_time_option_xfer_group = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_option_xfer_group); $wait_time_option_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_option_callmenu); $wait_time_option_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$wait_time_option_voicemail); $filter_phone_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_phone_group_id); $filter_action = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_action); $filter_user_unavailable_action = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_user_unavailable_action); $filter_user_route_settings_ingroup = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_user_route_settings_ingroup); $filter_agent_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_agent_search_method); $filter_campaign_id = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_campaign_id); $filter_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_group_id); $filter_menu_id = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_menu_id); $filter_call_handle_method = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_call_handle_method); $filter_user = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_user); $filter_exten_context = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_exten_context); $webphone_systemkey = preg_replace('/[^-_0-9a-zA-Z]/','',$webphone_systemkey); $webphone_dialpad = preg_replace('/[^-_0-9a-zA-Z]/','',$webphone_dialpad); $webphone_systemkey_override = preg_replace('/[^-_0-9a-zA-Z]/','',$webphone_systemkey_override); $webphone_dialpad_override = preg_replace('/[^-_0-9a-zA-Z]/','',$webphone_dialpad_override); $default_phone_registration_password = preg_replace('/[^-_0-9a-zA-Z]/','',$default_phone_registration_password); $default_phone_login_password = preg_replace('/[^-_0-9a-zA-Z]/','',$default_phone_login_password); $default_server_password = preg_replace('/[^-_0-9a-zA-Z]/','',$default_server_password); $ivr_park_call = preg_replace('/[^-_0-9a-zA-Z]/','',$ivr_park_call); $manual_preview_dial = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_preview_dial); $realtime_agent_time_stats = preg_replace('/[^-_0-9a-zA-Z]/','',$realtime_agent_time_stats); $api_manual_dial = preg_replace('/[^-_0-9a-zA-Z]/','',$api_manual_dial); $manual_dial_call_time_check = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_call_time_check); $lead_order_secondary = preg_replace('/[^-_0-9a-zA-Z]/','',$lead_order_secondary); $agent_lead_search = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_lead_search); $agent_lead_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_lead_search_method); $manual_dial_cid = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_cid); $post_phone_time_diff_alert = preg_replace('/[^-_0-9a-zA-Z]/','',$post_phone_time_diff_alert); $custom_3way_button_transfer = preg_replace('/[^-_0-9a-zA-Z]/','',$custom_3way_button_transfer); # $available_only_tally_threshold_agents = preg_replace('/[^-_0-9a-zA-Z]/','',$available_only_tally_threshold_agents); - Numeric, already filtered further up # $dial_level_threshold_agents = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_level_threshold_agents); - Numeric, already filtered further up $time_zone_setting = preg_replace('/[^-_0-9a-zA-Z]/','',$time_zone_setting); $safe_harbor_menu_id = preg_replace('/[^-_0-9a-zA-Z]/','',$safe_harbor_menu_id); $survey_menu_id = preg_replace('/[^-_0-9a-zA-Z]/','',$survey_menu_id); $dl_diff_target_method = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_diff_target_method); $disable_dispo_screen = preg_replace('/[^-_0-9a-zA-Z]/','',$disable_dispo_screen); $screen_labels = preg_replace('/[^-_0-9a-zA-Z]/','',$screen_labels); $label_hide_field_logs = preg_replace('/[^-_0-9a-zA-Z]/','',$label_hide_field_logs); $label_id = preg_replace('/[^-_0-9a-zA-Z]/','',$label_id); $status_display_fields = preg_replace('/[^-_0-9a-zA-Z]/','',$status_display_fields); $voicemail_timezone = preg_replace('/[^-_0-9a-zA-Z]/','',$voicemail_timezone); $default_voicemail_timezone = preg_replace('/[^-_0-9a-zA-Z]/','',$default_voicemail_timezone); $on_hook_cid = preg_replace('/[^-_0-9a-zA-Z]/','',$on_hook_cid); $pllb_grouping = preg_replace('/[^-_0-9a-zA-Z]/','',$pllb_grouping); $user_start = preg_replace('/[^-_0-9a-zA-Z]/','',$user_start); $drop_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_callmenu); $after_hours_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$after_hours_callmenu); $survey_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$survey_recording); $dtmf_field = preg_replace('/[^-_0-9a-zA-Z]/','',$dtmf_field); $preset_contact_search = preg_replace('/[^-_0-9a-zA-Z]/','',$preset_contact_search); $admin_hide_phone_data = preg_replace('/[^-_0-9a-zA-Z]/','',$admin_hide_phone_data); $max_calls_method = preg_replace('/[^-_0-9a-zA-Z]/','',$max_calls_method); $max_calls_action = preg_replace('/[^-_0-9a-zA-Z]/','',$max_calls_action); $in_group_dial = preg_replace('/[^-_0-9a-zA-Z]/','',$in_group_dial); $in_group_dial_select = preg_replace('/[^-_0-9a-zA-Z]/','',$in_group_dial_select); $queuemetrics_socket = preg_replace('/[^-_0-9a-zA-Z]/','',$queuemetrics_socket); $holiday_id = preg_replace('/[^-_0-9a-zA-Z]/','',$holiday_id); $holiday_date = preg_replace('/[^-_0-9a-zA-Z]/','',$holiday_date); $holiday_status = preg_replace('/[^-_0-9a-zA-Z]/','',$holiday_status); $expiration_date = preg_replace('/[^-_0-9a-zA-Z]/','',$expiration_date); $amd_inbound_group = preg_replace('/[^-_0-9a-zA-Z]/','',$amd_inbound_group); $amd_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$amd_callmenu); $filter_inbound_number = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_inbound_number); $filter_dnc_campaign = preg_replace('/[^-_0-9a-zA-Z]/','',$filter_dnc_campaign); $manual_dial_search_checkbox = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_search_checkbox); $alt_number_dialing = preg_replace('/[^-_0-9a-zA-Z]/','',$alt_number_dialing); $no_agent_ingroup_redirect = preg_replace('/[^-_0-9a-zA-Z]/','',$no_agent_ingroup_redirect); $no_agent_ingroup_id = preg_replace('/[^-_0-9a-zA-Z]/','',$no_agent_ingroup_id); $pre_filter_phone_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$pre_filter_phone_group_id); $shift_enforcement = preg_replace('/[^-_0-9a-zA-Z]/','',$shift_enforcement); $comments_all_tabs = preg_replace('/[^-_0-9a-zA-Z]/','',$comments_all_tabs); $comments_dispo_screen = preg_replace('/[^-_0-9a-zA-Z]/','',$comments_dispo_screen); $comments_callback_screen = preg_replace('/[^-_0-9a-zA-Z]/','',$comments_callback_screen); $qc_comment_history = preg_replace('/[^-_0-9a-zA-Z]/','',$qc_comment_history); $language_method = preg_replace('/[^-_0-9a-zA-Z]/','',$language_method); $manual_dial_override_field = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_override_field); $max_queue_ingroup_id = preg_replace('/[^-_0-9a-zA-Z]/','',$max_queue_ingroup_id); $agent_debug_logging = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_debug_logging); $container_id = preg_replace('/[^-_0-9a-zA-Z]/','',$container_id); $phone_defaults_container = preg_replace('/[^-_0-9a-zA-Z]/','',$phone_defaults_container); $container_type = preg_replace('/[^-_0-9a-zA-Z]/','',$container_type); $status_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$status_group_id); $unavail_dialplan_fwd_exten = preg_replace('/[^-_0-9a-zA-Z]/','',$unavail_dialplan_fwd_exten); $unavail_dialplan_fwd_context = preg_replace('/[^-_0-9a-zA-Z]/','',$unavail_dialplan_fwd_context); $nva_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$nva_search_method); $on_hook_cid_number = preg_replace('/[^-_0-9a-zA-Z]/','',$on_hook_cid_number); $colors_id = preg_replace('/[^-_0-9a-zA-Z]/','',$colors_id); $agent_screen_colors = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_screen_colors); $customer_chat_screen_colors = preg_replace('/[^-_0-9a-zA-Z]/','',$customer_chat_screen_colors); $web_loader_phone_length = preg_replace('/[^-_0-9a-zA-Z]/','',$web_loader_phone_length); $agent_chat_screen_colors = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_chat_screen_colors); $populate_lead_province = preg_replace('/[^-_0-9a-zA-Z]/','',$populate_lead_province); $populate_lead_owner = preg_replace('/[^-_0-9a-zA-Z]/','',$populate_lead_owner); $areacode_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$areacode_filter); $areacode_filter_action = preg_replace('/[^-_0-9a-zA-Z]/','',$areacode_filter_action); $report_id = preg_replace('/[^-_0-9a-zA-Z]/','',$report_id); $report_destination = preg_replace('/[^-_0-9a-zA-Z]/','',$report_destination); $report_times = preg_replace('/[^-_0-9a-zA-Z]/','',$report_times); $report_monthdays = preg_replace('/[^-_0-9a-zA-Z]/','',$report_monthdays); $populate_state_areacode = preg_replace('/[^-_0-9a-zA-Z]/','',$populate_state_areacode); $dl_id = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_id); $duplicate_check = preg_replace('/[^-_0-9a-zA-Z]/','',$duplicate_check); $dl_times = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_times); $dl_monthdays = preg_replace('/[^-_0-9a-zA-Z]/','',$dl_monthdays); $use_custom_cid = preg_replace('/[^-_0-9a-zA-Z]/','',$use_custom_cid); $system_ip_blacklist = preg_replace('/[^-_0-9a-zA-Z]/','',$system_ip_blacklist); $admin_ip_list = preg_replace('/[^-_0-9a-zA-Z]/','',$admin_ip_list); $agent_ip_list = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_ip_list); $api_ip_list = preg_replace('/[^-_0-9a-zA-Z]/','',$api_ip_list); $ip_list_id = preg_replace('/[^-_0-9a-zA-Z]/','',$ip_list_id); $inbound_survey_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_survey_callmenu); $filename_override = preg_replace('/[^-_0-9a-zA-Z]/','',$filename_override); $did_id = preg_replace('/[^-_0-9a-zA-Z]/','',$did_id); $extension_appended_cidname = preg_replace('/[^-_0-9a-zA-Z]/','',$extension_appended_cidname); $max_inbound_calls_outcome = preg_replace('/[^-_0-9a-zA-Z]/','',$max_inbound_calls_outcome); $manual_auto_next_options = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_auto_next_options); $agent_screen_time_display = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_screen_time_display); $get_call_launch = preg_replace('/[^-_0-9a-zA-Z]/','',$get_call_launch); $next_dial_my_callbacks = preg_replace('/[^-_0-9a-zA-Z]/','',$next_dial_my_callbacks); $anyone_callback_inactive_lists = preg_replace('/[^-_0-9a-zA-Z]/','',$anyone_callback_inactive_lists); $inbound_no_agents_no_dial_container = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_no_agents_no_dial_container); $closing_time_action = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_action); $closing_time_option_exten = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_option_exten); $closing_time_option_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_option_callmenu); $closing_time_option_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_option_voicemail); $closing_time_option_callback_list_id = preg_replace('/[^-_0-9a-zA-Z]/','',$closing_time_option_callback_list_id); $icbq_call_time_id = preg_replace('/[^-_0-9a-zA-Z]/','',$icbq_call_time_id); $add_lead_timezone = preg_replace('/[^-_0-9a-zA-Z]/','',$add_lead_timezone); $icbq_dial_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$icbq_dial_filter); $cid_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$cid_group_id); $cid_group_id_two = preg_replace('/[^-_0-9a-zA-Z]/','',$cid_group_id_two); $cid_group_type = preg_replace('/[^-_0-9a-zA-Z]/','',$cid_group_type); $populate_lead_source = preg_replace('/[^-_0-9a-zA-Z]/','',$populate_lead_source); $dead_trigger_action = preg_replace('/[^-_0-9a-zA-Z]/','',$dead_trigger_action); $dead_trigger_repeat = preg_replace('/[^-_0-9a-zA-Z]/','',$dead_trigger_repeat); $cid_cb_confirm_number = preg_replace('/[^-_0-9a-zA-Z]/','',$cid_cb_confirm_number); $cid_cb_invalid_filter_phone_group = preg_replace('/[^-_0-9a-zA-Z]/','',$cid_cb_invalid_filter_phone_group); $scheduled_callbacks_auto_reschedule = preg_replace('/[^-_0-9a-zA-Z]/','',$scheduled_callbacks_auto_reschedule); $scheduled_callbacks_timezones_container = preg_replace('/[^-_0-9a-zA-Z]/','',$scheduled_callbacks_timezones_container); $three_way_volume_buttons = preg_replace('/[^-_0-9a-zA-Z]/','',$three_way_volume_buttons); $callback_dnc = preg_replace('/[^-_0-9a-zA-Z]/','',$callback_dnc); $hide_call_log_info = preg_replace('/[^-_0-9a-zA-Z]/','',$hide_call_log_info); $hide_call_log_info_users = preg_replace('/[^-_0-9a-zA-Z]/','',$hide_call_log_info_users); # $call_quota_lead_ranking = preg_replace('/[^-_0-9a-zA-Z]/','',$call_quota_lead_ranking); $call_quota_lead_ranking_campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$call_quota_lead_ranking_campaigns); $call_quota_lead_ranking_system = preg_replace('/[^-_0-9a-zA-Z]/','',$call_quota_lead_ranking_system); # $sip_event_logging = preg_replace('/[^-_0-9a-zA-Z]/','',$sip_event_logging); $sip_event_logging_system = preg_replace('/[^-_0-9a-zA-Z]/','',$sip_event_logging_system); $sip_event_logging_campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$sip_event_logging_campaigns); $auto_active_list_new = preg_replace('/[^-_0-9a-zA-Z]/','',$auto_active_list_new); $script_id = preg_replace('/[^-_0-9a-zA-Z]/','',$script_id); $ingroup_script = preg_replace('/[^-_0-9a-zA-Z]/','',$ingroup_script); $ingroup_script_two = preg_replace('/[^-_0-9a-zA-Z]/','',$ingroup_script_two); $campaign_script = preg_replace('/[^-_0-9a-zA-Z]/','',$campaign_script); $campaign_script_two = preg_replace('/[^-_0-9a-zA-Z]/','',$campaign_script_two); $leave_vm_message_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$leave_vm_message_group_id); $dial_timeout_lead_container = preg_replace('/[^-_0-9a-zA-Z]/','',$dial_timeout_lead_container); $amd_type = preg_replace('/[^-_0-9a-zA-Z]/','',$amd_type); $recording_buttons = preg_replace('/[^-_0-9a-zA-Z]/','',$recording_buttons); $use_other_campaign_dnc = preg_replace('/[^-_0-9a-zA-Z]/','',$use_other_campaign_dnc); # $browser_alert_sound = preg_replace('/[^-_0-9a-zA-Z]/','',$browser_alert_sound); $browser_alert_sound_campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$browser_alert_sound_campaigns); $browser_alert_sound_ingroups = preg_replace('/[^-_0-9a-zA-Z]/','',$browser_alert_sound_ingroups); $three_way_record_stop_exception = preg_replace('/[^-_0-9a-zA-Z]/','',$three_way_record_stop_exception); $queuemetrics_pausereason = preg_replace('/[^-_0-9a-zA-Z]/','',$queuemetrics_pausereason); # $answer_signal = preg_replace('/[^-_0-9a-zA-Z]/','',$answer_signal); $answer_signal_callmenus = preg_replace('/[^-_0-9a-zA-Z]/','',$answer_signal_callmenus); $answer_signal_ingroups = preg_replace('/[^-_0-9a-zA-Z]/','',$answer_signal_ingroups); $inbound_drop_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_drop_voicemail); $inbound_after_hours_voicemail = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_after_hours_voicemail); $pause_max_exceptions = preg_replace('/[^-_0-9a-zA-Z]/','',$pause_max_exceptions); $two_factor_container = preg_replace('/[^-_0-9a-zA-Z]/','',$two_factor_container); $calls_inqueue_count_one = preg_replace('/[^-_0-9a-zA-Z]/','',$calls_inqueue_count_one); $calls_inqueue_count_two = preg_replace('/[^-_0-9a-zA-Z]/','',$calls_inqueue_count_two); $drop_call_seconds_override = preg_replace('/[^-_0-9a-zA-Z]/','',$drop_call_seconds_override); $in_man_dial_next_ready_seconds_override = preg_replace('/[^-_0-9a-zA-Z]/','',$in_man_dial_next_ready_seconds_override); $call_limit_24hour_method = preg_replace('/[^-_0-9a-zA-Z]/','',$call_limit_24hour_method); $call_limit_24hour_scope = preg_replace('/[^-_0-9a-zA-Z]/','',$call_limit_24hour_scope); $call_limit_24hour_override = preg_replace('/[^-_0-9a-zA-Z]/','',$call_limit_24hour_override); $in_queue_nanque_exceptions = preg_replace('/[^-_0-9a-zA-Z]/','',$in_queue_nanque_exceptions); $queue_group = preg_replace('/[^-_0-9a-zA-Z]/','',$queue_group); $pre_filter_recent_call = preg_replace('/[^-_0-9a-zA-Z]/','',$pre_filter_recent_call); $pre_filter_recent_extension = preg_replace('/[^-_0-9a-zA-Z]/','',$pre_filter_recent_extension); $user_group_two = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group_two); $agent_script_override = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_script_override); $inbound_list_script_override = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_list_script_override); $agent_hangup_route = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_hangup_route); $show_confetti = preg_replace('/[^-_0-9a-zA-Z]/','',$show_confetti); $webphone_settings = preg_replace('/[^-_0-9a-zA-Z]/','',$webphone_settings); # $demographic_quotas = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas); $demographic_quotas_system = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas_system); $demographic_quotas_campaigns = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas_campaigns); $demographic_quotas_container = preg_replace('/[^-_0-9a-zA-Z]/','',$demographic_quotas_container); $weekday_resets_container = preg_replace('/[^-_0-9a-zA-Z]/','',$weekday_resets_container); $second_alert_container = preg_replace('/[^-_0-9a-zA-Z]/','',$second_alert_container); $second_alert_only = preg_replace('/[^-_0-9a-zA-Z]/','',$second_alert_only); $third_alert_container = preg_replace('/[^-_0-9a-zA-Z]/','',$third_alert_container); $third_alert_only = preg_replace('/[^-_0-9a-zA-Z]/','',$third_alert_only); $state_descriptions = preg_replace('/[^-_0-9a-zA-Z]/','',$state_descriptions); $khomp_settings_container = preg_replace('/[^-_0-9a-zA-Z]/','',$khomp_settings_container); $agent_man_dial_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_man_dial_filter); $agent_3way_dial_filter = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_3way_dial_filter); $xfer_min_container = preg_replace('/[^-_0-9a-zA-Z]/','',$xfer_min_container); $amd_status_map = preg_replace('/[^-_0-9a-zA-Z]/','',$amd_status_map); ### ALPHA-NUMERIC and underscore $qc_statuses_id = preg_replace('/[^_0-9a-zA-Z]/','',$qc_statuses_id); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_timeout_prompt); $menu_invalid_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_invalid_prompt); $after_hours_message_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$after_hours_message_filename); $welcome_message_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$welcome_message_filename); $onhold_prompt_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$onhold_prompt_filename); $hold_time_option_callback_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$hold_time_option_callback_filename); $agent_alert_exten = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$agent_alert_exten); $filename = preg_replace('/[^-\/\._0-9a-zA-Z]/','',$filename); $am_message_exten = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$am_message_exten); $am_message_exten_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$am_message_exten_override); $campaign_groups = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$campaign_groups); $blind_monitor_filename = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$blind_monitor_filename); $hold_time_option_press_filename = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$hold_time_option_press_filename); $default_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$default_afterhours_filename_override); $sunday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$sunday_afterhours_filename_override); $monday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$monday_afterhours_filename_override); $tuesday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$tuesday_afterhours_filename_override); $wednesday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$wednesday_afterhours_filename_override); $thursday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$thursday_afterhours_filename_override); $friday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$friday_afterhours_filename_override); $saturday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$saturday_afterhours_filename_override); $admin_web_directory = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$admin_web_directory); $tts_voice = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$tts_voice); $wait_time_option_callback_filename = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$wait_time_option_callback_filename); $wait_time_option_press_filename = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$wait_time_option_press_filename); $eht_minimum_prompt_filename = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$eht_minimum_prompt_filename); $queuemetrics_phone_environment = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$queuemetrics_phone_environment); $active_twin_server_ip = preg_replace('/[^-\|\/\._0-9a-zA-Z]/','',$active_twin_server_ip); $safe_harbor_audio = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$safe_harbor_audio); $alt_log_server_ip = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$alt_log_server_ip); $alt_log_dbname = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$alt_log_dbname); $alt_log_login = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$alt_log_login); $alt_log_pass = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$alt_log_pass); $coldstorage_server_ip = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$coldstorage_server_ip); $coldstorage_dbname = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$coldstorage_dbname); $coldstorage_login = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$coldstorage_login); $coldstorage_pass = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$coldstorage_pass); $coldstorage_port = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$coldstorage_port); $survey_first_audio_file = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$survey_first_audio_file); $survey_opt_in_audio_file = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$survey_opt_in_audio_file); $survey_ni_audio_file = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$survey_ni_audio_file); $survey_third_audio_file = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$survey_third_audio_file); $survey_fourth_audio_file = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$survey_fourth_audio_file); $safe_harbor_audio_field = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$safe_harbor_audio_field); $voicemail_greeting = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$voicemail_greeting); $old_voicemail_greeting = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$old_voicemail_greeting); $meetme_enter_login_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$meetme_enter_login_filename); $meetme_enter_leave3way_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$meetme_enter_leave3way_filename); $nva_error_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$nva_error_filename); $inbound_survey_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$inbound_survey_filename); $inbound_survey_question_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$inbound_survey_question_filename); $closing_time_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$closing_time_filename); $closing_time_end_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$closing_time_end_filename); $dead_trigger_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$dead_trigger_filename); $cid_cb_valid_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_valid_filename); $cid_cb_confirmed_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_confirmed_filename); $cid_cb_enter_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_enter_filename); $cid_cb_you_entered_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_you_entered_filename); $cid_cb_press_to_confirm_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_press_to_confirm_filename); $cid_cb_invalid_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_invalid_filename); $cid_cb_reenter_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_reenter_filename); $cid_cb_error_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$cid_cb_error_filename); $place_in_line_caller_number_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$place_in_line_caller_number_filename); $place_in_line_you_next_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$place_in_line_you_next_filename); $audio_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$audio_filename); $agent_hangup_value = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$agent_hangup_value); $second_alert_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$second_alert_filename); $third_alert_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$third_alert_filename); ### ALPHA-NUMERIC and underscore and dash and slash and dot and comma $menu_prompt = preg_replace('/[^-\/\|\,\._0-9a-zA-Z]/','',$menu_prompt); ### ALPHA-NUMERIC and underscore and dash and comma $logins_list = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$logins_list); $forced_timeclock_login = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$forced_timeclock_login); $uniqueid_status_prefix = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$uniqueid_status_prefix); ### ALPHA-NUMERIC and spaces $lead_order = preg_replace('/[^ 0-9a-zA-Z]/','',$lead_order); ### ALPHA-NUMERIC and spaces and dashes and underscores $preset_name = preg_replace('/[^- \_0-9a-zA-Z]/','',$preset_name); $selected_language = preg_replace('/[^- \_0-9a-zA-Z]/','',$selected_language); $default_language = preg_replace('/[^- \_0-9a-zA-Z]/','',$default_language); # $opensips_cid_name = preg_replace('/[^- \_0-9a-zA-Z]/','',$opensips_cid_name); $max_system_stats_submit = preg_replace('/[^- \_0-9a-zA-Z]/','',$max_system_stats_submit); $opensips_cid_name_campaigns = preg_replace('/[^- \_0-9a-zA-Z]/','',$opensips_cid_name_campaigns); $opensips_cid_name_system = preg_replace('/[^- \_0-9a-zA-Z]/','',$opensips_cid_name_system); ### ALPHA-NUMERIC and hash $group_color = preg_replace('/[^\#0-9a-zA-Z]/','',$group_color); $script_color = preg_replace('/[^\#0-9a-zA-Z]/','',$script_color); ### ALPHA-NUMERIC and hash and star and dot and underscore $hold_time_option_exten = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$hold_time_option_exten); $voicemail_ext = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$voicemail_ext); $phone = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$phone); $phone_code = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$phone_code); $wait_time_option_exten = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$wait_time_option_exten); $filter_voicemail_ext = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$filter_voicemail_ext); $filter_phone_code = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$filter_phone_code); $filter_phone = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$filter_phone); $preset_number = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$preset_number); $no_agent_ingroup_extension = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$no_agent_ingroup_extension); $pre_filter_extension = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$pre_filter_extension); $max_queue_ingroup_extension = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$max_queue_ingroup_extension); $report_server = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$report_server); $dl_server = preg_replace('/[^\*\#\.\_0-9a-zA-Z]/','',$dl_server); ### ALPHA-NUMERIC and hash and star and dot and underscore and colon and plus sign $did_pattern = preg_replace('/[^:\+\*\#\.\_0-9a-zA-Z]/','',$did_pattern); $web_loader_phone_strip = preg_replace('/[^:\+\*\#\.\_0-9a-zA-Z]/','',$web_loader_phone_strip); $manual_dial_phone_strip = preg_replace('/[^:\+\*\#\.\_0-9a-zA-Z]/','',$manual_dial_phone_strip); $mobile_number = preg_replace('/[^:\+\*\#\.\_0-9a-zA-Z]/','',$mobile_number); ### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores $adaptive_dl_diff_target = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$adaptive_dl_diff_target); $adaptive_intensity = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$adaptive_intensity); $asterisk_version = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$asterisk_version); $call_time_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$call_time_comments); $call_time_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$call_time_name); $campaign_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$campaign_name); $campaign_rec_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$campaign_rec_filename); $ingroup_rec_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$ingroup_rec_filename); $company = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$company); $full_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$full_name); $fullname = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$fullname); $group_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$group_name); $HKstatus = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$HKstatus); $lead_filter_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$lead_filter_comments); $lead_filter_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$lead_filter_name); $list_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$list_name); $local_gmt = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$local_gmt); $new_fullname = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$new_fullname); $phone_type = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$phone_type); $picture = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$picture); $script_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$script_comments); $script_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$script_name); $server_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$server_description); $status = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$status); $status_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$status_name); $wrapup_message = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$wrapup_message); $pause_code_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$pause_code_name); $campaign_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$campaign_description); $list_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$list_description); $vcl_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$vcl_name); $vsc_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$vsc_name); $vsc_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$vsc_description); $code_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$code_name); $alias_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$alias_name); $shift_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$shift_name); $did_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$did_description); $template_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$template_name); $carrier_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$carrier_name); $group_alias_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$group_alias_name); $caller_id_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$caller_id_name); $user_code = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$user_code); $territory = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$territory); $tts_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$tts_name); $moh_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$moh_name); $timer_action_message = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$timer_action_message); $default_codecs = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$default_codecs); $codecs_list = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$codecs_list); $label_title = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_title); $label_first_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_first_name); $label_middle_initial = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_middle_initial); $label_last_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_last_name); $label_address1 = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_address1); $label_address2 = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_address2); $label_address3 = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_address3); $label_city = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_city); $label_state = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_state); $label_province = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_province); $label_postal_code = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_postal_code); $label_vendor_lead_code = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_vendor_lead_code); $label_gender = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_gender); $label_phone_number = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_phone_number); $label_phone_code = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_phone_code); $label_alt_phone = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_alt_phone); $label_security_phrase = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_security_phrase); $label_email = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_email); $label_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_comments); $slave_db_server = preg_replace('/[^- \.\,\:\_0-9a-zA-Z]/','',$slave_db_server); $filter_phone_group_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$filter_phone_group_name); $filter_phone_group_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$filter_phone_group_description); $filter_clean_cid_number = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$filter_clean_cid_number); $label_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_name); $default_local_gmt = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$default_local_gmt); $cid_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$cid_description); $description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$description); $first_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$first_name); $last_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$last_name); $bu_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$bu_name); $department = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$department); # $group = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$group); NOT USED $job_title = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$job_title); $location = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$location); $holiday_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$holiday_name); $holiday_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$holiday_comments); $api_allowed_functions = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$api_allowed_functions); $agent_display_fields = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$agent_display_fields); $container_notes = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$container_notes); $did_carrier_description = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$did_carrier_description); $status_group_notes = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$status_group_notes); $colors_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$colors_name); $web_logo = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$web_logo); $user_nickname = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$user_nickname); $customer_chat_survey_text = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$customer_chat_survey_text); $agent_script = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$agent_script); $report_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$report_name); $dl_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$dl_name); $drop_status = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$drop_status); $ip_list_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$ip_list_name); $cid_group_notes = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$cid_group_notes); $populate_lead_vendor = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$populate_lead_vendor); $leave_vm_message_group_notes = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$leave_vm_message_group_notes); $audio_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$audio_name); $populate_lead_comments = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$populate_lead_comments); $label_lead_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_lead_id); $label_list_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_list_id); $label_entry_date = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_entry_date); $label_gmt_offset_now = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_gmt_offset_now); $label_source_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_source_id); $label_called_since_last_reset = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_called_since_last_reset); $label_status = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_status); $label_user = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_user); $label_date_of_birth = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_date_of_birth); $label_country_code = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_country_code); $label_last_local_call_time = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_last_local_call_time); $label_called_count = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_called_count); $label_rank = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_rank); $label_owner = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_owner); $label_entry_list_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$label_entry_list_id); $user_location = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$user_location); $queue_group_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$queue_group_name); $qc_scorecard_id = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$qc_scorecard_id); $city_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$city_rule); $county_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$county_rule); $ac_rule = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$ac_rule); $stage = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$stage); $stereo_rec_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$stereo_rec_filename); $parallel_rec_co_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$parallel_rec_co_filename); $parallel_rec_cm_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$parallel_rec_cm_filename); $parallel_rec_fr_filename = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$parallel_rec_fr_filename); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$call_out_number_group); $client_browser = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$client_browser); $DBX_server = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$DBX_server); $DBY_server = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$DBY_server); $dtmf_send_extension = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$dtmf_send_extension); $install_directory = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$install_directory); $old_extension = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$old_extension); $telnet_host = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$telnet_host); $queuemetrics_dbname = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$queuemetrics_dbname); $queuemetrics_login = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$queuemetrics_login); $queuemetrics_pass = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$queuemetrics_pass); $email = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$email); $vtiger_dbname = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$vtiger_dbname); $vtiger_login = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$vtiger_login); $vtiger_pass = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$vtiger_pass); $external_server_ip = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$external_server_ip); $alt_server_ip = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$alt_server_ip); $email_from = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$email_from); $email_to = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$email_to); $ftp_server = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$ftp_server); $ftp_directory = preg_replace('/[^-\.\:\/\@\_0-9a-zA-Z]/','',$ftp_directory); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot and space $custom_one = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$custom_one); $custom_two = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$custom_two); $custom_three = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$custom_three); $custom_four = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$custom_four); $custom_five = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$custom_five); $email_subject = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$email_subject); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot and pound and star $extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9a-zA-Z]/','',$extension); $extension_dids = preg_replace('/[^-\*\#\.\:\/\@\_0-9a-zA-Z]/','',$extension_dids); $new_extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9a-zA-Z]/','',$new_extension); $timer_action_destination = preg_replace('/[^-\*\#\.\:\/\@\_0-9a-zA-Z]/','',$timer_action_destination); $filter_extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9a-zA-Z]/','',$filter_extension); ### ALPHA-NUMERIC and space and underscore and dash and slash and at and dot and pound and star and pipe and comma $ivr_park_call_agi = preg_replace('/[^- \*\#\.\,\:\/\|\@\_0-9a-zA-Z]/','',$ivr_park_call_agi); $source_phone = preg_replace('/[^- \*\#\.\,\:\/\|\@\_0-9a-zA-Z]/','',$source_phone); ### ALPHA-NUMERIC and space and underscore and dash and slash and at and dot and pound and star and pipe and comma and equal $voicemail_options = preg_replace('/[^- \=\*\#\.\,\:\/\|\@\_0-9a-zA-Z]/','',$voicemail_options); ### NUMERIC and comma and pipe $waitforsilence_options = preg_replace('/[^\|\,0-9a-zA-Z]/','',$waitforsilence_options); ### value cleaning $no_agent_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]/','',$no_agent_action_value); $areacode_filter_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]/','',$areacode_filter_action_value); ### ALPHA-NUMERIC and underscore and dash and slash and at and space and colon $vdc_header_date_format = preg_replace('/[^- \:\/\_0-9a-zA-Z]/','',$vdc_header_date_format); $vdc_customer_date_format = preg_replace('/[^- \:\/\_0-9a-zA-Z]/','',$vdc_customer_date_format); $menu_name = preg_replace('/[^- \:\/\_0-9a-zA-Z]/','',$menu_name); ### ALPHA-NUMERIC and underscore and dash and at and space and parantheses $vdc_header_phone_format = preg_replace('/[^- \(\)\_0-9a-zA-Z]/', '',$vdc_header_phone_format); ### ALPHA-NUMERIC and newlines $areacode_list = preg_replace('/[^\n0-9a-zA-Z]/', '',$areacode_list); ### ALPHA-NUMERIC and newlines and period and colon $ip_address = preg_replace('/[^\n\.\:\0-9a-zA-Z]/', '',$ip_address); } else { ### ALPHA-NUMERIC ONLY ### $is_webphone = preg_replace('/[^-_0-9\p{L}]/u','',$is_webphone); $campaign_script = preg_replace('/[^0-9\p{L}]/u','',$campaign_script); $submit = preg_replace('/[^0-9\p{L}]/u','',$submit); $campaign_cid = preg_replace('/[^0-9\p{L}]/u','',$campaign_cid); $campaign_recording = preg_replace('/[^0-9\p{L}]/u','',$campaign_recording); $ADD = preg_replace('/[^0-9\p{L}]/u','',$ADD); $dial_prefix = preg_replace('/[^0-9\p{L}]/u','',$dial_prefix); $state_call_time_state = preg_replace('/[^0-9\p{L}]/u','',$state_call_time_state); $scheduled_callbacks = preg_replace('/[^0-9\p{L}]/u','',$scheduled_callbacks); $concurrent_transfers = preg_replace('/[^0-9\p{L}]/u','',$concurrent_transfers); $billable = preg_replace('/[^0-9\p{L}]/u','',$billable); $pause_code = preg_replace('/[^0-9\p{L}]/u','',$pause_code); $vicidial_recording_override = preg_replace('/[^0-9\p{L}]/u','',$vicidial_recording_override); $ingroup_recording_override = preg_replace('/[^0-9\p{L}]/u','',$ingroup_recording_override); $queuemetrics_log_id = preg_replace('/[^0-9\p{L}]/u','',$queuemetrics_log_id); $after_hours_exten = preg_replace('/[^0-9\p{L}]/u','',$after_hours_exten); $after_hours_voicemail = preg_replace('/[^0-9\p{L}]/u','',$after_hours_voicemail); $qc_script = preg_replace('/[^0-9\p{L}]/u','',$qc_script); $code = preg_replace('/[^0-9\p{L}]/u','',$code); $survey_no_response_action = preg_replace('/[^0-9\p{L}]/u','',$survey_no_response_action); $survey_ni_status = preg_replace('/[^0-9\p{L}]/u','',$survey_ni_status); $qc_get_record_launch = preg_replace('/[^0-9\p{L}]/u','',$qc_get_record_launch); $agent_pause_codes_active = preg_replace('/[^0-9\p{L}]/u','',$agent_pause_codes_active); $three_way_dial_prefix = preg_replace('/[^0-9\p{L}]/u','',$three_way_dial_prefix); $agent_shift_enforcement_override = preg_replace('/[^0-9\p{L}]/u','',$agent_shift_enforcement_override); $survey_third_status = preg_replace('/[^0-9\p{L}]/u','',$survey_third_status); $survey_fourth_status = preg_replace('/[^0-9\p{L}]/u','',$survey_fourth_status); $sounds_web_directory = preg_replace('/[^0-9\p{L}]/u','',$sounds_web_directory); $disable_alter_custphone = preg_replace('/[^0-9\p{L}]/u','',$disable_alter_custphone); $view_calls_in_queue = preg_replace('/[^0-9\p{L}]/u','',$view_calls_in_queue); $view_calls_in_queue_launch = preg_replace('/[^0-9\p{L}]/u','',$view_calls_in_queue_launch); $grab_calls_in_queue = preg_replace('/[^0-9\p{L}]/u','',$grab_calls_in_queue); $call_requeue_button = preg_replace('/[^0-9\p{L}]/u','',$call_requeue_button); $pause_after_each_call = preg_replace('/[^0-9\p{L}]/u','',$pause_after_each_call); $use_internal_dnc = preg_replace('/[^0-9\p{L}]/u','',$use_internal_dnc); $use_campaign_dnc = preg_replace('/[^0-9\p{L}]/u','',$use_campaign_dnc); $new_voicemail_id = preg_replace('/[^0-9\p{L}]/u','',$new_voicemail_id); $voicemail_id = preg_replace('/[^0-9a-zA-Z]/','',$voicemail_id); $status_id = preg_replace('/[^0-9\p{L}]/u','',$status_id); $agent_call_log_view = preg_replace('/[^0-9\p{L}]/u','',$agent_call_log_view); $agent_call_log_view_override = preg_replace('/[^0-9\p{L}]/u','',$agent_call_log_view_override); $queuemetrics_loginout = preg_replace('/[^0-9\p{L}]/u','',$queuemetrics_loginout); $queuemetrics_callstatus = preg_replace('/[^0-9\p{L}]/u','',$queuemetrics_callstatus); $hide_xfer_number_to_dial = preg_replace('/[^0-9\p{L}]/u','',$hide_xfer_number_to_dial); $manual_dial_prefix = preg_replace('/[^0-9\p{L}]/u','',$manual_dial_prefix); $customer_3way_hangup_logging = preg_replace('/[^0-9\p{L}]/u','',$customer_3way_hangup_logging); $customer_3way_hangup_action = preg_replace('/[^0-9\p{L}]/u','',$customer_3way_hangup_action); $queuemetrics_dispo_pause = preg_replace('/[^0-9\p{L}]/u','',$queuemetrics_dispo_pause); $per_call_notes = preg_replace('/[^0-9\p{L}]/u','',$per_call_notes); $my_callback_option = preg_replace('/[^0-9\p{L}]/u','',$my_callback_option); $auto_pause_precall_code = preg_replace('/[^0-9\p{L}]/u','',$auto_pause_precall_code); $disable_dispo_status = preg_replace('/[^0-9\p{L}]/u','',$disable_dispo_status); $action_xfer_cid = preg_replace('/[^0-9\p{L}]/u','',$action_xfer_cid); $callback_list_calltime = preg_replace('/[^0-9\p{L}]/u','',$callback_list_calltime); $pause_after_next_call = preg_replace('/[^0-9\p{L}]/u','',$pause_after_next_call); $owner_populate = preg_replace('/[^0-9\p{L}]/u','',$owner_populate); $dead_max_dispo = preg_replace('/[^0-9\p{L}]/u','',$dead_max_dispo); $dispo_max_dispo = preg_replace('/[^0-9\p{L}]/u','',$dispo_max_dispo); $wrapup_bypass = preg_replace('/[^0-9\p{L}]/u','',$wrapup_bypass); $wrapup_after_hotkey = preg_replace('/[^0-9\p{L}]/u','',$wrapup_after_hotkey); $show_previous_callback = preg_replace('/[^0-9\p{L}]/u','',$show_previous_callback); $clear_script = preg_replace('/[^0-9\p{L}]/u','',$clear_script); $allow_chats = preg_replace('/[^0-9\p{L}]/u','',$allow_chats); $allow_emails = preg_replace('/[^0-9\p{L}]/u','',$allow_emails); $status_display_ingroup = preg_replace('/[^0-9\p{L}]/u','',$status_display_ingroup); $populate_lead_ingroup = preg_replace('/[^0-9\p{L}]/u','',$populate_lead_ingroup); $nva_new_status = preg_replace('/[^0-9\p{L}]/u','',$nva_new_status); $report_default_format = preg_replace('/[^0-9\p{L}]/u','',$report_default_format); $menu_background = preg_replace('/[^0-9\p{L}]/u','',$menu_background); $frame_background = preg_replace('/[^0-9\p{L}]/u','',$frame_background); $std_row1_background = preg_replace('/[^0-9\p{L}]/u','',$std_row1_background); $std_row2_background = preg_replace('/[^0-9\p{L}]/u','',$std_row2_background); $std_row3_background = preg_replace('/[^0-9\p{L}]/u','',$std_row3_background); $std_row4_background = preg_replace('/[^0-9\p{L}]/u','',$std_row4_background); $std_row5_background = preg_replace('/[^0-9\p{L}]/u','',$std_row5_background); $alt_row1_background = preg_replace('/[^0-9\p{L}]/u','',$alt_row1_background); $alt_row2_background = preg_replace('/[^0-9\p{L}]/u','',$alt_row2_background); $alt_row3_background = preg_replace('/[^0-9\p{L}]/u','',$alt_row3_background); $button_color = preg_replace('/[^0-9\p{L}]/u','',$button_color); $dead_to_dispo = preg_replace('/[^0-9\p{L}]/u','',$dead_to_dispo); $routing_prefix = preg_replace('/[^0-9\p{L}]/u','',$routing_prefix); $inbound_survey = preg_replace('/[^0-9\p{L}]/u','',$inbound_survey); $pause_max_dispo = preg_replace('/[^0-9\p{L}]/u','',$pause_max_dispo); $areacode = preg_replace('/[^0-9\p{L}]/u','',$areacode); $require_mgr_approval = preg_replace('/[^0-9\p{L}]/u','',$require_mgr_approval); # $mute_recordings = preg_replace('/[^0-9\p{L}]/u','',$mute_recordings); $mute_recordings_users = preg_replace('/[^0-9\p{L}]/u','',$mute_recordings_users); $mute_recordings_campaigns = preg_replace('/[^0-9\p{L}]/u','',$mute_recordings_campaigns); $mute_recordings_system = preg_replace('/[^0-9\p{L}]/u','',$mute_recordings_system); $leave_vm_no_dispo = preg_replace('/[^0-9\p{L}]/u','',$leave_vm_no_dispo); $amd_agent_route_options = preg_replace('/[^0-9\p{L}]/u','',$amd_agent_route_options); $did_pattern_filter = preg_replace('/[^0-9a-zA-Z]/','',$did_pattern_filter); ### ALPHA-NUMERIC and spaces and hash and star and comma $xferconf_a_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',trim($xferconf_a_dtmf)); $xferconf_b_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',trim($xferconf_b_dtmf)); # $xferconf_c_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',trim($xferconf_c_dtmf)); # $xferconf_d_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',trim($xferconf_d_dtmf)); # $xferconf_e_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',trim($xferconf_e_dtmf)); $survey_third_digit = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',$survey_third_digit); $survey_fourth_digit = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',$survey_fourth_digit); $survey_third_exten = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',$survey_third_exten); $survey_fourth_exten = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',$survey_fourth_exten); $preset_dtmf = preg_replace('/[^ \,\*\#0-9\p{L}]/u','',$preset_dtmf); ### ALPHA-NUMERIC and underscore $qc_statuses_id = preg_replace('/[^_0-9\p{L}]/u','',$qc_statuses_id); ### ALPHA-NUMERIC and underscore and dash $agi_output = preg_replace('/[^-_0-9\p{L}]/u','',$agi_output); $ASTmgrSECRET = preg_replace('/[^-_0-9\p{L}]/u','',$ASTmgrSECRET); $ASTmgrUSERNAME = preg_replace('/[^-_0-9\p{L}]/u','',$ASTmgrUSERNAME); $ASTmgrUSERNAMElisten = preg_replace('/[^-_0-9\p{L}]/u','',$ASTmgrUSERNAMElisten); $ASTmgrUSERNAMEsend = preg_replace('/[^-_0-9\p{L}]/u','',$ASTmgrUSERNAMEsend); $ASTmgrUSERNAMEupdate = preg_replace('/[^-_0-9\p{L}]/u','',$ASTmgrUSERNAMEupdate); $call_time_id = preg_replace('/[^-_0-9\p{L}]/u','',$call_time_id); $campaign_id = preg_replace('/[^-_0-9\p{L}]/u','',$campaign_id); $CoNfIrM = preg_replace('/[^-_0-9\p{L}]/u','',$CoNfIrM); $DBX_database = preg_replace('/[^-_0-9\p{L}]/u','',$DBX_database); $DBX_pass = preg_replace('/[^-_0-9\p{L}]/u','',$DBX_pass); $DBX_user = preg_replace('/[^-_0-9\p{L}]/u','',$DBX_user); $DBY_database = preg_replace('/[^-_0-9\p{L}]/u','',$DBY_database); $DBY_pass = preg_replace('/[^-_0-9\p{L}]/u','',$DBY_pass); $DBY_user = preg_replace('/[^-_0-9\p{L}]/u','',$DBY_user); $dial_method = preg_replace('/[^-_0-9\p{L}]/u','',$dial_method); $dial_status_a = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status_a); $dial_status_b = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status_b); $dial_status_c = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status_c); $dial_status_d = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status_d); $dial_status_e = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status_e); $ext_context = preg_replace('/[^-_0-9\p{L}]/u','',$ext_context); $group_id = preg_replace('/[^-_0-9\p{L}]/u','',$group_id); $lead_filter_id = preg_replace('/[^-_0-9\p{L}]/u','',$lead_filter_id); $local_call_time = preg_replace('/[^-_0-9\p{L}]/u','',$local_call_time); $login = preg_replace('/[^-_0-9\p{L}]/u','',$login); $login_campaign = preg_replace('/[^-_0-9\p{L}]/u','',$login_campaign); $login_pass = preg_replace('/[^-_0-9\p{L}]/u','',$login_pass); $login_user = preg_replace('/[^-_0-9\p{L}]/u','',$login_user); $new_login = preg_replace('/[^-_0-9\p{L}]/u','',$new_login); $new_pass = preg_replace('/[^-_0-9\p{L}]/u','',$new_pass); $next_agent_call = preg_replace('/[^-_0-9\p{L}]/u','',$next_agent_call); $old_campaign_id = preg_replace('/[^-_0-9\p{L}]/u','',$old_campaign_id); $old_server_id = preg_replace('/[^-_0-9\p{L}]/u','',$old_server_id); $OLDuser_group = preg_replace('/[^-_0-9\p{L}]/u','',$OLDuser_group); $park_file_name = preg_replace('/[^-_0-9\p{L}]/u','',$park_file_name); $pass = preg_replace('/[^-_0-9\p{L}]/u','',$pass); $phone_login = preg_replace('/[^-_0-9\p{L}]/u','',$phone_login); $phone_pass = preg_replace('/[^-_0-9\p{L}]/u','',$phone_pass); $PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u','',$PHP_AUTH_PW); $PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u','',$PHP_AUTH_USER); $protocol = preg_replace('/[^-_0-9\p{L}]/u','',$protocol); $server_id = preg_replace('/[^-_0-9\p{L}]/u','',$server_id); $state_rule = preg_replace('/[^-_0-9\p{L}]/u','',$state_rule); $holiday_rule = preg_replace('/[^-_0-9\p{L}]/u','',$holiday_rule); $trunk_restriction = preg_replace('/[^-_0-9\p{L}]/u','',$trunk_restriction); $user = preg_replace('/[^-_0-9\p{L}]/u','',$user); $user_group = preg_replace('/[^-_0-9\p{L}]/u','',$user_group); $VICIDIAL_park_on_filename = preg_replace('/[^-_0-9\p{L}]/u','',$VICIDIAL_park_on_filename); $auto_alt_dial = preg_replace('/[^-_0-9\p{L}]/u','',$auto_alt_dial); $dial_status = preg_replace('/[^-_0-9\p{L}]/u','',$dial_status); $queuemetrics_eq_prepend = preg_replace('/[^-_0-9\p{L}]/u','',$queuemetrics_eq_prepend); $vicidial_agent_disable = preg_replace('/[^-_0-9\p{L}]/u','',$vicidial_agent_disable); $alter_custdata_override = preg_replace('/[^-_0-9\p{L}]/u','',$alter_custdata_override); $list_order_mix = preg_replace('/[^-_0-9\p{L}]/u','',$list_order_mix); $vcl_id = preg_replace('/[^-_0-9\p{L}]/u','',$vcl_id); $mix_method = preg_replace('/[^-_0-9\p{L}]/u','',$mix_method); $category = preg_replace('/[^-_0-9\p{L}]/u','',$category); $vsc_id = preg_replace('/[^-_0-9\p{L}]/u','',$vsc_id); $moh_context = preg_replace('/[^-_0-9\p{L}]/u','',$moh_context); $source_campaign_id = preg_replace('/[^-_0-9\p{L}]/u','',$source_campaign_id); $source_user_id = preg_replace('/[^-_0-9\p{L}]/u','',$source_user_id); $source_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$source_group_id); $default_xfer_group = preg_replace('/[^-_0-9\p{L}]/u','',$default_xfer_group); $drop_exten = preg_replace('/[^-_0-9\p{L}]/u','',$drop_exten); $safe_harbor_exten = preg_replace('/[^-_0-9\p{L}]/u','',$safe_harbor_exten); # $drop_action = preg_replace('/[^-_0-9\p{L}]/u','',$drop_action); $drop_action_campaigns = preg_replace('/[^-_0-9\p{L}]/u','',$drop_action_campaigns); $drop_action_ingroups = preg_replace('/[^-_0-9\p{L}]/u','',$drop_action_ingroups); $drop_inbound_group = preg_replace('/[^-_0-9\p{L}]/u','',$drop_inbound_group); $afterhours_xfer_group = preg_replace('/[^-_0-9\p{L}]/u','',$afterhours_xfer_group); $after_hours_action = preg_replace('/[^-_0-9\p{L}]/u','',$after_hours_action); $alias_id = preg_replace('/[^-_0-9\p{L}]/u','',$alias_id); $shift_id = preg_replace('/[^-_0-9\p{L}]/u','',$shift_id); $qc_shift_id = preg_replace('/[^-_0-9\p{L}]/u','',$qc_shift_id); $survey_method = preg_replace('/[^-_0-9\p{L}]/u','',$survey_method); $alter_custphone_override = preg_replace('/[^-_0-9\p{L}]/u','',$alter_custphone_override); $manual_dial_filter = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_filter); $manual_dial_search_filter = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_search_filter); $agent_clipboard_copy = preg_replace('/[^-_0-9\p{L}]/u','',$agent_clipboard_copy); $hold_time_option = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_option); $hold_time_option_xfer_group = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_option_xfer_group); $hold_recall_xfer_group = preg_replace('/[^-_0-9\p{L}]/u','',$hold_recall_xfer_group); $play_welcome_message = preg_replace('/[^-_0-9\p{L}]/u','',$play_welcome_message); $did_route = preg_replace('/[^-_0-9\p{L}]/u','',$did_route); $user_unavailable_action = preg_replace('/[^-_0-9\p{L}]/u','',$user_unavailable_action); $user_route_settings_ingroup = preg_replace('/[^-_0-9\p{L}]/u','',$user_route_settings_ingroup); $call_handle_method = preg_replace('/[^-_0-9\p{L}]/u','',$call_handle_method); $agent_search_method = preg_replace('/[^-_0-9\p{L}]/u','',$agent_search_method); $agent_search_method_inbound = preg_replace('/[^-_0-9\p{L}]/u','',$agent_search_method_inbound); $agent_search_method_system = preg_replace('/[^-_0-9\p{L}]/u','',$agent_search_method_system); $hold_time_option_voicemail = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_option_voicemail); $exten_context = preg_replace('/[^-_0-9\p{L}]/u','',$exten_context); $three_way_call_cid = preg_replace('/[^-_0-9\p{L}]/u','',$three_way_call_cid); $web_form_target = preg_replace('/[^-_0-9\p{L}]/u','',$web_form_target); $recording_web_link = preg_replace('/[^-_0-9\p{L}]/u','',$recording_web_link); $vtiger_search_category = preg_replace('/[^-_0-9\p{L}]/u','',$vtiger_search_category); $vtiger_create_call_record = preg_replace('/[^-_0-9\p{L}]/u','',$vtiger_create_call_record); $vtiger_create_lead_record = preg_replace('/[^-_0-9\p{L}]/u','',$vtiger_create_lead_record); $vtiger_screen_login = preg_replace('/[^-_0-9\p{L}]/u','',$vtiger_screen_login); $cpd_amd_action = preg_replace('/[^-_0-9\p{L}]/u','',$cpd_amd_action); $cpd_unknown_action = preg_replace('/[^-_0-9\p{L}]/u','',$cpd_unknown_action); $template_id = preg_replace('/[^-_0-9\p{L}]/u','',$template_id); $carrier_id = preg_replace('/[^-_0-9\p{L}]/u','',$carrier_id); $source_carrier = preg_replace('/[^-_0-9\p{L}]/u','',$source_carrier); $group_alias_id = preg_replace('/[^-_0-9\p{L}]/u','',$group_alias_id); $default_group_alias = preg_replace('/[^-_0-9\p{L}]/u','',$default_group_alias); $vtiger_search_dead = preg_replace('/[^-_0-9\p{L}]/u','',$vtiger_search_dead); $menu_id = preg_replace('/[^-_0-9\p{L}]/u','',$menu_id); $source_menu = preg_replace('/[^-_0-9\p{L}]/u','',$source_menu); $call_time_id = preg_replace('/[^-_0-9\p{L}]/u','',$call_time_id); $phone_context = preg_replace('/[^-_0-9\p{L}]/u','',$phone_context); $new_conf_secret = preg_replace('/[^-_0-9\p{L}]/u','',$new_conf_secret); $conf_secret = preg_replace('/[^-_0-9\p{L}]/u','',$conf_secret); $tracking_group = preg_replace('/[^-_0-9\p{L}]/u','',$tracking_group); $no_agent_no_queue = preg_replace('/[^-_0-9\p{L}]/u','',$no_agent_no_queue); $no_agent_action = preg_replace('/[^-_0-9\p{L}]/u','',$no_agent_action); $quick_transfer_button = preg_replace('/[^-_0-9\p{L}]/u','',$quick_transfer_button); $prepopulate_transfer_preset = preg_replace('/[^-_0-9\p{L}]/u','',$prepopulate_transfer_preset); $tts_id = preg_replace('/[^-_0-9\p{L}]/u','',$tts_id); $drop_rate_group = preg_replace('/[^-_0-9\p{L}]/u','',$drop_rate_group); $agent_dial_owner_only = preg_replace('/[^-_0-9\p{L}]/u','',$agent_dial_owner_only); $reset_time = preg_replace('/[^-_0-9\p{L}]/u','',$reset_time); $moh_id = preg_replace('/[^-_0-9\p{L}]/u','',$moh_id); $mohsuggest = preg_replace('/[^-_0-9\p{L}]/u','',$mohsuggest); $drop_inbound_group_override = preg_replace('/[^-_0-9\p{L}]/u','',$drop_inbound_group_override); $timer_action = preg_replace('/[^-_0-9\p{L}]/u','',$timer_action); $record_call = preg_replace('/[^-_0-9\p{L}]/u','',$record_call); $scheduled_callbacks_alert = preg_replace('/[^-_0-9\p{L}]/u','',$scheduled_callbacks_alert); $extension_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$extension_group_id); $extension_group = preg_replace('/[^-_0-9\p{L}]/u','',$extension_group); $scheduled_callbacks_count = preg_replace('/[^-_0-9\p{L}]/u','',$scheduled_callbacks_count); $manual_dial_override = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_override); $blind_monitor_warning = preg_replace('/[^-_0-9\p{L}]/u','',$blind_monitor_warning); $uniqueid_status_display = preg_replace('/[^-_0-9\p{L}]/u','',$uniqueid_status_display); $hold_time_option_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_option_callmenu); $inbound_queue_no_dial = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_queue_no_dial); $hold_time_second_option = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_second_option); $hold_time_third_option = preg_replace('/[^-_0-9\p{L}]/u','',$hold_time_third_option); $wait_hold_option_priority = preg_replace('/[^-_0-9\p{L}]/u','',$wait_hold_option_priority); $wait_time_option = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_option); $wait_time_second_option = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_second_option); $wait_time_third_option = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_third_option); $wait_time_option_xfer_group = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_option_xfer_group); $wait_time_option_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_option_callmenu); $wait_time_option_voicemail = preg_replace('/[^-_0-9\p{L}]/u','',$wait_time_option_voicemail); $filter_phone_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$filter_phone_group_id); $filter_action = preg_replace('/[^-_0-9\p{L}]/u','',$filter_action); $filter_user_unavailable_action = preg_replace('/[^-_0-9\p{L}]/u','',$filter_user_unavailable_action); $filter_user_route_settings_ingroup = preg_replace('/[^-_0-9\p{L}]/u','',$filter_user_route_settings_ingroup); $filter_agent_search_method = preg_replace('/[^-_0-9\p{L}]/u','',$filter_agent_search_method); $filter_campaign_id = preg_replace('/[^-_0-9\p{L}]/u','',$filter_campaign_id); $filter_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$filter_group_id); $filter_menu_id = preg_replace('/[^-_0-9\p{L}]/u','',$filter_menu_id); $filter_call_handle_method = preg_replace('/[^-_0-9\p{L}]/u','',$filter_call_handle_method); $filter_user = preg_replace('/[^-_0-9\p{L}]/u','',$filter_user); $filter_exten_context = preg_replace('/[^-_0-9\p{L}]/u','',$filter_exten_context); $webphone_systemkey = preg_replace('/[^-_0-9\p{L}]/u','',$webphone_systemkey); $webphone_dialpad = preg_replace('/[^-_0-9\p{L}]/u','',$webphone_dialpad); $webphone_systemkey_override = preg_replace('/[^-_0-9\p{L}]/u','',$webphone_systemkey_override); $webphone_dialpad_override = preg_replace('/[^-_0-9\p{L}]/u','',$webphone_dialpad_override); $default_phone_registration_password = preg_replace('/[^-_0-9\p{L}]/u','',$default_phone_registration_password); $default_phone_login_password = preg_replace('/[^-_0-9\p{L}]/u','',$default_phone_login_password); $default_server_password = preg_replace('/[^-_0-9\p{L}]/u','',$default_server_password); $ivr_park_call = preg_replace('/[^-_0-9\p{L}]/u','',$ivr_park_call); $manual_preview_dial = preg_replace('/[^-_0-9\p{L}]/u','',$manual_preview_dial); $realtime_agent_time_stats = preg_replace('/[^-_0-9\p{L}]/u','',$realtime_agent_time_stats); $api_manual_dial = preg_replace('/[^-_0-9\p{L}]/u','',$api_manual_dial); $manual_dial_call_time_check = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_call_time_check); $lead_order_secondary = preg_replace('/[^-_0-9\p{L}]/u','',$lead_order_secondary); $agent_lead_search = preg_replace('/[^-_0-9\p{L}]/u','',$agent_lead_search); $agent_lead_search_method = preg_replace('/[^-_0-9\p{L}]/u','',$agent_lead_search_method); $manual_dial_cid = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_cid); $post_phone_time_diff_alert = preg_replace('/[^-_0-9\p{L}]/u','',$post_phone_time_diff_alert); $custom_3way_button_transfer = preg_replace('/[^-_0-9\p{L}]/u','',$custom_3way_button_transfer); # $available_only_tally_threshold_agents = preg_replace('/[^-_0-9\p{L}]/u','',$available_only_tally_threshold_agents); Numeric - already filtered further up # $dial_level_threshold_agents = preg_replace('/[^-_0-9\p{L}]/u','',$dial_level_threshold_agents); Numeric - already filtered further up $time_zone_setting = preg_replace('/[^-_0-9\p{L}]/u','',$time_zone_setting); $safe_harbor_menu_id = preg_replace('/[^-_0-9\p{L}]/u','',$safe_harbor_menu_id); $survey_menu_id = preg_replace('/[^-_0-9\p{L}]/u','',$survey_menu_id); $dl_diff_target_method = preg_replace('/[^-_0-9\p{L}]/u','',$dl_diff_target_method); $disable_dispo_screen = preg_replace('/[^-_0-9\p{L}]/u','',$disable_dispo_screen); $screen_labels = preg_replace('/[^-_0-9\p{L}]/u','',$screen_labels); $label_hide_field_logs = preg_replace('/[^-_0-9\p{L}]/u','',$label_hide_field_logs); $label_id = preg_replace('/[^-_0-9\p{L}]/u','',$label_id); $status_display_fields = preg_replace('/[^-_0-9\p{L}]/u','',$status_display_fields); $voicemail_timezone = preg_replace('/[^-_0-9\p{L}]/u','',$voicemail_timezone); $default_voicemail_timezone = preg_replace('/[^-_0-9\p{L}]/u','',$default_voicemail_timezone); $on_hook_cid = preg_replace('/[^-_0-9\p{L}]/u','',$on_hook_cid); $pllb_grouping = preg_replace('/[^-_0-9\p{L}]/u','',$pllb_grouping); $user_start = preg_replace('/[^-_0-9\p{L}]/u','',$user_start); $drop_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$drop_callmenu); $after_hours_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$after_hours_callmenu); $survey_recording = preg_replace('/[^-_0-9\p{L}]/u','',$survey_recording); $dtmf_field = preg_replace('/[^-_0-9\p{L}]/u','',$dtmf_field); $preset_contact_search = preg_replace('/[^-_0-9\p{L}]/u','',$preset_contact_search); $admin_hide_phone_data = preg_replace('/[^-_0-9\p{L}]/u','',$admin_hide_phone_data); $max_calls_method = preg_replace('/[^-_0-9\p{L}]/u','',$max_calls_method); $max_calls_action = preg_replace('/[^-_0-9\p{L}]/u','',$max_calls_action); $in_group_dial = preg_replace('/[^-_0-9\p{L}]/u','',$in_group_dial); $in_group_dial_select = preg_replace('/[^-_0-9\p{L}]/u','',$in_group_dial_select); $queuemetrics_socket = preg_replace('/[^-_0-9\p{L}]/u','',$queuemetrics_socket); $holiday_id = preg_replace('/[^-_0-9\p{L}]/u','',$holiday_id); $holiday_date = preg_replace('/[^-_0-9\p{L}]/u','',$holiday_date); $holiday_status = preg_replace('/[^-_0-9\p{L}]/u','',$holiday_status); $expiration_date = preg_replace('/[^-_0-9\p{L}]/u','',$expiration_date); $amd_inbound_group = preg_replace('/[^-_0-9\p{L}]/u','',$amd_inbound_group); $amd_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$amd_callmenu); $filter_inbound_number = preg_replace('/[^-_0-9\p{L}]/u','',$filter_inbound_number); $filter_dnc_campaign = preg_replace('/[^-_0-9\p{L}]/u','',$filter_dnc_campaign); $manual_dial_search_checkbox = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_search_checkbox); $alt_number_dialing = preg_replace('/[^-_0-9\p{L}]/u','',$alt_number_dialing); $no_agent_ingroup_redirect = preg_replace('/[^-_0-9\p{L}]/u','',$no_agent_ingroup_redirect); $no_agent_ingroup_id = preg_replace('/[^-_0-9\p{L}]/u','',$no_agent_ingroup_id); $pre_filter_phone_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$pre_filter_phone_group_id); $shift_enforcement = preg_replace('/[^-_0-9\p{L}]/u','',$shift_enforcement); $comments_all_tabs = preg_replace('/[^-_0-9\p{L}]/u','',$comments_all_tabs); $comments_dispo_screen = preg_replace('/[^-_0-9\p{L}]/u','',$comments_dispo_screen); $comments_callback_screen = preg_replace('/[^-_0-9\p{L}]/u','',$comments_callback_screen); $qc_comment_history = preg_replace('/[^-_0-9\p{L}]/u','',$qc_comment_history); $language_method = preg_replace('/[^-_0-9\p{L}]/u','',$language_method); $manual_dial_override_field = preg_replace('/[^-_0-9\p{L}]/u','',$manual_dial_override_field); $max_queue_ingroup_id = preg_replace('/[^-_0-9\p{L}]/u','',$max_queue_ingroup_id); $agent_debug_logging = preg_replace('/[^-_0-9\p{L}]/u','',$agent_debug_logging); $container_id = preg_replace('/[^-_0-9\p{L}]/u','',$container_id); $phone_defaults_container = preg_replace('/[^-_0-9\p{L}]/u','',$phone_defaults_container); $container_type = preg_replace('/[^-_0-9\p{L}]/u','',$container_type); $status_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$status_group_id); $unavail_dialplan_fwd_exten = preg_replace('/[^-_0-9\p{L}]/u','',$unavail_dialplan_fwd_exten); $unavail_dialplan_fwd_context = preg_replace('/[^-_0-9\p{L}]/u','',$unavail_dialplan_fwd_context); $nva_search_method = preg_replace('/[^-_0-9\p{L}]/u','',$nva_search_method); $on_hook_cid_number = preg_replace('/[^-_0-9\p{L}]/u','',$on_hook_cid_number); $colors_id = preg_replace('/[^-_0-9\p{L}]/u','',$colors_id); $agent_screen_colors = preg_replace('/[^-_0-9\p{L}]/u','',$agent_screen_colors); $customer_chat_screen_colors = preg_replace('/[^-_0-9\p{L}]/u','',$customer_chat_screen_colors); $web_loader_phone_length = preg_replace('/[^-_0-9\p{L}]/u','',$web_loader_phone_length); $agent_chat_screen_colors = preg_replace('/[^-_0-9\p{L}]/u','',$agent_chat_screen_colors); $populate_lead_province = preg_replace('/[^-_0-9\p{L}]/u','',$populate_lead_province); $populate_lead_owner = preg_replace('/[^-_0-9\p{L}]/u','',$populate_lead_owner); $areacode_filter = preg_replace('/[^-_0-9\p{L}]/u','',$areacode_filter); $areacode_filter_action = preg_replace('/[^-_0-9\p{L}]/u','',$areacode_filter_action); $report_id = preg_replace('/[^-_0-9\p{L}]/u','',$report_id); $report_destination = preg_replace('/[^-_0-9\p{L}]/u','',$report_destination); $report_times = preg_replace('/[^-_0-9\p{L}]/u','',$report_times); $report_monthdays = preg_replace('/[^-_0-9\p{L}]/u','',$report_monthdays); $populate_state_areacode = preg_replace('/[^-_0-9\p{L}]/u','',$populate_state_areacode); $dl_id = preg_replace('/[^-_0-9\p{L}]/u','',$dl_id); $duplicate_check = preg_replace('/[^-_0-9\p{L}]/u','',$duplicate_check); $dl_times = preg_replace('/[^-_0-9\p{L}]/u','',$dl_times); $dl_monthdays = preg_replace('/[^-_0-9\p{L}]/u','',$dl_monthdays); $use_custom_cid = preg_replace('/[^-_0-9\p{L}]/u','',$use_custom_cid); $system_ip_blacklist = preg_replace('/[^-_0-9\p{L}]/u','',$system_ip_blacklist); $admin_ip_list = preg_replace('/[^-_0-9\p{L}]/u','',$admin_ip_list); $agent_ip_list = preg_replace('/[^-_0-9\p{L}]/u','',$agent_ip_list); $api_ip_list = preg_replace('/[^-_0-9\p{L}]/u','',$api_ip_list); $ip_list_id = preg_replace('/[^-_0-9\p{L}]/u','',$ip_list_id); $inbound_survey_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_survey_callmenu); $filename_override = preg_replace('/[^-_0-9\p{L}]/u','',$filename_override); $did_id = preg_replace('/[^-_0-9\p{L}]/u','',$did_id); $extension_appended_cidname = preg_replace('/[^-_0-9\p{L}]/u','',$extension_appended_cidname); $max_inbound_calls_outcome = preg_replace('/[^-_0-9\p{L}]/u','',$max_inbound_calls_outcome); $manual_auto_next_options = preg_replace('/[^-_0-9\p{L}]/u','',$manual_auto_next_options); $agent_screen_time_display = preg_replace('/[^-_0-9\p{L}]/u','',$agent_screen_time_display); $get_call_launch = preg_replace('/[^-_0-9\p{L}]/u','',$get_call_launch); $next_dial_my_callbacks = preg_replace('/[^-_0-9\p{L}]/u','',$next_dial_my_callbacks); $anyone_callback_inactive_lists = preg_replace('/[^-_0-9\p{L}]/u','',$anyone_callback_inactive_lists); $inbound_no_agents_no_dial_container = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_no_agents_no_dial_container); $closing_time_action = preg_replace('/[^-_0-9\p{L}]/u','',$closing_time_action); $closing_time_option_exten = preg_replace('/[^-_0-9\p{L}]/u','',$closing_time_option_exten); $closing_time_option_callmenu = preg_replace('/[^-_0-9\p{L}]/u','',$closing_time_option_callmenu); $closing_time_option_voicemail = preg_replace('/[^-_0-9\p{L}]/u','',$closing_time_option_voicemail); $closing_time_option_callback_list_id = preg_replace('/[^-_0-9\p{L}]/u','',$closing_time_option_callback_list_id); $icbq_call_time_id = preg_replace('/[^-_0-9\p{L}]/u','',$icbq_call_time_id); $add_lead_timezone = preg_replace('/[^-_0-9\p{L}]/u','',$add_lead_timezone); $icbq_dial_filter = preg_replace('/[^-_0-9\p{L}]/u','',$icbq_dial_filter); $cid_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$cid_group_id); $cid_group_id_two = preg_replace('/[^-_0-9\p{L}]/u','',$cid_group_id_two); $cid_group_type = preg_replace('/[^-_0-9\p{L}]/u','',$cid_group_type); $populate_lead_source = preg_replace('/[^-_0-9\p{L}]/u','',$populate_lead_source); $dead_trigger_action = preg_replace('/[^-_0-9\p{L}]/u','',$dead_trigger_action); $dead_trigger_repeat = preg_replace('/[^-_0-9\p{L}]/u','',$dead_trigger_repeat); $cid_cb_confirm_number = preg_replace('/[^-_0-9\p{L}]/u','',$cid_cb_confirm_number); $cid_cb_invalid_filter_phone_group = preg_replace('/[^-_0-9\p{L}]/u','',$cid_cb_invalid_filter_phone_group); $scheduled_callbacks_auto_reschedule = preg_replace('/[^-_0-9\p{L}]/u','',$scheduled_callbacks_auto_reschedule); $scheduled_callbacks_timezones_container = preg_replace('/[^-_0-9\p{L}]/u','',$scheduled_callbacks_timezones_container); $three_way_volume_buttons = preg_replace('/[^-_0-9\p{L}]/u','',$three_way_volume_buttons); $callback_dnc = preg_replace('/[^-_0-9\p{L}]/u','',$callback_dnc); $hide_call_log_info = preg_replace('/[^-_0-9\p{L}]/u','',$hide_call_log_info); $hide_call_log_info_users = preg_replace('/[^-_0-9\p{L}]/u','',$hide_call_log_info_users); # $call_quota_lead_ranking = preg_replace('/[^-_0-9\p{L}]/u','',$call_quota_lead_ranking); $call_quota_lead_ranking_campaigns = preg_replace('/[^-_0-9\p{L}]/u','',$call_quota_lead_ranking_campaigns); $call_quota_lead_ranking_system = preg_replace('/[^-_0-9\p{L}]/u','',$call_quota_lead_ranking_system); # $sip_event_logging = preg_replace('/[^-_0-9\p{L}]/u','',$sip_event_logging); $sip_event_logging_system = preg_replace('/[^-_0-9\p{L}]/u','',$sip_event_logging_system); $sip_event_logging_campaign = preg_replace('/[^-_0-9\p{L}]/u','',$sip_event_logging_campaign); $auto_active_list_new = preg_replace('/[^-_0-9\p{L}]/u','',$auto_active_list_new); $script_id = preg_replace('/[^-_0-9\p{L}]/u','',$script_id); $ingroup_script = preg_replace('/[^-_0-9\p{L}]/u','',$ingroup_script); $ingroup_script_two = preg_replace('/[^-_0-9\p{L}]/u','',$ingroup_script_two); $campaign_script = preg_replace('/[^-_0-9\p{L}]/u','',$campaign_script); $campaign_script_two = preg_replace('/[^-_0-9\p{L}]/u','',$campaign_script_two); $leave_vm_message_group_id = preg_replace('/[^-_0-9\p{L}]/u','',$leave_vm_message_group_id); $dial_timeout_lead_container = preg_replace('/[^-_0-9\p{L}]/u','',$dial_timeout_lead_container); $amd_type = preg_replace('/[^-_0-9\p{L}]/u','',$amd_type); $recording_buttons = preg_replace('/[^-_0-9\p{L}]/u','',$recording_buttons); $use_other_campaign_dnc = preg_replace('/[^-_0-9\p{L}]/u','',$use_other_campaign_dnc); # $browser_alert_sound = preg_replace('/[^-_0-9\p{L}]/u','',$browser_alert_sound); $browser_alert_sound_campaigns = preg_replace('/[^-_0-9\p{L}]/u','',$browser_alert_sound_campaigns); $browser_alert_sound_ingroups = preg_replace('/[^-_0-9\p{L}]/u','',$browser_alert_sound_ingroups); $three_way_record_stop_exception = preg_replace('/[^-_0-9\p{L}]/u','',$three_way_record_stop_exception); $queuemetrics_pausereason = preg_replace('/[^-_0-9\p{L}]/u','',$queuemetrics_pausereason); $answer_signal = preg_replace('/[^-_0-9\p{L}]/u','',$answer_signal); $answer_signal_callmenus = preg_replace('/[^-_0-9\p{L}]/u','',$answer_signal_callmenus); $answer_signal_ingroups = preg_replace('/[^-_0-9\p{L}]/u','',$answer_signal_groups); $inbound_drop_voicemail = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_drop_voicemail); $inbound_after_hours_voicemail = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_after_hours_voicemail); $pause_max_exceptions = preg_replace('/[^-_0-9\p{L}]/u','',$pause_max_exceptions); $two_factor_container = preg_replace('/[^-_0-9\p{L}]/u','',$two_factor_container); $calls_inqueue_count_one = preg_replace('/[^-_0-9\p{L}]/u','',$calls_inqueue_count_one); $calls_inqueue_count_two = preg_replace('/[^-_0-9\p{L}]/u','',$calls_inqueue_count_two); $drop_call_seconds_override = preg_replace('/[^-_0-9\p{L}]/u','',$drop_call_seconds_override); $in_man_dial_next_ready_seconds_override = preg_replace('/[^-_0-9\p{L}]/u','',$in_man_dial_next_ready_seconds_override); $call_limit_24hour_method = preg_replace('/[^-_0-9\p{L}]/u','',$call_limit_24hour_method); $call_limit_24hour_scope = preg_replace('/[^-_0-9\p{L}]/u','',$call_limit_24hour_scope); $call_limit_24hour_override = preg_replace('/[^-_0-9\p{L}]/u','',$call_limit_24hour_override); $in_queue_nanque_exceptions = preg_replace('/[^-_0-9\p{L}]/u','',$in_queue_nanque_exceptions); $queue_group = preg_replace('/[^-_0-9\p{L}]/u','',$queue_group); $pre_filter_recent_call = preg_replace('/[^-_0-9\p{L}]/u','',$pre_filter_recent_call); $pre_filter_recent_extension = preg_replace('/[^-_0-9\p{L}]/u','',$pre_filter_recent_extension); $agent_script_override = preg_replace('/[^-_0-9\p{L}]/u','',$agent_script_override); $inbound_list_script_override = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_list_script_override); $user_group_two = preg_replace('/[^-_0-9\p{L}]/u','',$user_group_two); $agent_hangup_route = preg_replace('/[^-_0-9\p{L}]/u','',$agent_hangup_route); $show_confetti = preg_replace('/[^-_0-9\p{L}]/u','',$show_confetti); $webphone_settings = preg_replace('/[^-_0-9\p{L}]/u','',$webphone_settings); # $demographic_quotas = preg_replace('/[^-_0-9\p{L}]/u','',$demographic_quotas); $demographic_quotas_system = preg_replace('/[^-_0-9\p{L}]/u','',$demographic_quotas_system); $demographic_quotas_campaigns = preg_replace('/[^-_0-9\p{L}]/u','',$demographic_quotas_campaigns); $demographic_quotas_container = preg_replace('/[^-_0-9\p{L}]/u','',$demographic_quotas_container); $weekday_resets_container = preg_replace('/[^-_0-9\p{L}]/u','',$weekday_resets_container); $second_alert_container = preg_replace('/[^-_0-9\p{L}]/u','',$second_alert_container); $second_alert_only = preg_replace('/[^-_0-9\p{L}]/u','',$second_alert_only); $third_alert_container = preg_replace('/[^-_0-9\p{L}]/u','',$third_alert_container); $third_alert_only = preg_replace('/[^-_0-9\p{L}]/u','',$third_alert_only); $state_descriptions = preg_replace('/[^-_0-9\p{L}]/u','',$state_descriptions); $khomp_settings_container = preg_replace('/[^-_0-9\p{L}]/u','',$khomp_settings_container); $agent_man_dial_filter = preg_replace('/[^-_0-9\p{L}]/u','',$agent_man_dial_filter); $agent_3way_dial_filter = preg_replace('/[^-_0-9\p{L}]/u','',$agent_3way_dial_filter); $xfer_min_container = preg_replace('/[^-_0-9\p{L}]/u','',$xfer_min_container); $amd_status_map = preg_replace('/[^-_0-9\p{L}]/u','',$amd_status_map); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$menu_timeout_prompt); $menu_invalid_prompt = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$menu_invalid_prompt); $after_hours_message_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$after_hours_message_filename); $welcome_message_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$welcome_message_filename); $onhold_prompt_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$onhold_prompt_filename); $hold_time_option_callback_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$hold_time_option_callback_filename); $agent_alert_exten = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$agent_alert_exten); $filename = preg_replace('/[^-\/\._0-9\p{L}]/u','',$filename); $am_message_exten = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$am_message_exten); $am_message_exten_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$am_message_exten_override); $campaign_groups = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$campaign_groups); $blind_monitor_filename = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$blind_monitor_filename); $hold_time_option_press_filename = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$hold_time_option_press_filename); $default_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$default_afterhours_filename_override); $sunday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$sunday_afterhours_filename_override); $monday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$monday_afterhours_filename_override); $tuesday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$tuesday_afterhours_filename_override); $wednesday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$wednesday_afterhours_filename_override); $thursday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$thursday_afterhours_filename_override); $friday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$friday_afterhours_filename_override); $saturday_afterhours_filename_override = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$saturday_afterhours_filename_override); $admin_web_directory = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$admin_web_directory); $tts_voice = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$tts_voice); $wait_time_option_callback_filename = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$wait_time_option_callback_filename); $wait_time_option_press_filename = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$wait_time_option_press_filename); $eht_minimum_prompt_filename = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$eht_minimum_prompt_filename); $queuemetrics_phone_environment = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$queuemetrics_phone_environment); $active_twin_server_ip = preg_replace('/[^-\|\/\._0-9\p{L}]/u','',$active_twin_server_ip); $safe_harbor_audio = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$safe_harbor_audio); $alt_log_server_ip = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$alt_log_server_ip); $alt_log_dbname = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$alt_log_dbname); $alt_log_login = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$alt_log_login); $alt_log_pass = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$alt_log_pass); $coldstorage_server_ip = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$coldstorage_server_ip); $coldstorage_dbname = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$coldstorage_dbname); $coldstorage_login = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$coldstorage_login); $coldstorage_pass = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$coldstorage_pass); $coldstorage_port = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$coldstorage_port); $survey_first_audio_file = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$survey_first_audio_file); $survey_opt_in_audio_file = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$survey_opt_in_audio_file); $survey_ni_audio_file = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$survey_ni_audio_file); $survey_third_audio_file = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$survey_third_audio_file); $survey_fourth_audio_file = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$survey_fourth_audio_file); $safe_harbor_audio_field = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$safe_harbor_audio_field); $voicemail_greeting = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$voicemail_greeting); $old_voicemail_greeting = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$old_voicemail_greeting); $meetme_enter_login_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$meetme_enter_login_filename); $meetme_enter_leave3way_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$meetme_enter_leave3way_filename); $nva_error_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$nva_error_filename); $inbound_survey_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$inbound_survey_filename); $inbound_survey_question_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$inbound_survey_question_filename); $closing_time_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$closing_time_filename); $closing_time_end_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$closing_time_end_filename); $dead_trigger_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$dead_trigger_filename); $cid_cb_valid_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_valid_filename); $cid_cb_confirmed_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_confirmed_filename); $cid_cb_enter_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_enter_filename); $cid_cb_you_entered_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_you_entered_filename); $cid_cb_press_to_confirm_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_press_to_confirm_filename); $cid_cb_invalid_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_invalid_filename); $cid_cb_reenter_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_reenter_filename); $cid_cb_error_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$cid_cb_error_filename); $place_in_line_caller_number_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$place_in_line_caller_number_filename); $place_in_line_you_next_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$place_in_line_you_next_filename); $audio_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$audio_filename); $agent_hangup_value = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$agent_hangup_value); $second_alert_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$second_alert_filename); $third_alert_filename = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$third_alert_filename); ### ALPHA-NUMERIC and underscore and dash and slash and dot and comma $menu_prompt = preg_replace('/[^-\/\|\,\._0-9\p{L}]/u','',$menu_prompt); ### ALPHA-NUMERIC and underscore and dash and comma $logins_list = preg_replace('/[^-\,\_0-9\p{L}]/u','',$logins_list); $forced_timeclock_login = preg_replace('/[^-\,\_0-9\p{L}]/u','',$forced_timeclock_login); $uniqueid_status_prefix = preg_replace('/[^-\,\_0-9\p{L}]/u','',$uniqueid_status_prefix); ### ALPHA-NUMERIC and spaces $lead_order = preg_replace('/[^ 0-9\p{L}]/u','',$lead_order); ### ALPHA-NUMERIC and spaces and dashes and underscores $preset_name = preg_replace('/[^- \_0-9\p{L}]/u','',$preset_name); $selected_language = preg_replace('/[^- \_0-9\p{L}]/u','',$selected_language); $default_language = preg_replace('/[^- \_0-9\p{L}]/u','',$default_language); # $opensips_cid_name = preg_replace('/[^- \_0-9\p{L}]/u','',$opensips_cid_name); $max_system_stats_submit = preg_replace('/[^- \_0-9\p{L}]/u','',$max_system_stats_submit); $opensips_cid_name_campaigns = preg_replace('/[^- \_0-9\p{L}]/u','',$opensips_cid_name_campaigns); $opensips_cid_name_system = preg_replace('/[^- \_0-9\p{L}]/u','',$opensips_cid_name_system); ### ALPHA-NUMERIC and hash $group_color = preg_replace('/[^\#0-9\p{L}]/u','',$group_color); $script_color = preg_replace('/[^\#0-9\p{L}]/u','',$script_color); ### ALPHA-NUMERIC and hash and star and dot and underscore $hold_time_option_exten = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$hold_time_option_exten); $voicemail_ext = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$voicemail_ext); $phone = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$phone); $phone_code = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$phone_code); $wait_time_option_exten = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$wait_time_option_exten); $filter_voicemail_ext = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$filter_voicemail_ext); $filter_phone_code = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$filter_phone_code); $filter_phone = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$filter_phone); $preset_number = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$preset_number); $no_agent_ingroup_extension = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$no_agent_ingroup_extension); $pre_filter_extension = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$pre_filter_extension); $max_queue_ingroup_extension = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$max_queue_ingroup_extension); $report_server = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$report_server); $dl_server = preg_replace('/[^\*\#\.\_0-9\p{L}]/u','',$dl_server); ### ALPHA-NUMERIC and hash and star and dot and underscore and colon and plus sign $did_pattern = preg_replace('/[^:\+\*\#\.\_0-9\p{L}]/u','',$did_pattern); $web_loader_phone_strip = preg_replace('/[^:\+\*\#\.\_0-9\p{L}]/u','',$web_loader_phone_strip); $manual_dial_phone_strip = preg_replace('/[^:\+\*\#\.\_0-9\p{L}]/u','',$manual_dial_phone_strip); $mobile_number = preg_replace('/[^:\+\*\#\.\_0-9\p{L}]/u','',$mobile_number); ### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores $adaptive_dl_diff_target = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$adaptive_dl_diff_target); $adaptive_intensity = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$adaptive_intensity); $asterisk_version = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$asterisk_version); $call_time_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$call_time_comments); $call_time_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$call_time_name); $campaign_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$campaign_name); $campaign_rec_filename = preg_replace('/[^-\.\_0-9\p{L}]/u','',$campaign_rec_filename); $ingroup_rec_filename = preg_replace('/[^-\.\_0-9\p{L}]/u','',$ingroup_rec_filename); $company = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$company); $full_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$full_name); $fullname = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$fullname); $group_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$group_name); $HKstatus = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$HKstatus); $lead_filter_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$lead_filter_comments); $lead_filter_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$lead_filter_name); $list_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$list_name); $local_gmt = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$local_gmt); $new_fullname = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$new_fullname); $phone_type = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$phone_type); $picture = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$picture); $script_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$script_comments); $script_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$script_name); $server_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$server_description); $status = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$status); $status_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$status_name); $wrapup_message = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$wrapup_message); $pause_code_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$pause_code_name); $campaign_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$campaign_description); $list_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$list_description); $vcl_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$vcl_name); $vsc_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$vsc_name); $vsc_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$vsc_description); $code_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$code_name); $alias_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$alias_name); $shift_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$shift_name); $did_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$did_description); $template_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$template_name); $carrier_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$carrier_name); $group_alias_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$group_alias_name); $caller_id_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$caller_id_name); $user_code = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_code); $territory = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$territory); $tts_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$tts_name); $moh_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$moh_name); $timer_action_message = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$timer_action_message); $default_codecs = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$default_codecs); $codecs_list = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$codecs_list); $label_title = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_title); $label_first_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_first_name); $label_middle_initial = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_middle_initial); $label_last_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_last_name); $label_address1 = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_address1); $label_address2 = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_address2); $label_address3 = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_address3); $label_city = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_city); $label_state = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_state); $label_province = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_province); $label_postal_code = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_postal_code); $label_vendor_lead_code = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_vendor_lead_code); $label_gender = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_gender); $label_phone_number = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_phone_number); $label_phone_code = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_phone_code); $label_alt_phone = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_alt_phone); $label_security_phrase = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_security_phrase); $label_email = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_email); $label_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_comments); $slave_db_server = preg_replace('/[^- \.\,\:\_0-9\p{L}]/u','',$slave_db_server); $filter_phone_group_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$filter_phone_group_name); $filter_phone_group_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$filter_phone_group_description); $filter_clean_cid_number = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$filter_clean_cid_number); $label_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_name); $default_local_gmt = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$default_local_gmt); $cid_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$cid_description); $description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$description); $first_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$first_name); $last_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$last_name); $bu_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$bu_name); $department = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$department); # $group = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$group); NOT USED $job_title = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$job_title); $location = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$location); $holiday_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$holiday_name); $holiday_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$holiday_comments); $api_allowed_functions = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$api_allowed_functions); $agent_display_fields = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$agent_display_fields); $container_notes = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$container_notes); $did_carrier_description = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$did_carrier_description); $status_group_notes = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$status_group_notes); $colors_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$colors_name); $web_logo = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$web_logo); $user_nickname = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_nickname); $customer_chat_survey_text = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$customer_chat_survey_text); $agent_script = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$agent_script); $report_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$report_name); $dl_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$dl_name); $drop_status = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$drop_status); $ip_list_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$ip_list_name); $cid_group_notes = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$cid_group_notes); $populate_lead_vendor = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$populate_lead_vendor); $leave_vm_message_group_notes = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$leave_vm_message_group_notes); $audio_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$audio_name); $populate_lead_comments = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$populate_lead_comments); $label_lead_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_lead_id); $label_list_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_list_id); $label_entry_date = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_entry_date); $label_gmt_offset_now = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_gmt_offset_now); $label_source_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_source_id); $label_called_since_last_reset = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_called_since_last_reset); $label_status = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_status); $label_user = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_user); $label_date_of_birth = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_date_of_birth); $label_country_code = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_country_code); $label_last_local_call_time = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_last_local_call_time); $label_called_count = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_called_count); $label_rank = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_rank); $label_owner = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_owner); $label_entry_list_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$label_entry_list_id); $user_location = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_location); $queue_group_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$queue_group_name); $qc_scorecard_id = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$qc_scorecard_id); $city_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$city_rule); $county_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$county_rule); $ac_rule = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$ac_rule); $stage = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$stage); $stereo_rec_filename = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$stereo_rec_filename); $parallel_rec_co_filename = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$parallel_rec_co_filename); $parallel_rec_cm_filename = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$parallel_rec_cm_filename); $parallel_rec_fr_filename = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$parallel_rec_fr_filename); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$call_out_number_group); $client_browser = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$client_browser); $DBX_server = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$DBX_server); $DBY_server = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$DBY_server); $dtmf_send_extension = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$dtmf_send_extension); $install_directory = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$install_directory); $old_extension = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$old_extension); $telnet_host = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$telnet_host); $queuemetrics_dbname = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$queuemetrics_dbname); $queuemetrics_login = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$queuemetrics_login); $queuemetrics_pass = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$queuemetrics_pass); $email = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$email); $vtiger_dbname = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$vtiger_dbname); $vtiger_login = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$vtiger_login); $vtiger_pass = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$vtiger_pass); $external_server_ip = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$external_server_ip); $alt_server_ip = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$alt_server_ip); $email_from = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$email_from); $email_to = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$email_to); $ftp_server = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$ftp_server); $ftp_directory = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$ftp_directory); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot and space $custom_one = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$custom_one); $custom_two = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$custom_two); $custom_three = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$custom_three); $custom_four = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$custom_four); $custom_five = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$custom_five); $email_subject = preg_replace('/[^- \.\:\/\@\_0-9\p{L}]/u','',$email_subject); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot and pound and star $extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9\p{L}]/u','',$extension); $extension_dids = preg_replace('/[^-\*\#\.\:\/\@\_0-9\p{L}]/u','',$extension_dids); $new_extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9\p{L}]/u','',$new_extension); $timer_action_destination = preg_replace('/[^-\*\#\.\:\/\@\_0-9\p{L}]/u','',$timer_action_destination); $filter_extension = preg_replace('/[^-\*\#\.\:\/\@\_0-9\p{L}]/u','',$filter_extension); ### ALPHA-NUMERIC and space and underscore and dash and slash and at and dot and pound and star and pipe and comma $ivr_park_call_agi = preg_replace('/[^- \*\#\.\,\:\/\|\@\_0-9\p{L}]/u','',$ivr_park_call_agi); $source_phone = preg_replace('/[^- \*\#\.\,\:\/\|\@\_0-9\p{L}]/u','',$source_phone); ### ALPHA-NUMERIC and space and underscore and dash and slash and at and dot and pound and star and pipe and comma and equal $voicemail_options = preg_replace('/[^- \=\*\#\.\,\:\/\|\@\_0-9\p{L}]/u','',$voicemail_options); ### NUMERIC and comma and pipe $waitforsilence_options = preg_replace('/[^\|\,0-9\p{L}]/u','',$waitforsilence_options); ### value cleaning $no_agent_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9\p{L}]/u','',$no_agent_action_value); $areacode_filter_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9\p{L}]/u','',$areacode_filter_action_value); ### ALPHA-NUMERIC and underscore and dash and slash and at and space and colon $vdc_header_date_format = preg_replace('/[^- \:\/\_0-9\p{L}]/u','',$vdc_header_date_format); $vdc_customer_date_format = preg_replace('/[^- \:\/\_0-9\p{L}]/u','',$vdc_customer_date_format); $menu_name = preg_replace('/[^- \:\/\_0-9\p{L}]/u','',$menu_name); ### ALPHA-NUMERIC and underscore and dash and at and space and parantheses $vdc_header_phone_format = preg_replace('/[^- \(\)\_0-9\p{L}]/u', '',$vdc_header_phone_format); ### ALPHA-NUMERIC and newlines $areacode_list = preg_replace('/[^\n0-9\p{L}]/u', '',$areacode_list); ### ALPHA-NUMERIC and newlines and period and colon $ip_address = preg_replace('/[^\n\.\:\0-9\p{L}]/u', '',$ip_address); } ### remove semi-colons and other special characters ### $lead_filter_sql = preg_replace('/;/','',$lead_filter_sql); $list_mix_container = preg_replace('/;/','',$list_mix_container); $survey_response_digit_map = preg_replace('/;/','',$survey_response_digit_map); $survey_camp_record_dir = preg_replace('/;/','',$survey_camp_record_dir); $conf_override = preg_replace('/;/','',$conf_override); $template_contents = preg_replace('/;/','',$template_contents); $registration_string = preg_replace('/;/','',$registration_string); #$account_entry = preg_replace('/\r/', '',$account_entry); $globals_string = preg_replace('/;/','',$globals_string); $dialplan_entry = preg_replace('/\\\\/', '',$dialplan_entry); $dialplan_entry = preg_replace('/\'/', '',$dialplan_entry); $dialplan_entry = preg_replace('/\r/', '',$dialplan_entry); $custom_dialplan_entry = preg_replace('/\\\\/', '',$custom_dialplan_entry); $custom_dialplan_entry = preg_replace('/\'/', '',$custom_dialplan_entry); $custom_dialplan_entry = preg_replace('/\r/', '',$custom_dialplan_entry); $tts_text = preg_replace('/\\\\/', '',$tts_text); $tts_text = preg_replace('/;/','',$tts_text); $tts_text = preg_replace('/\r/', '',$tts_text); $tts_text = preg_replace('/\"/', '',$tts_text); $carrier_description = preg_replace('/\\\\/', '',$carrier_description); $carrier_description = preg_replace('/;/','',$carrier_description); $carrier_description = preg_replace('/\r/', '',$carrier_description); $carrier_description = preg_replace('/\"/', '',$carrier_description); $blind_monitor_message = preg_replace('/\\\\/', '',$blind_monitor_message); $blind_monitor_message = preg_replace('/;/','',$blind_monitor_message); $blind_monitor_message = preg_replace('/\r/', '',$blind_monitor_message); $blind_monitor_message = preg_replace('/\"/', '',$blind_monitor_message); $modify_url = preg_replace('/\\\\/', '',$modify_url); $modify_url = preg_replace('/;/','',$modify_url); $modify_url = preg_replace('/\r/', '',$modify_url); $modify_url = preg_replace('/\"/', '',$modify_url); $qualify_sql = preg_replace('/\\\\/', '',$qualify_sql); $qualify_sql = preg_replace('/;/','',$qualify_sql); $qualify_sql = preg_replace('/\r/', '',$qualify_sql); $qualify_sql = preg_replace('/\'/', "\"",$qualify_sql); $queuemetrics_socket_url = preg_replace('/\\\\/', '',$queuemetrics_socket_url); $queuemetrics_socket_url = preg_replace('/;/','',$queuemetrics_socket_url); $queuemetrics_socket_url = preg_replace('/\r/', '',$queuemetrics_socket_url); $queuemetrics_socket_url = preg_replace('/\'/', "\"",$queuemetrics_socket_url); $agent_status_viewable_groups = preg_replace('/\\\\/', '',$agent_status_viewable_groups); $agent_status_viewable_groups = preg_replace('/\\\\/', '',$agent_status_viewable_groups); $agent_allowed_chat_groups = preg_replace('/\\\\/', '',$agent_allowed_chat_groups); $agent_allowed_chat_groups = preg_replace('/\\\\/', '',$agent_allowed_chat_groups); $report_url = preg_replace('/\\\\/', '',$report_url); $report_url = preg_replace('/;/','',$report_url); $report_url = preg_replace('/\r|\n/', '',$report_url); $report_url = preg_replace('/\'/', '',$report_url); $agent_push_url = preg_replace('/\\\\/', '',$agent_push_url); $agent_push_url = preg_replace('/;/','',$agent_push_url); $agent_push_url = preg_replace('/\r|\n/', '',$agent_push_url); $agent_push_url = preg_replace('/\'/', '',$agent_push_url); $waiting_call_url_on = preg_replace('/\\\\/', '',$waiting_call_url_on); $waiting_call_url_on = preg_replace('/;/','',$waiting_call_url_on); $waiting_call_url_on = preg_replace('/\r|\n/', '',$waiting_call_url_on); $waiting_call_url_on = preg_replace('/\'/', '',$waiting_call_url_on); $waiting_call_url_off = preg_replace('/\\\\/', '',$waiting_call_url_off); $waiting_call_url_off = preg_replace('/;/','',$waiting_call_url_off); $waiting_call_url_off = preg_replace('/\r|\n/', '',$waiting_call_url_off); $waiting_call_url_off = preg_replace('/\'/', '',$waiting_call_url_off); $sounds_web_server = preg_replace('/\\\\/', '',$sounds_web_server); $sounds_web_server = preg_replace('/;/','',$sounds_web_server); $sounds_web_server = preg_replace('/\r|\n/', '',$sounds_web_server); $sounds_web_server = preg_replace('/\'/', '',$sounds_web_server); $pause_max_url = preg_replace('/\\\\/', '',$pause_max_url); $pause_max_url = preg_replace('/;/','',$pause_max_url); $pause_max_url = preg_replace('/\r|\n/', '',$pause_max_url); $pause_max_url = preg_replace('/\'/', '',$pause_max_url); $apinewlead_url = preg_replace('/\\\\/', '',$apinewlead_url); $apinewlead_url = preg_replace('/;/','',$apinewlead_url); $apinewlead_url = preg_replace('/\r|\n/', '',$apinewlead_url); $apinewlead_url = preg_replace('/\'/', '',$apinewlead_url); ### VARIABLES TO BE mysqli_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 # $add_lead_url # $webphone_url # $webphone_url_override # $filter_url # $na_call_url # $web_form_address_three # $container_entry # $nva_call_url # $web_socket_url # $external_web_socket_url # $customer_chat_survey_link # $ftp_user # $ftp_pass # $webphone_layout # $enter_ingroup_url # $dead_trigger_url # $user_admin_redirect_url # $local_web_callerID_URL # $VICIDIAL_web_URL # $audit_comments # $chat_url # $ara_url # filtered further down in the code # $groups # $XFERgroups # $campaigns # $qc_campaigns # $qc_groups # $qc_statuses # $qc_lists # $shift_weekdays # $group_shifts # $phone_numbers # $list_active_change # $reports_use_slave_db # $custom_reports_use_slave_db # $allowed_reports # $allowed_custom_reports # $tables_use_alt_log_db # $admin_viewable_groups # $admin_viewable_call_times # $territory_reset # $max_inbound_filter_statuses # $max_inbound_filter_ingroups # $included_campaigns # $included_inbound_groups # $allowed_queue_groups # $queue_groups ### VARIABLES optionally filtered: ### # $script_text JS filtering $rjs_debug=''; if ($SSscript_remove_js > 0) { $rjs=0; $rjs_ct=0; $temp_length_a = strlen($script_text); if ($temp_length_a > 7) { while ( ($rjs < 10000000000) and (preg_match("/]*>/is",$script_text)) ) { $temp_length_a = strlen($script_text); $script_text = preg_replace('/]*>(.*?)<\/script\s*>/is','',$script_text); $temp_length_b = strlen($script_text); if ($temp_length_a != $temp_length_b) {$rjs_ct++;} else {$rjs=99999999999;} $rjs++; } $rjsb=0; while ( ($rjsb < 10000000000) and (preg_match("/]*>/is",$script_text)) ) { $temp_length_a = strlen($script_text); $script_text = preg_replace('/]*>/is','',$script_text); $temp_length_b = strlen($script_text); if ($temp_length_a != $temp_length_b) {$rjs_ct++;} else {$rjsb=99999999999;} $rjsb++; } $rjsc=0; while ( ($rjsc < 10000000000) and (preg_match("/javascript:|onabort|onactivate|onafterprint|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onblur|onbounce|oncellchange|onchange|onclick|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavaible|ondatasetchanged|ondatasetcomplete|ondblclick|ondeactivate|ondrag|ondragdrop|ondragend|ondragenter|ondragleave|ondragover|ondragstart|ondrop|onerror|onerrorupdate|onfilterupdate|onfinish|onfocus|onfocusin|onfocusout|onhelp|onkeydown|onkeypress|onkeyup|onlayoutcomplete|onload|onlosecapture|onmousedown|onmouseenter|onmouseleave|onmousemove|onmoveout|onmouseover|onmouseup|onmousewheel|onmove|onmoveend|onmovestart|onpaste|onpropertychange|onreadystatechange|onreset|onresize|onresizeend|onresizestart|onrowexit|onrowsdelete|onrowsinserted|onscroll|onselect|onselectionchange|onselectstart|onstart|onstop|onsubmit|onunload/is",$script_text)) ) { $temp_length_a = strlen($script_text); $script_text = preg_replace('/javascript:|onabort|onactivate|onafterprint|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onblur|onbounce|oncellchange|onchange|onclick|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavaible|ondatasetchanged|ondatasetcomplete|ondblclick|ondeactivate|ondrag|ondragdrop|ondragend|ondragenter|ondragleave|ondragover|ondragstart|ondrop|onerror|onerrorupdate|onfilterupdate|onfinish|onfocus|onfocusin|onfocusout|onhelp|onkeydown|onkeypress|onkeyup|onlayoutcomplete|onload|onlosecapture|onmousedown|onmouseenter|onmouseleave|onmousemove|onmoveout|onmouseover|onmouseup|onmousewheel|onmove|onmoveend|onmovestart|onpaste|onpropertychange|onreadystatechange|onreset|onresize|onresizeend|onresizestart|onrowexit|onrowsdelete|onrowsinserted|onscroll|onselect|onselectionchange|onselectstart|onstart|onstop|onsubmit|onunload/is','',$script_text); $temp_length_b = strlen($script_text); if ($temp_length_a != $temp_length_b) {$rjs_ct++;} else {$rjsc=99999999999;} $rjsc++; } if ($rjs_ct > 0) {$rjs_debug = "\n

Script Text JS Filtered: $rjs_ct
\n";} # $script_text = "PROCESSED:".date("U")."\n".$script_text; } } ##### 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 # 100122-0747 - Added NOT-LOGGED-IN-AGENTS option for User Groups # 100123-1301 - Added DID record call option # 100127-0601 - Added Vtiger ViciDial user_level role lookup # 100127-1546 - Added ignore_list_script_override option for ingroups # 100219-1309 - Added agent dispo log system settings option and user call_log options # 100220-1411 - Added system settings and servers custom_dialplan_entry # 100221-0924 - Added Custom CallerID capability in Campaign settings # 100302-2133 - Added Scheduled Callbacks Alert option # 100309-0510 - Added queuemetrics_loginout option # 100311-2348 - Added CallCard links and settings # 100313-0020 - Added User Group agent screen transfer-conf button display options # 100317-1244 - Added User Group agent_fullscreen option # 100401-0014 - Added agent_choose_blended option # 100405-1425 - Added queuemetrics_callstatus option and full logging of user campaign/in-group settings # 100414-1603 - Added extension_appended_cidname option to campaigns # 100420-1010 - Added scheduled_callbacks_count campaign option # 100423-1030 - Added realtime_block_user_info, manual dial campaign, blind monitor warnings, in-group callid, phones codecs features # 100506-1807 - Added hidden settings for lists custom fields # 100507-1102 - Added hold_time_option_minimum option to in-groups and copy carrier function # 100512-1615 - Added more hold time press-1 options # 100518-0643 - Added inbound_queue_no_dial and call time after hours override features # 100523-0840 - Added inbound prompt and no-block options # 100616-2232 - Added VIDPROMPT call menu options # 100621-1010 - Added admin_web_directory system setting # 100622-1700 - Added custom agent field names for default fields # 100702-1142 - Added FORM get_call_launch option for custom list fields tab in agent interface # 100703-1322 - Added LEADS ability to admin log display # 100709-1025 - Added option for slave DB server to be used for selected reports # 100718-2318 - Added Wait Time options to in-groups # 100720-1332 - Small changes to Phone addition and modification pages # 100723-1519 - Added LOCKED options for Quick Transfer Button in campaigns # 100726-1017 - Added HANGUP, CALLMENU, EXTENSION and IN_GROUP timer actions to campaigns and in-groups # 100802-2130 - Changed Admin links to point to links page instead of Phones listings, changed Remote Agents to allow 9-digit IDs # 100803-1412 - Added allowed_reports option to User Groups, added CAMPLISTS_ALL for manual_dial_filter(issue #369) # - Added allowed_campaigns enforcement for Campaign listings # 100804-2313 - Added filter phone groups section for inbound call filtering by incoming phone number when it comes into a DID # 100805-1539 - Added option to clean up cid numbers when calls come into DIDs # 100806-0607 - Added validation for remote agents settings, user_start must be valid user, number of lines must not overlap # 100811-0827 - Added webphone_url_override to User Groups and calculate_estimated_hold_seconds to In-Groups # 100813-0544 - Added campaign presets and option to hide xfer number to dial # 100815-0802 - Added manual_dial_prefix campaign option # 100817-1243 - Added checking for reserved menu_id on creation of Call Menus # 100823-1501 - Added CallCard search as an available User Group report option # 100827-1535 - Added webphone options for dialpad and systemkey # 100901-2055 - Added password strength grading, force password change, password default settings and first login screen # 100908-0926 - Added 3way hangup logging options to campaigns # 100912-0842 - Several small changes, removed Emergency VDAC clear since it does not do anything anymore # 100927-2321 - Added entry_list_id as a script, webform, dispo_call_url variable # 100928-1634 - Moved Realtime Block User Info user setting into the new ADMIN REPORT OPTIONS section # 100929-1203 - Added add_lead_url feature to In-Groups # 101008-0349 - Added Estimated Hold Time Minimum options, Manual Dial Preview settings and two new variables for recording filenames # 101022-1427 - Added ability to change user in-group prefs from in-group mod screen, added realtime_agent_time_stats campaign option # 101106-1850 - Added admin refrech, no-cache, cross-server-exten, QM-addmember options # 101109-1621 - Added Auto Hopper Level which allows Vicidial to adjust the hopper for a campaign as needed (MikeC) # - Added Auto Trim Hopper which will allow Vicidial to remove excess leads from the hopper (MikeC) # 101115-1355 - Added more options for the concurrent transfer limit campaign setting # 101123-2214 - Added api_manual_dial and manual_dial_call_time_check campaign options # 101127-2232 - Added webform override options to lists # 101208-0341 - Changed some descriptions and field names in Phones # 101209-2027 - Added display_leads_count option for campaign modification screens # 101216-1838 - Changed Realtime report links to go to new realtime_report # 101227-1320 - Added dialplan off toggle options # 110103-1135 - Added queuemetrics_dispo_pause and lead_order_randomize features # 110111-1305 - Added sort by list name for list listings in list section and campaign screens # 110124-1134 - Small query fix for large queue_log tables # 110212-2048 - Added Scheduled Callback as status flag to allow for custom scheduled callback statuses # 110214-0001 - Added campaign settings for lead_order_secondary, per_call_notes and my_callback_option # 110215-1721 - Added add-a-new-lead link to the lists submenu # 110215-2135 - Added agent_lead_search options to user and campaign # 110222-2039 - Added USER, GROUP and TERRITORY restrictions to agent lead search # 110224-1427 - Added queuemetrics_phone_environment and active_twin_server_ip options # 110301-1206 - Added options for ring-all in-group next-agent-call # 110304-1651 - Added DEFER options to the scheduled callbacks alert campaign feature # 110310-0311 - Added pre-call auto-pause and resume with pause code, for auto-pausing of callback-check, lead search, etc... # 110408-0433 - Added Multi-alt block code and system settings reload dialplan setting # 110428-1108 - Added manual_dial_cid campaign option # 110430-1642 - Added post_phone_time_diff_alert campaign option # 110506-1537 - Added custom_3way_button_transfer campaign option # 110514-1351 - Added dial level and available only tally threshold campaign settings, and time zone list setting # 110524-1401 - Small help text fix, issue #486 # 110525-2109 - Added safe_harbor_audio, safe_harbor_menu_id campaign options and dtmf_log call menu option # 110526-1715 - Added webphone_auto_answer option # 110528-2304 - Added campaign survey callmenu option # 110531-2009 - Added callback_days_limit campaign option # 110602-0941 - Added dl_diff_target_method campaign option # 110619-1942 - Added disable_dispo_ agent screen options # 110624-0842 - Added Export Leads Report links and permissions # 110624-2246 - Added Screen Labels subsection for Admin and status_display_fields feature # 110625-2338 - Added queuemetrics_pe_phone_append option # 110703-1400 - Added test_campaign_calls and agents_calls_reset features # 110707-0725 - Added AGENTEXT notes for in-groups settings # 110707-1402 - Added last_inbound_call_time and finish to next agent call options for in-groups # 110727-0130 - Added more voicemail box options and default timezone and voicemail zone to system settings # 110730-2249 - Added DISPO_SELECT_DISABLED option for the Dispo Disable setting in campaigns # 110731-0245 - Added na_call_url options to campaigns and in-groups # 110801-0833 - Added on_hook_cid option for in-groups # 110802-2053 - Added links to Team Performance Detail Report # 110809-1547 - Added no-answer log and alt-log server system settings # 110815-2155 - Added the Campaign Status List Report # 110822-1204 - Added did_agent_log System Settings option # 110829-1600 - Added multiple invalid option to Call Menus # 110829-2129 - Added survey recording option # 110831-2038 - Added Campaign Areacode CID features # 110920-1344 - Added pllb_grouping_limit settings # 110922-1218 - Added new User admin permissions, Added DID Remote Agent extension override section # 110923-0834 - Added option for in-group action transfer cid, and CALLMENU as drop and after-hours action options # 110923-2043 - Added custom DID fields # 111004-1539 - Added dtmf_field call menu option # 111006-1403 - Added several new campaign and other options, call_count_limit, status flag, shift report flag, etc... # 111015-1914 - Added Preset Contact Search options # 111018-1535 - Added more contact fields # 111021-1646 - Added callback_hours_block option # 111024-1234 - Added callback_list_calltime option # 111025-0728 - Added user group to all sections, more user settings # 111102-1930 - Added in-group max_calls_ options # 111106-1116 - Many fixes for user_group restrictions # 111116-0207 - Added ALT and ADDR3 in-group handle methods # 111122-1333 - Added Inbound Daily Report # 111201-0939 - Added graded-random next-agent-call option # 111223-0043 - Added max stats displays for in-groups and , fixed several ereg issues # 111227-1938 - Added Timer Action for Dx_DIAL_QUIET options # 120102-2125 - Added Dialer Inventory Report # 120104-2024 - Changed copyright dates, other small fixes # 120118-2113 - Fixed bugs in phone alias and conf template updates # 120125-1234 - Added Maximum System Stats report and permissions for it and Max Stats Detail report # 120125-2107 - Added User Group Active User In-Group Select function to User Group page # 120207-1955 - Added List territory reset function # 120213-1512 - Added remote agent max stats display and campaign VLC hopper dup check option # 120221-0054 - Fixed Call Time and User Group restrictions on several pages # 120221-1647 - Added inventory report options to lists and shifts # 120316-1203 - Fixed DIALBLE counts for completed statuses # 120402-2111 - Added lead loading template and two carrier log reports to the admin utils page # 120409-1136 - Added Search Leads Logs as slave db option # 120420-1620 - Forked 2.4 to branches, changing trunk to 2.6 # 120512-0844 - Added In-Group Manual Dial options to campaign screen # 120514-0936 - Added Dial In-group CID override setting # 120518-1456 - Added XFTAMM/LTMG special hotkeys for send to answering machine message # 120526-0827 - Added User Group User Login Report # 120529-2112 - Added safe_harbor_audio_field campaign option # 120706-1255 - Added Max stats date range and call menu qualify_sql options # 120713-2123 - Added max stats download link and extended_vl option # 120810-1018 - Added Admin List Counts system settings option # 120820-1104 - Added is_webphone option Y_API_LAUNCH # 120831-1523 - Added vicidial_dial_log outbound call logging # 121018-2321 - Added blank option to owner only dialing # 121019-0520 - Added voicemail greeting audio chooser options to phones and voicemail boxes # 121025-2339 - Added without-filter output to test filter function, added server option to test call # 121027-2344 - Added servers versions page # 121029-0109 - Added pause_after_next_call and owner_populate campaign options # 121114-1923 - Added Basic Lead Management page link. Added INGROUP as a recording filename option # 121116-1410 - Added QC functionality # 121120-0824 - Added queuemetrics_socket functionality to system settings # 121123-1208 - Added inbound holiday functions # 121124-1957 - Added List Expiration Date feature and Campaign Other-DNC-List feature # 121129-2319 - Added enhanced_disconnect_logging option # 121130-1425 - Fixed user group permissions issue with allowed campaigns modifications of user groups # 121205-1619 - Added parentheses around filter SQL when in SQL queries # 121206-0630 - Added inbound lead search feature # 121212-1529 - Standardization of list_id fields at 19 digits in forms # 121222-2146 - Added new email features # 130102-1135 - Small change to admin log viewing for email accounts # 130124-1721 - Added Inbound Email report link, added Status Display LEADID options(issue #639) # 130130-1207 - Added new CPD AMD options for In-Groups and CallMenus # 130221-1736 - Added Level 8 Disable Add option to system settings and new Email Log Report link, DID exten made non-editable # 130402-2322 - Added user_group script variable # 130414-1924 - Added report logging and display # 130424-1601 - Added survey_wait_sec campaign survey option # 130425-0700 - Added DROP option for survey_no_response_action to go to campaign drop method # 130503-1509 - Added red color to server table on reports page if asterisk out of sync # 130508-2306 - Branched 2.7, trunk becomes 2.8 # 130510-1350 - Added outbound state call time holidays functionality # 130605-0841 - Converted ereg to preg # - Added display of agent login information on User Modify screen, and reset of failed_logins on update # 130615-2124 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes # 130627-0745 - Added url log, lagged log and user group login reports to admin utilities page # 130709-1350 - Changes for encrypted password compatibility, added Dial Log Report # 130711-2208 - Added SYSTEM SNAPSHOT STATS as new welcome screen, and added new # 130809-1410 - Small fixes for call times and holidays # 130824-2319 - Changed to mysqli PHP functions # 130915-0045 - Added counts for new nanpa prefix type tables # 130926-1731 - Added queuemetrics_record_hold system setting # 130928-1130 - Added country_code_list_stats system setting option # 131003-1749 - Small fix for voicemail box duplication with phone account # 131007-1234 - Fix for copy user on encrypted passwords systems # 131016-2112 - Added manual_dial_lead_id campaign option, fixes some small issues # 131019-0849 - Moved help section to help.php # 131029-2008 - Added Asterisk auto-restart options to servers # 131208-1626 - Added campaign options for max dead, dispo and pause time # 131210-1741 - Added ability to define slave server with port number, issue #687 # 140108-0752 - Added webserver and hostname to report logging # 140117-0840 - Added option for Lists Pass Report # 140126-0939 - Added VMAIL_NO_INST options # 140126-2253 - Added voicemail_instructions option for phones # 140206-1357 - Filter dashes from new or copied campaigns and in-groups # 140214-1643 - Added system settings dialplan reload timestamp # 140302-0958 - Added Webserver-URL Report # 140305-0846 - Bug fix for list modify admin logging issue # 140313-0727 - Added links to Called Counts List IDs Report # 140313-1014 - Added warning to in-groups if they are not set as allowed in any campaigns # 140314-1134 - Added more strict enforcement of level 9 report and user permissions and definable max stats days # 140404-1007 - Added new DID filter features for DNC matching and URL DID Redirects # 140411-1434 - Added Performance Comparison Report # 140418-0914 - Added users and campaigns max_inbound_calls # 140423-1636 - Added campaign settings for manual_dial_search_checkbox and hide_call_log_info # 140425-0906 - Added user permission for editing custom dialplan entries # 140425-1257 - Added queuemetrics_pause_type system settings option, and added pause_type to agent logout # 140509-2201 - Added frozen_server_call_clear system setting, used in admin.php and AST_timecheck.pl # 140515-1610 - Added clear list option, Issue #763 # 140521-2101 - Added timer_alt_seconds and more Manual Auto Dial options # 140612-2153 - branched 2.9 version, raised trunk to 2.10 # 140617-2017 - Added vicidial_users wrapup_seconds_override option # 140621-2136 - Added DID pre-filter phone-group redirection and no-agent-ingroup redirection options # 140623-2147 - Added wrapup_bypass and script_message changes # 140625-1931 - Added wrapup_after_hotkey campaign option # 140706-0829 - Incorporated QC includes into code # 140706-0927 - Added callback_time_24hour system setting # 140817-0928 - Added User Group report permission for the Front Page System Summary report # 140822-1034 - Fixed minor voicemail chooser bug on DID modify page # 140902-0816 - Added callback_active_limit and callback_active_limit_override # 141111-0554 - Finalized adding QXZ translation to all admin files # 141118-1541 - Added agent_email script and webform variable # 141121-0116 - Added campaign options for comments and QC comment history display in agent screen # 141124-2138 - Added show_previous_callback campaign option # 141124-2226 - Added clear_script campaign option # 141124-2352 - Allow spaces in user custom fields, issue #465 # 141128-0758 - Fixed carrier-related seccurity issue in carrier listings # 141204-0559 - Fixed Contacts alt-db issue, Added user modify_languages user option and enable_languages system option # 141211-1639 - Added cpd_unknown_action campaign option and na_call_url lists option # 141212-0930 - Added selected_language,user_choose_language user options and language_method system option # 141227-1008 - Trigger sounds update on voicemail server when phone record is updated # 141229-1543 - Added code for on-the-fly language translations display # 150101-1511 - Updated for 2015 # 150107-1938 - Added ignore_group_on_search user option # 150111-1543 - Added Lists local call time option(Issue #812) and a campaign option for manual_dial_search_filter # 150112-2005 - Added flag to delete voicemail greeting when changed from an audio file to empty # 150114-2249 - Added Single Agent Daily Time report # 150117-1416 - Added list local call time validation when calculating dialable # 150117-1454 - Added NAME as status dialplay option # 150119-0920 - Added more list local calltime safety, issue #812 # 150120-0749 - Prevent modification of user_group ID, Hide non-functional agent_extended_alt_dial campaign feature, Export Calls Report Carrier added # 150210-0657 - Added LOCK options for manual_dial_search_checkbox campaign setting # 150217-0702 - Added Show VM on Summary Screen option for phones and voicemail boxes # 150218-0924 - Added link to callbacks bulk move, also now we will archive deleted callbacks # 150302-0951 - Release of 2.11 stable branch and raising trunk to 2.12 # 150307-1914 - Added login and leave3way custom sounds system settings options # 150313-0912 - Added DB Schema Version warning if mismatched with astguiclient.conf value # 150404-0932 - Added enable_did_entry_list_id and related DID options # 150421-2315 - Fixed bugs in allow_emails # 150422-1953 - Don't allow dial_timeout of less than 4 seconds # 150428-1705 - Added options for third webform # 150429-1222 - Added new API user restrictions # 150512-2225 - Fixed SQL for permissions # 150603-2000 - Modified for chat settings # 150608-1127 - Added manual dial filer and search options for ALT/ADDR3 numbers, Added manual dial override field campaign option # 150609-1207 - Fixes for chat settings # 150609-1216 - Added in-group and script display settings # 150609-2142 - Changes for different types of in-groups # 150610-0934 - Added customer_gone_seconds campaign setting # 150701-1131 - Modified mysqli_error() to mysqli_connect_error() where appropriate # 150703-2105 - Fixed field sizes in Issues #867 and #868 # 150706-0811 - Added user setting for lead_filter_id in no-hopper dialing # 150708-2246 - Added max_queue_ingroup_ DID settings options # 150710-1120 - Added options for alternate Dispo Call URLs # 150717-1333 - Optimization for dialable lead count SQL # 150724-0822 - Added agent_debug_logging SS option and report # 150725-1341 - Added agent_display_fields campaign options # 150727-0903 - Added default_language System Setting option # 150728-1012 - Added $DB hidden variable in Filter Text form, Issue #845 # 150728-1048 - Added option for secondary sorting by vendor_lead_code, Issue #833 # 150804-1107 - Added agent_whisper_enabled system settings option # 150804-1608 - Added inbound group _lead_reset options # 150806-1348 - Added Admin -> Settings Containers # 150903-1457 - Added options for encrypt hosted features # 150909-0158 - Added Report Page Servers Summary and Admin Utilities Page options for User Group Allowed Reports # 150909-1418 - Added $active_only_default_campaigns options.php option for Campaigns Listings # 150915-2113 - Added x_ra_carrier module option # 150917-1629 - Added more permission validation before deleting records, issue #893 # 150925-2126 - Added user_hide_realtime options # 150927-0820 - Added did_carrier_description, sorting by columns in DID list page, integer sort for user list page # 150928-1235 - Separated User Group permissions for Inbound Report report by in-group and by DID # 150928-1817 - Added DNC logging and DNC phone number log search # 151007-2224 - Added links and lists for DIDs and Call Menus in use in sections, Issue #835 # 151022-1404 - Added status groups admin, Added custom reports display and admin # 151030-0636 - Added usacan_phone_dialcode_fix system setting option, executed by keepalive at timeclock end of day # 151104-1518 - Added am_message_wildcards campaign option and amm-multi admin page # 151124-1141 - Added cache_carrier_stats_realtime settings option # 151125-0010 - Added oldest_logs_date display field to system settings # 151203-2142 - Added links to search page from called counts within this list table of list modify page # 151204-0615 - Added phone options to have call go to dialplan extension instead of voicemail if phone not answered # 151211-0940 - Added phone options for NVA recording agi script # 151216-1053 - Added links to Inbound Chat Report # 151220-1545 - Added more phone NVA settings # 151221-0750 - Changes to Chat In-group Modify page # 151229-1653 - Added gather_asterisk_output server option # 151229-2258 - Added campaign setting for manual_dial_timeout # 151231-0009 - Fixed admin logging in several places # 151231-0834 - Added agent_allowed_chat_groups to User Groups # 160101-0928 - Added routing_initiated_recordings to in-group and campaign settings, and updated for 2016 # 160106-0751 - Added GROUP_AREACODE option to inbound did filters # 160106-1342 - Added on_hook_cid_number setting to in-groups # 160106-1733 - Fixed user modification issue with certain manager user settings # 160108-2211 - Added manual_dial_hopper_check campaign option # 160111-0626 - Fixed SQL issues with making changes, Issue #913 # 160116-1439 - Added options/permissions for accessing recordings and logging the access time # 160122-1401 - Added report_default_format system setting, added agent count per server on reports page # 160304-2348 - Added link to API log report # 160305-2048 - Added alternate ivr(call menu) dtmf logging # 160306-1053 - Added new webphone options, added option to have carriers on all active asterisk servers # 160312-1931 - Added select/deselect all options to AC-CID modify page. Reworked max stats calculations # 160313-0756 - Changed AC-CID changes to log to the same entry instead of one per record # 160325-1435 - Changes for sidebar, added callback_useronly_move_minutes campaign feature # 160327-0145 - Reworked System Summary Screen # 160328-0316 - Added links to the real-time report from the summary screen # 160330-1559 - Redesign of Admin sub-menu and added icons # 160331-2204 - Made URL form input fields longer # 160404-0940 - design changes # 160414-1013 - Added default_phone_code to system_settings # 160427-1656 - Added more detail on active servers column on reports page # 160429-0835 - Added admin_row_click system settings option # 160506-0644 - Fixed old mysql connector, issue #950 # 160508-1155 - Added screen colors admin section # 160508-1948 - Changed lists view to default to not show leads counts, with link to click to show counts # 160514-1437 - Added ofcom_uk_drop_calc option # 160517-1927 - formatting fixes # 160602-1450 - Hiding email group settings that are not needed # 160611-2230 - Added diff to last change on admin change detail display # 160621-1733 - Added agent_screen_colors and script_remove_js settings to system settings # 160708-0745 - Added more Automatic Hopper Multiplier options, up to 4 # 160731-1026 - Added campaign option to automatically manual dial next number in agent screen after X seconds # 160801-2119 - Added Admin Bulk Tools page link from Admin Utilities page # 160809-1339 - Added customer_chat_screen_colors, customer_chat_survey_link/text as Chat Groups options # 160816-2113 - Added trim to transfer-conf numbers so they don't retain spaces at the beginning or end of the number # 160827-0917 - Added the User Group Hourly Report # 161014-0902 - Added List Merge utility and User List NEW Lead Limit options # 161018-2249 - Added allow_required_fields campaign option # 161021-1320 - Added Fronter - Closer Detail Report, Fixed admin logging bug # 161028-1539 - Added agent_xfer_park_3way option to system settings and user groups # 161029-2304 - Added rec_prompt_count display to system settings # 161031-1415 - Added User Overall user_new_lead_limit # 161102-1040 - Fixed QM partition problem # 161103-2204 - Added web_loader_phone_length and agent soundboards # 161106-2058 - Added agent_script # 161113-0900 - Changed script_id to 20 characters max, other small script changes # 161126-2157 - Release of 2.13 stable branch and raising trunk to 2.14 # 161128-1552 - Small fix for link on DID modify page with plus sign'+' in did pattern # 161128-1746 - Updated 3 INSERT SQL queries to specify fields # 161205-1650 - Added AGI container_type to settings containers # 161207-1953 - Added Agent DID Report # 161222-0841 - Added agent_chat_screen_colors # 161226-2224 - Added conf_qualify servers option # 170113-1637 - Added call menu in-group option DYNAMIC_INGROUP_VAR for use with cm_phonesearch.agi, and updated for 2017 # 170114-1356 - Added populate_lead_province in-group option # 170118-0106 - Added OW options to populate_lead_province in-group option # 170207-1317 - Added phone_number_log API function, added api_only_user User option # 170211-1041 - Moved api_only_user option in User Modify screen # 170217-1350 - Added dead_to_dispo campaign setting # 170220-1209 - Added switch_lead Agent API function # 170220-1632 - Added In-group areacode_filter feature # 170221-1542 - Added more DNC options for campaign setting 'manual dial filter', added counts to DNC add/delete page # 170223-0657 - Added warning for On Hold Message if too long, adjusted chooser placements # 170226-0850 - Added recording override options to chat and email groups to disable recordings for those, issue #992 # 170227-2231 - Change to allow horizontal_bar_chart header to be translated, issue #991 # 170228-1621 - Changed emergency logout to hangup all agent session calls, and more logging # 170304-1355 - Added Automated Reports section to Admin # 170309-1209 - Added campaign agent_xfer_validation option and ingroup populate_state_areacode option # 170311-0928 - Fixes for QC allowed campaign permissions, issue #1003 # 170313-1041 - Added CHAT options to inbound_queue_no_dial # 170315-0633 - Fix in in-group copy SQL # 170320-1340 - Added conf_qualify phones option for IAX # 170321-1100 - Added pause code time limits warning feature # 170327-0704 - Added Drop Lists section # 170327-1655 - Added USER_CUSTOM_ options to campaign custom callerID setting # 170330-0953 - Fixed translation phrases in callbacks list, issue #1006 # 170407-0744 - Added Agents count on server page # 170409-0950 - Added IP Lists (white and black) functionality # 170410-1326 - Added dl_minutes option for drop lists # 170412-2222 - Added Agent Parked Call Report link in Admin Utilities # 170416-1548 - Added ready_max_logout campaign/user setting and routing_prefix server setting # 170425-1353 - Fixed issue with entries in this server lists # 170428-1958 - Added Inbound and Advanced Forecasting Reports # 170429-0807 - Added campaign setting callback_display_days # 170430-1001 - Added three_way_record_stop and hangup_xfer_record_start campaign settings # 170516-0632 - Added Real-Time Monitoring Log Report # 170527-0041 - Added filtering of browser details before logging # 170529-2320 - Added agent events push settings # 170609-1529 - Added ccc_lead_info API function # 170613-0851 - Added hide_inactive_lists system settings option # 170623-2142 - Changed parameters for password recommendations # 170717-1444 - Fix for empty agent_choose_territories value # 170816-1240 - Added in-group survey options # 170818-0741 - Added User Group Hourly Report v2(detail) # 170819-0949 - Added allow_manage_active_lists system setting # 170821-2009 - Fix for issue #1036 # 170825-1708 - Added filename_override option for Automated Reports, added more space for report_times # 170828-2105 - Added Inbound DID Summary Report # 170913-0908 - Added Agent Inbound Status Summary Report # 170920-2153 - Added expired_lists_inactive system setting and functions # 170923-1425 - Added did_system_filter system setting and functions # 170926-1618 - Fix for Test Call function for Asterisk 13 # 170930-0853 - Added extension_appended_cidname options and custom reports variable display # 171001-1544 - Moved user IP Lists permissions to new security section in Modify User page # 171005-1707 - Fix for remote agent modify overlap issue # 171006-2039 - Added inbound list script override, Issue #1038 # 171011-1450 - Added webphone_layout option to phones and user groups # 171018-1314 - Added scheduled_callbacks_email_alert campaign option # 171018-2234 - Added server function to clear agent conferences # 171028-0913 - Added Real-Time Whiteboard Report # 171114-1100 - Fixed issue with admin log viewer for logs of modifications made by deleted users # 171124-1041 - Added max_inbound_calls_outcome campaign setting # 171124-1349 - Added manual_auto_next_options campaign setting # 171126-1413 - Changes to allow for Email groups to display script tab on get_call_launch # 171130-0036 - Added agent_screen_time_display campaign setting # 171214-2045 - Added PREVIEW_ options for get_call_launch # 171224-1220 - Added List default_xfer_group override # 171229-2309 - Added housecleaning code # 180108-2011 - Added next_dial_my_callbacks campaign option, updated for 2018 # 180109-1316 - Added call_status_stats API function # 180111-1544 - Added anyone_callback_inactive_lists system setting # 180130-2309 - Added inbound_no_agents_no_dial options # 180204-0208 - Added In-Group Wait-Time option PRESS_CALLBACK_QUEUE, and Closing-Time options # 180211-1024 - Changed campaign dial statuses to allow List and allowed In-Group selected status group statuses # 180211-1126 - Added Outbound Lead Source Report # 180213-0010 - Added GDPR system and user settings # 180215-1318 - Added CID Groups admin screens # 180216-1332 - Fix for system summary screen, issue #1068 # 180216-1743 - Many translation strings and permissions fixes, issue #1065 # 180217-0934 - Added NO_READY option for no_agent_no_queue in-group feature, issue #1046 # 180219-2204 - Fixed issue with CID Groups # 180222-0017 - Added higher hopper level options # 180306-1718 - Added script_top_dispo feature # 180310-2230 - Added bulk change function for campaign and ingroup ranks in user modify page # 180310-2321 - Added source_id_display system option # 180316-0751 - Translated phrases fixes, issue #1081 # 180330-1425 - Added download of CID Group records feature # 180331-1715 - Added update_did non-agent API function # 180410-1600 - Added pause code manager approval settings # 180411-1647 - Added DISPO_FILTER as Settings Container type # 180424-1521 - Added in-group populate_lead_source, populate_lead_vendor settings # 180430-1834 - Added in-group park_file_name override # 180512-0852 - New AJAX-based help interface # 180512-2217 - Added users-max_hopper_calls,max_hopper_calls_hour settings # 180516-1246 - Added waiting_call_url_ feature to In-Groups # 180520-1749 - Added enter_ingroup_url feature to In-Groups # 180530-0017 - Small DID bug fix, added Call Menus list on Modify Call Time page # 180610-2309 - Added Campaign settings for Dead Call Triggers # 180613-0943 - Fix for issue #1108 # 180618-2300 - Modified calls to audio file chooser function # 180806-0752 - Added link to Callmenu Survey Report, Added fields for In-Group Callback CID features # 180807-0958 - Added change for admin change log for Admin Modify Lead to better show lead changes # 180807-1653 - Added agent_logout_link credentials setting to System Settings # 180809-1547 - Added scheduled_callbacks_force_dial campaign setting # 180812-0902 - Added scheduled_callbacks_auto_reschedule campaign setting # 180825-2100 - Added scheduled_callbacks_timezones_container campaign setting and timezones display # 180904-1206 - Added copying of in-group user grades/ranks when copying an in-group # 180908-1618 - Added force_fronter_leave_3way API function # 180916-0824 - Added daily_reset_limit Lists feature(level 9 users only) # 180922-0958 - Added copying of user selected in-groups in copying of an in-group # 180923-2226 - Added three_way_volume_buttons campaign setting # 180924-1731 - Added callback_dnc campaign setting # 180927-0018 - Added _wait_time options for next agent call options in campaigns and in-groups # 181003-1619 - Added external_web_socket_url server setting # 181005-1738 - Added SYSTEM to Manual Dial Filter campaign options # 181116-1133 - Fix for DID server IP de-assignment # 190108-0806 - Added manual_dial_validation system and campaign options, update date for 2019 # 190121-2019 - Added RA_AGENT_PHONE on-hook agent option # 190207-2301 - Fix for user-group, in-group and campaign allowed/permissions matching issues # 190221-1831 - Added force_fronter_audio_stop API function # 190223-0850 - Added static prompt fields for in-group play-place-in-line # 190302-1745 - Added disclaimers for pure-knob code # 190310-1909 - Added mute_recordings system setting and campaign/user options # 190311-2153 - Added indicators for lists being assigned to non-existing campaigns # 190312-0928 - Added more hide_call_log_info options # 190327-2311 - Added READ_ONLY settings container type # 190329-1909 - Added AMD Log Report # 190406-1437 - Added user override option for next_dial_my_callbacks # 190414-0924 - Added user_admin_redirect system setting and user option # 190530-1014 - Added list_status_modification_confirmation feature # 190530-1715 - Added sip_event_logging system setting # 190607-1525 - Added SIP Event Report link # 190627-1528 - Added new options for campaign agent_screen_time_display setting # 190628-0835 - Added copying/deleting of vicidial_url_multi records when copying/deleting campaigns/in-groups # 190628-1511 - Added API update_cid_group_entry function # 190705-1012 - Added call_quota_lead_ranking settings # 190722-1602 - Added ENABLED_EXTENDED_RANGE Agent Screen Time campaign option # 190724-1603 - Added sip_event_logging campaign actions # 190902-0839 - Fixes for PHP 7.2 # 190930-2110 - More PHP7 fixes # 191014-1816 - Additional PHP7 fixes # 191015-1620 - Added user inbound call count filters # 191101-1149 - Added 2nd script tab, voicemail message groups and fixed translation issues # 191106-0934 - Added several multi-campaign options to the add/delete DNC number page # 191107-1150 - Added list_info as API function option # 191107-2356 - Added Dial Timeout Lead Container functionality # 191111-0833 - Added LTMGAD/XAMMAD Hotkey options # 191111-1601 - Added additional user status group setting(status_group_id) # 191113-1751 - Added add_dnc_phone add_fpg_phone API functions # 191114-0923 - Added enable_first_webform and recording_buttons system settings # 191121-2256 - Extended survey audio file lengths # 191230-1001 - Added Voicemail Message Daily Limit # 200108-0937 - Added CID Group Type of NONE, update date for 2020 # 200115-1702 - Added Caller ID Log Report to Admin Utilities # 200122-0921 - Added CID Group auto-rotate feature settings # 200127-1620 - Changes to HELP content # 200204-2336 - Added opensips_cid_name settings # 200206-2154 - Added require_password_length system setting and display of password length in modify pages # 200210-1628 - Added link for KHOMP Admin Tool in admin utilities # 200310-0946 - Added AGENT_PHONE_OVERRIDE campaign option, and amd_agent_route_options # 200315-1126 - Added a SKIP option for the CID Group auto-rotate feature # 200318-1330 - Added a default bgcolor to the servers table on the Reports page, Issue #1203 # 200327-1715 - Translation fixes # 200331-1148 - Added list_custom_fields API function, and more translation fixes # 200401-1448 - Added email_agent_login_link.php feature # 200405-1805 - Added entries_per_page system setting option, fixed phone relocate conf file load issue # 200405-2339 - Added warnings for inactive voicemail server # 200406-0033 - Fix for Remote Agents where user deleted # 200406-2319 - Small changes to entries_per_page display(w/ display all), also added it for DIDs # 200407-1030 - Added browser_call_alerts system setting # 200409-1719 - Reorganized Inbound admin section # 200425-0949 - Added 2nd option for agentcall_manual to disable FAST DIAL # 200508-1024 - Added feature to Call Menus to allow copying of previous option # 200518-0828 - Fixed issue with Carrier custom dialplan allowing comments';' # 200528-2126 - Added three_way_record_stop_exception campaign option # 200601-2129 - Added link for Auto Reports FTP server if using SFTP or FTPSSL # 200609-2257 - Added NONE_ options for the campaign manual_dial_filter # 200619-1643 - Added queuemetrics_pausereason system settings option # 200623-1957 - Added inbound answer configuration # 200624-1939 - Added Callbacks Export report # 200701-1525 - Added more concurrent_transfers options # 200708-1033 - Added List overrides for some inbound settings # 200711-1822 - Added EVERY_NEW_ADMINCALL option for QM PAUSEREASON system setting # 200719-1645 - Added EVERY_NEW_ALLCALL option for QM PAUSEREASON system setting # 200814-2249 - Added International DNC scrub options # 200815-0015 - Added another modify_leads option for users # 200816-0912 - Removed the ability to delete the 'default' DID entry # 200912-1649 - Added more get_call_launch PREVIEW_ options # 200913-0820 - Added UNSELECTED options for campaign alt_number_dialing # 200916-0922 - Added more modify_leads options for users(modify log statuses) # 200922-0924 - Added web_loader_phone_strip & manual_dial_phone_strip system settings # 201002-1534 - Allowed for secure sounds_web_server setting # 201004-1045 - Added campaign pause_max_exceptions setting, also fix for issue #1235 # 201101-1056 - Added In-Group setting for No-Agent-No-Queue delay # 201106-2324 - Fix for issue with populate_lead_source menu # 201111-1258 - Added campaigns hopper_drop_run_trigger setting # 201111-1616 - Fix for CID Groups permissions issue #1234 # 201113-0754 - Changed Modify DID page variable population # 201118-1057 - Better compatibility with non-latin data input # 201123-2300 - Added daily_call_count_limit features # 201201-1944 - Added transfer_button_launch campaign feature # 201214-1545 - Fixes for PHP8 compatibility # 210102-1651 - Added SHARED agent features for outbound dialing campaigns # 210103-0856 - Added agent_search_method override settings # 210124-0947 - Added copy_user Non-Agent API function # 210207-0915 - Added Shared Debug Page to admin utilities # 210210-1601 - Added add_did Non-Agent API function # 210211-1145 - Added Matex use information # 210226-1545 - Added Copy Phone functionality # 210227-1126 - Variable filter changes # 210302-1032 - Changed Logout to auto-logout through AJAX, with redirect to Admin Home URL # 210304-1615 - Added User modify_leads = 5 option, for READONLY # 210305-2159 - Added Default Phone Fields, Changed CLEAR LIST to remove custom fields for removed leads # 210306-0840 - Added new QC module with QC scorecards, Quality Control Report, Settings Compare Utility # 210309-2207 - Added Inbound main panel sub-links, fixed System Settings modify SQL # 210312-1239 - Added Two-Factor Authentication system, Added mobile_number to User Modify screen # 210312-1456 - Small change to Copy User page # 210314-0919 - Added more enhanced_disconnect_logging options in System Settings # 210315-1730 - Added clear_form campaign option, Issue #1179 # 210315-2118 - Added new manual_dial_filter CALLBACK options, Issue #1139 # 210316-0923 - Small fix for 2FA consistency # 210317-0819 - Added lead_all_info Non-Agent API function, Changed lead-modify page links to javascript because of Chrome # 210317-1211 - Fixes for better consistency in password change process, Issue #1261 # 210317-1736 - Added the ability to see orphan Remote Agent entries(with no valid User account) # 210317-2329 - Added system settings for agent_hidden_sound and added more browser_alert_sounds # 210321-0120 - Added classAudioFile PHP library # 210324-0954 - Added leave_3way_start_recording campaign options # 210325-2220 - Added populate_lead_comments in-group option # 210406-1821 - Added hopper_drop_run_trigger_all option, moved dialable_leads function to functions.php # 210417-1027 - Added calls_waiting_vl_X campaign settings # 210421-2227 - Added more screen labels for non-form fields # 210425-1506 - Added calls_inqueue_count_ campaign options # 210429-1624 - Added mohsuggest phone config option # 210519-1747 - Fix for Copy Phone conf rebuild, Require prompt be populated on Call Menu creation and modification # 210608-2108 - Added In-Group Drop Seconds Override Container and Inbound Manual Dial Agent Forced Ready features # 210615-1108 - Default security fixes, CVE-2021-28854 # 210624-1243 - Fix for Copy Phone issue # 210702-0848 - Added transfer_no_dispo campaign setting # 210705-1037 - Added User override for campaign manual_dial_filter setting # 210706-0128 - Added display of Call Time Holidays to the agent screen Scheduled Callbacks calendar # 210707-0731 - Added display of phone codes and postal codes, linked from System Settings page # 210712-1733 - Allow brackets and spaces in Filter Phone Group numbers([ ]) # 210715-1248 - Added call_limit_24hour campaign settings # 210729-2127 - Added CID Group Failover campaign setting(cid_group_id_two) # 210804-0712 - Fix for closing time action issue #1321 # 210812-1609 - Added 'Phone Stats' to report permissions list # 210827-0753 - Added allowed_sip_stacks system setting and PJSIP Phone and Carrier options # 210901-2051 - Fix for User Modify page issue # 210907-1901 - Added new OWNERCUSTOMx handle methods for menu options # 210911-1958 - Added populate_lead_owner in-group option # 210920-2159 - Added batch_update_lead API function # 211012-0934 - Added incall_tally_threshold_seconds campaign feature # 211027-1031 - Added lead_search Non-Agent API function # 211106-1500 - Added In-Group in_queue_nanque settings # 211208-1646 - Added user_location to User Modify page, Added Queue Groups to Admin pages # 211213-1619 - Fix for new phone inserts template_id issue on some MySQL setups # 211214-1157 - Fix for Queue Groups link issue #1343 # 211215-1806 - Added some User Group settings # 211217-0732 - Fixes for PHP8, issue #1341 # 220118-1944 - Added auto_alt_threshold option for campaigns and override option for lists # 220120-0902 - Added download_invalid_files user option # 220122-1659 - Added more variable filtering, updated copyright year to 2022 # 220127-2915 - Added update_alt_url Non-Agent API function # 220212-0758 - Added pause_max_url campaign setting # 220215-1011 - Fix for XSS multi-script security issue # 220215-1431 - Additional XSS script text variable filtering # 220217-1727 - Added agent_hide_hangup system and campaign settings # 220217-2022 - Added input variable filtering # 220218-1656 - Added allow_web_debug system setting to disable $DB output by default # 220307-1151 - Added 'update_presets' Non-Agent API function # 220310-1007 - Added STAGING option for campaign presets # 220311-0808 - Added List setting for Campaign CID Group Override # 220312-0937 - Added vicidial_dial_cid_log logging # 220328-1420 - Disallow adding 'INCALL','QUEUE' statuses in Auto-Alt-Dial and Lead Recycling # 220429-1111 - Code cleanup and more optional DB output for queries # 220506-0905 - Added ig_xfer_list_sort campaign setting # 220510-0822 - Added pre_filter_recent_call DID settings and Inbound DID Detail Report # 220510-1617 - Added script_tab_frame_size campaign setting # 220513-0819 - Added user_group_two to User Modify screen # 220623-0824 - Added max_logged_in_agents campaign/system settings and dial_prefix list setting # 220730-0859 - Added user_codes_admin user/system setting # 220811-0854 - Added webphone inticator"(w)" to Phone Listing page # 220824-1452 - Fix for Script override input variable filtering issues # 220827-0855 - Added BETA support for ConfBridge in Servers and Conferences # 220829-1036 - Added testing code for VERM(VICIdial Enhanced Reporting Module) # 220831-0850 - Added Campaign user_group_script override option, with User Group script option # 220921-1319 - Added more User failed login details for level 9 users # 221017-0822 - Fix for Copy Carrier issue #1384 # 221020-1632 - Added login_kickall system setting # 221021-1038 - Added webphone_settings option to phones, pointed to a settings container # 221214-1153 - Added $HTMLcolors validation for color form entry fields # 221230-2231 - Added Postal Codes Cities display # 230117-0838 - Added Agent Call Hangup Routing options, changed year to 2023 # 230204-1642 - Added No Agent Call URL "ALT" multi-url options # 230227-1150 - Updated VERM code and notices # 230306-1336 - Added 20Hz_tone browser sound, Issue #1448 # 230306-2050 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448 # 230311-0859 - Added abandon_check_queue system setting, ara_url server option and show_confetti campaign feature # 230312-2212 - Fix for webphone_settings issue #1451 # 230407-1038 - Added VERM report links to main admin Reports page # 230412-0946 - Added send_notification Agent-API function, agent_notifications system_setting # 230421-0847 - Added Agent Latency Report # 230421-1739 - Fix for QC issue #1352 # 230515-1621 - Added demographic_quotas system setting and cammpaign options and DEMOGRAPHIC_QUOTAS container, Latency Gaps Report # 230518-0908 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use # 230522-0903 - Added modify_dial_prefix user setting # 230523-0832 - Added inbound_credits user setting # 230524-1742 - Added weekday_resets settings # 230607-0918 - Added second_alert_trigger settings # 230612-0752 - Added VIDPROMPTSPECIAL... Call Menu In-Group routing feature, Added CM_VIDPROMPT_SPECIAL Container Type # 230615-0849 - Added dead_stop_recording campaign option # 230621-0114 - Added missing API functions to the permissions list # 230726-0922 - Added manual_vm_status_updates campaign setting # 230810-1617 - Added force_per_call_notes campaign setting # 230810-2005 - Added third_alert_trigger features # 230830-1059 - Changed settings-outbound_calls_per_second max to allow up to 1000 CPS # 230926-0849 - Added camp_lead_order_random options.php setting # 230927-0857 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options # 231109-0904 - Added two_factor_auth_agent_hours system setting # 231109-2027 - Added lead_dearchive API function # 231115-1636 - Added vm_view_messages_link options.php setting, hopper_hold_inserts system and campaign settings # 231119-1520 - Added hci_enabled user setting # 231129-0936 - Added daily_phone_number_call_limit campaign setting # 231129-1541 - Added refresh_panel Agent API function # 231204-0858 - Added Agent LAGGED Summary Report # 231227-2217 - Added 3-Way Press Log Report # 240214-2120 - Added STATE_DESCRIPTIONS container type and state_descriptions campaign and in-group settings, change year to 2024 # 240221-0331 - Changes for in-group daily limits, small changes for stats_descriptions # 240223-0854 - Added INBOUND_DID In-Group populate option # 240225-0933 - Added the AUTONEXT hopper_hold_inserts campaign option # 240226-2128 - Fix for READ_ONLY settings container type # 240227-1127 - Added holiday_method option # 240322-0942 - Added input filtering # 240325-2313 - Fix for new user daily limits # 240415-1858 - Added script_tab_height campaign option # 240418-0836 - Added link to Agent Time-Off Interface in Admin Utilities page # 240419-1817 - Added call_log_days campaign option # 240516-1720 - Added ALT option for start_call_url fields # 240528-1722 - Added display of Dial Prefixes column on the CAMPAIGH LISTINGS page # 240617-0833 - Fix for 2FA user override # 240627-1950 - Added leave_3way_stop_recording campaign setting # 240703-1758 - Added update_remote_agent Non-Agent API function # 240704-0944 - Added coldstorage database connection fields to system_settings # 240706-2332 - Added DB Schema Compare Utility # 240716-1453 - Small header fixes # 240730-1829 - Changes for PHP8 compatibility, added copy_did Non-Agent API function # 240805-1738 - Added DID listing display filter # 240824-1629 - Added user_details Non-Agent API function # 240826-0918 - Added mnaual dial minimum campaign settings # 241001-1532 - Added Khomp Quick Stats Report # 241021-2138 - Added Khomp campaign settings option # 241113-2002 - Added update timestamps for sub-settings groups(like campaigns) # 241206-1527 - Do not display inactive VDAD/VDCL users in Copy User screen # 241208-1747 - Changed DID filter_phone_group_id & pre_filter_phone_group_id to multi-selects # 250103-0843 - Added Enhanced Agent Monitoring system settings option, Changed copyright date # 250210-1701 - Fix for PHP8 issue on User Modify page # 250227-1607 - Fix for test call phone code issue (PHP8-related) # 250326-2023 - Added agent_hide_dial_fail system_settings feature # 250424-0715 - Fix for modify IP Lists screen permissions issue # 250620-1001 - Added apinewlead options for system settings and lists # 250722-1546 - Added hopper_bulk_insert non-agent API function # 250806-0841 - Added manual_dial_lead_id user setting, and new 'ONLY' option for campaign setting # 250808-1120 - Added agent_man_dial_filter & agent_3way_dial_filter system settings # 250822-2056 - Added system/campaign/ingroup settings for stereo_recording # 250922-0841 - Added Talk Seconds URL links to multi-url admin page in campaigns and in-groups # 251002-1428 - Added call_count_limit_restrict campaign setting # 251019-2024 - Added Recording DTMF Muting # 251025-1924 - Added CRASHED DATABASE TABLES display page, db_crashed_tables_check system settings option # 251112-2201 - Added alter_cid_name DID option # 251204-0757 - Added SERVER DRIVE PARTITIONS display # 251211-1134 - Added ADAPT_PERCENTMAX dial_method and adaptive_percentmax_percentage campaign setting # 260106-1438 - Fixes for PHP8, 2026 date change # 260126-1335 - Added check of reserved_extensions against dialplan numbers when creating/modifying phones # 260128-0823 - Added xfer_min_container and in-group minimum transfer time features, xfer_talk_minimum, xfer_talk_minimum_sec # 260203-1600 - Code updates for PHP8 compatibility # 260324-0848 - Added hangup_again_link campaign option # 260408-0827 - Added max_inbound_auto_reenable system setting and function to re-enable agent in-group selections after max_inbound_calls has been raised # 260410-1953 - Fix for max_inbound_auto_reenable feature in 4B admin screen # 260416-0909 - Added modify_settings_containers user setting # 260516-2350 - Added Internal Process Logs display page # 260521-2044 - Fixes for input variable filtering # 260529-0918 - Added new AMD features # 260620-1447 - Added amd_status_map system setting and campaign setting # 260822-0855 - Added many input variable declarations, added agent_ingroup_availability API function # 260902-1656 - Fix for PJSIP # 260907-1810 - Added copy_phone API function # 260910-0111 - Fix for added users without user_group # 260910-2040 - Added CID SIP 603 Report # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time $admin_version = '2.14-966a'; $build = '260910-2040'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); $REPORTdate = date("Y-m-d"); $EXPtestdate = date("Ymd"); $CIDdate = date("mdHis"); $dateint = date("YmdHis"); while (strlen($CIDdate) > 9) {$CIDdate = substr("$CIDdate", 1);} $MT[0]=''; $US='_'; $active_lists=0; $inactive_lists=0; $modify_refresh_set=0; $modify_footer_refresh=0; $check_time = ($STARTtime - 86400); $SSanswer_transfer_agent = '8368'; $add_copy_disabled=0; $camp_lead_order_random=1; $vm_view_messages_link=''; $stereo_dev_mode=1; $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]=_QXZ('TIMECHECK'); $dtmf[17]='TIMEOUT'; $dtmf_key[17]=_QXZ('TIMEOUT'); $dtmf[18]='INVALID'; $dtmf_key[18]=_QXZ('INVALID'); $dtmf[19]='INVALID_2ND'; $dtmf_key[19]=_QXZ('INVALID_2ND'); $dtmf[20]='INVALID_3RD'; $dtmf_key[20]=_QXZ('INVALID_3RD'); $stmt="SELECT selected_language,user_admin_redirect_url from vicidial_users where user='$PHP_AUTH_USER';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $sl_ct = mysqli_num_rows($rslt); if ($sl_ct > 0) { $row=mysqli_fetch_row($rslt); $VUselected_language = $row[0]; $VUuser_admin_redirect_url = $row[1]; } if ($force_logout) { if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) { if ($SStwo_factor_auth_hours > 0) { $stmt="UPDATE vicidial_two_factor_auth SET auth_stage='2' where user='$PHP_AUTH_USER' and auth_stage='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ?> \n"; echo "\n"; # Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); # Header("HTTP/1.0 401 Unauthorized"); } echo _QXZ("You have now logged out. Thank you")."\n
"._QXZ("To log back in").", "._QXZ("click here").""; exit; } ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### $stmt = "SELECT use_non_latin,auto_dial_limit,user_territories_active,allow_custom_dialplan,callcard_enabled,admin_modify_refresh,nocache_admin,webroot_writable,allow_emails,manual_dial_validation FROM system_settings;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $qm_conf_ct = mysqli_num_rows($rslt); if ($qm_conf_ct > 0) { $row=mysqli_fetch_row($rslt); $non_latin = $row[0]; $SSauto_dial_limit = $row[1]; $SSuser_territories_active = $row[2]; $SSallow_custom_dialplan = $row[3]; $SScallcard_enabled = $row[4]; $SSadmin_modify_refresh = $row[5]; $SSnocache_admin = $row[6]; $SSwebroot_writable = $row[7]; $SSemail_enabled = $row[8]; $SSmanual_dial_validation = $row[9]; # slightly increase limit value, because PHP somehow thinks 2.8 > 2.8 $SSauto_dial_limit = ($SSauto_dial_limit + 0.001); } ##### END SETTINGS LOOKUP ##### ########################################### $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); $user_auth=0; $auth=0; $reports_auth=0; $qc_auth=0; $auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'QC',1,0); if ($auth_message == 'GOOD') {$user_auth=1;} if ($user_auth > 0) { $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and api_only_user != '1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $auth=$row[0]; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1' and api_only_user != '1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $reports_auth=$row[0]; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and qc_enabled='1' and api_only_user != '1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $qc_auth=$row[0]; $reports_only_user=0; $qc_only_user=0; if ( ($reports_auth > 0) and ($auth < 1) ) { $ADD=999999; $reports_only_user=1; } if ( ($qc_auth > 0) and ($reports_auth < 1) and ($auth < 1) ) { if ( ($ADD != '881') and ($ADD != '100000000000000') ) { $ADD=100000000000000; } $qc_only_user=1; } if ( ($qc_auth < 1) and ($reports_auth < 1) and ($auth < 1) ) { $VDdisplayMESSAGE = _QXZ("You do not have permission to be here"); Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } if ( (strlen($VUuser_admin_redirect_url) > 5) and ($SSuser_admin_redirect > 0) ) { Header('Location: '.$VUuser_admin_redirect_url); echo""._QXZ("Admin Redirect")."\n"; echo"\n"; echo"\n"; echo"\n"; echo"\n"; echo""._QXZ("click here to continue").". . .\n"; exit; } } else { $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again"); if ($auth_message == 'LOCK') { $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes"); Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } if ($auth_message == 'IPBLOCK') { $VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip"; Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); Header("HTTP/1.0 401 Unauthorized"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n"; exit; } $admin_lists_custom = 'admin_lists_custom.php'; $x_ra_carrier = 0; if (preg_match("/x_ra_carrier/",$SSactive_modules)) {$x_ra_carrier = 1;} ############################################## # Include QC Agents with no other permission # ############################################## //Get QC User permissions $stmt="SELECT qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and active='Y' and qc_enabled='1';"; $qc_auth=0; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $qc_auth=$row[0]; } //Not "qc_" as it will interfere with ADD=4A storage of modified user. if ($qc_auth=='1') { $qcuser_level=$row[1]; $qcpass=$row[2]; $qcfinish=$row[3]; $qccommit=$row[4]; } //Modify menuing to allow qc users into the system (if they have no permission otherwise) //Copied Reports-Only user setup for QC-Only user (Poundteam QC setup) $qc_only_user=0; if ( ($qc_auth > 0) and ($auth < 1) ) { if ($ADD != '881') { $ADD=100000000000000; } $qc_only_user=1; } $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,callcard_admin,force_change_password,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,modify_contacts,modify_same_user_level,alter_admin_interface_options,modify_custom_dialplans,modify_languages,selected_language,user_choose_language,modify_colors,api_only_user,modify_auto_reports,modify_ip_lists,export_gdpr_leads,mobile_number,two_factor_override,modify_dial_prefix,hci_enabled,modify_settings_containers from vicidial_users where user='$PHP_AUTH_USER';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $LOGmodify_leads =$row[19]; $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]; $LOGemail =$row[66]; $LOGcallcard_admin =$row[70]; $LOGforce_change_password =$row[71]; $LOGmodify_shifts =$row[72]; $LOGmodify_phones =$row[73]; $LOGmodify_carriers =$row[74]; $LOGmodify_labels =$row[75]; $LOGmodify_statuses =$row[76]; $LOGmodify_voicemail =$row[77]; $LOGmodify_audiostore =$row[78]; $LOGmodify_moh =$row[79]; $LOGmodify_tts =$row[80]; $LOGmodify_contacts =$row[81]; $LOGmodify_same_user_level =$row[82]; $LOGalter_admin_interface =$row[83]; $LOGmodify_custom_dialplans =$row[84]; $LOGmodify_languages =$row[85]; $LOGselected_language =$row[86]; $LOGuser_choose_language =$row[87]; $LOGmodify_colors =$row[88]; $LOGapi_only_user =$row[89]; $LOGmodify_auto_reports =$row[90]; $LOGmodify_ip_lists =$row[91]; $LOGexport_gdpr_leads =$row[92]; $LOGmobile_number =$row[93]; $LOGtwo_factor_override =$row[94]; $LOGmodify_dial_prefix =$row[95]; $LOGhci_enabled =$row[96]; $LOGmodify_settings_containers =$row[97]; $stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times,qc_allowed_campaigns,qc_allowed_inbound_groups,reports_header_override,admin_home_url,allowed_queue_groups from vicidial_user_groups where user_group='$LOGuser_group';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $LOGallowed_campaigns = $row[0]; $LOGallowed_reports = $row[1]; $LOGadmin_viewable_groups = $row[2]; $LOGadmin_viewable_call_times = $row[3]; $LOGqc_allowed_campaigns = $row[4]; $LOGqc_allowed_inbound_groups = $row[5]; $LOGreports_header_override = $row[6]; $LOGadmin_home_url = $row[7]; $LOGallowed_queue_groups = $row[8]; if (strlen($LOGadmin_home_url) > 5) {$SSadmin_home_url = $LOGadmin_home_url;} $LOGallowed_campaignsSQL=''; $notLOGallowed_campaignsSQL = "and campaign_id IN('')"; $campLOGallowed_campaignsSQL=''; $whereLOGallowed_campaignsSQL=''; if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { $rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns); $rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL); $LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')"; $notLOGallowed_campaignsSQL = "and campaign_id NOT IN('$rawLOGallowed_campaignsSQL')"; $campLOGallowed_campaignsSQL = "and camp.campaign_id IN('$rawLOGallowed_campaignsSQL')"; $whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')"; } $regexLOGallowed_campaigns = " $LOGallowed_campaigns "; if (preg_match("/DRA/",$SShosted_settings)) {$LOGmodify_remoteagents=0;} $admin_viewable_groupsALL=0; $LOGadmin_viewable_groupsSQL=''; $whereLOGadmin_viewable_groupsSQL=''; $valLOGadmin_viewable_groupsSQL=''; $vmLOGadmin_viewable_groupsSQL=''; if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) ) { $rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups); $rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL); $LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $valLOGadmin_viewable_groupsSQL = "and val.user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $vmLOGadmin_viewable_groupsSQL = "and vm.user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; } else {$admin_viewable_groupsALL=1;} $regexLOGadmin_viewable_groups = " $LOGadmin_viewable_groups "; $LOGadmin_viewable_call_timesSQL=''; $whereLOGadmin_viewable_call_timesSQL=''; if ( (!preg_match('/\-\-ALL\-\-/i', $LOGadmin_viewable_call_times)) and (strlen($LOGadmin_viewable_call_times) > 3) ) { $rawLOGadmin_viewable_call_timesSQL = preg_replace("/ -/",'',$LOGadmin_viewable_call_times); $rawLOGadmin_viewable_call_timesSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_call_timesSQL); $LOGadmin_viewable_call_timesSQL = "and call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')"; $whereLOGadmin_viewable_call_timesSQL = "where call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')"; } $regexLOGadmin_viewable_call_times = " $LOGadmin_viewable_call_times "; $UUgroups_list=''; if ($admin_viewable_groupsALL > 0) {$UUgroups_list .= "\n";} $stmt="SELECT user_group,group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $UUgroups_to_print = mysqli_num_rows($rslt); $o=0; while ($UUgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $UUgroups_list .= "\n"; $o++; } $LOGqc_allowed_campaignsSQL=''; $whereLOGqc_allowed_campaignsSQL=''; if ( (!preg_match('/\-ALL/i', $LOGqc_allowed_campaigns)) ) { $rawLOGqc_allowed_campaignsSQL = preg_replace("/ -/",'',$LOGqc_allowed_campaigns); $rawLOGqc_allowed_campaignsSQL = preg_replace("/ /","','",$rawLOGqc_allowed_campaignsSQL); $LOGqc_allowed_campaignsSQL = "and campaign_id IN('$rawLOGqc_allowed_campaignsSQL')"; $whereLOGqc_allowed_campaignsSQL = "where campaign_id IN('$rawLOGqc_allowed_campaignsSQL')"; } $LOGqc_allowed_inbound_groupsSQL=''; $whereLOGqc_allowed_inbound_groupsSQL=''; if ( (!preg_match('/\-ALL/i', $LOGqc_allowed_inbound_groups)) ) { $rawLOGqc_allowed_inbound_groupsSQL = preg_replace("/ -/",'',$LOGqc_allowed_inbound_groups); $rawLOGqc_allowed_inbound_groupsSQL = preg_replace("/ /","','",$rawLOGqc_allowed_inbound_groupsSQL); $LOGqc_allowed_inbound_groupsSQL = "and group_id IN('$rawLOGqc_allowed_inbound_groupsSQL')"; $whereLOGqc_allowed_inbound_groupsSQL = "where group_id IN('$rawLOGqc_allowed_inbound_groupsSQL')"; } $first_login_link=0; $VALID_2FA=1; # check for 2FA being active, and if so, see if there is a non-expired 2FA auth if ( ($SStwo_factor_auth_hours > 0) and ($SStwo_factor_container != '') and ($SStwo_factor_container != '---DISABLED---') and ($LOGtwo_factor_override != 'DISABLED') ) { $stmt="SELECT count(*) from vicidial_two_factor_auth where user='$PHP_AUTH_USER' and auth_stage='1' and auth_exp_date > NOW();"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $auth_check_to_print = mysqli_num_rows($rslt); if ($auth_check_to_print < 1) {$VALID_2FA=0;} else { $row=mysqli_fetch_row($rslt); $VALID_2FA = $row[0]; } } if ($VALID_2FA < 1) { $ADD=99999701; $reports_only_user=1; } if ($LOGforce_change_password=='Y') { $ADD=999997; $reports_only_user=1; } if ($SSfirst_login_trigger=='Y') { if ($ADD==999996) {$reports_only_user=1;} else { $ADD=999995; $first_login_link=1; } } if ($ADD==999995) { $reports_only_user=1; } if (($LOGuser_level < 9) and ($SSlevel_8_disable_add > 0)) {$add_copy_disabled++;} $SSmenu_background='015B91'; $SSframe_background='D9E6FE'; $SSstd_row1_background='9BB9FB'; $SSstd_row2_background='B9CBFD'; $SSstd_row3_background='8EBCFD'; $SSstd_row4_background='B6D3FC'; $SSstd_row5_background='A3C3D6'; $SSalt_row1_background='BDFFBD'; $SSalt_row2_background='99FF99'; $SSalt_row3_background='CCFFCC'; $SSbutton_color='EFEFEF'; $SSweb_logo='default_old'; if ($SSadmin_screen_colors != 'default') { $stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo,button_color FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $colors_ct = mysqli_num_rows($rslt); if ($colors_ct > 0) { $row=mysqli_fetch_row($rslt); $SSmenu_background = $row[0]; $SSframe_background = $row[1]; $SSstd_row1_background = $row[2]; $SSstd_row2_background = $row[3]; $SSstd_row3_background = $row[4]; $SSstd_row4_background = $row[5]; $SSstd_row5_background = $row[6]; $SSalt_row1_background = $row[7]; $SSalt_row2_background = $row[8]; $SSalt_row3_background = $row[9]; $SSweb_logo = $row[10]; $SSbutton_color = $row[11]; } } $Mhead_color = $SSstd_row5_background; $Mmain_bgcolor = $SSmenu_background; $Mhead_color = $SSstd_row5_background; if ($download_max_system_stats_metric_name) { if (!$query_date) {$query_date=date("Y-m-d", time()-(29*86400));} if (!$end_date) { $end_date=date("Y-m-d", time()); } else if (strtotime($end_date)>strtotime(date("Y-m-d"))) { $end_date=date("Y-m-d"); } if ($query_date>$end_date) {$query_date=$end_date;} $num_graph_days = ceil(abs(strtotime($end_date) - strtotime($query_date)) / 86400)+1; $CSV_text=""; if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="total call count in and out") { download_max_system_stats($campaign_id,$num_graph_days,'system','total_calls','total call count in and out',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="total inbound call count") { download_max_system_stats($campaign_id,$num_graph_days,'system','total_calls_inbound_all','total inbound call count',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="total outbound call count") { download_max_system_stats($campaign_id,$num_graph_days,'system','total_calls_outbound_all','total outbound call count',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="most concurrent calls in and out") { download_max_system_stats($campaign_id,$num_graph_days,'system','(max_inbound + max_outbound)','most concurrent calls in and out',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="most concurrent calls inbound total") { download_max_system_stats($campaign_id,$num_graph_days,'system','max_inbound','most concurrent calls inbound total',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="most concurrent calls outbound total") { download_max_system_stats($campaign_id,$num_graph_days,'system','max_outbound','most concurrent calls outbound total',$end_date); } if ($download_max_system_stats_metric_name=="ALL" || $download_max_system_stats_metric_name=="most concurrent agents") { download_max_system_stats($campaign_id,$num_graph_days,'system','max_agents','most concurrent agents',$end_date); } $FILE_TIME = date("Ymd-His"); $CSVfilename = "MAX_SYSTEM_STATS_$US$FILE_TIME.csv"; $CSV_text=preg_replace('/ +\"/', '"', $CSV_text); $CSV_text=preg_replace('/\" +/', '"', $CSV_text); header('Content-type: application/octet-stream'); header("Content-Disposition: attachment; filename=\"$CSVfilename\""); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); ob_clean(); flush(); echo "$CSV_text"; exit; } ###################################################################################################### ###################################################################################################### ####### Header settings ###################################################################################################### ###################################################################################################### header ("Content-type: text/html; charset=utf-8"); if ($SSnocache_admin=='1') { header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; if ($SSnocache_admin=='1') { echo "\n"; echo "\n"; echo "\n"; } if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3/",$ADD)) ) { $modify_refresh_set=1; if (preg_match("/^3/",$ADD)) {$modify_url = "$PHP_SELF?$QUERY_STRING";} echo "\n"; } echo "\n"; echo ""._QXZ("ADMINISTRATION").": "; ### set the default screen to the user list if ( (!isset($ADD)) or (strlen($ADD)<1) ) {$ADD="999990";} if ($ADD=='0') {$ADD="999990";} ### set the sections and headers if ($ADD=="1") {$hh='users'; $sh='new'; echo _QXZ("Add New User");} if ($ADD=="1A") {$hh='users'; $sh='copy'; echo _QXZ("Copy User");} if ($ADD==11) {$hh='campaigns'; $sh='basic'; echo _QXZ("Add New Campaign");} if ($ADD==12) {$hh='campaigns'; $sh='basic'; echo _QXZ("Copy Campaign");} if ($ADD==111) {$hh='lists'; $sh='new'; echo _QXZ("Add New List");} if ($ADD==121) {$hh='lists'; $sh='dnc'; echo _QXZ("Add New DNC");} if ($ADD==131) {$hh='lists'; $sh='droplist'; echo _QXZ("Add New Drop List");} if ($ADD==171) {$hh='ingroups'; $sh='addFPG'; echo _QXZ("Filter Phone Group Numbers");} if ($ADD==1111) {$hh='ingroups'; $sh='newIG'; echo _QXZ("Add New In-Group");} if ($ADD==1211) {$hh='ingroups'; $sh='copyIG'; echo _QXZ("Copy In-Group");} if ($ADD==1311) {$hh='ingroups'; $sh='newDID'; echo _QXZ("Add New DID");} if ($ADD==1411) {$hh='ingroups'; $sh='copyDID'; echo _QXZ("Copy DID");} if ($ADD==1511) {$hh='ingroups'; $sh='newCM'; echo _QXZ("Add Call Menu");} if ($ADD==1611) {$hh='ingroups'; $sh='copyCM'; echo _QXZ("Copy Call Menu");} if ($ADD==1711) {$hh='ingroups'; $sh='newFPG'; echo _QXZ("Add Filter Phone Group");} if ($ADD==1811) {$hh='ingroups'; $sh='newEG'; echo _QXZ("Add New EMAIL In-Group");} if ($ADD==18111) {$hh='ingroups'; $sh='newCG'; echo _QXZ("Add New CHAT In-Group");} if ($ADD==1911) {$hh='ingroups'; $sh='copyEG'; echo _QXZ("Copy EMAIL In-Group");} if ($ADD==19111) {$hh='ingroups'; $sh='copyCG'; echo _QXZ("Copy CHAT In-Group");} if ($ADD==11111) {$hh='remoteagent'; $sh='new'; echo _QXZ("Add New Remote Agents");} if ($ADD==12111) {$hh='remoteagent'; $sh='newEG'; echo _QXZ("Add Extension Group");} if ($ADD==111111) {$hh='usergroups'; $sh='new'; echo _QXZ("Add New Users Group");} if ($ADD==1111111) {$hh='scripts'; $sh='new'; echo _QXZ("Add New Script");} if ($ADD==11111111) {$hh='filters'; $sh='new'; echo _QXZ("Add New Filter");} if ($ADD==111111111) {$hh='admin'; $sh='times'; echo _QXZ("Add New Call Time");} if ($ADD==131111111) {$hh='admin'; $sh='shifts'; echo _QXZ("Add New Shift");} if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo _QXZ("Add New State Call Time");} if ($ADD==1211111111) {$hh='admin'; $sh='times'; echo _QXZ("Add Holiday");} if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADD NEW PHONE");} if ($ADD==12222222222) {$hh='admin'; $sh='phones'; echo _QXZ("COPY NEW PHONE");} if ($ADD==12111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADD NEW PHONE ALIAS");} if ($ADD==13111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADD NEW GROUP ALIAS");} if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo _QXZ("ADD NEW SERVER");} if ($ADD==131111111111) {$hh='admin'; $sh='templates'; echo _QXZ("ADD NEW CONF TEMPLATE");} if ($ADD==141111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("ADD NEW CARRIER");} if ($ADD==140111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("ADD COPIED CARRIER");} if ($ADD==151111111111) {$hh='admin'; $sh='tts'; echo _QXZ("ADD NEW TTS ENTRY");} if ($ADD==161111111111) {$hh='admin'; $sh='moh'; echo _QXZ("ADD NEW MUSIC ON HOLD ENTRY");} if ($ADD==171111111111) {$hh='admin'; $sh='vm'; echo _QXZ("ADD NEW VOICEMAIL BOX");} if ($ADD==181111111111) {$hh='admin'; $sh='label'; echo _QXZ("ADD NEW SCREEN LABEL");} if ($ADD==182111111111) {$hh='admin'; $sh='colors'; echo _QXZ("ADD NEW SCREEN COLORS");} if ($ADD==191111111111) {$hh='admin'; $sh='cts'; echo _QXZ("ADD NEW CONTACT");} if ($ADD==192111111111) {$hh='admin'; $sh='sc'; echo _QXZ("ADD SETTINGS CONTAINER");} if ($ADD==193111111111) {$hh='admin'; $sh='sg'; echo _QXZ("ADD STATUS GROUP");} if ($ADD==194111111111) {$hh='admin'; $sh='ar'; echo _QXZ("ADD AUTOMATED REPORT");} if ($ADD==195111111111) {$hh='admin'; $sh='il'; echo _QXZ("ADD IP LIST");} if ($ADD==196111111111) {$hh='admin'; $sh='cg'; echo _QXZ("ADD CID GROUP");} if ($ADD==197111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("ADD VM MESSAGE GROUP");} if ($ADD==198111111111) {$hh='admin'; $sh='qg'; echo _QXZ("ADD QUEUE GROUP");} if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADD NEW CONFERENCE");} if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADD NEW AGENT CONFERENCE");} if ($ADD==12111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADD NEW AGENT CONFBRIDGE");} if ($ADD=='2') {$hh='users'; $sh='new'; echo _QXZ("New User Addition");} if ($ADD=='2A') {$hh='users'; $sh='copy'; echo _QXZ("New Copied User Addition");} if ($ADD==20) {$hh='campaigns'; $sh='basic'; echo _QXZ("New Copied Campaign Addition");} if ($ADD==21) {$hh='campaigns'; $sh='basic'; echo _QXZ("New Campaign Addition");} if ($ADD==22) {$hh='campaigns'; $sh='status'; echo _QXZ("New Campaign Status Addition");} if ($ADD==23) {$hh='campaigns'; $sh='hotkey'; echo _QXZ("New Campaign HotKey Addition");} if ($ADD==25) {$hh='campaigns'; $sh='recycle'; echo _QXZ("New Campaign Lead Recycle Addition");} if ($ADD==26) {$hh='campaigns'; $sh='autoalt'; echo _QXZ("New Auto Alt Dial Status");} if ($ADD==27) {$hh='campaigns'; $sh='pause'; echo _QXZ("New Agent Pause Code");} if ($ADD==28) {$hh='campaigns'; $sh='dialstat'; echo _QXZ("Campaign Dial Status Added");} if ($ADD==29) {$hh='campaigns'; $sh='listmix'; echo _QXZ("Campaign List Mix Added");} if ($ADD==201) {$hh='campaigns'; $sh='preset'; echo _QXZ("Campaign Preset Added");} if ($ADD==202) {$hh='campaigns'; $sh='accid'; echo _QXZ("Campaign Areacode CID Modify");} if ($ADD==211) {$hh='lists'; $sh='new'; echo _QXZ("New List Addition");} if ($ADD==231) {$hh='lists'; $sh='droplist'; echo _QXZ("New Drop List Addition");} if ($ADD==2111) {$hh='ingroups'; $sh='newIG'; echo _QXZ("New In-Group Addition");} if ($ADD==2011) {$hh='ingroups'; $sh='copyIG'; echo _QXZ("New Copied In-Group Addition");} if ($ADD==2311) {$hh='ingroups'; $sh='newDID'; echo _QXZ("New DID Addition");} if ($ADD==2411) {$hh='ingroups'; $sh='copyDID'; echo _QXZ("New Copied DID Addition");} if ($ADD==2511) {$hh='ingroups'; $sh='newCM'; echo _QXZ("New Call Menu");} if ($ADD==2611) {$hh='ingroups'; $sh='copyCM'; echo _QXZ("New Call Menu");} if ($ADD==2711) {$hh='ingroups'; $sh='newFPG'; echo _QXZ("New Filter Phone Group");} if ($ADD==2811) {$hh='ingroups'; $sh='newEG'; echo _QXZ("New Email Group Addition");} if ($ADD==2911) {$hh='ingroups'; $sh='copyEG'; echo _QXZ("New Copied Email Group Addition");} if ($ADD==29111) {$hh='ingroups'; $sh='copyCG'; echo _QXZ("New Copied Chat Group Addition");} if ($ADD==21111) {$hh='remoteagent'; $sh='new'; echo _QXZ("New Remote Agents Addition");} if ($ADD==22111) {$hh='remoteagent'; $sh='newEG'; echo _QXZ("New Group Extension Addition");} if ($ADD==211111) {$hh='usergroups'; $sh='new'; echo _QXZ("New Users Group Addition");} if ($ADD==2111111) {$hh='scripts'; $sh='new'; echo _QXZ("New Script Addition");} if ($ADD==21111111) {$hh='filters'; $sh='new'; echo _QXZ("New Filter Addition");} if ($ADD==211111111) {$hh='admin'; $sh='times'; echo _QXZ("New Call Time Addition");} if ($ADD==231111111) {$hh='admin'; $sh='shifts'; echo _QXZ("New Shift Addition");} if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo _QXZ("New State Call Time Addition");} if ($ADD==2211111111) {$hh='admin'; $sh='times'; echo _QXZ("New Holiday Addition");} if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADDING NEW PHONE");} if ($ADD==21222222222) {$hh='admin'; $sh='phones'; echo _QXZ("COPYING NEW PHONE");} if ($ADD==22111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADDING NEW PHONE ALIAS");} if ($ADD==23111111111) {$hh='admin'; $sh='phones'; echo _QXZ("ADDING NEW GROUP ALIAS");} if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo _QXZ("ADDING NEW SERVER");} if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo _QXZ("ADDING NEW SERVER TRUNK RECORD");} if ($ADD==231111111111) {$hh='admin'; $sh='templates'; echo _QXZ("ADDING NEW CONF TEMPLATE");} if ($ADD==241111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("ADDING NEW CARRIER");} if ($ADD==240111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("ADDING COPIED CARRIER");} if ($ADD==251111111111) {$hh='admin'; $sh='tts'; echo _QXZ("ADDING NEW TTS ENTRY");} if ($ADD==261111111111) {$hh='admin'; $sh='moh'; echo _QXZ("ADDING NEW MUSIC ON HOLD ENTRY");} if ($ADD==271111111111) {$hh='admin'; $sh='vm'; echo _QXZ("ADDING NEW VOICEMAIL BOX");} if ($ADD==281111111111) {$hh='admin'; $sh='label'; echo _QXZ("ADDING NEW SCREEN LABEL");} if ($ADD==282111111111) {$hh='admin'; $sh='colors'; echo _QXZ("ADDING NEW SCREEN COLORS");} if ($ADD==291111111111) {$hh='admin'; $sh='cts'; echo _QXZ("ADDING NEW CONTACT");} if ($ADD==292111111111) {$hh='admin'; $sh='sc'; echo _QXZ("ADDING NEW SETTINGS CONTAINER");} if ($ADD==293111111111) {$hh='admin'; $sh='sg'; echo _QXZ("ADDING NEW STATUS GROUP");} if ($ADD==294111111111) {$hh='admin'; $sh='ar'; echo _QXZ("ADDING NEW AUTOMATED REPORT");} if ($ADD==295111111111) {$hh='admin'; $sh='il'; echo _QXZ("ADDING NEW IP LIST");} if ($ADD==296111111111) {$hh='admin'; $sh='cg'; echo _QXZ("ADDING NEW CID GROUP");} if ($ADD==297111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("ADDING NEW VM MESSAGE GROUP");} if ($ADD==298111111111) {$hh='admin'; $sh='qg'; echo _QXZ("ADDING NEW QUEUE GROUP");} if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADDING NEW CONFERENCE");} if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADDING NEW AGENT CONFERENCE");} if ($ADD==22111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("ADDING NEW AGENT CONFBRIDGE");} if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo _QXZ("ADDING SYSTEM STATUSES");} if ($ADD==231111111111111) {$hh='admin'; $sh='status'; echo _QXZ("ADDING STATUS CATEGORY");} if ($ADD==241111111111111) {$hh='admin'; $sh='status'; echo _QXZ("ADDING QC STATUS CODE");} if ($ADD==3) {$hh='users'; $sh='list'; echo _QXZ("Modify User");} if ($ADD==30) {$hh='campaigns'; echo _QXZ("Campaign Not Allowed");} if ($ADD==31) { $hh='campaigns'; $sh='detail'; echo _QXZ("Modify Campaign - Detail")." - $campaign_id"; if ($SUB==22) {echo " - "._QXZ("Statuses");} if ($SUB==23) {echo " - "._QXZ("HotKeys");} if ($SUB==25) {echo " - "._QXZ("Lead Recycle Entries");} if ($SUB==26) {echo " - "._QXZ("Auto Alt Dial Statuses");} if ($SUB==27) {echo " - "._QXZ("Agent Pause Codes");} if ($SUB==28) {echo " - "._QXZ("QC");} if ($SUB==29) {echo " - "._QXZ("List Mixes");} if ($SUB=='20A') {echo " - "._QXZ("Survey");} if ($SUB==201) {echo " - "._QXZ("Presets");} if ($SUB==202) {echo " - "._QXZ("AC-CID");} } if ($ADD==34) { $hh='campaigns'; $sh='basic'; echo _QXZ("Modify Campaign - Basic View")." - $campaign_id"; if ($SUB==22) {echo " - "._QXZ("Statuses");} if ($SUB==23) {echo " - "._QXZ("HotKeys");} if ($SUB==25) {echo " - "._QXZ("Lead Recycle Entries");} if ($SUB==26) {echo " - "._QXZ("Auto Alt Dial Statuses");} if ($SUB==27) {echo " - "._QXZ("Agent Pause Codes");} if ($SUB==28) {echo " - "._QXZ("QC");} if ($SUB==29) {echo " - "._QXZ("List Mixes");} if ($SUB=='20A') {echo " - "._QXZ("Survey");} if ($SUB==201) {echo " - "._QXZ("Presets");} if ($SUB==202) {echo " - "._QXZ("AC-CID");} } if ($ADD==32) {$hh='campaigns'; $sh='status'; echo _QXZ("Campaign Statuses");} if ($ADD==33) {$hh='campaigns'; $sh='hotkey'; echo _QXZ("Campaign HotKeys");} if ($ADD==35) {$hh='campaigns'; $sh='recycle'; echo _QXZ("Campaign Lead Recycle Entries");} if ($ADD==36) {$hh='campaigns'; $sh='autoalt'; echo _QXZ("Campaign Auto Alt Dial Statuses");} if ($ADD==37) {$hh='campaigns'; $sh='pause'; echo _QXZ("Campaign Agent Pause Codes");} if ($ADD==38) {$hh='campaigns'; $sh='dialstat'; echo _QXZ("Campaign Dial Statuses");} if ($ADD==39) {$hh='campaigns'; $sh='listmix'; echo _QXZ("Campaign List Mixes");} if ($ADD==301) {$hh='campaigns'; $sh='preset'; echo _QXZ("Campaign Presets");} if ($ADD==302) {$hh='campaigns'; $sh='accid'; echo _QXZ("Campaign Areacode CID");} if ($ADD==311) {$hh='lists'; $sh='list'; echo _QXZ("Modify List");} if ($ADD==331) {$hh='lists'; $sh='droplist'; echo _QXZ("Modify Drop List");} if ($ADD==333) {$hh='lists'; $sh='droplist'; echo _QXZ("Modify Drop List Status");} if ($ADD==3111) {$hh='ingroups'; echo _QXZ("Modify In-Group");} if ($ADD==3311) {$hh='ingroups'; echo _QXZ("Modify DID");} if ($ADD==3321) {$hh='ingroups'; echo _QXZ("Modify DID RA Extension Overrides");} if ($ADD==3511) {$hh='ingroups'; echo _QXZ("Modify Call Menu");} if ($ADD==3711) {$hh='ingroups'; echo _QXZ("Modify Filter Phone Group");} if ($ADD==3811) {$hh='ingroups'; echo _QXZ("Modify EMAIL In-Group");} if ($ADD==3911) {$hh='ingroups'; echo _QXZ("Modify CHAT In-Group");} if ($ADD==3211) {$hh='ingroups'; echo _QXZ("Modify Areacode List");} if ($ADD==31111) {$hh='remoteagent'; echo _QXZ("Modify Remote Agents");} if ($ADD==32111) {$hh='remoteagent'; echo _QXZ("Modify Extension Group");} if ($ADD==311111) {$hh='usergroups'; echo _QXZ("Modify Users Groups");} if ($ADD==3111111) {$hh='scripts'; echo _QXZ("Modify Script");} if ($ADD==31111111) {$hh='filters'; echo _QXZ("Modify Filter");} if ($ADD==311111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Call Time");} if ($ADD==321111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Call Time State Definitions List");} if ($ADD==322111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Call Time State Holiday");} if ($ADD==331111111) {$hh='admin'; $sh='shifts'; echo _QXZ("Modify Shift");} if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify State Call Time");} if ($ADD==3211111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Holiday");} if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY PHONE");} if ($ADD==32111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY PHONE ALIAS");} if ($ADD==33111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY GROUP ALIAS");} if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo _QXZ("MODIFY SERVER");} if ($ADD==331111111111) {$hh='admin'; $sh='templates'; echo _QXZ("MODIFY CONF TEMPLATE");} if ($ADD==341111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("MODIFY CARRIER");} if ($ADD==351111111111) {$hh='admin'; $sh='tts'; echo _QXZ("MODIFY TTS ENTRY");} if ($ADD==361111111111) {$hh='admin'; $sh='moh'; echo _QXZ("MODIFY MUSIC ON HOLD ENTRY");} if ($ADD==371111111111) {$hh='admin'; $sh='vm'; echo _QXZ("MODIFY VOICEMAIL BOX");} if ($ADD==381111111111) {$hh='admin'; $sh='label'; echo _QXZ("MODIFY SCREEN LABEL");} if ($ADD==382111111111) {$hh='admin'; $sh='colors'; echo _QXZ("MODIFY SCREEN COLORS");} if ($ADD==391111111111) {$hh='admin'; $sh='cts'; echo _QXZ("MODIFY CONTACT");} if ($ADD==392111111111) {$hh='admin'; $sh='sc'; echo _QXZ("MODIFY SETTINGS CONTAINER");} if ($ADD==393111111111) {$hh='admin'; $sh='sg'; echo _QXZ("MODIFY STATUS GROUP");} if ($ADD==394111111111) {$hh='admin'; $sh='ar'; echo _QXZ("MODIFY AUTOMATED REPORT");} if ($ADD==395111111111) {$hh='admin'; $sh='il'; echo _QXZ("MODIFY IP LIST");} if ($ADD==396111111111) {$hh='admin'; $sh='cg'; echo _QXZ("MODIFY CID GROUP");} if ($ADD==397111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("MODIFY VM MESSAGE GROUP");} if ($ADD==398111111111) {$hh='admin'; $sh='qg'; echo _QXZ("MODIFY QUEUE GROUP");} if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY AGENT CONFERENCE");} if ($ADD==32111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY AGENT CONFBRIDGE");} if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo _QXZ("MODIFY SYSTEM SETTINGS");} if ($ADD==321111111111111) {$hh='admin'; $sh='status'; echo _QXZ("MODIFY SYSTEM STATUSES");} if ($ADD==331111111111111) {$hh='admin'; $sh='status'; echo _QXZ("MODIFY STATUS CATEGORY");} if ($ADD==341111111111111) {$hh='qc'; $sh='modify'; echo _QXZ("MODIFY QC STATUS CODE");} if ($ADD=="4A") {$hh='users'; $sh='list'; echo _QXZ("Modify User - Admin");} # ADMIN - Admin Screen and Agent Screen Options if ($ADD=="4B") {$hh='users'; $sh='list'; echo _QXZ("Modify User - Admin");} # ADMIN - Agent Screen Options Only if ($ADD==4) {$hh='users'; $sh='list'; echo _QXZ("Modify User");} if ($ADD==41) {$hh='campaigns'; $sh='detail'; echo _QXZ("Modify Campaign");} if ($ADD==42) {$hh='campaigns'; $sh='status'; echo _QXZ("Modify Campaign Status");} if ($ADD==43) {$hh='campaigns'; $sh='hotkey'; echo _QXZ("Modify Campaign HotKey");} if ($ADD==44) {$hh='campaigns'; $sh='basic'; echo _QXZ("Modify Campaign - Basic View");} if ($ADD==45) {$hh='campaigns'; $sh='recycle'; echo _QXZ("Modify Campaign Lead Recycle");} if ($ADD==47) {$hh='campaigns'; $sh='pause'; echo _QXZ("Modify Agent Pause Code");} if ($ADD==48) {$hh='campaigns'; $sh='qc'; echo _QXZ("Modify Campaign QC Settings");} if ($ADD==49) {$hh='campaigns'; $sh='listmix'; echo _QXZ("Modify Campaign List Mix");} if ($ADD==401) {$hh='campaigns'; $sh='preset'; echo _QXZ("Modify Campaign Preset");} if ($ADD=='40A') {$hh='campaigns'; $sh='survey'; echo _QXZ("Modify Campaign Survey");} if ($ADD==411) {$hh='lists'; $sh='list'; echo _QXZ("Modify List");} if ($ADD==431) {$hh='lists'; $sh='droplist'; echo _QXZ("Modify Drop List");} if ($ADD==4111) {$hh='ingroups'; echo _QXZ("Modify In-Group");} if ($ADD==4311) {$hh='ingroups'; echo _QXZ("Modify DID");} if ($ADD==4511) {$hh='ingroups'; echo _QXZ("Modify Call Menu");} if ($ADD==4711) {$hh='ingroups'; echo _QXZ("Modify Filter Phone Group");} if ($ADD==4811) {$hh='ingroups'; echo _QXZ("Modify Email In-Group");} if ($ADD==4911) {$hh='ingroups'; echo _QXZ("Modify Chat In-Group");} if ($ADD==41111) {$hh='remoteagent'; echo _QXZ("Modify Remote Agents");} if ($ADD==42111) {$hh='remoteagent'; echo _QXZ("Modify Extension Group");} if ($ADD==411111) {$hh='usergroups'; echo _QXZ("Modify Users Groups");} if ($ADD==4111111) {$hh='scripts'; echo _QXZ("Modify Script");} if ($ADD==41111111) {$hh='filters'; echo _QXZ("Modify Filter");} if ($ADD==411111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Call Time");} if ($ADD==431111111) {$hh='admin'; $sh='shifts'; echo _QXZ("Modify Shift");} if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify State Call Time");} if ($ADD==4211111111) {$hh='admin'; $sh='times'; echo _QXZ("Modify Holiday");} if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY PHONE");} if ($ADD==42111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY PHONE ALIAS");} if ($ADD==43111111111) {$hh='admin'; $sh='phones'; echo _QXZ("MODIFY GROUP ALIAS");} if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo _QXZ("MODIFY SERVER");} if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo _QXZ("MODIFY SERVER TRUNK RECORD");} if ($ADD==431111111111) {$hh='admin'; $sh='templates'; echo _QXZ("MODIFY CONF TEMPLATE");} if ($ADD==441111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("MODIFY CARRIER");} if ($ADD==451111111111) {$hh='admin'; $sh='tts'; echo _QXZ("MODIFY TTS ENTRY");} if ($ADD==461111111111) {$hh='admin'; $sh='moh'; echo _QXZ("MODIFY MUSIC ON HOLD ENTRY");} if ($ADD==471111111111) {$hh='admin'; $sh='vm'; echo _QXZ("MODIFY VOICEMAIL BOX");} if ($ADD==481111111111) {$hh='admin'; $sh='label'; echo _QXZ("MODIFY SCREEN LABEL");} if ($ADD==482111111111) {$hh='admin'; $sh='colors'; echo _QXZ("MODIFY SCREEN COLORS");} if ($ADD==491111111111) {$hh='admin'; $sh='cts'; echo _QXZ("MODIFY CONTACT");} if ($ADD==492111111111) {$hh='admin'; $sh='sc'; echo _QXZ("MODIFY SETTINGS CONTAINER");} if ($ADD==493111111111) {$hh='admin'; $sh='sg'; echo _QXZ("MODIFY STATUS GROUP");} if ($ADD==494111111111) {$hh='admin'; $sh='ar'; echo _QXZ("MODIFY AUTOMATED REPORT");} if ($ADD==496111111111) {$hh='admin'; $sh='cg'; echo _QXZ("MODIFY CID GROUP");} if ($ADD==497111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("MODIFY VM MESSAGE GROUP");} if ($ADD==498111111111) {$hh='admin'; $sh='qg'; echo _QXZ("MODIFY QUEUE GROUP");} if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFERENCE");} if ($ADD==42111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("MODIFY CONFBRIDGE");} if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo _QXZ("MODIFY SYSTEM SETTINGS");} if ($ADD==421111111111111) {$hh='admin'; $sh='status'; echo _QXZ("MODIFY SYSTEM STATUSES");} if ($ADD==431111111111111) {$hh='admin'; $sh='status'; echo _QXZ("MODIFY STATUS CATEGORIES");} if ($ADD==441111111111111) {$hh='admin'; $sh='status'; echo _QXZ("MODIFY QC STATUS CODE");} if ($ADD==5) {$hh='users'; $sh='list'; echo _QXZ("Delete User");} if ($ADD==51) {$hh='campaigns'; $sh='detail'; echo _QXZ("Delete Campaign");} if ($ADD==52) {$hh='campaigns'; $sh='detail'; echo _QXZ("Logout Agents");} if ($ADD==53) {$hh='campaigns'; $sh='detail'; echo _QXZ("Emergency VDAC Jam Clear");} if ($ADD==511) {$hh='lists'; $sh='list'; echo _QXZ("Delete List");} if ($ADD==512) {$hh='lists'; $sh='list'; echo _QXZ("Clear List");} if ($ADD==531) {$hh='lists'; $sh='droplist'; echo _QXZ("Delete Drop List");} if ($ADD==5111) {$hh='ingroups'; echo _QXZ("Delete In-Group");} if ($ADD==5311) {$hh='ingroups'; echo _QXZ("Delete DID");} if ($ADD==5511) {$hh='ingroups'; echo _QXZ("Delete Call Menu");} if ($ADD==5711) {$hh='ingroups'; echo _QXZ("Delete Phone Filter Group");} if ($ADD==51111) {$hh='remoteagent'; echo _QXZ("Delete Remote Agents");} if ($ADD==52111) {$hh='remoteagent'; echo _QXZ("Delete Extension Group");} if ($ADD==511111) {$hh='usergroups'; echo _QXZ("Delete Users Group");} if ($ADD==5111111) {$hh='scripts'; echo _QXZ("Delete Script");} if ($ADD==51111111) {$hh='filters'; echo _QXZ("Delete Filter");} if ($ADD==511111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete Call Time");} if ($ADD==531111111) {$hh='admin'; $sh='shifts'; echo _QXZ("Delete Shift");} if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete State Call Time");} if ($ADD==5211111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete Holiday");} if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE PHONE");} if ($ADD==52111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE PHONE ALIAS");} if ($ADD==53111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE GROUP ALIAS");} if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo _QXZ("DELETE SERVER");} if ($ADD==521111111111) {$hh='admin'; $sh='server'; echo _QXZ("CLEAR AGENT CONFERENCES");} if ($ADD==531111111111) {$hh='admin'; $sh='templates'; echo _QXZ("DELETE CONF TEMPLATE");} if ($ADD==541111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("DELETE CARRIER");} if ($ADD==551111111111) {$hh='admin'; $sh='tts'; echo _QXZ("DELETE TTS ENTRY");} if ($ADD==561111111111) {$hh='admin'; $sh='moh'; echo _QXZ("DELETE MUSIC ON HOLD ENTRY");} if ($ADD==571111111111) {$hh='admin'; $sh='vm'; echo _QXZ("DELETE VOICEMAIL BOX");} if ($ADD==581111111111) {$hh='admin'; $sh='label'; echo _QXZ("DELETE SCREEN LABEL");} if ($ADD==582111111111) {$hh='admin'; $sh='colors'; echo _QXZ("DELETE SCREEN COLORS");} if ($ADD==591111111111) {$hh='admin'; $sh='cts'; echo _QXZ("DELETE CONTACT");} if ($ADD==592111111111) {$hh='admin'; $sh='sc'; echo _QXZ("DELETE SETTINGS CONTAINER");} if ($ADD==593111111111) {$hh='admin'; $sh='sg'; echo _QXZ("DELETE STATUS GROUP");} if ($ADD==594111111111) {$hh='admin'; $sh='ar'; echo _QXZ("DELETE AUTOMATED REPORT");} if ($ADD==595111111111) {$hh='admin'; $sh='il'; echo _QXZ("DELETE IP LIST");} if ($ADD==596111111111) {$hh='admin'; $sh='cg'; echo _QXZ("DELETE CID GROUP");} if ($ADD==597111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("DELETE VM MESSAGE GROUP");} if ($ADD==598111111111) {$hh='admin'; $sh='qg'; echo _QXZ("DELETE QUEUE GROUP");} if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE CONFERENCE");} if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFERENCE");} if ($ADD==52111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFBRIDGE");} if ($ADD==6) {$hh='users'; $sh='list'; echo _QXZ("Delete User");} if ($ADD==61) {$hh='campaigns'; $sh='detail'; echo _QXZ("Delete Campaign");} if ($ADD==62) {$hh='campaigns'; $sh='detail'; echo _QXZ("Logout Agents");} if ($ADD==63) {$hh='campaigns'; $sh='detail'; echo _QXZ("Emergency VDAC Jam Clear");} if ($ADD==65) {$hh='campaigns'; $sh='recycle'; echo _QXZ("Delete Lead Recycle");} if ($ADD==66) {$hh='campaigns'; $sh='autoalt'; echo _QXZ("Delete Auto Alt Dial Status");} if ($ADD==67) {$hh='campaigns'; $sh='pause'; echo _QXZ("Delete Agent Pause Code");} if ($ADD==68) {$hh='campaigns'; $sh='dialstat'; echo _QXZ("Campaign Dial Status Removed");} if ($ADD==69) {$hh='campaigns'; $sh='listmix'; echo _QXZ("Campaign List Mix Removed");} if ($ADD==601) {$hh='campaigns'; $sh='preset'; echo _QXZ("Campaign Preset Removed");} if ($ADD==611) {$hh='lists'; $sh='list'; echo _QXZ("Delete List");} if ($ADD==612) {$hh='lists'; $sh='list'; echo _QXZ("Clear List");} if ($ADD==631) {$hh='lists'; $sh='droplist'; echo _QXZ("Delete Drop List");} if ($ADD==6111) {$hh='ingroups'; echo _QXZ("Delete In-Group");} if ($ADD==6311) {$hh='ingroups'; echo _QXZ("Delete DID");} if ($ADD==6511) {$hh='ingroups'; echo _QXZ("Delete Call Menu");} if ($ADD==6711) {$hh='ingroups'; echo _QXZ("Delete Phone Filter Group");} if ($ADD==61111) {$hh='remoteagent'; echo _QXZ("Delete Remote Agents");} if ($ADD==62111) {$hh='remoteagent'; echo _QXZ("Delete Extension Group");} if ($ADD==611111) {$hh='usergroups'; echo _QXZ("Delete Users Group");} if ($ADD==6111111) {$hh='scripts'; echo _QXZ("Delete Script");} if ($ADD==61111111) {$hh='filters'; echo _QXZ("Delete Filter");} if ($ADD==611111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete Call Time");} if ($ADD==631111111) {$hh='admin'; $sh='shifts'; echo _QXZ("Delete Shift");} if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete State Call Time");} if ($ADD==6211111111) {$hh='admin'; $sh='times'; echo _QXZ("Delete Holiday");} if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE PHONE");} if ($ADD==62111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE PHONE ALIAS");} if ($ADD==63111111111) {$hh='admin'; $sh='phones'; echo _QXZ("DELETE GROUP ALIAS");} if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo _QXZ("DELETE SERVER");} if ($ADD==622111111111) {$hh='admin'; $sh='server'; echo _QXZ("CLEAR AGENT CONFERENCES");} if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo _QXZ("DELETE SERVER TRUNK RECORD");} if ($ADD==631111111111) {$hh='admin'; $sh='templates'; echo _QXZ("DELETE CONF TEMPLATE");} if ($ADD==641111111111) {$hh='admin'; $sh='carriers'; echo _QXZ("DELETE CARRIER");} if ($ADD==651111111111) {$hh='admin'; $sh='tts'; echo _QXZ("DELETE TTS ENTRY");} if ($ADD==661111111111) {$hh='admin'; $sh='moh'; echo _QXZ("DELETE MUSIC ON HOLD ENTRY");} if ($ADD==671111111111) {$hh='admin'; $sh='vm'; echo _QXZ("DELETE VOICEMAIL BOX");} if ($ADD==681111111111) {$hh='admin'; $sh='label'; echo _QXZ("DELETE SCREEN LABEL");} if ($ADD==682111111111) {$hh='admin'; $sh='colors'; echo _QXZ("DELETE SCREEN COLORS");} if ($ADD==691111111111) {$hh='admin'; $sh='cts'; echo _QXZ("DELETE CONTACT");} if ($ADD==692111111111) {$hh='admin'; $sh='sc'; echo _QXZ("DELETE SETTINGS CONTAINER");} if ($ADD==693111111111) {$hh='admin'; $sh='sg'; echo _QXZ("DELETE STATUS GROUP");} if ($ADD==694111111111) {$hh='admin'; $sh='ar'; echo _QXZ("DELETE AUTOMATED REPORT");} if ($ADD==695111111111) {$hh='admin'; $sh='il'; echo _QXZ("DELETE IP LIST");} if ($ADD==696111111111) {$hh='admin'; $sh='cg'; echo _QXZ("DELETE CID GROUP");} if ($ADD==697111111111) {$hh='admin'; $sh='vmmg'; echo _QXZ("DELETE VM MESSAGE GROUP");} if ($ADD==698111111111) {$hh='admin'; $sh='qg'; echo _QXZ("DELETE QUEUE GROUP");} if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE CONFERENCE");} if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFERENCE");} if ($ADD==62111111111111) {$hh='admin'; $sh='conference'; echo _QXZ("DELETE AGENT CONFBRIDGE");} if ($ADD==73) {$hh='campaigns'; echo _QXZ("Dialable Lead Count");} if ($ADD==7111111) {$hh='scripts'; $sh='list'; echo _QXZ("Preview Script");} if ($ADD==700000000000000) {$hh='reports'; echo _QXZ("ADMIN CHANGE LOG");} if ($ADD==710000000000000) {$hh='reports'; echo _QXZ("USER ADMIN CHANGE LOG");} if ($ADD==720000000000000) {$hh='reports'; echo _QXZ("SECTION ADMIN CHANGE LOG");} if ($ADD==730000000000000) {$hh='reports'; echo _QXZ("DETAIL ADMIN CHANGE LOG");} if ($ADD==800000000000000) {$hh='reports'; echo _QXZ("ADMIN REPORT LOG");} if ($ADD==810000000000000) {$hh='reports'; echo _QXZ("USER ADMIN REPORT LOG");} if ($ADD==830000000000000) {$hh='reports'; echo _QXZ("DETAIL ADMIN REPORT LOG");} if ($ADD=="0A") {$hh='users'; $sh='list'; echo _QXZ("Users List");} if ($ADD==8) {$hh='users'; $sh='list'; echo _QXZ("CallBacks Within Agent");} if ($ADD==81) {$hh='campaigns'; $sh='list'; echo _QXZ("CallBacks Within Campaign");} if ($ADD==811) {$hh='lists'; $sh='list'; echo _QXZ("CallBacks Within List");} if ($ADD==8111) {$hh='usergroups'; echo _QXZ("CallBacks Within User Group");} if ($ADD==10) {$hh='campaigns'; $sh='list'; echo _QXZ("Campaigns");} if ($ADD==100) {$hh='lists'; $sh='list'; echo _QXZ("Lists");} if ($ADD==130) {$hh='lists'; $sh='droplist'; echo _QXZ("Drop Lists");} if ($ADD==1001) {$hh='ingroups'; $sh='sections'; echo _QXZ("Inbound");} if ($ADD==1000) {$hh='ingroups'; $sh='listIG'; echo _QXZ("In-Groups");} if ($ADD==1300) {$hh='ingroups'; $sh='listDID'; echo _QXZ("DIDs");} if ($ADD==1320) {$hh='ingroups'; $sh='didRA'; echo _QXZ("Modify DID RA Extension Overrides");} if ($ADD==1500) {$hh='ingroups'; $sh='listCM'; echo _QXZ("Call Menus");} if ($ADD==1700) {$hh='ingroups'; $sh='listFPG'; echo _QXZ("Filter Phone Groups");} if ($ADD==1800) {$hh='ingroups'; $sh='listEG'; echo _QXZ("Email In-Groups");} if ($ADD==1900) {$hh='ingroups'; $sh='listCG'; echo _QXZ("Chat In-Groups");} if ($ADD==10000) {$hh='remoteagent'; $sh='list'; echo _QXZ("Remote Agents");} if ($ADD==12000) {$hh='remoteagent'; $sh='listEG'; echo _QXZ("Extension Groups");} if ($ADD==100000) {$hh='usergroups'; $sh='list'; echo _QXZ("User Groups");} if ($ADD==1000000) {$hh='scripts'; $sh='list'; echo _QXZ("Scripts");} if ($ADD==10000000) {$hh='filters'; $sh='list'; echo _QXZ("Filters");} if ($ADD==100000000) {$hh='admin'; $sh='times'; echo _QXZ("Call Times");} if ($ADD==130000000) {$hh='admin'; $sh='shifts'; echo _QXZ("Shifts");} if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo _QXZ("State Call Times");} if ($ADD==1200000000) {$hh='admin'; $sh='times'; echo _QXZ("Holidays");} if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo _QXZ("PHONE LIST");} if ($ADD==12000000000) {$hh='admin'; $sh='phones'; echo _QXZ("PHONE ALIAS LIST");} if ($ADD==13000000000) {$hh='admin'; $sh='phones'; echo _QXZ("GROUP ALIAS LIST");} if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo _QXZ("SERVER LIST");} if ($ADD==130000000000) {$hh='admin'; $sh='templates'; echo _QXZ("CONF TEMPLATE LIST");} if ($ADD==140000000000) {$hh='admin'; $sh='carriers'; echo _QXZ("CARRIER LIST");} if ($ADD==150000000000) {$hh='admin'; $sh='tts'; echo _QXZ("TTS ENTRY LIST");} if ($ADD==160000000000) {$hh='admin'; $sh='moh'; echo _QXZ("MUSIC ON HOLD ENTRY LIST");} if ($ADD==170000000000) {$hh='admin'; $sh='vm'; echo _QXZ("VOICEMAIL BOXES LIST");} if ($ADD==180000000000) {$hh='admin'; $sh='label'; echo _QXZ("SCREEN LABELS LIST");} if ($ADD==182000000000) {$hh='admin'; $sh='colors'; echo _QXZ("SCREEN COLORS LIST");} if ($ADD==190000000000) {$hh='admin'; $sh='cts'; echo _QXZ("CONTACTS LIST");} if ($ADD==192000000000) {$hh='admin'; $sh='sc'; echo _QXZ("SETTINGS CONTAINTER LIST");} if ($ADD==193000000000) {$hh='admin'; $sh='sg'; echo _QXZ("STATUS GROUP LIST");} if ($ADD==194000000000) {$hh='admin'; $sh='ar'; echo _QXZ("AUTOMATED REPORTS LIST");} if ($ADD==195000000000) {$hh='admin'; $sh='il'; echo _QXZ("IP LISTS");} if ($ADD==196000000000) {$hh='admin'; $sh='cg'; echo _QXZ("CID GROUP LIST");} if ($ADD==197000000000) {$hh='admin'; $sh='vmmg'; echo _QXZ("VM MESSAGE GROUPS LIST");} if ($ADD==198000000000) {$hh='admin'; $sh='qg'; echo _QXZ("QUEUE GROUPS LIST");} if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo _QXZ("CONFERENCE LIST");} if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo _QXZ("AGENT CONFERENCE LIST");} if ($ADD==12000000000000) {$hh='admin'; $sh='conference'; echo _QXZ("AGENT CONFBRIDGE LIST");} if ($ADD==100000000000000) {$hh='qc'; $sh='campaign'; echo _QXZ("Quality Control");} if ($ADD==881) {$hh='qc'; $sh='enter'; echo _QXZ("Quality Control Campaign")," $campaign_id";} if ($ADD==550) {$hh='users'; $sh='search'; echo _QXZ("Search Form");} if ($ADD==551) {$hh='users'; echo _QXZ("SEARCH PHONES");} if ($ADD==660) {$hh='users'; echo _QXZ("Search Results");} if ($ADD==661) {$hh='users'; echo _QXZ("SEARCH PHONES RESULTS");} if ($ADD==99999) {$hh='users'; echo _QXZ("HELP");} if ($ADD==999999) {$hh='reports'; echo _QXZ("REPORTS");} if ($ADD==999998) {$hh='admin'; echo _QXZ("ADMIN");} if ($ADD==999997) {$hh='reports'; echo _QXZ("CHANGE PASSWORD");} if ($ADD==99999701) {$hh='reports'; echo _QXZ("TWO-FACTOR-AUTHENTICATION");} if ($ADD==999996) {$hh='reports'; echo _QXZ("INITIAL INSTALL WELCOME");} if ($ADD==999995) {$hh='reports'; echo _QXZ("COPYRIGHT TRADEMARK LICENSE");} if ($ADD==999994) {$hh='reports'; echo _QXZ("ADMIN UTILITIES");} if ($ADD==999993) {$hh='reports'; echo _QXZ("SUMMARY STATS");} if ($ADD==999992) {$hh='reports'; echo _QXZ("SYSTEM SUMMARY STATS");} if ($ADD==999991) {$hh='reports'; echo _QXZ("SERVERS VERSIONS");} if ($ADD==999990) {$hh='reports'; echo _QXZ("SYSTEM SNAPSHOT STATS");} if ($ADD==999989) {$hh='reports'; echo _QXZ("USER CHANGE LANGUAGE");} if ($ADD==999988) {$hh='reports'; echo _QXZ("AVAILABLE TIMEZONES");} if ($ADD==999987) {$hh='reports'; echo _QXZ("PHONE CODES");} if ($ADD==999986) {$hh='reports'; echo _QXZ("POSTAL CODES");} if ($ADD==999985) {$hh='reports'; echo _QXZ("POSTAL CODES CITIES");} if ($ADD==999984) {$hh='reports'; echo _QXZ("CRASHED DATABASE TABLES");} if ($ADD==999983) {$hh='reports'; echo _QXZ("SERVER DRIVE PARTITIONS");} if ($ADD==999982) {$hh='reports'; echo _QXZ("INTERNAL PROCESS LOGS");} echo "\n"; if ( ($ADD==999993) or ($ADD==999992) or ($ADD==730000000000000) or ($ADD==830000000000000) ) { if ($ADD==999993) {$report_name = "SUMMARY STATS";} if ($ADD==999992) {$report_name = "SYSTEM SUMMARY STATS";} if ($ADD==730000000000000) {$report_name = "DETAIL ADMIN CHANGE LOG";} if ($ADD==830000000000000) {$report_name = "DETAIL ADMIN REPORT LOG";} ##### BEGIN log visit to the vicidial_report_log table ##### $LOGip = getenv("REMOTE_ADDR"); $LOGbrowser = getenv("HTTP_USER_AGENT"); $LOGscript_name = getenv("SCRIPT_NAME"); $LOGserver_name = getenv("SERVER_NAME"); $LOGserver_port = getenv("SERVER_PORT"); $LOGrequest_uri = getenv("REQUEST_URI"); $LOGhttp_referer = getenv("HTTP_REFERER"); $LOGbrowser=preg_replace("/\'|\"|\\\\|<|>/","",$LOGbrowser); $LOGrequest_uri=preg_replace("/\'|\"|\\\\|<|>/","",$LOGrequest_uri); $LOGhttp_referer=preg_replace("/\'|\"|\\\\|<|>/","",$LOGhttp_referer); if (preg_match("/443/i",$LOGserver_port)) {$HTTPprotocol = 'https://';} else {$HTTPprotocol = 'http://';} if (($LOGserver_port == '80') or ($LOGserver_port == '443') ) {$LOGserver_port='';} else {$LOGserver_port = ":$LOGserver_port";} $LOGfull_url = "$HTTPprotocol$LOGserver_name$LOGserver_port$LOGrequest_uri"; $LOGhostname = php_uname('n'); if (strlen($LOGhostname)<1) {$LOGhostname='X';} if (strlen($LOGserver_name)<1) {$LOGserver_name='X';} $stmt="SELECT webserver_id FROM vicidial_webservers where webserver='$LOGserver_name' and hostname='$LOGhostname' LIMIT 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $webserver_id_ct = mysqli_num_rows($rslt); if ($webserver_id_ct > 0) { $row=mysqli_fetch_row($rslt); $webserver_id = $row[0]; } else { ##### insert webserver entry $stmt="INSERT INTO vicidial_webservers (webserver,hostname) values('$LOGserver_name','$LOGhostname');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $webserver_id = mysqli_insert_id($link); } $stmt="INSERT INTO vicidial_report_log set event_date=NOW(), user='$PHP_AUTH_USER', ip_address='$LOGip', report_name='$report_name', browser='$LOGbrowser', referer='$LOGhttp_referer', notes='$LOGserver_name:$LOGserver_port $LOGscript_name |$query_date, $end_date, $stage|', url='$LOGfull_url', webserver='$webserver_id';"; $rslt=mysql_to_mysqli($stmt, $link); $report_log_id = mysqli_insert_id($link); if ($DB) {echo "$report_log_id|$stmt|\n";} ##### END log visit to the vicidial_report_log table ##### } if ( ($ADD>2) and ($ADD < 99998) ) { ##### get scripts listing for dynamic pulldown $stmt="SELECT script_id,script_name from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$scripts_to_print|$stmt|\n";} $scripts_list="\n"; $o=0; while ($scripts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $scripts_list .= "\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 $whereLOGadmin_viewable_groupsSQL order by lead_filter_id;"; $rslt=mysql_to_mysqli($stmt, $link); $filters_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$filters_to_print|$stmt|\n";} $filters_list="\n"; $o=0; while ($filters_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $filters_list .= "\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 $whereLOGadmin_viewable_call_timesSQL order by call_time_id;"; $rslt=mysql_to_mysqli($stmt, $link); $times_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$times_to_print|$stmt|\n";} $o=0; $call_times_list=""; while ($times_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $call_times_list .= "\n"; $call_timename_list["$rowx[0]"] = "$rowx[1]"; $o++; } } if ( ( (strlen($ADD)>4) and ($ADD < 99998) ) or ($ADD==2) or ($ADD==3) or ($ADD==31 and $SUB==22) or (($ADD>20) and ($ADD<70)) or ($ADD==201) or ($ADD==202) or ($ADD==601) or ($ADD=="4A") or ($ADD=="4B") or ($ADD=="4") or (strlen($ADD)==12) ) { ##### BEGIN get campaigns listing for rankings ##### $h="9"; $headRANKcampaigns_list=''; while ($h>=-9) { $headRANKcampaigns_list .= ""; $h--; } $h="10"; $headGRADEcampaigns_list=''; while ($h>=1) { $headGRADEcampaigns_list .= ""; $h--; } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$campaigns_to_print|$stmt|\n";} $campaigns_list=''; $campaigns_value=''; $RANKcampaigns_list=''; $RANKcampaigns_list.="   "._QXZ("CAMPAIGN")."\n"; $RANKcampaigns_list.="   "._QXZ("RANK")."  
"._QXZ("change")."\n"; $RANKcampaigns_list.="   "._QXZ("GRADE")."  
"._QXZ("change")."\n"; $RANKcampaigns_list.="   "._QXZ("CALLS")."   "._QXZ("WEB VARS")."\n"; $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaigns_list .= "\n"; $campaign_id_values[$o] = $rowx[0]; $campaign_name_values[$o] = $rowx[1]; $o++; } $o=0; $stmt_grp_values=''; $campaign_js_rank=''; $campaign_js_grade=''; $campaign_js_rank_ct=0; $campaign_js_grade_ct=0; $USER_hopper_calls_today = 0; $USER_hopper_calls_hour = 0; while ($campaigns_to_print > $o) { $group_web_vars=''; $campaign_web=''; $stmt="SELECT campaign_rank,calls_today,group_web_vars,campaign_grade,hopper_calls_today,hopper_calls_hour from vicidial_campaign_agents where user='$user' and campaign_id='$campaign_id_values[$o]' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ranks_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$ranks_to_print|$stmt|\n";} if ($ranks_to_print > 0) { $row=mysqli_fetch_row($rslt); $SELECT_campaign_rank = $row[0]; $calls_today = $row[1]; $group_web_vars = $row[2]; $SELECT_campaign_grade = $row[3]; $hopper_calls_today = $row[4]; $hopper_calls_hour = $row[5]; } else {$calls_today=0; $SELECT_campaign_rank=0; $SELECT_campaign_grade=1; $group_web_vars=''; $hopper_calls_today=0; $hopper_calls_hour=0;} if ( ($ADD=="4A") or ($ADD=="4B") or ($ADD=="4") ) { 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 (isset($_GET["GRADE_$campaign_id_values[$o]"])) {$campaign_grade=$_GET["GRADE_$campaign_id_values[$o]"];} elseif (isset($_POST["GRADE_$campaign_id_values[$o]"])) {$campaign_grade=$_POST["GRADE_$campaign_id_values[$o]"];} $campaign_rank = preg_replace('/[^-\_0-9]/','',$campaign_rank); $campaign_web = preg_replace("/;|\"|\'/","",$campaign_web); $campaign_grade = preg_replace('/[^-\_0-9]/','',$campaign_grade); if ($ranks_to_print > 0) { $stmt="UPDATE vicidial_campaign_agents set campaign_rank='$campaign_rank', campaign_weight='$campaign_rank', group_web_vars='$campaign_web',campaign_grade='$campaign_grade' where campaign_id='$campaign_id_values[$o]' and user='$user';"; $rslt=mysql_to_mysqli($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',campaign_grade='$campaign_grade';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_grp_values .= "$stmt|"; } $stmt="UPDATE vicidial_live_agents set campaign_weight='$campaign_rank',campaign_grade='$campaign_grade' where campaign_id='$campaign_id_values[$o]' and user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_grp_values .= "$stmt|"; } else { $campaign_rank = $SELECT_campaign_rank; $campaign_grade = $SELECT_campaign_grade; } $USER_hopper_calls_today = ($USER_hopper_calls_today + $hopper_calls_today); $USER_hopper_calls_hour = ($USER_hopper_calls_hour + $hopper_calls_hour); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#' . $SSstd_row1_background . '"';} # disable non user-group allowable campaign ranks $stmt="SELECT user_group from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $Ruser_group = $row[0]; } else {$Ruser_group = "";} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$Ruser_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $allowed_campaigns = $row[0]; } else {$allowed_campaigns="";} $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); $UGcampaigns = explode(" ", $allowed_campaigns); $p=0; $RANK_camp_active=0; $GRADE_camp_active=0; $CR_disabled = ''; if (preg_match('/\-ALL\-CAMPAIGNS\-/i',$allowed_campaigns)) {$RANK_camp_active++; $GRADE_camp_active++;} else { $UGcampaign_ct = count($UGcampaigns); while ($p < $UGcampaign_ct) { if ($campaign_id_values[$o] === $UGcampaigns[$p]) {$RANK_camp_active++; $GRADE_camp_active++;} $p++; } } if ($RANK_camp_active < 1) {$CR_disabled = 'DISABLED';} else { $campaign_js_rank_ct++; $campaign_js_grade_ct++; if (strlen($campaign_js_rank) > 1) { $campaign_js_rank .= ","; $campaign_js_grade .= ","; } $campaign_js_rank .= "'RANK_$campaign_id_values[$o]'"; $campaign_js_grade .= "'GRADE_$campaign_id_values[$o]'"; } $RANKcampaigns_list .= ""; $campaigns_list .= "$campaign_id_values[$o] - $campaign_name_values[$o]
\n"; $RANKcampaigns_list .= "$campaign_id_values[$o] - $campaign_name_values[$o] "; $RANKcampaigns_list .= "   \n"; $RANKcampaigns_list .= "   \n"; $RANKcampaigns_list .= "     $calls_today\n"; $RANKcampaigns_list .= "     \n"; $o++; } ##### END get campaigns listing for rankings ##### ##### BEGIN get inbound groups listing for checkboxes ##### $xfer_groupsSQL=''; $xfer_groups=''; if (!isset($XFERgroups)) {$XFERgroups='';} if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) and ($ADD!="4A") and ($ADD!="4B") or (($ADD==601) and isset($campaign_id) and isset($preset_name)) or ( ($ADD==41) and ( (preg_match('/list_activation/i', $stage)) or (preg_match('/test_call/',$stage)) ) ) ) { $stmt="SELECT closer_campaigns,xfer_groups from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $closer_campaigns=""; $xfer_groups=""; if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $closer_campaigns = $row[0]; $xfer_groups = $row[1]; } $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); $groups = explode(" ", $closer_campaigns); $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; if (!is_array($XFERgroups)) $XFERgroups = array(); $XFERgroup_ct = count($XFERgroups); while ($p < $XFERgroup_ct) { $xfer_groups .= " $XFERgroups[$p]"; $p++; } $xfer_groups = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$xfer_groups); $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_to_mysqli($stmt, $link); $row=mysqli_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' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $closer_campaigns = $row[0]; $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); $groups = explode(" ", $closer_campaigns); } $h="9"; $headRANKgroups_list=''; while ($h>=-9) { $headRANKgroups_list .= ""; $h--; } $h="10"; $headGRADEgroups_list=''; while ($h>=1) { $headGRADEgroups_list .= ""; $h--; } $stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL 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_to_mysqli($stmt, $link); $groups_to_print = mysqli_num_rows($rslt); $groups_list=''; $groups_value=''; $XFERgroups_list=''; $RANKgroups_list=''; $RANKgroups_list.="   "._QXZ("INBOUND GROUP")."\n"; $RANKgroups_list.="   "._QXZ("RANK")."  
"._QXZ("change")."\n"; $RANKgroups_list.="   "._QXZ("GRADE")."  
"._QXZ("change")."\n"; $RANKgroups_list.="   "._QXZ("CALLS")."   \n"; $RANKgroups_list.="   "._QXZ("LIMIT")."   \n"; $RANKgroups_list.=""._QXZ("WEB VARS")."\n"; $o=0; while ($groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_id_values[$o] = $rowx[0]; $group_name_values[$o] = $rowx[1]; $o++; } $o=0; $USER_inbound_calls_today=0; $USER_inbound_calls_today_filtered=0; $ingroup_js_rank=''; $ingroup_js_grade=''; $ingroup_js_rank_ct=0; $ingroup_js_grade_ct=0; $XFERgroups_value = ""; while ($groups_to_print > $o) { $group_web_vars=''; $group_web=''; $stmt="SELECT group_rank,calls_today,group_web_vars,group_grade,calls_today_filtered,daily_limit from vicidial_inbound_group_agents where user='$user' and group_id='$group_id_values[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); $ranks_to_print = mysqli_num_rows($rslt); if ($ranks_to_print > 0) { $row=mysqli_fetch_row($rslt); $SELECT_group_rank = $row[0]; $calls_today = $row[1]; $group_web_vars = $row[2]; $SELECT_group_grade = $row[3]; $calls_today_filtered = $row[4]; $group_limit = $row[5]; } else {$calls_today=0; $SELECT_group_rank=0; $SELECT_group_grade=1; $calls_today_filtered=0; $group_limit=-1;} 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 (isset($_GET["GRADE_$group_id_values[$o]"])) {$group_grade=$_GET["GRADE_$group_id_values[$o]"];} elseif (isset($_POST["GRADE_$group_id_values[$o]"])) {$group_grade=$_POST["GRADE_$group_id_values[$o]"];} if (isset($_GET["LIMIT_$group_id_values[$o]"])) {$group_limit=$_GET["LIMIT_$group_id_values[$o]"];} elseif (isset($_POST["LIMIT_$group_id_values[$o]"])) {$group_limit=$_POST["LIMIT_$group_id_values[$o]"];} $group_rank = preg_replace('/[^-\_0-9]/','',$group_rank); $group_web = preg_replace("/;|\"|\'/","",$group_web); $group_grade = preg_replace('/[^-\_0-9]/','',$group_grade); $group_limit = preg_replace('/[^-\_0-9]/','',$group_limit); if ( (strlen($group_limit) < 1) or ($group_limit == 'NULL') ) {$group_limit=-1;} 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', group_grade='$group_grade', daily_limit='$group_limit' where group_id='$group_id_values[$o]' and user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows_grp = mysqli_affected_rows($link); if ($DB) {echo "$affected_rows_grp|$stmt|
\n";} $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', group_grade='$group_grade', daily_limit='$group_limit';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows_grp = mysqli_affected_rows($link); if ($DB) {echo "$affected_rows_grp|$stmt|
\n";} $stmt_grp_values .= "$stmt|"; } $stmt="UPDATE vicidial_live_inbound_agents set group_weight='$group_rank', group_grade='$group_grade' where group_id='$group_id_values[$o]' and user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_grp_values .= "$stmt|"; } else { $group_rank = $SELECT_group_rank; $group_grade = $SELECT_group_grade; } if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#' . $SSstd_row1_background . '"';} $groups_list .= " 1) { $ingroup_js_rank .= ","; $ingroup_js_grade .= ","; } $ingroup_js_rank .= "'RANK_$group_id_values[$o]'"; $ingroup_js_grade .= "'GRADE_$group_id_values[$o]'"; $groups_list .= "> $group_id_values[$o] - $group_name_values[$o] - $VIG_priority
\n"; $XFERgroups_list .= "> $group_id_values[$o] - $group_name_values[$o]
\n"; $RANKgroups_list .= "> $group_id_values[$o] - $group_name_values[$o] "; $RANKgroups_list .= "   \n"; $RANKgroups_list .= "   \n"; $RANKgroups_list .= "     $calls_today\n"; $RANKgroups_list .= "   \n"; $RANKgroups_list .= "   \n"; $o++; $USER_inbound_calls_today = ($USER_inbound_calls_today + $calls_today); $USER_inbound_calls_today_filtered = ($USER_inbound_calls_today_filtered + $calls_today_filtered); } 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,allowed_queue_groups from vicidial_user_groups where user_group='$user_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $allowed_campaigns = ""; $qc_allowed_campaigns = ""; $qc_allowed_inbound_groups = ""; $allowed_queue_groups = ""; if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $allowed_campaigns = $row[0]; $qc_allowed_campaigns = $row[1]; $qc_allowed_inbound_groups = $row[2]; $allowed_queue_groups = $row[3]; } $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); $allowed_queue_groups = preg_replace("/ -$/","",$allowed_queue_groups); $queue_groups = explode(" ", $allowed_queue_groups); } $campaigns_value=''; if ( (preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) {$campaigns_list='
\n";} $qc_campaigns_list.="> "._QXZ("ALL-CAMPAIGNS - USERS CAN QC ANY CAMPAIGN")."

\n"; $qc_groups_list.="> "._QXZ("ALL-GROUPS - USERS CAN QC ANY INBOUND GROUP")."

\n"; $queue_groups_list.="> "._QXZ("ALL-GROUPS - USERS CAN VIEW ANY QUEUE GROUP")."
\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaign_id_value = $rowx[0]; $campaign_name_value = $rowx[1]; $campaigns_list .= " 1) ) { # echo ""; $campaigns_list .= " CHECKED"; $campaigns_value .= " $campaign_id_value"; } if (isset($qc_campaigns[$p]) && $campaign_id_value === $qc_campaigns[$p]) { $qc_campaigns_list .= " CHECKED"; $qc_campaigns_value .= " $campaign_id_value"; } # echo ""; $p++; } $campaigns_list .= "> $campaign_id_value - $campaign_name_value
\n"; $qc_campaigns_list .= "> $campaign_id_value - $campaign_name_value
\n"; $o++; } $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $groups_to_print = mysqli_num_rows($rslt); $o=0; while ($groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_id_value = $rowx[0]; $group_name_value = $rowx[1]; $qc_groups_list .= " 1) ) { $qc_groups_list .= " CHECKED"; $qc_groups_value .= " $group_id_value"; } $p++; } $qc_groups_list .= "> $group_id_value - $group_name_value
\n"; $o++; } $stmt="SELECT queue_group,queue_group_name from vicidial_queue_groups where queue_group NOT IN('') $LOGadmin_viewable_groupsSQL order by queue_group;"; $rslt=mysql_to_mysqli($stmt, $link); $groups_to_print = mysqli_num_rows($rslt); $o=0; while ($groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_id_value = $rowx[0]; $group_name_value = $rowx[1]; $queue_groups_list .= " 1) ) { $queue_groups_list .= " CHECKED"; $queue_groups_value .= " $group_id_value"; } $p++; } $queue_groups_list .= "> $group_id_value - $group_name_value
\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 .= " -";} if (strlen($queue_groups_value)>2) {$queue_groups_value .= " -";} } ##### END get campaigns listing for checkboxes ##### ##### BEGIN Queue Groups campaigns/in-groups listings ##### if ( ($ADD==298111111111) or ($ADD==398111111111) or ($ADD==498111111111) or ($ADD==598111111111) or ($ADD==698111111111) ) { if ( ($ADD==298111111111) or ($ADD==398111111111) or ($ADD==598111111111) or ($ADD==698111111111) ) { $included_campaigns=""; $included_inbound_groups=""; $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (mysqli_num_rows($rslt)>0) { $included_campaigns = $row[4]; $included_inbound_groups = $row[5]; } $qg_allowed_campaigns = preg_replace("/ -$/","",$included_campaigns); $qg_campaigns = explode(" ", $qg_allowed_campaigns); $qg_allowed_inbound_groups = preg_replace("/ -$/","",$included_inbound_groups); $qg_groups = explode(" ", $qg_allowed_inbound_groups); } if ($ADD==498111111111) { $qg_campaigns = $included_campaigns; $qg_groups = $included_inbound_groups; } $qg_campaigns_value=''; $qg_campaigns_list=''; $qg_groups_value=''; $qg_groups_list=''; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaign_id_value = $rowx[0]; $campaign_name_value = $rowx[1]; $qg_campaigns_list .= ""; $p++; } $qg_campaigns_list .= "> $campaign_id_value - $campaign_name_value
\n"; $o++; } $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $groups_to_print = mysqli_num_rows($rslt); $o=0; while ($groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_id_value = $rowx[0]; $group_name_value = $rowx[1]; $qg_groups_list .= " 1) ) { $qg_groups_list .= " CHECKED"; $qg_groups_value .= " $group_id_value"; } $p++; } $qg_groups_list .= "> $group_id_value - $group_name_value
\n"; $o++; } if (strlen($qg_campaigns_value)>2) {$qg_campaigns_value .= " -";} if (strlen($qg_groups_value)>2) {$qg_groups_value .= " -";} } ##### END Queue Groups campaigns/in-groups listings ##### if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) or ($ADD=='141111111111') or ($ADD=='140111111111') or ($ADD=='341111111111') or ($ADD=='311111111111111') or ( (strlen($ADD)>4) and ($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,external_server_ip,active,active_asterisk_server from servers order by server_ip"; $rsltx=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rsltx); $servers_list=''; $o=0; while ($servers_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $servers_list .= "\n"; $o++; } } $NWB = "\"HELP\""; if ($ADD==99999) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""._QXZ("click here to continue").". . .\n"; exit; } ###################################################################################################### ###################################################################################################### ####### 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 "\n"; echo "\n"; echo ""; $stmt="SELECT dial_statuses,local_call_time,lead_filter_id,drop_lockout_time,call_count_limit from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $dial_statuses = $row[0]; $local_call_time = $row[1]; $drop_lockout_time = $row[3]; $call_count_limit = $row[4]; 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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match('/Y/', $rowx[1])) {$camp_lists .= "'$rowx[0]',";} } $camp_lists = preg_replace('/.$/i','',$camp_lists); $filterSQL = $filtersql_list[$lead_filter_id]; $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = preg_replace('/^and|and$|^or|or$/i', '',$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} echo "

\n"; echo ""._QXZ("Show Dialable Leads Count")." -

\n"; echo ""._QXZ("CAMPAIGN").": $campaign_id
\n"; echo ""._QXZ("LISTS").": $camp_lists
\n"; echo ""._QXZ("STATUSES").": $dial_statuses
\n"; echo ""._QXZ("FILTER").": $lead_filter_id
\n"; echo ""._QXZ("CALL LIMIT").": $call_count_limit\n"; echo ""._QXZ("CALL TIME").": $local_call_time

\n"; echo ""._QXZ("With Filter").":\n"; echo "

\n"; ### call function to calculate and print dialable leads $single_status=0; $only_return=0; dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,$fSQL,$only_return); echo "

\n"; echo ""._QXZ("Without Filter").":\n"; echo "

\n"; dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,'',$only_return); echo "

\n"; echo "\n"; exit; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=7111111 view sample script with test variables ###################### if ($ADD==7111111) { ##### TEST VARIABLES ##### $vendor_lead_code = 'VENDOR:LEAD;CODE'; $list_id = 'LISTID'; $list_name = 'LISTNAME'; $list_description = 'LISTDESCRIPTION'; $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'; $RGagent_email = 'Joe@agent.com'; $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'; $did_id = 'did_id'; $did_extension = 'did_extension'; $did_pattern = 'did_pattern'; $did_description = 'did_description'; $closecallid = 'closecallid'; $xfercallid = 'xfercallid'; $agent_log_id = 'agent_log_id'; $entry_list_id = 'entry_list_id'; $call_id = 'call_id'; $user_group = 'user_group'; $called_count = '2'; echo "\n"; echo "\n"; echo ""; $stmt="SELECT script_id,script_name,script_comments,script_text,active,script_color from vicidial_scripts where script_id='$script_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $script_name = $row[1]; $script_text = stripslashes($row[3]); $script_color = $row[5]; if (preg_match('/iframe src/i',$script_text)) { $vendor_lead_code = preg_replace('/\s/i', '+',$vendor_lead_code); $list_id = preg_replace('/\s/i', '+',$list_id); $list_name = preg_replace('/\s/i', '+',$list_name); $list_description = preg_replace('/\s/i', '+',$list_description); $gmt_offset_now = preg_replace('/\s/i', '+',$gmt_offset_now); $phone_code = preg_replace('/\s/i', '+',$phone_code); $phone_number = preg_replace('/\s/i', '+',$phone_number); $title = preg_replace('/\s/i', '+',$title); $first_name = preg_replace('/\s/i', '+',$first_name); $middle_initial = preg_replace('/\s/i', '+',$middle_initial); $last_name = preg_replace('/\s/i', '+',$last_name); $address1 = preg_replace('/\s/i', '+',$address1); $address2 = preg_replace('/\s/i', '+',$address2); $address3 = preg_replace('/\s/i', '+',$address2); $city = preg_replace('/\s/i', '+',$city); $state = preg_replace('/\s/i', '+',$state); $province = preg_replace('/\s/i', '+',$province); $postal_code = preg_replace('/\s/i', '+',$postal_code); $country_code = preg_replace('/\s/i', '+',$country_code); $gender = preg_replace('/\s/i', '+',$gender); $date_of_birth = preg_replace('/\s/i', '+',$date_of_birth); $alt_phone = preg_replace('/\s/i', '+',$alt_phone); $email = preg_replace('/\s/i', '+',$email); $security_phrase = preg_replace('/\s/i', '+',$security_phrase); $comments = preg_replace('/\s/i', '+',$comments); $source_id = preg_replace('/\s/i', '+',$source_id); $RGfullname = preg_replace('/\s/i', '+',$RGfullname); $RGagent_email = preg_replace('/\s/i', '+',$RGagent_email); $RGuser = preg_replace('/\s/i', '+',$RGuser); $RGlead_id = preg_replace('/\s/i', '+',$RGlead_id); $RGcampaign = preg_replace('/\s/i', '+',$RGcampaign); $RGphone_login = preg_replace('/\s/i', '+',$RGphone_login); $RGgroup = preg_replace('/\s/i', '+',$RGgroup); $RGchannel_group = preg_replace('/\s/i', '+',$RGchannel_group); $RGSQLdate = preg_replace('/\s/i', '+',$RGSQLdate); $RGepoch = preg_replace('/\s/i', '+',$RGepoch); $RGuniqueid = preg_replace('/\s/i', '+',$RGuniqueid); $RGcustomer_zap_channel = preg_replace('/\s/i', '+',$RGcustomer_zap_channel); $RGserver_ip = preg_replace('/\s/i', '+',$RGserver_ip); $RGSIPexten = preg_replace('/\s/i', '+',$RGSIPexten); $RGsession_id = preg_replace('/\s/i', '+',$RGsession_id); $RGdialed_number = preg_replace('/\s/i', '+',$RGdialed_number); $RGdialed_label = preg_replace('/\s/i', '+',$RGdialed_label); $RGrank = preg_replace('/\s/i', '+',$RGrank); $RGowner = preg_replace('/\s/i', '+',$RGowner); $RGcamp_script = preg_replace('/\s/i', '+',$RGcamp_script); $RGin_script = preg_replace('/\s/i', '+',$RGin_script); $script_width = preg_replace('/\s/i', '+',$script_width); $script_height = preg_replace('/\s/i', '+',$script_height); $recording_filename = preg_replace('/\s/i', '+',$recording_filename); $recording_id = preg_replace('/\s/i', '+',$recording_id); $user_custom_one = preg_replace('/\s/i', '+',$user_custom_one); $user_custom_two = preg_replace('/\s/i', '+',$user_custom_two); $user_custom_three = preg_replace('/\s/i', '+',$user_custom_three); $user_custom_four = preg_replace('/\s/i', '+',$user_custom_four); $user_custom_five = preg_replace('/\s/i', '+',$user_custom_five); $preset_number_a = preg_replace('/\s/i', '+',$preset_number_a); $preset_number_b = preg_replace('/\s/i', '+',$preset_number_b); $preset_number_c = preg_replace('/\s/i', '+',$preset_number_c); $preset_number_d = preg_replace('/\s/i', '+',$preset_number_d); $preset_number_e = preg_replace('/\s/i', '+',$preset_number_e); $preset_number_f = preg_replace('/\s/i', '+',$preset_number_f); $preset_dtmf_a = preg_replace('/\s/i', '+',$preset_dtmf_a); $preset_dtmf_b = preg_replace('/\s/i', '+',$preset_dtmf_b); $did_description = preg_replace('/\s/i', '+',$did_description); } $script_text = preg_replace('/\-\-A\-\-vendor_lead_code\-\-B\-\-/i', "$vendor_lead_code",$script_text); $script_text = preg_replace('/\-\-A\-\-list_id\-\-B\-\-/i', "$list_id",$script_text); $script_text = preg_replace('/\-\-A\-\-list_name\-\-B\-\-/i', "$list_name",$script_text); $script_text = preg_replace('/\-\-A\-\-list_description\-\-B\-\-/i', "$list_description",$script_text); $script_text = preg_replace('/\-\-A\-\-gmt_offset_now\-\-B\-\-/i', "$gmt_offset_now",$script_text); $script_text = preg_replace('/\-\-A\-\-phone_code\-\-B\-\-/i', "$phone_code",$script_text); $script_text = preg_replace('/\-\-A\-\-phone_number\-\-B\-\-/i', "$phone_number",$script_text); $script_text = preg_replace('/\-\-A\-\-title\-\-B\-\-/i', "$title",$script_text); $script_text = preg_replace('/\-\-A\-\-first_name\-\-B\-\-/i', "$first_name",$script_text); $script_text = preg_replace('/\-\-A\-\-middle_initial\-\-B\-\-/i', "$middle_initial",$script_text); $script_text = preg_replace('/\-\-A\-\-last_name\-\-B\-\-/i', "$last_name",$script_text); $script_text = preg_replace('/\-\-A\-\-address1\-\-B\-\-/i', "$address1",$script_text); $script_text = preg_replace('/\-\-A\-\-address2\-\-B\-\-/i', "$address2",$script_text); $script_text = preg_replace('/\-\-A\-\-address3\-\-B\-\-/i', "$address3",$script_text); $script_text = preg_replace('/\-\-A\-\-city\-\-B\-\-/i', "$city",$script_text); $script_text = preg_replace('/\-\-A\-\-state\-\-B\-\-/i', "$state",$script_text); $script_text = preg_replace('/\-\-A\-\-province\-\-B\-\-/i', "$province",$script_text); $script_text = preg_replace('/\-\-A\-\-postal_code\-\-B\-\-/i', "$postal_code",$script_text); $script_text = preg_replace('/\-\-A\-\-country_code\-\-B\-\-/i', "$country_code",$script_text); $script_text = preg_replace('/\-\-A\-\-gender\-\-B\-\-/i', "$gender",$script_text); $script_text = preg_replace('/\-\-A\-\-date_of_birth\-\-B\-\-/i', "$date_of_birth",$script_text); $script_text = preg_replace('/\-\-A\-\-alt_phone\-\-B\-\-/i', "$alt_phone",$script_text); $script_text = preg_replace('/\-\-A\-\-email\-\-B\-\-/i', "$email",$script_text); $script_text = preg_replace('/\-\-A\-\-security_phrase\-\-B\-\-/i', "$security_phrase",$script_text); $script_text = preg_replace('/\-\-A\-\-comments\-\-B\-\-/i', "$comments",$script_text); $script_text = preg_replace('/\-\-A\-\-source_id\-\-B\-\-/i', "$source_id",$script_text); $script_text = preg_replace('/\-\-A\-\-fullname\-\-B\-\-/i', "$RGfullname",$script_text); $script_text = preg_replace('/\-\-A\-\-agent_email\-\-B\-\-/i', "$RGagent_email",$script_text); $script_text = preg_replace('/\-\-A\-\-fronter\-\-B\-\-/i', "$RGuser",$script_text); $script_text = preg_replace('/\-\-A\-\-user\-\-B\-\-/i', "$RGuser",$script_text); $script_text = preg_replace('/\-\-A\-\-lead_id\-\-B\-\-/i', "$RGlead_id",$script_text); $script_text = preg_replace('/\-\-A\-\-campaign\-\-B\-\-/i', "$RGcampaign",$script_text); $script_text = preg_replace('/\-\-A\-\-phone_login\-\-B\-\-/i', "$RGphone_login",$script_text); $script_text = preg_replace('/\-\-A\-\-group\-\-B\-\-/i', "$RGgroup",$script_text); $script_text = preg_replace('/\-\-A\-\-channel_group\-\-B\-\-/i', "$RGchannel_group",$script_text); $script_text = preg_replace('/\-\-A\-\-SQLdate\-\-B\-\-/i', "$RGSQLdate",$script_text); $script_text = preg_replace('/\-\-A\-\-epoch\-\-B\-\-/i', "$RGepoch",$script_text); $script_text = preg_replace('/\-\-A\-\-uniqueid\-\-B\-\-/i', "$RGuniqueid",$script_text); $script_text = preg_replace('/\-\-A\-\-customer_zap_channel\-\-B\-\-/i', "$RGcustomer_zap_channel",$script_text); $script_text = preg_replace('/\-\-A\-\-server_ip\-\-B\-\-/i', "$RGserver_ip",$script_text); $script_text = preg_replace('/\-\-A\-\-SIPexten\-\-B\-\-/i', "$RGSIPexten",$script_text); $script_text = preg_replace('/\-\-A\-\-session_id\-\-B\-\-/i', "$RGsession_id",$script_text); $script_text = preg_replace('/\-\-A\-\-dialed_number\-\-B\-\-/i', "$RGdialed_number",$script_text); $script_text = preg_replace('/\-\-A\-\-dialed_label\-\-B\-\-/i', "$RGdialed_label",$script_text); $script_text = preg_replace('/\-\-A\-\-rank\-\-B\-\-/i', "$RGrank",$script_text); $script_text = preg_replace('/\-\-A\-\-owner\-\-B\-\-/i', "$RGowner",$script_text); $script_text = preg_replace('/\-\-A\-\-camp_script\-\-B\-\-/i', "$RGcamp_script",$script_text); $script_text = preg_replace('/\-\-A\-\-in_script\-\-B\-\-/i', "$RGin_script",$script_text); $script_text = preg_replace('/\-\-A\-\-script_width\-\-B\-\-/i', "$script_width",$script_text); $script_text = preg_replace('/\-\-A\-\-script_height\-\-B\-\-/i', "$script_height",$script_text); $script_text = preg_replace('/\-\-A\-\-recording_filename\-\-B\-\-/i', "$recording_filename",$script_text); $script_text = preg_replace('/\-\-A\-\-recording_id\-\-B\-\-/i', "$recording_id",$script_text); $script_text = preg_replace('/\-\-A\-\-user_custom_one\-\-B\-\-/i', "$user_custom_one",$script_text); $script_text = preg_replace('/\-\-A\-\-user_custom_two\-\-B\-\-/i', "$user_custom_two",$script_text); $script_text = preg_replace('/\-\-A\-\-user_custom_three\-\-B\-\-/i', "$user_custom_three",$script_text); $script_text = preg_replace('/\-\-A\-\-user_custom_four\-\-B\-\-/i', "$user_custom_four",$script_text); $script_text = preg_replace('/\-\-A\-\-user_custom_five\-\-B\-\-/i', "$user_custom_five",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_a\-\-B\-\-/i', "$preset_number_a",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_b\-\-B\-\-/i', "$preset_number_b",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_c\-\-B\-\-/i', "$preset_number_c",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_d\-\-B\-\-/i', "$preset_number_d",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_e\-\-B\-\-/i', "$preset_number_e",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_number_f\-\-B\-\-/i', "$preset_number_f",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_dtmf_a\-\-B\-\-/i', "$preset_dtmf_a",$script_text); $script_text = preg_replace('/\-\-A\-\-preset_dtmf_b\-\-B\-\-/i', "$preset_dtmf_b",$script_text); $script_text = preg_replace('/\-\-A\-\-did_id\-\-B\-\-/i', "$did_id",$script_text); $script_text = preg_replace('/\-\-A\-\-did_extension\-\-B\-\-/i', "$RGdid_extension",$script_text); $script_text = preg_replace('/\-\-A\-\-did_pattern\-\-B\-\-/i', "$did_pattern",$script_text); $script_text = preg_replace('/\-\-A\-\-did_description\-\-B\-\-/i', "$RGdid_description",$script_text); $script_text = preg_replace('/\-\-A\-\-closecallid\-\-B\-\-/i', "$closecallid",$script_text); $script_text = preg_replace('/\-\-A\-\-xfercallid\-\-B\-\-/i', "$xfercallid",$script_text); $script_text = preg_replace('/\-\-A\-\-agent_log_id\-\-B\-\-/i', "$agent_log_id",$script_text); $script_text = preg_replace('/\-\-A\-\-entry_list_id\-\-B\-\-/i', "$entry_list_id",$script_text); $script_text = preg_replace('/\-\-A\-\-call_id\-\-B\-\-/i', "$call_id",$script_text); $script_text = preg_replace('/\-\-A\-\-user_group\-\-B\-\-/i', "$user_group",$script_text); $script_text = preg_replace('/\-\-A\-\-called_count\-\-B\-\-/i', "$called_count",$script_text); $script_text = preg_replace('/\n/i', "
",$script_text); echo ""; echo _QXZ("Preview Script").": $script_id
\n"; echo "1) {echo " bgcolor=\"$script_color\"";} echo ">
\n"; echo "
$script_name
\n"; echo "$script_text\n"; echo "
\n"; echo "\n"; exit; } $no_title=1; $ADMIN=$PHP_SELF; require("admin_header.php"); if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) ) { echo "
"; } ###################################################################################################### ###################################################################################################### ####### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Users\" "; echo "
"._QXZ("ADD A NEW USER")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("User Number").": "._QXZ("Auto-Generated")." $NWB#users-user$NWE
"._QXZ("User Number").": $NWB#users-user$NWE
"._QXZ("Password").": $NWB#users-pass$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Full Name").": $NWB#users-full_name$NWE
"._QXZ("User Level").": $NWB#users-user_level$NWE
"._QXZ("User Group").": $NWB#users-user_group$NWE
"._QXZ("Phone Login").": $NWB#users-phone_login$NWE
"._QXZ("Phone Pass").": $NWB#users-phone_pass$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Users\" "; echo "
"._QXZ("COPY USER")."\n"; echo "\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; if ($LOGuser_level==9) {$levelMAX=10;} else {$levelMAX=$LOGuser_level;} echo "\n"; echo "\n"; echo "
"._QXZ("New User Number").": "._QXZ("Auto-Generated")." $NWB#users-user$NWE
"._QXZ("New User Number").": $NWB#users-user$NWE
"._QXZ("Password").": $NWB#users-pass$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Full Name").": $NWB#users-full_name$NWE
"._QXZ("Source User").": $NWB#users-user$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Campaigns\" "; echo "
"._QXZ("ADD A NEW CAMPAIGN")."\n"; echo "\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; } echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= "";} echo "\n"; echo "\n"; echo "
"._QXZ("Campaign ID").": "._QXZ("Auto-Generated")." $NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign ID").": $NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign Name").": $NWB#campaigns-campaign_name$NWE
"._QXZ("Campaign Description").": $NWB#campaigns-campaign_description$NWE
"._QXZ("Admin User Group").": $NWB#campaigns-user_group$NWE
"._QXZ("Active").": $NWB#campaigns-active$NWE
"._QXZ("Park Music-on-Hold").": "._QXZ("moh chooser")." $NWB#campaigns-park_ext$NWE
"._QXZ("Web Form").": $NWB#campaigns-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Allow Closers").": $NWB#campaigns-allow_closers$NWE
"._QXZ("Minimum Hopper Level").": $NWB#campaigns-hopper_level$NWE
"._QXZ("Auto Dial Level").": (0 = "._QXZ("off").")$NWB#campaigns-auto_dial_level$NWE
"._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE
"._QXZ("Local Call Time").": $NWB#campaigns-local_call_time$NWE
"._QXZ("Voicemail").": $NWB#campaigns-voicemail_ext$NWE
"._QXZ("Script").": $NWB#campaigns-campaign_script$NWE
"._QXZ("Script Two").": $NWB#campaigns-campaign_script$NWE
"._QXZ("Get Call Launch").": $NWB#campaigns-get_call_launch$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Campaigns\" "; echo "
"._QXZ("COPY A CAMPAIGN")."\n"; echo "\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Campaign ID").": "._QXZ("Auto-Generated")." $NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign ID").": $NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign Name").": $NWB#campaigns-campaign_name$NWE
"._QXZ("Source Campaign").": $NWB#campaigns-campaign_id$NWE
"._QXZ("NOTE: Copying a campaign will copy all settings from the master campaign you select, but it will not copy a campaign-specific DNC list if there was one on the selected master campaign.")."
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Lists\" "; echo "
"._QXZ("ADD A NEW LIST")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("List ID").": "._QXZ("Auto-Generated")." $NWB#lists-list_id$NWE
"._QXZ("List ID").": ("._QXZ("digits only").")$NWB#lists-list_id$NWE
"._QXZ("List Name").": $NWB#lists-list_name$NWE
"._QXZ("List Description").": $NWB#lists-list_description$NWE
"._QXZ("Campaign").": $NWB#lists-campaign_id$NWE
"._QXZ("Active").": $NWB#lists-active$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=121 display the ADD NUMBER TO DNC FORM SCREEN and add a new number ###################### if ($ADD==121) { ### filter for DIGITS and NEWLINES $phone_numbers = preg_replace('/[^X\n0-9]/', '',$phone_numbers); echo "
\n"; echo ""; $campaigns_list = "\n"; $campaigns_list .= "\n"; $campaigns_list .= "\n"; $campaigns_list .= "\n"; $campaigns_list .= "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where use_campaign_dnc IN('Y','AREACODE') $LOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaigns_list .= "\n"; $o++; } # DNC Log Search if (strlen($phone) > 2) { echo "
"._QXZ("SEARCHING FOR PHONE NUMBER IN DNC LIST LOGS").": $phone

\n"; $stmt = "SELECT campaign_id,action,action_date,user FROM vicidial_dnc_log where phone_number='$phone' order by action_date desc limit 1000;"; $rslt=mysql_to_mysqli($stmt, $link); $vdl_ct = mysqli_num_rows($rslt); $i=0; if ($vdl_ct > 0) { echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; } else { echo _QXZ("No Results Found")."\n"; } while ($vdl_ct > $i) { if (preg_match('/1$|3$|5$|7$|9$/i', $i)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#' . $SSstd_row1_background . '"';} $row=mysqli_fetch_row($rslt); $vdl_campaign = $row[0]; $vdl_action = $row[1]; $vdl_action_date = $row[2]; $vdl_user = $row[3]; echo ""; echo ""; echo ""; echo "\n"; $i++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("ACTION").""._QXZ("DATE")."   "._QXZ("USER")."  
"; if ($vdl_campaign == '-SYSINT-') {echo "$vdl_campaign";} else {echo "$vdl_campaign";} echo " $vdl_action $vdl_action_date$vdl_user
\n"; echo "

\n"; } # Add / Delete from DNC if (strlen($phone_numbers) > 2) { $PN = explode("\n",$phone_numbers); $PNct = count($PN); $p=0; $DNCadded=0; $DNCnotadded=0; $DNCdeleted=0; $DNCnotdeleted=0; while ($p < $PNct) { $PN[$p] = preg_replace('/[^\,\:\+\*\#\.\_0-9\p{L}]/u','',$PN[$p]); if ( (preg_match('/delete/',$stage)) and ($LOGdelete_from_dnc > 0) ) { ##### BEGIN DELETE FROM DNC ##### if (preg_match('/SYSTEM_INTERNAL/',$campaign_id)) { $stmt="SELECT count(*) from vicidial_dnc where phone_number='$PN[$p]';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { echo "
"._QXZ("DNC NOT DELETED - This phone number is not in the Do Not Call List").": $PN[$p]\n"; $DNCnotdeleted++; } else { $stmt="DELETE FROM vicidial_dnc where phone_number='$PN[$p]';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("DNC DELETED").": $PN[$p]\n"; $DNCdeleted++; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', 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_to_mysqli($stmt, $link); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='-SYSINT-', action='delete', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } } ### DELETE FROM ALL_CAMPAIGNS, ALL_DNC_CAMPAIGNS, ALL_ACTIVE_CAMPAIGNS, ALL_ACTIVE_DNC_CAMPAIGNS elseif (preg_match('/ALL_CAMPAIGNS|ALL_ACTIVE_CAMPAIGNS|ALL_DNC_CAMPAIGNS|ALL_ACTIVE_DNC_CAMPAIGNS/',$campaign_id)) { echo "
"._QXZ("DNC DELETE PROCESS STARTED").": $PN[$p] $campaign_id\n"; $multi_stmts=''; $camp_typeSQL=''; $numberDNCnotdeleted=0; $numberDNCdeleted=0; if (preg_match('/ALL_DNC_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where use_campaign_dnc IN('Y','AREACODE')";} if (preg_match('/ALL_ACTIVE_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where active='Y'";} if (preg_match('/ALL_ACTIVE_DNC_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where active='Y' and use_campaign_dnc IN('Y','AREACODE')";} ### gather all campaign IDs for selected group of campaigns $stmt = "SELECT campaign_id FROM vicidial_campaigns $camp_typeSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $camp_ct = mysqli_num_rows($rslt); $cdnc=0; while ($camp_ct > $cdnc) { $row=mysqli_fetch_row($rslt); $camp_list[$cdnc] = $row[0]; $cdnc++; } $cdnc=0; while ($camp_ct > $cdnc) { $temp_campaign_id = $camp_list[$cdnc]; $stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$temp_campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { echo "
"._QXZ("DNC NOT DELETED - This phone number is not in the Do Not Call List").": $PN[$p] $temp_campaign_id\n"; $DNCnotdeleted++; $numberDNCnotdeleted++; } else { $stmt="DELETE FROM vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$temp_campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $multi_stmts .= "$stmt|"; echo "
"._QXZ("DNC DELETED").": $affected_rows - $PN[$p] $temp_campaign_id\n"; $DNCdeleted = ($DNCdeleted + $affected_rows); $numberDNCdeleted = ($numberDNCdeleted + $affected_rows); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='$temp_campaign_id', action='delete', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } $cdnc++; } if ($camp_ct > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$multi_stmts|"; $SQL_log = preg_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='LISTS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM CAMPAIGN DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='Deleted: $numberDNCdeleted Not-Deleted: $numberDNCnotdeleted';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { $stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { echo "
"._QXZ("DNC NOT DELETED - This phone number is not in the Do Not Call List").": $PN[$p] $campaign_id\n"; $DNCnotdeleted++; } else { $stmt="DELETE FROM vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("DNC DELETED").": $PN[$p] $campaign_id\n"; $DNCdeleted++; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM CAMPAIGN DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='$campaign_id', action='delete', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } } ##### END DELETE FROM DNC ##### } else { ##### BEGIN ADD TO DNC ##### if (preg_match('/SYSTEM_INTERNAL/',$campaign_id)) { $stmt="SELECT count(*) from vicidial_dnc where phone_number='$PN[$p]';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("DNC NOT ADDED - This phone number is already in the Do Not Call List").": $PN[$p]\n"; $DNCnotadded++; } else { $stmt="INSERT INTO vicidial_dnc (phone_number) values('$PN[$p]');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("DNC ADDED").": $PN[$p]\n"; $DNCadded++; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO DNC LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='-SYSINT-', action='add', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } } ### ADD TO ALL_CAMPAIGNS, ALL_DNC_CAMPAIGNS, ALL_ACTIVE_CAMPAIGNS, ALL_ACTIVE_DNC_CAMPAIGNS elseif (preg_match('/ALL_CAMPAIGNS|ALL_ACTIVE_CAMPAIGNS|ALL_DNC_CAMPAIGNS|ALL_ACTIVE_DNC_CAMPAIGNS/',$campaign_id)) { echo "
"._QXZ("DNC ADD PROCESS STARTED").": $PN[$p] $campaign_id\n"; $multi_stmts=''; $camp_typeSQL=''; $numberDNCnotadded=0; $numberDNCadded=0; if (preg_match('/ALL_DNC_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where use_campaign_dnc IN('Y','AREACODE')";} if (preg_match('/ALL_ACTIVE_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where active='Y'";} if (preg_match('/ALL_ACTIVE_DNC_CAMPAIGNS/',$campaign_id)) {$camp_typeSQL = "where active='Y' and use_campaign_dnc IN('Y','AREACODE')";} ### gather all campaign IDs for selected group of campaigns $stmt = "SELECT campaign_id FROM vicidial_campaigns $camp_typeSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $camp_ct = mysqli_num_rows($rslt); $cdnc=0; while ($camp_ct > $cdnc) { $row=mysqli_fetch_row($rslt); $camp_list[$cdnc] = $row[0]; $cdnc++; } $cdnc=0; while ($camp_ct > $cdnc) { $temp_campaign_id = $camp_list[$cdnc]; $stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$temp_campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("DNC NOT ADDED - This phone number is already in the Do Not Call List").": $PN[$p] $temp_campaign_id\n"; $DNCnotadded++; $numberDNCnotadded++; } else { $stmt="INSERT INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$PN[$p]','$temp_campaign_id');"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $multi_stmts .= "$stmt|"; echo "
"._QXZ("DNC ADDED").": $affected_rows - $PN[$p] $temp_campaign_id\n"; $DNCadded = ($DNCadded + $affected_rows); $numberDNCadded = ($numberDNCadded + $affected_rows); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='$temp_campaign_id', action='add', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } $cdnc++; } if ($camp_ct > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$multi_stmts|"; $SQL_log = preg_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='LISTS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO CAMPAIGN DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='Added: $numberDNCadded Not-Added: $numberDNCnotadded';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { $stmt="SELECT count(*) from vicidial_campaign_dnc where phone_number='$PN[$p]' and campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("DNC NOT ADDED - This phone number is already in the Do Not Call List").": $PN[$p] $campaign_id\n"; $DNCnotadded++; } else { $stmt="INSERT INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$PN[$p]','$campaign_id');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("DNC ADDED").": $PN[$p] $campaign_id\n"; $DNCadded++; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO CAMPAIGN DNC LIST $campaign_id', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmt="INSERT INTO vicidial_dnc_log SET phone_number='$PN[$p]', campaign_id='$campaign_id', action='add', action_date=NOW(), user='$PHP_AUTH_USER';"; $rslt=mysql_to_mysqli($stmt, $link); } } ##### END ADD TO DNC ##### } $p++; } if ( ($DNCadded > 0) or ($DNCnotadded > 0) ) { echo "
\n"; echo "
"._QXZ("TOTAL NUMBERS ADDED TO DNC LIST").": $DNCadded\n"; echo "
"._QXZ("TOTAL NUMBERS NOT ADDED TO DNC LIST").": $DNCnotadded\n"; echo "
\n"; } if ( ($DNCdeleted > 0) or ($DNCnotdeleted > 0) ) { echo "
\n"; echo "
"._QXZ("TOTAL NUMBERS DELETED FROM DNC LIST").": $DNCdeleted\n"; echo "
"._QXZ("TOTAL NUMBERS NOT DELETED FROM DNC LIST").": $DNCnotdeleted\n"; echo "
\n"; } } echo "
"; echo ""; if ($LOGdelete_from_dnc > 0) {echo "
"._QXZ("ADD OR DELETE NUMBERS FROM THE DNC LIST")."\n";} else {echo "
"._QXZ("ADD NUMBERS TO THE DNC LIST")."\n";} echo "\n"; echo "
\n"; echo "\n"; echo "\n"; if ($LOGdelete_from_dnc > 0) { echo "\n"; } echo "\n"; echo "
"._QXZ("List").":
"._QXZ("Phone Numbers").":

("._QXZ("one phone number per line only").")
$NWB#internal_list-dnc$NWE
"._QXZ("Add or Delete").":
\n"; echo "
"._QXZ("DNC LOG SEARCH")."
\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Phone Number").":
\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Download List/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
"._QXZ("Download numbers in this list to a file").":
\n"; echo "\n"; echo "
\n"; } } ###################### # ADD=131 display the ADD NEW DROP LIST FORM SCREEN ###################### if ($ADD==131) { 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_drop_lists' and active='1';"; $rslt=mysql_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Lists\" "; echo "
"._QXZ("ADD A NEW DROP LIST")."
\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "
"._QXZ("Drop List ID").": "._QXZ("Auto-Generated")." $NWB#drop_lists-dl_id$NWE
"._QXZ("Drop List ID").": $NWB#drop_lists-dl_id$NWE
"._QXZ("Drop List Name").": $NWB#drop_lists-dl_name$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=171 display the ADD NUMBER TO Filter Phone Group FORM SCREEN and add a new number ###################### if ($ADD==171) { ### filter for Letters DIGITS and NEWLINES if ($non_latin < 1) { $phone_numbers = preg_replace('/[^\n\[\] 0-9a-zA-Z]/', '',$phone_numbers); } else { $phone_numbers = preg_replace('/[^\n\[\] 0-9\p{L}]/u', '',$phone_numbers); } echo "
\n"; echo ""; $stmt="SELECT filter_phone_group_id,filter_phone_group_name from vicidial_filter_phone_groups $whereLOGadmin_viewable_groupsSQL order by filter_phone_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $vfpg_to_print = mysqli_num_rows($rslt); $o=0; $vfpg_list=""; while ($vfpg_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $vfpg_list .= "\n"; $o++; } if (strlen($phone_numbers) > 2) { $PN = explode("\n",$phone_numbers); $PNct = count($PN); $p=0; while ($p < $PNct) { $PN[$p] = preg_replace('/[^\,\:\+\*\#\.\_0-9\p{L}]/u','',$PN[$p]); if ( (preg_match('/delete/',$stage)) and ($LOGdelete_from_dnc > 0) ) { $stmt="SELECT count(*) from vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("FILTER PHONE GROUP NUMBER NOT DELETED - This phone number is not in the Filter Phone Group List").": $PN[$p] $filter_phone_group_id\n";} else { $stmt="DELETE FROM vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER PHONE GROUP NUMBER DELETED").": $PN[$p] $filter_phone_group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERPHONEGROUPS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM FILTER PHONE GROUP $filter_phone_group_id', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { $stmt="SELECT count(*) from vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("FILTER PHONE GROUP NUMBER NOT ADDED - This phone number is already in the Filter Phone Group List").": $PN[$p] $filter_phone_group_id\n";} else { $stmt="INSERT INTO vicidial_filter_phone_numbers (phone_number,filter_phone_group_id) values('$PN[$p]','$filter_phone_group_id');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER PHONE GROUP NUMBER ADDED").": $PN[$p] $filter_phone_group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERPHONEGROUPS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO FILTER PHONE GROUP $filter_phone_group_id', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } $p++; } } if ($LOGdelete_from_dnc > 0) {echo "
"._QXZ("ADD OR DELETE NUMBERS FROM THE FILTER PHONE GROUP LIST")."\n";} else {echo "
"._QXZ("ADD NUMBERS TO THE FILTER PHONE GROUP LIST")."\n";} echo "\n"; echo "
\n"; echo "\n"; echo "\n"; if ($LOGdelete_from_dnc > 0) { echo "\n"; } echo "\n"; echo "
"._QXZ("Filter Phone Group").":
"._QXZ("Phone Numbers").":

("._QXZ("one phone number per line only").")
$NWB#filter-phone-list$NWE
"._QXZ("Add or Delete").":
\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Download List/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
"._QXZ("Download numbers in this list to a file").":
\n"; echo "\n"; echo "
\n"; } } ###################### # ADD=3211 areacode list modification screen ###################### if ($ADD==3211) { echo "
\n"; echo ""; if ($LOGmodify_ingroups==1) { $stmt = "SELECT count(*) FROM vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vig_exists = $row[0]; if ($vig_exists > 0) { ### read in all areacodes in this in-group areacode filter list $stmt = "SELECT areacode FROM vicidial_areacode_filters where group_id='$group_id' order by areacode;"; $rslt=mysql_to_mysqli($stmt, $link); $vaf_ct = mysqli_num_rows($rslt); $vaf=0; while ($vaf_ct > $vaf) { $row=mysqli_fetch_row($rslt); $vaf_list[$vaf] = $row[0]; $vaf_count[$vaf] = 0; $vaf++; } if (strlen($areacode_list) > 2) { $PN = explode("\n",$areacode_list); $PNct = count($PN); $p=0; $stmt_log=''; while ($p < $PNct) { if (strlen($PN[$p]) > 0) { $PN[$p] = preg_replace('/[^\,\:\+\*\#\.\_0-9\p{L}]/u','',$PN[$p]); $ac_found=0; $vaf=0; while ($vaf_ct > $vaf) { if ($PN[$p] == $vaf_list[$vaf]) { $vaf_count[$vaf]++; $ac_found++; } $vaf++; } if ($ac_found < 1) { $stmt="SELECT count(*) from vicidial_areacode_filters where areacode='$PN[$p]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { $stmt="INSERT INTO vicidial_areacode_filters (areacode,group_id) values('$PN[$p]','$group_id');"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_log .= "$stmt|"; if ($DB > 0) {echo "Added areacode $PN[$p]
\n";} } else {if ($DB > 0) {echo "Skipped add, already exists: $PN[$p]
\n";}} } } $p++; } $vaf=0; while ($vaf_ct > $vaf) { if ($vaf_count[$vaf] < 1) { $stmt="SELECT count(*) from vicidial_areacode_filters where areacode='$vaf_list[$vaf]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { $stmt="DELETE FROM vicidial_areacode_filters where areacode='$vaf_list[$vaf]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_log .= "$stmt|"; if ($DB > 0) {echo "Removed areacode $vaf_list[$vaf]
\n";} } else {if ($DB > 0) {echo "Skipped delete, already removed: $vaf_list[$vaf]
\n";}} } $vaf++; } if (strlen($stmt_log) > 10) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt_log|"; $SQL_log = preg_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 AREACODE FILTER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } ### read in all areacodes in this in-group areacode filter list $stmt = "SELECT areacode FROM vicidial_areacode_filters where group_id='$group_id' order by areacode;"; $rslt=mysql_to_mysqli($stmt, $link); $vaf_ct = mysqli_num_rows($rslt); $vaf=0; $vaf_textarea=''; while ($vaf_ct > $vaf) { $row=mysqli_fetch_row($rslt); $vaf_textarea .= "$row[0]\n"; $vaf++; } echo "
"._QXZ("MODIFY AREACODE LIST")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("In-Group").": $group_id - modify
"._QXZ("Areacodes").":

("._QXZ("one areacode per line only").")
$NWB#internal_list-dnc$NWE
\n"; } else { echo _QXZ("You must use a valid group")."\n"; exit; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Inbound\" "; echo "
"._QXZ("ADD A NEW INBOUND GROUP")."
\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= "";} echo "\n"; /* Don't give an option (yet). This is clearly for phones only. if ($SSallow_emails>0 || $SSallow_chats > 0) { echo "\n"; } else { */ echo "\n"; # } echo "\n"; echo "
"._QXZ("Group ID").": "._QXZ("Auto-Generated")." $NWB#inbound_groups-group_id$NWE
"._QXZ("Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Voicemail").": $NWB#inbound_groups-voicemail_ext$NWE
"._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Script").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Script Two").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Get Call Launch").": $NWB#inbound_groups-get_call_launch$NWE
"._QXZ("Group Handling").": $NWB#inbound_groups-group_handling$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1811 display the ADD NEW EMAIL GROUP SCREEN ###################### if ($ADD==1811) { if ( ($LOGmodify_ingroups==1) and ($SSallow_emails>0) ) { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Email "._QXZ("ADD A NEW EMAIL GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= "";} echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group ID").": "._QXZ("Auto-Generated")." $NWB#inbound_groups-group_id$NWE
"._QXZ("Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
Voicemail: $NWB#inbound_groups-voicemail_ext$NWE
"._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Script").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Script Two").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Get Call Launch").": $NWB#inbound_groups-get_call_launch$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=18111 display the ADD NEW CHAT GROUP SCREEN ###################### if ($ADD==18111) { if ( ($LOGmodify_ingroups==1) and ($SSallow_chats>0) ) { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Chat "._QXZ("ADD A NEW CHAT GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= "";} echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group ID").": "._QXZ("Auto-Generated")."$NWB#inbound_groups-group_id$NWE
"._QXZ("Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("Default List ID").": $NWB#inbound_groups-default_list_id$NWE
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
Voicemail: $NWB#inbound_groups-voicemail_ext$NWE
"._QXZ("Next Agent Chat").": $NWB#inbound_groups-next_agent_chat$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Script").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Script Two").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Get Call Launch").": $NWB#inbound_groups-get_call_launch$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Inbound\" "; echo "
"._QXZ("COPY INBOUND GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group ID").": "._QXZ("Auto-Generated")." $NWB#inbound_groups-group_id$NWE
"._QXZ("Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Source Group ID").": $NWB#inbound_groups-group_id$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1911 display the COPY EMAIL INBOUND GROUP SCREEN ###################### if ($ADD==1911) { if ( ($LOGmodify_ingroups==1) and ($SSallow_emails>0) ) { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Email "._QXZ("COPY EMAIL GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Email Group ID").": "._QXZ("Auto-Generated")." $NWB#inbound_groups-group_id$NWE
"._QXZ("Email Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Email Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Source Email Group ID").": $NWB#inbound_groups-group_id$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=19111 display the COPY CHAT INBOUND GROUP SCREEN ###################### if ($ADD==19111) { if ( ($LOGmodify_ingroups==1) and ($SSallow_chats>0) ) { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Chat "._QXZ("COPY CHAT GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Chat Group ID").": "._QXZ("Auto-Generated")." $NWB#inbound_groups-group_id$NWE
"._QXZ("Chat Group ID").": ("._QXZ("no spaces").")$NWB#inbound_groups-group_id$NWE
"._QXZ("Chat Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Source Chat Group ID").": $NWB#inbound_groups-group_id$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1311 display the ADD NEW DID SCREEN ###################### if ($ADD==1311) { if ($LOGmodify_dids==1) { echo "
\n"; echo ""; echo "\"DIDs\" "._QXZ("ADD A NEW DID")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("DID Extension").": ("._QXZ("no spaces or dashes").")$NWB#inbound_dids-did_pattern$NWE
"._QXZ("DID Description").": $NWB#inbound_dids-did_description$NWE
"._QXZ("Admin User Group").": $NWB#inbound_dids-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1411 display the COPY DID SCREEN ###################### if ($ADD==1411) { if ($LOGmodify_dids==1) { echo "
\n"; echo ""; echo "\"DIDs\" "._QXZ("COPY DID")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("DID Extension").": ("._QXZ("no spaces or dashes").")$NWB#inbound_dids-did_pattern$NWE
"._QXZ("DID Description").": $NWB#inbound_dids-did_description$NWE
"._QXZ("Source DID").": $NWB#inbound_dids-did_pattern$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Call "._QXZ("ADD A NEW CALL MENU")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Menu ID").": "._QXZ("Auto-Generated")." $NWB#call_menu-menu_id$NWE
"._QXZ("Menu ID").": ("._QXZ("no spaces or special characters").")$NWB#call_menu-menu_id$NWE
"._QXZ("Menu Name").": $NWB#call_menu-menu_name$NWE
"._QXZ("Admin User Group").": $NWB#call_menu-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo ""; echo "\"Call "._QXZ("COPY CALL MENU")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Menu ID").": "._QXZ("Auto-Generated")." $NWB#call_menu-menu_id$NWE
"._QXZ("Menu ID").": ("._QXZ("no spaces or special characters").")$NWB#call_menu-menu_id$NWE
"._QXZ("Menu Name").": $NWB#call_menu-menu_name$NWE
"._QXZ("Source Menu").": $NWB#call_menu-menu_id$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1711 display the ADD NEW FILTER PHONE GROUP SCREEN ###################### if ($ADD==1711) { if ($LOGmodify_dids==1) { echo "
\n"; echo ""; echo "\"Filter "._QXZ("Add Filter Phone Group")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Filter Phone Group ID").": ("._QXZ("no spaces or special characters").")$NWB#filter_phone_groups-filter_phone_group_id$NWE
"._QXZ("Filter Phone Group Name").": $NWB#filter_phone_groups-filter_phone_group_name$NWE
"._QXZ("Filter Phone Group Description").": $NWB#filter_phone_groups-filter_phone_group_description$NWE
"._QXZ("Admin User Group").": $NWB#filter_phone_groups-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN ###################### if ($ADD==11111) { if ( ($LOGmodify_remoteagents==1) and ($x_ra_carrier < 1) ) { echo "
\n"; echo "\"Remote "; echo "
"._QXZ("ADD NEW REMOTE AGENTS")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("User ID Start").": ("._QXZ("numbers only, incremented, must be an existing vicidial user").")$NWB#remote_agents-user_start$NWE
"._QXZ("Number of Lines").": ("._QXZ("numbers only").")$NWB#remote_agents-number_of_lines$NWE
"._QXZ("Server IP").": $NWB#remote_agents-server_ip$NWE
"._QXZ("External Extension").": ("._QXZ("dial plan number dialed to reach agents").")$NWB#remote_agents-conf_exten$NWE
"._QXZ("Status").": $NWB#remote_agents-status$NWE
"._QXZ("Campaign").": $NWB#remote_agents-campaign_id$NWE
"._QXZ("Inbound Groups").": \n"; echo "$groups_list"; echo "$NWB#remote_agents-closer_campaigns$NWE
\n"; echo _QXZ("NOTE: It can take up to 30 seconds for changes submitted on this screen to go live")."\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=12111 display the ADD NEW EXTENSION GROUP SCREEN ###################### if ($ADD==12111) { if ($LOGmodify_remoteagents==1) { echo "
\n"; echo ""; echo "
"._QXZ("Add Extension Group Entry")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Extension Group").": ("._QXZ("no spaces").")$NWB#extension_groups-extension_group_id$NWE
"._QXZ("Extension").": ("._QXZ("numbers only").")$NWB#extension_groups-extension$NWE
"._QXZ("Rank").": $NWB#extension_groups-rank$NWE
"._QXZ("Campaigns Groups").": ("._QXZ("pipe-delimited list").")$NWB#extension_groups-campaign_groups$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=111111 display the ADD NEW USER 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"User "; echo "
"._QXZ("ADD NEW USERS GROUP")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "
"._QXZ("Group").": "._QXZ("Auto-Generated")." $NWB#user_groups-user_group$NWE
"._QXZ("Group").": ("._QXZ("no spaces or punctuation").")$NWB#user_groups-user_group$NWE
"._QXZ("Description").": ("._QXZ("description of group").")$NWB#user_groups-group_name$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Scripts\" "; echo "
"._QXZ("ADD NEW SCRIPT")."\n"; echo "\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Script ID").": "._QXZ("Auto-Generated")." $NWB#scripts-script_id$NWE
"._QXZ("Script ID").": ("._QXZ("no spaces or punctuation").")$NWB#scripts-script_id$NWE
"._QXZ("Script Name").": ("._QXZ("title of the script").")$NWB#scripts-script_name$NWE
"._QXZ("Script Comments").": $NWB#scripts-script_comments$NWE
"._QXZ("Active").": $NWB#scripts-active$NWE
"._QXZ("Admin User Group").": $NWB#scripts-user_group$NWE
"._QXZ("Script Text").": "; # BEGIN Insert Field echo ""; echo "
"; # END Insert Field echo " $NWB#scripts-script_text$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Filters\" "; echo "
"._QXZ("ADD NEW FILTER")."\n"; echo "\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Filter ID").": "._QXZ("Auto-Generated")." $NWB#lead_filters-lead_filter_id$NWE
"._QXZ("Filter ID").": ("._QXZ("no spaces or punctuation").")$NWB#lead_filters-lead_filter_id$NWE
"._QXZ("Filter Name").": ("._QXZ("short description of the filter").")$NWB#lead_filters-lead_filter_name$NWE
"._QXZ("Filter Comments").": $NWB#lead_filters-lead_filter_comments$NWE
"._QXZ("Admin User Group").": $NWB#lead_filters-user_group$NWE
"._QXZ("Filter SQL").": $NWB#lead_filters-lead_filter_sql$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=111111111 display the ADD NEW CALL TIME SCREEN ###################### if ($ADD==111111111) { if ($LOGmodify_call_times==1) { echo "
\n"; echo "\"Call "; echo "
"._QXZ("ADD NEW CALL TIME")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Call Time ID").": ("._QXZ("no spaces or punctuation").")$NWB#call_times-call_time_id$NWE
"._QXZ("Call Time Name").": ("._QXZ("short description of the call time").")$NWB#call_times-call_time_name$NWE
"._QXZ("Call Time Comments").": $NWB#call_times-call_time_comments$NWE
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Day and time options will appear once you have created the Call Time Definition")."
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN ###################### if ($ADD==1111111111) { if ($LOGmodify_call_times==1) { echo "
\n"; echo "\"State "; echo "
"._QXZ("ADD NEW STATE CALL TIME")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("State Call Time ID").": ("._QXZ("no spaces or punctuation").")$NWB#call_times-call_time_id$NWE
"._QXZ("State Call Time State").": ("._QXZ("no spaces or punctuation").")$NWB#call_times-state_call_time_state$NWE
"._QXZ("State Call Time Name").": ("._QXZ("short description of the call time").")$NWB#call_times-call_time_name$NWE
"._QXZ("State Call Time Comments").": $NWB#call_times-call_time_comments$NWE
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Day and time options will appear once you have created the Call Time Definition")."
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1211111111 display the ADD NEW HOLIDAY SCREEN ###################### if ($ADD==1211111111) { if ($LOGmodify_call_times==1) { echo "
\n"; echo "\"Holidays\" "; echo "
"._QXZ("ADD NEW STATE CALL TIME")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Holiday ID").": ("._QXZ("no spaces or punctuation").")$NWB#call_times-holiday_id$NWE
"._QXZ("Holiday Name").": ("._QXZ("short description of the holiday").")$NWB#call_times-holiday_name$NWE
"._QXZ("Holiday Comments").": $NWB#call_times-holiday_comments$NWE
"._QXZ("Holiday Date").": $NWB#call_times-holiday_date$NWE\n"; echo "
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Day and time options will appear once you have created the Holiday Definition")."
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=131111111 display the ADD NEW SHIFT SCREEN ###################### if ($ADD==131111111) { if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { echo "
\n"; echo "\"Shifts\" "; echo "
"._QXZ("ADD NEW SHIFT")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Shift ID").": ("._QXZ("no spaces or punctuation").")$NWB#shifts-shift_id$NWE
"._QXZ("Shift Name").": ("._QXZ("short description of the shift").")$NWB#shifts-shift_name$NWE
"._QXZ("Admin User Group").": $NWB#shifts-user_group$NWE
"._QXZ("Shift Start Time").": \n"; echo "   "._QXZ("Shift End Time").": \n"; echo " $NWB#shifts-shift_start_time$NWE
"._QXZ("Shift Length").": $NWB#shifts-shift_length$NWE
"._QXZ("Shift Weekdays").":
$NWB#shifts-shift_weekdays$NWE
\n"; echo "Sunday
\n"; echo "Monday
\n"; echo "Tuesday
\n"; echo "Wednesday
\n"; echo "Thursday
\n"; echo "Friday
\n"; echo "Saturday
\n"; echo "
"._QXZ("Report Option").": $NWB#shifts-report_option$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=11111111111 display the ADD NEW PHONE SCREEN ###################### if ($ADD==11111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Phones\" "; echo "
"._QXZ("ADD A NEW PHONE")."\n"; ##### Lookup settings container ##### $SScontainer_stmt="select phone_defaults_container from system_settings limit 1"; $SScontainer_rslt=mysql_to_mysqli($SScontainer_stmt, $link); $SScontainer_row=mysqli_fetch_row($SScontainer_rslt); $dps=array("voicemail_id" => "", "outbound_cid" => "", "user_group" => "", "server_ip" => "", "pass" => "", "conf_secret" => "", "status" => "", "active" => "", "phone_type" => "", "protocol" => "", "local_gmt" => ""); # Default phone setting array if (!preg_match('/\-\-\-DISABLED\-\-\-/', $SScontainer_row[0])) { $container_stmt="select container_entry from vicidial_settings_containers where container_id='$SScontainer_row[0]'"; $container_rslt=mysql_to_mysqli($container_stmt, $link); $container_entry=""; if (mysqli_num_rows($container_rslt)>0) { echo ""._QXZ("Using default phone setting container")." $SScontainer_row[0]...
\n"; $container_row=mysqli_fetch_row($container_rslt); $container_entry=$container_row[0]; $container_entry_array=explode("\n", $container_entry); for ($c=0; $c", $container_line); if (strlen(trim($current_setting_array[0]))>0 && strlen(trim($current_setting_array[1]))>0) { # $$current_setting_array[0]=$current_setting_array[1]; $dps[trim($current_setting_array[0])]=trim($current_setting_array[1]); } } } } } echo "\n"; echo "
\n"; echo "
\n"; if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; # echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($dps["pass"]) { $SSdefault_phone_login_password=$dps["pass"]; } if ($dps["conf_secret"]) { $SSdefault_phone_registration_password=$dps["conf_secret"]; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # echo "\n"; # echo "\n"; echo "\n"; if ($dps["local_gmt"]) { $SSdefault_local_gmt=$dps["local_gmt"]; } echo "\n"; echo "\n"; echo "
"._QXZ("Phone Extension").": "._QXZ("Auto-Generated")." $NWB#phones-extension$NWE
"._QXZ("Phone Extension").": $NWB#phones-extension$NWE
"._QXZ("Dial Plan Number").": ("._QXZ("digits only").")$NWB#phones-dialplan_number$NWE
"._QXZ("Voicemail Box").": ("._QXZ("digits only").")$NWB#phones-voicemail_id$NWE
"._QXZ("Outbound CallerID").": ("._QXZ("digits only").")$NWB#phones-outbound_cid$NWE
Phone IP address: (optional)$NWB#phones-phone_ip$NWE
Computer IP address: (optional)$NWB#phones-computer_ip$NWE
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
"._QXZ("Server IP").": $NWB#phones-server_ip$NWE
"._QXZ("Agent Screen Login").": $NWB#phones-login$NWE
"._QXZ("Login Password").": $NWB#phones-pass$NWE
"._QXZ("Registration Password").": $NWB#phones-conf_secret$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Status").": $NWB#phones-status$NWE
"._QXZ("Active Account").": $NWB#phones-active$NWE
"._QXZ("Phone Type").": $NWB#phones-phone_type$NWE
"._QXZ("Full Name").": $NWB#phones-fullname$NWE
Company: $NWB#phones-company$NWE
Picture: $NWB#phones-picture$NWE
"._QXZ("Client Protocol").": $NWB#phones-protocol$NWE
"._QXZ("Local GMT").": ("._QXZ("Do NOT Adjust for DST").")$NWB#phones-local_gmt$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=21222222222 adds copied new phone to the system ###################### if ($ADD==21222222222) { $source_phone_array=explode("|", $source_phone); $source_extension=(isset($source_phone_array[0]) ? $source_phone_array[0] : ""); $source_server_ip=(isset($source_phone_array[1]) ? $source_phone_array[1] : ""); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $stmt="SELECT count(*) from phones where extension='$source_extension' and server_ip='$source_server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { echo "
"._QXZ("PHONE NOT COPIED - Your selected Source Phone does not exist")."\n"; } else { echo ""; $stmt="SELECT count(*) from phones where extension='$new_extension' and server_ip='$new_server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT COPIED - there is already a phone in the system with this extension/server")."\n";} else { $stmt="SELECT count(*) from phones where login='$new_login';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT COPIED - there is already a Phone in the system with this login")."\n";} else { $stmt="SELECT count(*) from phones_alias where alias_id='$new_login';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT COPIED - there is already a Phone alias in the system with this login")."\n";} else { $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$new_voicemail_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT COPIED - there is already a Voicemail ID in the system with this ID")."\n";} else { if ( (strlen($new_extension) < 1) or (strlen($new_server_ip) < 7) or (strlen($new_dialplan_number) < 1) or (strlen($new_voicemail_id) < 1) or (strlen($new_login) < 1) or (strlen($new_pass) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($new_conf_secret)) )) { echo "
"._QXZ("PHONE NOT COPIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("The following fields must have data").": extension, server_ip, dialplan_number, voicemail_id, login, pass\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("registration password must be at least $SSrequire_password_length characters long")."\n"; } } else { $ins_stmt="INSERT INTO phones(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, is_webphone, use_external_server_ip, codecs_list, codecs_with_template, webphone_dialpad, on_hook_agent, webphone_auto_answer, voicemail_timezone, voicemail_options, user_group, voicemail_greeting, voicemail_dump_exten_no_inst, voicemail_instructions, on_login_report, unavail_dialplan_fwd_exten, unavail_dialplan_fwd_context, nva_call_url, nva_search_method, nva_error_filename, nva_new_list_id, nva_new_phone_code, nva_new_status, webphone_dialbox, webphone_mute, webphone_volume, webphone_debug, outbound_alt_cid, conf_qualify, webphone_layout, mohsuggest, webphone_settings) SELECT '$new_extension', '$new_dialplan_number', '$new_voicemail_id', phone_ip, computer_ip, '$new_server_ip', '$new_login', '$new_pass', status, active, phone_type, '$new_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, '$new_outbound_cid', enable_sipsak_messages, email, template_id, conf_override, phone_context, phone_ring_timeout, '$new_conf_secret', delete_vm_after_email, is_webphone, use_external_server_ip, codecs_list, codecs_with_template, webphone_dialpad, on_hook_agent, webphone_auto_answer, voicemail_timezone, voicemail_options, user_group, voicemail_greeting, voicemail_dump_exten_no_inst, voicemail_instructions, on_login_report, unavail_dialplan_fwd_exten, unavail_dialplan_fwd_context, nva_call_url, nva_search_method, nva_error_filename, nva_new_list_id, nva_new_phone_code, nva_new_status, webphone_dialbox, webphone_mute, webphone_volume, webphone_debug, outbound_alt_cid, conf_qualify, webphone_layout, mohsuggest, webphone_settings from phones where extension='$source_extension' and server_ip='$source_server_ip'"; $ins_rslt=mysql_to_mysqli($ins_stmt, $link); $affected_rows = mysqli_affected_rows($link); if ($affected_rows>0) { echo "
"._QXZ("PHONE COPIED").": $new_extension, $new_server_ip - VIEW HERE.

Please allow up to 1 minute for the server dialplan to update with the new phone.\n"; $upd_stmt="UPDATE servers set rebuild_conf_files='Y' where server_ip='$new_server_ip';"; $upd_rslt=mysql_to_mysqli($upd_stmt, $link); $affected_rowsS = mysqli_affected_rows($link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$ins_stmt|$upd_stmt"; $SQL_log = preg_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='COPY', record_id='$new_extension-$new_server_ip', event_code='ADMIN COPY PHONE', event_sql=\"$SQL_log\", event_notes='$affected_rows,$affected_rowsS';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } else { echo "
"._QXZ("UNKNOWN SQL ERROR - $ins_stmt")."\n"; } } } } } } } } echo "
"; $ADD=12222222222; } ###################### # ADD=12222222222 display the COPY PHONE SCREEN ###################### if ($ADD==12222222222) { if ($LOGmodify_phones==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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $voi_count = "$row[0]"; } ##### END ID override optional section ##### echo "
\n"; echo "\"Phones\" "; echo ""._QXZ("COPY A PHONE")."\n"; echo "\n"; echo "\n"; echo "
\n"; /* if ($voi_count > 0) { echo "\n"; } else { echo "\n"; } */ echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Campaign ID").": "._QXZ("Auto-Generated")." $NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign ID").": $NWB#campaigns-campaign_id$NWE
"._QXZ("Phone Extension").": $NWB#phones-extension$NWE
"._QXZ("Dial Plan Number").": ("._QXZ("digits only").")$NWB#phones-dialplan_number$NWE
"._QXZ("Voicemail Box").": ("._QXZ("digits only").")$NWB#phones-voicemail_id$NWE
"._QXZ("Outbound CallerID").": ("._QXZ("digits only").")$NWB#phones-outbound_cid$NWE
"._QXZ("Server IP").": $NWB#phones-server_ip$NWE
"._QXZ("Agent Screen Login").": $NWB#phones-login$NWE
"._QXZ("Login Password").": $NWB#phones-pass$NWE
"._QXZ("Registration Password").": $NWB#phones-conf_secret$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Full Name").": $NWB#phones-fullname$NWE
"._QXZ("Source Phone").": $NWB#campaigns-campaign_id$NWE
"._QXZ("NOTE: Copying a phone will copy all the settings from the selected source phone, except for the settings entered above.")."
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=12111111111 display the ADD NEW PHONE ALIAS SCREEN ###################### if ($ADD==12111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo "
\n"; echo "\"Phones\" "; echo "
"._QXZ("ADD A NEW PHONE ALIAS")."\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Alias ID").": $NWB#phones-alias_id$NWE
"._QXZ("Alias Name").": $NWB#phones-alias_name$NWE
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
"._QXZ("Phone Logins List").": ("._QXZ("comma separated").")$NWB#phones-logins_list$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=13111111111 display the ADD NEW GROUP ALIAS SCREEN ###################### if ($ADD==13111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { echo "
\n"; echo "\"Phones\" "; echo "
"._QXZ("ADD A NEW GROUP ALIAS")."\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group Alias ID").": $NWB#phones-group_alias_id$NWE
"._QXZ("Group Alias Name").": $NWB#phones-group_alias_name$NWE
"._QXZ("CallerID Number").": $NWB#phones-caller_id_number$NWE
"._QXZ("CallerID Name").": $NWB#phones-caller_id_name$NWE
"._QXZ("Active").":
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=111111111111 display the ADD NEW SERVER SCREEN ###################### if ($ADD==111111111111) { if ($LOGmodify_servers==1) { echo "
\n"; echo "\"Servers\" "; echo "
"._QXZ("ADD A NEW SERVER")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Server ID").": $NWB#servers-server_id$NWE
"._QXZ("Server Description").": $NWB#servers-server_description$NWE
"._QXZ("Server IP Address").": $NWB#servers-server_ip$NWE
"._QXZ("Active").": $NWB#servers-active$NWE
"._QXZ("Asterisk Version").": $NWB#servers-asterisk_version$NWE
"._QXZ("Admin User Group").": $NWB#servers-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=131111111111 display the ADD NEW CONF TEMPLATE SCREEN ###################### if ($ADD==131111111111) { if ($LOGmodify_servers==1) { echo "
\n"; echo "\"Templates\" "; echo "
"._QXZ("ADD NEW CONF TEMPLATE")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Template ID").": $NWB#conf_templates-template_id$NWE
"._QXZ("Template Name").": $NWB#conf_templates-template_name$NWE
"._QXZ("Admin User Group").": $NWB#conf_templates-user_group$NWE
"._QXZ("Template Contents").": $NWB#conf_templates-template_contents$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=141111111111 display the ADD NEW CARRIER SCREEN ###################### if ($ADD==141111111111) { if ( ( ($LOGmodify_servers==1) or ($LOGmodify_carriers==1) ) and ($x_ra_carrier < 1) ) { echo "
\n"; echo "\"Carriers\" "; echo "
"._QXZ("ADD NEW CARRIER")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Carrier ID").": $NWB#server_carriers-carrier_id$NWE
"._QXZ("Carrier Name").": $NWB#server_carriers-carrier_name$NWE
"._QXZ("Carrier Description").": $NWB#server_carriers-carrier_description$NWE
"._QXZ("Admin User Group").": $NWB#server_carriers-user_group$NWE
"._QXZ("Registration String").": $NWB#server_carriers-registration_string$NWE
"._QXZ("Template ID").": $NWB#server_carriers-template_id$NWE
"._QXZ("Account Entry").": $NWB#server_carriers-account_entry$NWE
"._QXZ("Protocol").": $NWB#server_carriers-protocol$NWE
"._QXZ("Globals String").": $NWB#server_carriers-globals_string$NWE
"._QXZ("Dialplan Entry").": $NWB#server_carriers-dialplan_entry$NWE
"._QXZ("Server IP").": $NWB#server_carriers-server_ip$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=140111111111 display the ADD COPIED CARRIER SCREEN ###################### if ($ADD==140111111111) { if ( ( ($LOGmodify_servers==1) or ($LOGmodify_carriers==1) ) and ($x_ra_carrier < 1) ) { echo "
\n"; echo "\"Carriers\" "; echo "
"._QXZ("ADD COPIED CARRIER")."\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Carrier ID").": $NWB#server_carriers-carrier_id$NWE
"._QXZ("Carrier Name").": $NWB#server_carriers-carrier_name$NWE
"._QXZ("Server IP").": $NWB#server_carriers-server_ip$NWE
"._QXZ("Source Carrier").": $NWB#server_carriers-carrier_id$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=151111111111 display the ADD NEW TTS ENTRY SCREEN ###################### if ($ADD==151111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_tts==1) ) { echo "
\n"; echo "\"Text "; echo "
"._QXZ("ADD NEW TTS ENTRY")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("TTS ID").": $NWB#tts_prompts-tts_id$NWE
"._QXZ("TTS Name").": $NWB#tts_prompts-tts_name$NWE
"._QXZ("Active").":
"._QXZ("Admin User Group").": $NWB#tts_prompts-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=161111111111 display the ADD NEW MUSIC ON HOLD ENTRY SCREEN ###################### if ($ADD==161111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_moh==1) ) { echo "
\n"; echo "\"Music "; echo "
"._QXZ("ADD NEW MUSIC ON HOLD ENTRY")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Music On Hold ID").": $NWB#music_on_hold-moh_id$NWE
"._QXZ("Music On Hold Name").": $NWB#music_on_hold-moh_name$NWE
"._QXZ("Random Order").":
"._QXZ("Admin User Group").": $NWB#music_on_hold-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=171111111111 display the ADD NEW VOICEMAIL BOX SCREEN ###################### if ($ADD==171111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_moh==1) ) { echo "
\n"; echo "\"Voicemail\" "; echo "
"._QXZ("ADD NEW VOICEMAIL BOX")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Voicemail ID").": $NWB#voicemail-voicemail_id$NWE
"._QXZ("Pass").": $NWB#voicemail-pass$NWE
"._QXZ("Name").": $NWB#voicemail-fullname$NWE
"._QXZ("Active").":
"._QXZ("Email").": $NWB#voicemail-email$NWE
"._QXZ("Admin User Group").": $NWB#voicemail-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=181111111111 display the ADD NEW SCREEN LABEL SCREEN ###################### if ($ADD==181111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_labels==1) ) { echo "
\n"; echo "\"Screen "; echo "
"._QXZ("ADD NEW SCREEN LABEL")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Screen Label ID").": $NWB#screen_labels-label_id$NWE
"._QXZ("Screen Label Name").": $NWB#screen_labels-label_name$NWE
"._QXZ("Admin User Group").": $NWB#screen_labels-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=182111111111 display the ADD NEW SCREEN LABEL SCREEN ###################### if ($ADD==182111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_colors==1) ) { echo "
\n"; echo "\"Screen "; echo "
"._QXZ("ADD NEW SCREEN COLORS")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Screen Colors ID").": $NWB#screen_labels-label_id$NWE
"._QXZ("Screen Colors Name").": $NWB#screen_labels-label_name$NWE
"._QXZ("Admin User Group").": $NWB#screen_labels-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=191111111111 display the ADD NEW CONTACT SCREEN ###################### if ($ADD==191111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_contacts==1) ) { echo "
\n"; echo "\"Contacts\" "; echo "
"._QXZ("ADD NEW CONTACT")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("First Name").": $NWB#contact_information$NWE
"._QXZ("Last Name").": $NWB#contact_information$NWE
"._QXZ("Office Number").": $NWB#contact_information$NWE
"._QXZ("Cell Number").": $NWB#contact_information$NWE
"._QXZ("Other Number")." 1: $NWB#contact_information$NWE
"._QXZ("Other Number")." 2: $NWB#contact_information$NWE
"._QXZ("BU Name").": $NWB#contact_information$NWE
"._QXZ("Department").": $NWB#contact_information$NWE
"._QXZ("Group").": $NWB#contact_information$NWE
"._QXZ("Job Title").": $NWB#contact_information$NWE
"._QXZ("Location").": $NWB#contact_information$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=192111111111 display the ADD NEW SETTINGS CONTAINER ###################### if ($ADD==192111111111) { if ($LOGmodify_servers==1) { echo "
\n"; echo "\"Settings "; echo "
"._QXZ("ADD NEW SETTINGS CONTAINER")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Container ID").": $NWB#settings_containers-container_id$NWE
"._QXZ("Container Notes").": $NWB#settings_containers-container_notes$NWE
"._QXZ("Container Type").": $NWB#settings_containers-container_type$NWE
"._QXZ("Admin User Group").": $NWB#settings_containers-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=193111111111 display the ADD NEW Statuses Group ###################### if ($ADD==193111111111) { if ($LOGmodify_statuses==1) { echo "
\n"; echo "\"Status "; echo "
"._QXZ("ADD NEW STATUSES GROUP")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Status Group ID").": $NWB#status_groups$NWE
"._QXZ("Status Group Notes").": $NWB#status_groups$NWE
"._QXZ("Admin User Group").": $NWB#status_groups$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=194111111111 display the ADD NEW AUTOMATED REPORT screen ###################### if ($ADD==194111111111) { if ($LOGmodify_auto_reports==1) { echo "
\n"; echo "\"Automated "; echo "
"._QXZ("ADD NEW AUTOMATED REPORT")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Report ID").": $NWB#auto_reports-report_id$NWE
"._QXZ("Report Name").": $NWB#auto_reports-report_name$NWE
"._QXZ("Admin User Group").": $NWB#auto_reports-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=195111111111 display the ADD NEW IP LIST screen ###################### if ($ADD==195111111111) { if ($LOGmodify_ip_lists==1) { echo "
\n"; echo "\"IP "; echo "
"._QXZ("ADD NEW IP LIST")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("IP List ID").": $NWB#ip_lists-ip_list_id$NWE
"._QXZ("IP List Name").": $NWB#ip_lists-ip_list_name$NWE
"._QXZ("Admin User Group").": $NWB#ip_lists-user_group$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=196111111111 display the ADD NEW CID Group ###################### if ($ADD==196111111111) { if ($LOGmodify_statuses==1) { echo "
\n"; echo "\"CID "; echo "
"._QXZ("ADD NEW CID GROUP")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("CID Group ID").": $NWB#cid_groups$NWE
"._QXZ("CID Group Notes").": $NWB#cid_groups$NWE
"._QXZ("CID Group Type").": $NWB#cid_groups$NWE
"._QXZ("Admin User Group").": $NWB#cid_groups$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=197111111111 display the ADD NEW VM MESSAGE Group ###################### if ($ADD==197111111111) { if ($LOGmodify_statuses==1) { echo "
\n"; echo "\"VM "; echo "
"._QXZ("ADD NEW VM MESSAGE GROUP")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("VM Message Group ID").": $NWB#vm_message_groups$NWE
"._QXZ("VM Message Group Notes").": $NWB#vm_message_groups$NWE
"._QXZ("Active").": $NWB#vm_message_groups$NWE
"._QXZ("Admin User Group").": $NWB#vm_message_groups$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=198111111111 display the ADD NEW Queue Group ###################### if ($ADD==198111111111) { if ($LOGmodify_statuses==1) { echo "
\n"; echo "\"Queue "; echo "
"._QXZ("ADD NEW QUEUE GROUP")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Queue Group ID").": $NWB#queue_groups$NWE
"._QXZ("Queue Group Name").": $NWB#queue_groups$NWE
"._QXZ("Active").": $NWB#queue_groups$NWE
"._QXZ("Admin User Group").": $NWB#queue_groups$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN ###################### if ($ADD==1111111111111) { if ($LOGast_admin_access==1) { echo "
\n"; echo "\"Conferences\" "; echo "
"._QXZ("ADD A NEW CONFERENCE")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Conference Number").": ("._QXZ("digits only").")$NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN ###################### if ($ADD==11111111111111) { if ($LOGast_admin_access==1) { echo "
\n"; echo "\"Conferences\" "; echo "
"._QXZ("ADD A NEW AGENT CONFERENCE")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Conference Number").": ("._QXZ("digits only").")$NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=12111111111111 display the ADD NEW VICIDIAL CONFBRIDGE SCREEN ###################### if ($ADD==12111111111111) { if ($LOGast_admin_access==1) { echo "
\n"; echo "\"ConfBridges\" "; echo "
"._QXZ("ADD A NEW AGENT CONFBRIDGE")."\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("ConfBridge Number").": ("._QXZ("digits only").")$NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
\n"; } else { echo _QXZ("You do not have permission to view this page")."\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") { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo "\"Users\" "; $stmt="SELECT count(*) from vicidial_users where user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("USER NOT ADDED - there is already a user in the system with this user number")."\n";} else { if (preg_match('/AUTOGENERA/',$user)) { $user = 'AUTOGENERA'; } if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or (preg_match('/---ALL---/',$user_group)) or ( (mb_strlen($user,'utf-8') > 20) and (!preg_match('/AUTOGENERA/',$user)) ) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) ) { echo "
"._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("user id must be between 2 and 20 characters long")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("full name must be at least 2 characters long")."\n"; echo "
"._QXZ("password must be at least $SSrequire_password_length characters long")."\n"; } else {echo "
"._QXZ("full name and password must be at least 2 characters long")."\n";} echo "
"._QXZ("you must select a user group")."\n"; exit; } else { if (preg_match('/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_to_mysqli($stmt, $link); $ss_auav_ct = mysqli_num_rows($rslt); if ($ss_auav_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { $new_user++; } else { echo "\n"; $auto_user_add_value = ($auto_user_add_value + 7); } } $user = $auto_user_add_value; echo "
user_id "._QXZ("has been auto-generated").": $user
\n"; $stmt="UPDATE system_settings SET auto_user_add_value='$user';"; $rslt=mysql_to_mysqli($stmt, $link); } $pass_hash=''; if ($SSpass_hash_enabled > 0) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass=''; } echo "
"._QXZ("USER ADDED").": $user\n"; $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,pass_hash) values('$user','$pass','$full_name','$user_level','$user_group','$phone_login','$phone_pass','$pass_hash');"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows_user = mysqli_affected_rows($link); if ($DB) {echo "$affected_rows_user|$stmt|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='USERS', event_type='ADD', record_id='$user', event_code='ADMIN ADD USER', event_sql=\"$SQL_log\", event_notes='user: $user inserts: $affected_rows_user';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $user_name = $user; $user_password = $pass; $last_name = $full_name; $is_admin = 'off'; $roleid = 'H5'; $status = 'Active'; $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); ### search for role in ViciDial $stmt = "SELECT vtiger_role FROM vtiger_vicidial_roles where user_level='$user_level';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $vvr_ct = mysqli_num_rows($rslt); if ($vvr_ct > 0) { $row=mysqli_fetch_row($rslt); $roleid = $row[0]; } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $userid = $row[0]; $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} if ($usergroupcount < 1) { $stmt="SELECT user_group FROM vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_groups_ct = mysqli_num_rows($rslt); $k=0; $VD_groups_list=''; while ($k < $VD_groups_ct) { $row=mysqli_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_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $userid = mysqli_insert_id($linkV); $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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") { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo "\"Users\" "; $stmt="SELECT count(*) from vicidial_users where user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("USER NOT ADDED - there is already a user in the system with this user number")."\n";} else { if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (mb_strlen($user,'utf-8') > 20) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) ) { echo "
"._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("user id must be between 2 and 20 characters long")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("full name must be at least 2 characters long")."\n"; echo "
"._QXZ("password must be at least $SSrequire_password_length characters long")."\n"; } else {echo "
"._QXZ("full name and password must be at least 2 characters long")."\n";} echo "\n"; exit; } else { if (preg_match('/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_to_mysqli($stmt, $link); $ss_auav_ct = mysqli_num_rows($rslt); if ($ss_auav_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { $new_user++; } else { echo "\n"; $auto_user_add_value = ($auto_user_add_value + 7); } } $user = $auto_user_add_value; echo "
user_id "._QXZ("has been auto-generated").": $user
\n"; $stmt="UPDATE system_settings SET auto_user_add_value='$user';"; $rslt=mysql_to_mysqli($stmt, $link); } $pass_hash=''; if ($SSpass_hash_enabled > 0) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass=''; } $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,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,pass_hash,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location,download_invalid_files,user_group_two,modify_dial_prefix,inbound_credits,hci_enabled,manual_dial_lead_id,modify_settings_containers) 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,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,agentcall_chat,modify_email_accounts,\"$pass_hash\",alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,admin_cf_show_hidden,user_hide_realtime,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,access_recordings,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location,download_invalid_files,user_group_two,modify_dial_prefix,inbound_credits,hci_enabled,manual_dial_lead_id,modify_settings_containers from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today,group_type,daily_limit) SELECT \"$user\",group_id,group_rank,group_weight,\"0\",group_type,daily_limit from vicidial_inbound_group_agents where user=\"$source_user_id\";"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="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_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='USERS', event_type='COPY', record_id='$user', event_code='ADMIN COPY USER', event_sql=\"$SQL_log\", event_notes='user: $user';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $user_name = $user; $user_password = $pass; $last_name = $full_name; $is_admin = 'off'; $roleid = 'H5'; $status = 'Active'; $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); ### search for role in ViciDial $stmt = "SELECT vtiger_role FROM vtiger_vicidial_roles where user_level='$user_level';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $vvr_ct = mysqli_num_rows($rslt); if ($vvr_ct > 0) { $row=mysqli_fetch_row($rslt); $roleid = $row[0]; } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $userid = $row[0]; $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} if ($usergroupcount < 1) { $stmt="SELECT user_group FROM vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_groups_ct = mysqli_num_rows($rslt); $k=0; $VD_groups_list=''; while ($k < $VD_groups_ct) { $row=mysqli_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_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $userid = mysqli_insert_id($linkV); $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} #### END CREATE NEW USER RECORD IN VTIGER } ##### END Add/Update user info in Vtiger ###################################### } ### END vtiger integration echo "
"._QXZ("USER COPIED").": $user "._QXZ("copied from")." $source_user_id\n"; echo "

\n"; echo ""._QXZ("Click here to go to the user record")."\n"; echo "

\n"; } } } exit; } ###################### # ADD=21 adds the new campaign to the system ###################### if ($ADD==21) { $campaign_id = preg_replace("/\-/",'',$campaign_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo "\"Campaigns\" "; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already an inbound group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_status_groups where status_group_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already a status group in the system with this ID")."\n";} else { if ( (strlen($campaign_id) < 2) or (mb_strlen($campaign_id,'utf-8') > 8) or (strlen($campaign_name) < 6) or (mb_strlen($campaign_name,'utf-8') > 40) ) { echo "
"._QXZ("CAMPAIGN NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("campaign ID must be between 2 and 8 characters in length")."\n"; echo "
"._QXZ("campaign name must be between 6 and 40 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN ADDED").": $campaign_id\n"; # if admin user's user group does not have -ALL-CAMPAIGNS- then add this new campaign to their user group's allowable campaigns if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { $UPDATEallowed_campaigns = $LOGallowed_campaigns; $UPDATEallowed_campaigns = preg_replace("/ -$/"," $campaign_id -",$UPDATEallowed_campaigns); $LOGallowed_campaigns = $UPDATEallowed_campaigns; $rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns); $rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL); $LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')"; $whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')"; $regexLOGallowed_campaigns = " $LOGallowed_campaigns "; $stmt="UPDATE vicidial_user_groups SET allowed_campaigns='$UPDATEallowed_campaigns' where user_group='$LOGuser_group';"; $rslt=mysql_to_mysqli($stmt, $link); } $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,na_call_url,user_group,web_form_address_three,campaign_script_two,survey_first_audio_file,survey_ni_audio_file,survey_opt_in_audio_file,survey_third_audio_file,survey_fourth_audio_file,agent_hangup_value) values('$campaign_id','$campaign_name','$campaign_description','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysqli_real_escape_string($link, $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','','','','','$user_group','','$campaign_script_two','US_pol_survey_hello','US_thanks_no_contact','US_pol_survey_transfer','US_thanks_no_contact','US_thanks_no_contact','');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$campaign_id');"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='CAMPAIGNS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } } $ADD=31; } ###################### # ADD=20 adds copied new campaign to the system ###################### if ($ADD==20) { $campaign_id = preg_replace("/\-/",'',$campaign_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo "\"Campaigns\" "; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already an inbound group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_status_groups where status_group_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN NOT ADDED - there is already a status group in the system with this ID")."\n";} else { if ( (strlen($campaign_id) < 2) or (mb_strlen($campaign_id,'utf-8') > 8) or (strlen($campaign_name) < 6) or (strlen($source_campaign_id) < 2) or (mb_strlen($source_campaign_id,'utf-8') > 8) ) { echo "
"._QXZ("CAMPAIGN NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("campaign ID must be between 2 and 8 characters in length")."\n"; echo "
"._QXZ("source campaign ID must be between 2 and 8 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN COPIED").": $campaign_id "._QXZ("copied from")." $source_campaign_id\n"; # if admin user's user group does not have -ALL-CAMPAIGNS- then add this new campaign to their user group's allowable campaigns if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { $UPDATEallowed_campaigns = $LOGallowed_campaigns; $UPDATEallowed_campaigns = preg_replace("/ -$/"," $campaign_id -",$UPDATEallowed_campaigns); $LOGallowed_campaigns = $UPDATEallowed_campaigns; $rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns); $rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL); $LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')"; $whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')"; $regexLOGallowed_campaigns = " $LOGallowed_campaigns "; $stmtX="UPDATE vicidial_user_groups SET allowed_campaigns='$UPDATEallowed_campaigns' where user_group='$LOGuser_group';"; $rslt=mysql_to_mysqli($stmtX, $link); } $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,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two,incall_tally_threshold_seconds,auto_alt_threshold,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti,demographic_quotas,demographic_quotas_container,demographic_quotas_rerank,demographic_quotas_list_resets,custom_one,custom_two,custom_three,custom_four,custom_five,dead_stop_recording,manual_vm_status_updates,force_per_call_notes,agent_search_ingroup_list,hopper_hold_inserts,daily_phone_number_call_limit,state_descriptions,script_tab_height,call_log_days,leave_3way_stop_recording,manual_minimum_ring_seconds,manual_minimum_attempt_seconds,manual_minimum_answer_seconds,khomp_settings_container,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,call_count_limit_restrict,adaptive_percentmax_percentage,hangup_again_link,amd_agent_display,amd_status_map) 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,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two,incall_tally_threshold_seconds,auto_alt_threshold,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti,demographic_quotas,demographic_quotas_container,demographic_quotas_rerank,demographic_quotas_list_resets,custom_one,custom_two,custom_three,custom_four,custom_five,dead_stop_recording,manual_vm_status_updates,force_per_call_notes,agent_search_ingroup_list,hopper_hold_inserts,daily_phone_number_call_limit,state_descriptions,script_tab_height,call_log_days,leave_3way_stop_recording,manual_minimum_ring_seconds,manual_minimum_attempt_seconds,manual_minimum_answer_seconds,khomp_settings_container,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,call_count_limit_restrict,adaptive_percentmax_percentage,hangup_again_link,amd_agent_display,amd_status_map from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$campaign_id');"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); $stmtC="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine) SELECT status,status_name,selectable,\"$campaign_id\",human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); $stmtD="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_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="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_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); $stmtF="INSERT INTO vicidial_pause_codes (pause_code,pause_code_name,billable,campaign_id,time_limit,require_mgr_approval) SELECT pause_code,pause_code_name,billable,\"$campaign_id\",time_limit,require_mgr_approval from vicidial_pause_codes where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtF, $link); $affected_rowsF = mysqli_affected_rows($link); $stmtG="INSERT INTO vicidial_xfer_presets (campaign_id,preset_name,preset_number,preset_dtmf,preset_hide_number) SELECT \"$campaign_id\",preset_name,preset_number,preset_dtmf,preset_hide_number from vicidial_xfer_presets where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtG, $link); $affected_rowsG = mysqli_affected_rows($link); $stmtH="INSERT INTO vicidial_xfer_stats (campaign_id,preset_name) SELECT \"$campaign_id\",preset_name from vicidial_xfer_presets where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtH, $link); $affected_rowsH = mysqli_affected_rows($link); $stmtI="INSERT INTO vicidial_campaign_cid_areacodes (areacode,outbound_cid,active,cid_description,campaign_id) SELECT areacode,outbound_cid,active,cid_description,\"$campaign_id\" from vicidial_campaign_cid_areacodes where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtI, $link); $affected_rowsI = mysqli_affected_rows($link); $stmtJ="INSERT INTO vicidial_url_multi (entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,campaign_id) SELECT entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,\"$campaign_id\" from vicidial_url_multi where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtJ, $link); $affected_rowsJ = mysqli_affected_rows($link); $stmtK="SELECT count(*) from vicidial_settings_containers where container_id='AMD_AGENT_OPT_$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtK, $link); $row=mysqli_fetch_row($rslt); $AMDAOcount = $row[0]; $stmtL=""; $affected_rowsL=0; if ($AMDAOcount > 0) { $stmtL = "INSERT INTO vicidial_settings_containers (container_id,container_notes,container_type,user_group,container_entry) SELECT \"AMD_AGENT_OPT_$campaign_id\",\"AMD agent options for $campaign_id campaign\",container_type,user_group,container_entry from vicidial_settings_containers where container_id='AMD_AGENT_OPT_$source_campaign_id';"; $rslt=mysql_to_mysqli($stmtL, $link); $affected_rowsL = mysqli_affected_rows($link); } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|$stmtF|$stmtG|$stmtH|$stmtI|$stmtJ|$stmtK|$stmtL|"; $SQL_log = preg_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='CAMPAIGNS', event_type='COPY', record_id='$campaign_id', event_code='ADMIN COPY CAMPAIGN', event_sql=\"$SQL_log\", event_notes='$affected_rows|$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE|$affected_rowsF|$affected_rowsG|$affected_rowsH|$affected_rowsI|$affected_rowsJ|$AMDAOcount|$affected_rowsL';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } } $ADD=31; } ###################### # ADD=22 adds the new campaign status to the system ###################### if ($ADD==22) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name")."\n";} else { $stmt="SELECT count(*) from vicidial_statuses where status='$status_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($status_id) < 1) or (strlen($status_name) < 2) ) { echo "
"._QXZ("CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 8 characters in length")."\n"; echo "
"._QXZ("status name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN STATUS ADDED").": $campaign_id - $status_id\n"; $stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine) values('$status_id','$status_name','$selectable','$campaign_id','$human_answered','$category','$sale','$dnc','$customer_contact','$not_interested','$unworkable','$scheduled_callbacks','$completed','$min_sec','$max_sec','$answering_machine');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_STATUS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $SUB=22; $ADD=31; } ###################### # ADD=23 adds the new campaign hotkey to the system ###################### if ($ADD==23) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $HKstatus_data = explode('-----',$HKstatus); $status = $HKstatus_data[0]; $status_name = $HKstatus_data[1]; echo ""; $stmt="SELECT count(*) from vicidial_campaign_hotkeys where campaign_id='$campaign_id' and hotkey='$hotkey' and hotkey='$hotkey';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN 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 "
"._QXZ("CAMPAIGN HOT KEY NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("hotkey must be a single character between 1 and 9")." \n"; echo "
"._QXZ("status must be between 1 and 8 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN HOT KEY ADDED").": $campaign_id - $status - $hotkey\n"; $stmt="INSERT INTO vicidial_campaign_hotkeys(status,hotkey,status_name,selectable,campaign_id) values('$status','$hotkey','$status_name','$selectable','$campaign_id');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_HOTKEY', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=23; $ADD=31; } ###################### # ADD=25 adds the new campaign lead recycle entry to the system ###################### if ($ADD==25) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $status = preg_replace('/\-\-\-\-\-.*/i', '',$status); echo ""; $stmt="SELECT count(*) from vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this 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 "
"._QXZ("CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; echo "
"._QXZ("attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours")."\n"; echo "
"._QXZ("maximum attempts must be from 1 to 10")."\n"; } else { echo "
"._QXZ("CAMPAIGN LEAD RECYCLE ADDED").": $campaign_id - $status - $attempt_delay\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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_RECYCLE', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=25; $ADD=31; } ###################### # ADD=26 adds the new auto alt dial status to the campaign ###################### if ($ADD==26) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $status = preg_replace('/\-\-\-\-\-.*/i', '',$status); echo ""; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AUTO ALT DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("AUTO ALT DIAL STATUS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; } else { echo "
"._QXZ("AUTO ALT DIAL STATUS ADDED").": $campaign_id - $status\n"; $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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',campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGN_ALTDIAL', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN ALT DIAL', event_sql=\"$SQL_log\", event_notes='Status: $auto_alt_dial_statuses';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=26; $ADD=31; } ###################### # ADD=27 adds the new campaign agent pause code entry to the system ###################### if ($ADD==27) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AGENT PAUSE CODE NOT ADDED - there is already an entry for this campaign with this pause code")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (mb_strlen($pause_code,'utf-8') > 6) or (strlen($pause_code_name) < 2) ) { echo "
"._QXZ("AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("pause code must be between 1 and 6 characters in length")."\n"; echo "
"._QXZ("pause code name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("AGENT PAUSE CODE ADDED").": $campaign_id - $pause_code - $pause_code_name\n"; if (strlen($time_limit) < 1) {$time_limit='65000';} $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable,time_limit,require_mgr_approval) values('$campaign_id','$pause_code','$pause_code_name','$billable','$time_limit','$require_mgr_approval');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PAUSECODE', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN PAUSE CODE', event_sql=\"$SQL_log\", event_notes='Pause Code: $pause_code';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=27; $ADD=31; } ###################### # ADD=28 adds new status to the campaign dial statuses ###################### if ($ADD==28) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $status = preg_replace('/\-\-\-\-\-.*/i', '',$status); echo ""; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CAMPAIGN DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("CAMPAIGN DIAL STATUS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN DIAL STATUS ADDED").": $campaign_id - $status\n"; $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (strlen($row[0])<2) {$row[0] = ' -';} $dial_statuses = " $status$row[0]"; $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses',campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGN_DIALSTATUS', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN DIAL STATUS', event_sql=\"$SQL_log\", event_notes='Status: $statuses';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } #$SUB=28; $ADD=31; } ###################### # ADD=201 adds new preset to the campaign presets ###################### if ($ADD==201) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_xfer_presets where campaign_id='$campaign_id' and preset_name='$preset_name';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PRESET NOT ADDED - there is already an entry for this campaign with this preset")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($preset_name) < 1) or (strlen($preset_number) < 1) ) { echo "
"._QXZ("PRESET NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("preset name must be between 1 and 40 characters in length")."\n"; echo "
"._QXZ("preset number must be between 2 and 50 characters in length")."\n"; } else { echo "
"._QXZ("PRESET ADDED").": $campaign_id - $preset_name - $preset_number\n"; $stmt="INSERT INTO vicidial_xfer_presets(campaign_id,preset_name,preset_number,preset_dtmf,preset_hide_number) values('$campaign_id','$preset_name','$preset_number','$preset_dtmf','$preset_hide_number');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_xfer_stats(campaign_id,preset_name) values('$campaign_id','$preset_name');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PRESET', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN PRESET', event_sql=\"$SQL_log\", event_notes='Preset: $preset_name - $preset_number';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=201; $ADD=31; } ###################### # ADD=202 adds/deletes/modifies areacode cid to the campaign ###################### if ($ADD==202) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; if ($stage == 'ADD') { $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$campaign_id' and areacode='$areacode' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AREACODE CID NOT ADDED - there is already an entry for this campaign with this CID")."
\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($areacode) < 2) or (strlen($outbound_cid) < 6) ) { echo "
"._QXZ("AREACODE CID NOT ADDED - Please go back and look at the data you entered")."
\n"; } else { echo "
"._QXZ("AREACODE CID ADDED").": $campaign_id - $areacode - $outbound_cid
\n"; $stmt="INSERT INTO vicidial_campaign_cid_areacodes(campaign_id,areacode,outbound_cid,cid_description) values('$campaign_id','$areacode','$outbound_cid','$cid_description');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_AC-CID', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN AC-CID', event_sql=\"$SQL_log\", event_notes='CID: $areacode - $outbound_cid';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } if ($stage == 'DELETE') { $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$campaign_id' and areacode='$areacode' and outbound_cid='$outbound_cid' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("AREACODE CID NOT DELETED - this entry does not exist")."
\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($areacode) < 2) or (strlen($outbound_cid) < 6) ) { echo "
"._QXZ("AREACODE CID NOT DELETED - Please go back and look at the data you entered")."
\n"; } else { echo "
"._QXZ("AREACODE CID DELETED").": $campaign_id - $areacode - $outbound_cid
\n"; $stmt="DELETE FROM vicidial_campaign_cid_areacodes WHERE campaign_id='$campaign_id' and areacode='$areacode' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_AC-CID', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN AC-CID', event_sql=\"$SQL_log\", event_notes='CID: $areacode - $outbound_cid';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } if ($stage == 'MODIFY') { $stmt="SELECT areacode,outbound_cid,active,cid_description,call_count_today from vicidial_campaign_cid_areacodes where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by areacode,outbound_cid"; $rslt=mysql_to_mysqli($stmt, $link); $accids_to_print = mysqli_num_rows($rslt); $o=0; while ($accids_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xareacode[$o] = $rowx[0]; $Xoutbound_cid[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xcid_description[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $o++; } $accid_modified=0; $stmt_log=''; $accid_log=''; $o=0; while ($accids_to_print > $o) { $Factive_value=''; $Fcid_description_value=''; $Factive = "active_$Xareacode[$o]_$Xoutbound_cid[$o]"; $Fcid_description = "cid_description_$Xareacode[$o]_$Xoutbound_cid[$o]"; if (isset($_GET[$Factive])) {$Factive_value=$_GET[$Factive];} elseif (isset($_POST[$Factive])) {$Factive_value=$_POST[$Factive];} if (isset($_GET[$Fcid_description])) {$Fcid_description_value=$_GET[$Fcid_description];} elseif (isset($_POST[$Fcid_description])) {$Fcid_description_value=$_POST[$Fcid_description];} if ($non_latin < 1) { $Fcid_description_value = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$Fcid_description_value); } else { $Fcid_description_value = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$Fcid_description_value); } $Factive_value = preg_replace('/[^A-Z]/','',$Factive_value); # echo "$campaign_id - $Xareacode[$o] - $Xoutbound_cid[$o] - $Factive($Factive_value|$Xactive[$o]) - $Fcid_description($Fcid_description_value|$Xcid_description[$o])
"; if ( ($Factive_value == $Xactive[$o]) and ($Fcid_description_value == $Xcid_description[$o]) ) { # echo "
AREACODE CID NOT MODIFIED - Please go back and look at the data you entered
\n"; } else { $accid_modified++; echo ""._QXZ("AREACODE CID MODIFIED").": $Xareacode[$o] - $Xoutbound_cid[$o]
\n"; $stmt="UPDATE vicidial_campaign_cid_areacodes SET active='$Factive_value',cid_description='$Fcid_description_value' WHERE campaign_id='$campaign_id' and areacode='$Xareacode[$o]' and outbound_cid='$Xoutbound_cid[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmt_log .= "$stmt|$stmtB|"; $accid_log .= "CID: $Xareacode[$o] - $Xoutbound_cid[$o] - $Factive_value - $Fcid_description_value|"; } $o++; } if ($accid_modified > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt_log|"; $SQL_log = preg_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='CAMPAIGN_AC-CID', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN AC-CID', event_sql=\"$SQL_log\", event_notes='$accid_modified AC-CIDs MODIFIED. CHANGES: $accid_log';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $SUB=202; $ADD=31; } ###################### # ADD=211 adds the new list to the system ###################### if ($ADD==211) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("LIST NOT ADDED - there is already a list in the system with this ID")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or ($list_id < 100) or (strlen($list_id) > 19) ) { echo "
"._QXZ("LIST NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("List ID must be between 2 and 8 characters in length")."\n"; echo "
"._QXZ("List name must be at least 2 characters in length")."\n"; echo "
"._QXZ("List ID must be greater than 100")."\n"; } else { echo "
"._QXZ("LIST ADDED").": $list_id\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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', 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_to_mysqli($stmt, $link); } } } $ADD=311; } ###################### # ADD=231 adds the new drop list to the system ###################### if ($ADD==231) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_drop_lists' and active='1';"; $rslt=mysql_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $dl_id = ($row[0] + 1); $stmt="UPDATE vicidial_override_ids SET value='$dl_id' where id_table='vicidial_drop_lists' and active='1';"; $rslt=mysql_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DROP LIST NOT ADDED - there is already a drop list in the system with this ID")."\n";} else { if ( (strlen($dl_id) < 2) or (strlen($dl_name) < 2) ) { echo "
"._QXZ("DROP LIST NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Drop List ID must be between 2 and 30 characters in length")."\n"; echo "
"._QXZ("Drop List name must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("DROP LIST ADDED").": $list_id\n"; $stmt="INSERT INTO vicidial_drop_lists (dl_id,dl_name) values('$dl_id','$dl_name');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DROPLISTS', event_type='ADD', record_id='$dl_id', event_code='ADMIN ADD DROP LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $ADD=331; } } } } ###################### # ADD=2111 adds the new inbound group to the system ###################### if ($ADD==2111) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,add_lead_url,na_call_url,user_group,group_handling,web_form_address_three,place_in_line_caller_number_filename,place_in_line_you_next_filename,custom_one,custom_two,custom_three,custom_four,custom_five) values('$group_id','$group_name','$group_color','$active','" . mysqli_real_escape_string($link, $web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch','','','','','','$user_group','$group_handling','','','','','','','','');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); echo "
"._QXZ("GROUP ADDED").": $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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 INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3111; } ###################### # ADD=2811 adds the new EMAIL inbound group to the system ###################### if ( ($ADD==2811) and ($SSallow_emails>0) ) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("EMAIL GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("EMAIL 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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,add_lead_url,na_call_url,user_group,group_handling,web_form_address_three,place_in_line_caller_number_filename,place_in_line_you_next_filename,custom_one,custom_two,custom_three,custom_four,custom_five) values('$group_id','$group_name','$group_color','$active','" . mysqli_real_escape_string($link, $web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','EMAIL','','','','','','$user_group','$group_handling','','','','','','','','');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); echo "
"._QXZ("EMAIL GROUP ADDED").": $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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 INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3811; } ###################### # ADD=28111 adds the new CHAT inbound group to the system ###################### if ( ($ADD==28111) and ($SSallow_chats>0) ) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CHAT GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CHAT 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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,add_lead_url,na_call_url,user_group,group_handling,hold_time_option_callback_list_id,web_form_address_three,place_in_line_caller_number_filename,place_in_line_you_next_filename,custom_one,custom_two,custom_three,custom_four,custom_five) values('$group_id','$group_name','$group_color','$active','" . mysqli_real_escape_string($link, $web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','CHAT','','','','','','$user_group','$group_handling','$hold_time_option_callback_list_id','','','','','','','','');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); echo "
CHAT GROUP ADDED: $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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 INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3911; } ###################### # ADD=2011 adds copied inbound group to the system ###################### if ($ADD==2011) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,xfer_talk_minimum,xfer_talk_minimum_sec) 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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,xfer_talk_minimum,xfer_talk_minimum_sec from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); # copy agent ranks and grades from source in-group $stmtC="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,group_grade,group_web_vars,daily_limit) SELECT user,'$group_id',group_rank,group_weight,group_grade,group_web_vars,daily_limit from vicidial_inbound_group_agents where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); # add new in-group to user's agent-selected in-groups $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id); $stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="INSERT INTO vicidial_url_multi (entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,campaign_id) SELECT entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,\"$group_id\" from vicidial_url_multi where campaign_id='$source_group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); echo "
"._QXZ("INBOUND GROUP ADDED").": $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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 COPY INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rows|$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3111; } ###################### # ADD=2911 adds copied email group to the system ###################### if ( ($ADD==2911) and ($SSallow_emails>0) ) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("EMAIL GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("EMAIL 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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("EMAIL GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Email group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Email group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,xfer_talk_minimum,xfer_talk_minimum_sec) 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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,xfer_talk_minimum,xfer_talk_minimum_sec from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); # copy agent ranks and grades from source in-group $stmtC="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,group_grade,group_web_vars,daily_limit) SELECT user,'$group_id',group_rank,group_weight,group_grade,group_web_vars,daily_limit from vicidial_inbound_group_agents where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); # add new in-group to user's agent-selected in-groups $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id); $stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="INSERT INTO vicidial_url_multi (entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,campaign_id) SELECT entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,\"$group_id\" from vicidial_url_multi where campaign_id='$source_group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); echo "
"._QXZ("EMAIL GROUP ADDED").": $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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 COPY INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rows|$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3811; } ###################### # ADD=29111 adds copied chat group to the system ###################### if ( ($ADD==29111) and ($SSallow_chats>0) ) { $group_id = preg_replace("/\-/",'',$group_id); if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CHAT GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CHAT 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 (mb_strlen($group_id,'utf-8') > 20) or (preg_match('/\s/i',$group_id)) or (preg_match('/\-/i',$group_id)) or (preg_match("/\+/i",$group_id)) ) { echo "
"._QXZ("CHAT GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Chat group ID must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; echo "
"._QXZ("Chat group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,xfer_talk_minimum,xfer_talk_minimum_sec) 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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,xfer_talk_minimum,xfer_talk_minimum_sec from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="INSERT INTO vicidial_campaign_stats_debug (campaign_id) values('$group_id');"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); # copy agent ranks and grades from source in-group $stmtC="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,group_grade,group_web_vars,daily_limit) SELECT user,'$group_id',group_rank,group_weight,group_grade,group_web_vars,daily_limit from vicidial_inbound_group_agents where group_id=\"$source_group_id\";"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); # add new in-group to user's agent-selected in-groups $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $SQL_source_group_id = preg_replace("/_/",'\\_',$source_group_id); $stmtD="UPDATE vicidial_users set closer_campaigns=REPLACE( closer_campaigns, ' $source_group_id ', ' $source_group_id $group_id ' ) where closer_campaigns LIKE \"% $SQL_source_group_id %\" and closer_campaigns NOT LIKE \"% $SQL_group_id %\";"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="INSERT INTO vicidial_url_multi (entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,campaign_id) SELECT entry_type,active,url_type,url_rank,url_statuses,url_description,url_address,url_lists,\"$group_id\" from vicidial_url_multi where campaign_id='$source_group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); echo "
CHAT GROUP ADDED: $group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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 COPY INBOUND GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rows|$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=3911; } ###################### # ADD=2311 adds the new did to the system ###################### if ($ADD==2311) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DID NOT ADDED - there is already a DID in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DID NOT ADDED - there is already a DID in the system with this extension")."\n";} else { # or (preg_match("/\+/i",$did_pattern)) if ( (strlen($did_pattern) < 2) or (preg_match('/\s/i',$did_pattern)) or (preg_match('/\-/i',$did_pattern)) ) { echo "
"._QXZ("DID NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("DID Extension must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; } else { $stmtA="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,user_group,filter_phone_group_id,pre_filter_phone_group_id) values('$did_pattern','$did_description','$user_group','','');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; echo "
"._QXZ("DID ADDED").": $did_pattern $did_description - $did_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } $ADD=3311; } ###################### # ADD=2411 adds copied did to the system ###################### if ($ADD==2411) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DID NOT ADDED - there is already a DID in the system with this extension")."\n";} else { if ( (strlen($source_did) < 1) or (strlen($did_pattern) < 1) or (preg_match('/\s/i',$source_did)) or (preg_match('/\s/i',$did_pattern)) or (preg_match("/\+/i",$source_did)) ) { echo "
"._QXZ("DID NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("DID Extension must be between 2 and 20 characters in length and contain no")." ' -+'.\n"; } else { $stmtA="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,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,custom_one,custom_two,custom_three,custom_four,custom_five,user_group,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,entry_list_id,filter_entry_list_id,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,did_carrier_description,inbound_route_answer,pre_filter_recent_call,pre_filter_recent_extension,alter_cid_name) 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,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,custom_one,custom_two,custom_three,custom_four,custom_five,user_group,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,entry_list_id,filter_entry_list_id,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,did_carrier_description,inbound_route_answer,pre_filter_recent_call,pre_filter_recent_extension,alter_cid_name from vicidial_inbound_dids where did_id=\"$source_did\";"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; echo "
"._QXZ("DID ADDED").": $did_pattern - $did_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|"; $SQL_log = preg_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 COPY DID', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=3311; } ###################### # ADD=2511 adds the new call menu to the system ###################### if ($ADD==2511) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_call_menu where menu_id='$menu_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("CALL MENU NOT ADDED - there is already a CALL MENU in the system with this ID")."\n"; $ADD=1500; } else { if ( (preg_match("/^vicidial$/i",$menu_id)) or (preg_match("/^vicidial-auto$/i",$menu_id)) or (preg_match("/^general$/i",$menu_id)) or (preg_match("/^globals$/i",$menu_id)) or (preg_match("/^default$/i",$menu_id)) or (preg_match("/^trunkinbound$/i",$menu_id)) or (preg_match("/^loopback-no-log$/i",$menu_id)) or (preg_match("/^monitor_exit$/i",$menu_id)) or (preg_match("/^monitor$/i",$menu_id)) ) { echo "
"._QXZ("CALL MENU NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Menu ID cannot use reserved words").": vicidial, vicidial-auto, general, globals, default, trunkinbound, loopback-no-log, monitor_exit, monitor\n"; $ADD=1500; } else { if ( (strlen($menu_id) < 2) or (preg_match('/\s/i',$menu_id)) ) { echo "
"._QXZ("CALL MENU NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Menu ID must be between 2 and 50 characters in length and contain no").".\n"; $ADD=1500; } else { $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,user_group) values('$menu_id','$menu_name','$user_group');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CALL MENU ADDED").": $menu_id $menu_name\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); $ADD=3511; } } } } } ###################### # ADD=2611 adds copied call menu to the system ###################### if ($ADD==2611) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_call_menu where menu_id='$menu_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("CALL MENU NOT ADDED - there is already a CALL MENU in the system with this ID")."\n"; $ADD=1500; } else { if ( (preg_match("/^vicidial$/i",$menu_id)) or (preg_match("/^vicidial-auto$/i",$menu_id)) or (preg_match("/^general$/i",$menu_id)) or (preg_match("/^globals$/i",$menu_id)) or (preg_match("/^default$/i",$menu_id)) or (preg_match("/^trunkinbound$/i",$menu_id)) or (preg_match("/^loopback-no-log$/i",$menu_id)) or (preg_match("/^monitor_exit$/i",$menu_id)) or (preg_match("/^monitor$/i",$menu_id)) ) { echo "
"._QXZ("CALL MENU NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Menu ID cannot use reserved words").": vicidial, vicidial-auto, general, globals, default, trunkinbound, loopback-no-log, monitor_exit, monitor\n"; $ADD=1500; } else { if ( (strlen($menu_id) < 2) or (preg_match('/\s/i',$menu_id)) or (strlen($source_menu) < 2) or (preg_match('/\s/i',$source_menu)) ) { echo "
"._QXZ("CALL MENU NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Menu ID must be between 2 and 50 characters in length and contain no")." ' '.\n"; $ADD=1500; } 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,dtmf_log,dtmf_field,user_group,qualify_sql,alt_dtmf_log,question,answer_signal) 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,dtmf_log,dtmf_field,user_group,qualify_sql,alt_dtmf_log,question,answer_signal from vicidial_call_menu where menu_id=\"$source_menu\";"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); echo "
"._QXZ("CALL MENU ADDED").": $menu_id - $menu_name\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA"; $SQL_log = preg_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_to_mysqli($stmt, $link); $ADD=3511; } } } } } ###################### # ADD=2711 adds the new filter phone group to the system ###################### if ($ADD==2711) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE FILTER GROUP NOT ADDED - there is already a PHONE FILTER GROUP in the system with this ID")."\n";} else { if ( (strlen($filter_phone_group_id) < 2) or (mb_strlen($filter_phone_group_id,'utf-8') > 20) or (preg_match('/\s/i',$filter_phone_group_id)) ) { echo "
"._QXZ("PHONE FILTER GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Phone Filter Group ID must be between 2 and 20 characters in length and contain no")." ' '.\n"; } else { $stmt="INSERT INTO vicidial_filter_phone_groups (filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,user_group) values('$filter_phone_group_id','$filter_phone_group_name','$filter_phone_group_description','$user_group');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("PHONE FILTER GROUP ADDED").": $filter_phone_group_id $filter_phone_group_name\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERPHONEGROUPS', event_type='ADD', record_id='$filter_phone_group_id', event_code='ADMIN ADD FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='$filter_phone_group_name';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=3711; } ###################### # ADD=21111 adds new remote agents to the system ###################### if ($ADD==21111) { if ( ($add_copy_disabled > 0) or ($LOGmodify_remoteagents!='1') or ($x_ra_carrier > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_remote_agents where server_ip='$server_ip' and user_start='$user_start';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this user ID")."\n";} else { ### check for a valid user that will be associated with this account $stmt="SELECT count(*) from vicidial_users where user='$user_start' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("REMOTE AGENTS NOT ADDED - you must use a valid user as the user_start for remote agents")."\n";} else { ### check for closest remote agents to this account to ensure no overlapping $user_finish = ($user_start + $number_of_lines); $stmt="SELECT count(*) from vicidial_remote_agents where user_start >= '$user_start' and user_start < '$user_finish';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("REMOTE AGENTS NOT ADDED - your number of lines overlaps with another remote agent")."\n";} else { if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) { echo "
"._QXZ("REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("User ID start and external extension must be at least 2 characters in length")."\n"; } else { $stmt="INSERT INTO vicidial_remote_agents (user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns) values('$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("REMOTE AGENTS ADDED").": $user_start\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } } $ADD=10000; } ###################### # ADD=22111 adds new extension group entry to the system ###################### if ($ADD==22111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_extension_groups where extension_group_id='$extension_group_id' and extension='$extension';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("EXTENSION GROUP ENTRY NOT ADDED - there is already an extension group entry with these values")."\n";} else { if ( (strlen($extension_group_id) < 2) or (strlen($extension) < 2) or (strlen($rank) < 1) ) { echo "
"._QXZ("EXTENSION GROUP ENTRY NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("extension group id and extension and rank must be at least 2 characters in length")."\n"; } else { $stmtA="INSERT INTO vicidial_extension_groups (extension_group_id,extension,rank,campaign_groups) values('$extension_group_id','$extension','$rank','$campaign_groups');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT extension_id from vicidial_extension_groups where extension_group_id='$extension_group_id' and extension='$extension';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $extension_id = $row[0]; echo "
"._QXZ("EXTENSION GROUP ENTRY ADDED").": $extension_id - $extension_group_id - $extension\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|"; $SQL_log = preg_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='EXTENGROUP', event_type='ADD', record_id='$extension_id', event_code='ADMIN ADD EXTENSION GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=12000; } ###################### # ADD=211111 adds new user group to the system ###################### if ($ADD==211111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("USER GROUP NOT ADDED - there is already a user group entry with this name")."\n";} else { if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) { echo "
"._QXZ("USER GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group name and description must be at least 2 characters in length")."\n"; } else { $allowed_user_group_insert_SQL = '---ALL---'; $allowed_campaign_insert_SQL = '-ALL-CAMPAIGNS-'; # if admin user's user group does not have --ALL-- then add this new user group to their user group's allowable user groups if ($admin_viewable_groupsALL < 1) { $UPDATEadmin_viewable_groups = $LOGadmin_viewable_groups; $UPDATEadmin_viewable_groups = preg_replace("/ $/"," $user_group ",$UPDATEadmin_viewable_groups); $LOGadmin_viewable_groups = $UPDATEadmin_viewable_groups; $stmt="UPDATE vicidial_user_groups SET admin_viewable_groups='$UPDATEadmin_viewable_groups' where user_group='$LOGuser_group';"; $rslt=mysql_to_mysqli($stmt, $link); $allowed_user_group_insert_SQL = " $user_group -"; $rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups); $rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL); $LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; $whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')"; } if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { $allowed_campaign_insert_SQL = $LOGallowed_campaigns; } $stmt="INSERT INTO vicidial_user_groups(user_group,group_name,allowed_campaigns,admin_viewable_groups,allowed_queue_groups) values('$user_group','$group_name','$allowed_campaign_insert_SQL','$allowed_user_group_insert_SQL','-ALL-GROUPS-');"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("USER GROUP ADDED").": $user_group\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 ADD USER GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SCRIPT NOT ADDED - there is already a script entry with this name")."\n";} else { if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) { echo "
"._QXZ("SCRIPT NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Script name, description and text must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$script_color,/i",$HTMLcolors)) and (strlen($script_color) > 0) and ( (strlen($script_color) > 7) or (strlen($script_color) < 7) or (!preg_match("/^#/",$script_color)) ) ) { if (!preg_match("/^#/",$script_color)) {$script_color = "#$script_color";} if (strlen($script_color) > 7) {$script_color = substr($rowx[1],0,7);} while (strlen($script_color) < 7) {$script_color .= '0';} } $stmt="INSERT INTO vicidial_scripts(script_id, script_name, script_comments, script_text, active, user_group, script_color) values('$script_id','$script_name','$script_comments','" . mysqli_real_escape_string($link, $script_text) . "','$active','$user_group','');"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("SCRIPT ADDED").": $script_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 ADD SCRIPT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=1000000; } ###################### # ADD=21111111 adds new filter to the system ###################### if ($ADD==21111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("FILTER NOT ADDED - there is already a filter entry with this ID")."\n";} else { if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) { echo "
"._QXZ("FILTER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Filter ID, name and SQL must be at least 2 characters in length")."\n"; } else { $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',user_group='$user_group',lead_filter_comments='$lead_filter_comments',lead_filter_sql='" . mysqli_real_escape_string($link, $lead_filter_sql) . "';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("FILTER ADDED").": $lead_filter_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERS', event_type='ADD', record_id='$lead_filter_id', event_code='ADMIN ADD FILTER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=10000000; } ###################### # ADD=211111111 adds new call time definition to the system ###################### if ($ADD==211111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID")."\n";} else { if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or ($call_time_id == 'campaign') ) { echo "
"._QXZ("CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID and name must be at least 2 characters in length")."\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',user_group='$user_group',ct_state_call_times='',ct_holidays='';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("CALL TIME ADDED").": $call_time_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=311111111; } ###################### # ADD=2111111111 adds new state call time definition to the system ###################### if ($ADD==2111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATE CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID")."\n";} else { if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) { echo "
"._QXZ("STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("State Call Time ID, name and state must be at least 2 characters in length")."\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',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("STATE CALL TIME ADDED").": $call_time_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=3111111111; } ###################### # ADD=2211111111 adds new holiday definition to the system ###################### if ($ADD==2211111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_call_time_holidays where holiday_id='$holiday_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("HOLIDAY DEFINITION NOT ADDED - there is already a holiday entry with this ID")."\n";} else { if ( (strlen($holiday_id) < 2) or (strlen($holiday_name) < 2) or (strlen($holiday_date) < 10) ) { echo "
"._QXZ("HOLIDAY DEFINITION NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Holiday ID, name and date must be populated")."\n"; } else { $stmt="INSERT INTO vicidial_call_time_holidays SET holiday_id='$holiday_id',holiday_name='$holiday_name',holiday_comments='$holiday_comments',holiday_date='$holiday_date',holiday_status='INACTIVE',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("HOLIDAY ADDED").": $holiday_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='HOLIDAYS', event_type='ADD', record_id='$holiday_id', event_code='ADMIN ADD HOLIDAY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=3211111111; } ###################### # ADD=231111111 adds new shift definition to the system ###################### if ($ADD==231111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_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_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from vicidial_shifts where shift_id='$shift_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SHIFT DEFINITION NOT ADDED - there is already a shift entry with this ID")."\n";} else if (!isset($shift_weekdays) || !is_array($shift_weekdays)) {echo "
"._QXZ("SHIFT DEFINITION NOT ADDED - you have to select at least one weekday")."\n";} else { $shift_length_test = preg_replace('/:/i', '',$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 "
"._QXZ("SHIFT DEFINITION NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Shift ID and name must be at least 2 characters in length")."\n"; echo "
"._QXZ("Shift Start Time must be 4 digits in length and be a valid time")."\n"; echo "
"._QXZ("Shift Length must be 5 characters in length and be 24 hours or less")."\n"; } else { $p=0; $SHIFT_weekdays=''; $shift_weekdays_ct = count($shift_weekdays); while ($p < $shift_weekdays_ct) { $shift_weekdays[$p] = preg_replace('/[^0-9]/','',$shift_weekdays[$p]); $SHIFT_weekdays .= "$shift_weekdays[$p]"; $p++; } $SHIFT_weekdays = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$SHIFT_weekdays); $stmt="INSERT INTO vicidial_shifts SET shift_id='$shift_id',shift_name='$shift_name',shift_start_time='$shift_start_time',shift_length='$shift_length',report_option='$report_option',shift_weekdays='$SHIFT_weekdays',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|";} echo "
"._QXZ("SHIFT ADDED").": $shift_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=331111111; } ###################### # ADD=21111111111 adds new phone to the system ###################### if ($ADD==21111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { ##### 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_to_mysqli($stmt, $link); $voi_ct = mysqli_num_rows($rslt); if ($voi_ct > 0) { $row=mysqli_fetch_row($rslt); $extension = ($row[0] + 1); $stmt="UPDATE vicidial_override_ids SET value='$extension' where id_table='phones' and active='1';"; $rslt=mysql_to_mysqli($stmt, $link); } ##### END ID override optional section ##### echo ""; $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT ADDED - there is already a Phone in the system with this extension/server")."\n";} else { $stmt="SELECT count(*) from phones where login='$login';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT ADDED - there is already a Phone in the system with this login")."\n";} else { $stmt="SELECT count(*) from phones_alias where alias_id='$login';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT ADDED - there is already a Phone alias in the system with this login")."\n";} else { $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT ADDED - there is already a Voicemail ID 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) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) )) { echo "
"._QXZ("PHONE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("The following fields must have data").": extension, server_ip, dialplan_number, voicemail_id, login, pass\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("registration password must be at least $SSrequire_password_length characters long")."\n"; } } else { echo "
"._QXZ("PHONE ADDED")."\n"; ##### Lookup settings container ##### $SScontainer_stmt="select phone_defaults_container from system_settings limit 1"; $SScontainer_rslt=mysql_to_mysqli($SScontainer_stmt, $link); $SScontainer_row=mysqli_fetch_row($SScontainer_rslt); $dps=array("voicemail_timezone" => "$SSdefault_voicemail_timezone"); # Default phone setting array, need to set voicemail timezone here due to system settings $SQLfields=""; $SQLvalues=""; # Below settings were pre-set at the initial page, so we remove them here so the settings don't overwrite anything the user may have modified. $settings_to_purge=array("active", "local_gmt", "conf_secret", "outbound_cid", "pass", "phone_type", "protocol", "server_ip", "status", "voicemail_id", "user_group"); if (!preg_match('/\-\-\-DISABLED\-\-\-/', $SScontainer_row[0])) { $container_stmt="select container_entry from vicidial_settings_containers where container_id='$SScontainer_row[0]'"; $container_rslt=mysql_to_mysqli($container_stmt, $link); $container_entry=""; if (mysqli_num_rows($container_rslt)>0) { # echo "Using container $SScontainer_row[0]...
\n"; $container_row=mysqli_fetch_row($container_rslt); $container_entry=$container_row[0]; $container_entry_array=explode("\n", $container_entry); for ($c=0; $c", $container_line); $setting_key=trim($current_setting_array[0]); $setting_value=trim($current_setting_array[1]); if (strlen($setting_key)>0 && (strlen($setting_value)>0 || $setting_key=="conf_override") && !in_array($setting_key, $settings_to_purge)) { if($setting_key=="conf_override") { $conf_override_on=1; $conf_override_str=$setting_value; } else { if ($conf_override_on==1) { $conf_override_on=0; $dps["conf_override"]=trim($conf_override_str); } $dps[$setting_key]=$setting_value; } # $$current_setting_array[0]=$current_setting_array[1]; } else if ($conf_override_on==1) { $conf_override_str.="\n".trim($container_line); } } else { if ($conf_override_on==1) { $dps["conf_override"]=trim($conf_override_str); } $conf_override_on=0; } } } # Compile additional SQL to insert into phones foreach($dps as $field_name => $field_val) { $SQLfields.=",$field_name"; $SQLvalues.=",'".mysqli_real_escape_string($link, $field_val)."'"; } } $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,conf_secret,user_group,template_id$SQLfields) 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','$conf_secret','$user_group',''$SQLvalues);"; #print_r($dps); #echo "$stmt
"; die; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); $stmtB="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$SSactive_voicemail_server';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } } } $ADD=31111111111; } ###################### # ADD=22111111111 adds new phone alias to the system ###################### if ($ADD==22111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE ALIAS NOT ADDED - there is already a Phone Alias in the system with this ID")."\n";} else { $stmt="SELECT count(*) from phones where login='$alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE ALIAS NOT ADDED - there is already a Phone Login in the system with this ID")."\n";} else { if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) { echo "
"._QXZ("PHONE ALIAS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Back to phone alias entry page").""; } else { echo "
"._QXZ("PHONE ALIAS ADDED")."\n"; $stmt="INSERT INTO phones_alias (alias_id,alias_name,logins_list,user_group) values('$alias_id','$alias_name','$logins_list','$user_group');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 PHONE ALIAS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=32111111111; } ###################### # ADD=23111111111 adds new group alias to the system ###################### if ($ADD==23111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("GROUP ALIAS NOT ADDED - there is already a Phone Alias in the system with this ID")."\n";} else { if (preg_match("/AGENT_PHONE|CUSTOMER|CAMPAIGN|NONE/",$group_alias_id)) {echo "
"._QXZ("GROUP ALIAS NOT ADDED - you cannot use reserved words in group aliases")."\n";} else { if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) { echo "
"._QXZ("GROUP ALIAS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Back to group alias entry page").""; } else { echo "
"._QXZ("GROUP ALIAS ADDED")."\n"; $stmt="INSERT INTO groups_alias (group_alias_id,group_alias_name,caller_id_number,caller_id_name,active,user_group) values('$group_alias_id','$group_alias_name','$caller_id_number','$caller_id_name','$active','$user_group');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } $ADD=33111111111; } ###################### # ADD=211111111111 adds new server to the system ###################### if ($ADD==211111111111) { if ( ($LOGmodify_servers!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from servers where server_id='$server_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SERVER NOT ADDED - there is already a server in the system with this ID")."\n";} else { if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("SERVER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("SERVER ADDED")."\n"; $stmt="INSERT INTO servers (server_id,server_description,server_ip,active,asterisk_version,conf_secret,local_gmt,user_group) values('$server_id','$server_description','$server_ip','$active','$asterisk_version','$SSdefault_server_password','$SSdefault_local_gmt','$user_group');"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=311111111111; } ###################### # ADD=221111111111 adds the new vicidial server trunk record to the system ###################### if ($ADD==221111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_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_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); if ($SUMvicidial_trunks > $MAXvicidial_trunks) { echo "
"._QXZ("SERVER TRUNK RECORD NOT ADDED - the number of trunks is too high").": $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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) { echo "
"._QXZ("SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("campaign must be between 3 and 8 characters in length")."\n"; echo "
"._QXZ("server_ip delay must be at least 7 characters")."\n"; echo "
"._QXZ("trunks must be a digit from 0 to 9999")."\n"; } else { echo "
"._QXZ("SERVER TRUNK RECORD ADDED").": $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 SERVER TRUNK', event_sql=\"$SQL_log\", event_notes='campaign: $campaign_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=311111111111; } ###################### # ADD=231111111111 adds new conf template to the system ###################### if ($ADD==231111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_conf_templates where template_id='$template_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CONF TEMPLATE NOT ADDED - there is already a template in the system with this ID")."\n";} else { if (strlen($template_id) < 2) { echo "
"._QXZ("CONF TEMPLATE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("CONF TEMPLATE ADDED")."\n"; $stmt="INSERT INTO vicidial_conf_templates (template_id,template_name,template_contents,user_group) values('$template_id','$template_name','$template_contents','$user_group');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=331111111111; } ###################### # ADD=241111111111 adds new server carrier to the system ###################### if ($ADD==241111111111) { if ( ($add_copy_disabled > 0) or ($x_ra_carrier > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_server_carriers where carrier_id='$carrier_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CARRIER NOT ADDED - there is already a carrier in the system with this ID")."\n";} else { if ( (strlen($carrier_id) < 2) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("CARRIER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("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,user_group) values('$carrier_id','$carrier_name','$registration_string','$template_id','" . mysqli_real_escape_string($link, $account_entry) . "','$protocol','$globals_string','$dialplan_entry','$server_ip','N','$carrier_description','$user_group');"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=341111111111; } ###################### # ADD=240111111111 adds copied server carrier to the system ###################### if ($ADD==240111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_server_carriers where carrier_id='$carrier_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CARRIER NOT ADDED - there is already a carrier in the system with this ID")."\n";} else { if ( (strlen($carrier_id) < 2) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("CARRIER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("COPIED 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,user_group) SELECT \"$carrier_id\",\"$carrier_name\",registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,\"$server_ip\",\"N\",carrier_description,user_group from vicidial_server_carriers where carrier_id=\"$source_carrier\";"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "|$stmt|\n";} $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; if ($server_ip == '0.0.0.0') {$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";} $rslt=mysql_to_mysqli($stmtA, $link); if ($DB) {echo "|$stmt|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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='COPY', record_id='$carrier_id', event_code='ADMIN COPY CARRIER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=341111111111; } ###################### # ADD=251111111111 adds new tts entry to the system ###################### if ($ADD==251111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_tts_prompts where tts_id='$tts_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("TTS ENTRY NOT ADDED - there is already a tts entry in the system with this ID")."\n";} else { if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 3) ) {echo "
"._QXZ("TTS ENTRY NOT ADDED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("TTS ENTRY ADDED")."\n"; $stmt="INSERT INTO vicidial_tts_prompts SET tts_id='$tts_id',tts_name='$tts_name',active='$active',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=351111111111; } ###################### # ADD=261111111111 adds new music on hold entry to the system ###################### if ($ADD==261111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_music_on_hold where moh_id='$moh_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("MUSIC ON HOLD ENTRY NOT ADDED - there is already a moh entry in the system with this 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 "
"._QXZ("MUSIC ON HOLD ENTRY NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("MUSIC ON HOLD ENTRY ADDED")."\n"; $stmt="INSERT INTO vicidial_music_on_hold SET moh_id='$moh_id',moh_name='$moh_name',random='$random',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } $ADD=361111111111; } ###################### # ADD=271111111111 adds new voicemail box to the system ###################### if ($ADD==271111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("VOICEMAIL BOX NOT ADDED - there is already a voicemail box in the system with this ID")."\n";} else { $stmt="SELECT count(*) from phones where voicemail_id='$voicemail_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("VOICEMAIL BOX NOT ADDED - there is already a phone in the system with this voicemail ID")."\n";} else { if ( (strlen($voicemail_id) < 2) or (strlen($pass) < 2) or (strlen($fullname) < 3) ) { echo "
"._QXZ("VOICEMAIL BOX NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("VOICEMAIL BOX ADDED")."\n"; $stmtA="INSERT INTO vicidial_voicemail SET voicemail_id='$voicemail_id',pass='$pass',email='$email',fullname='$fullname',active='$active',voicemail_timezone='$SSdefault_voicemail_timezone',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT active_voicemail_server from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $active_voicemail_server = $row[0]; $stmtB="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_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } $ADD=371111111111; } ###################### # ADD=281111111111 adds new screen label to the system ###################### if ($ADD==281111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_screen_labels where label_id='$label_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SCREEN LABEL NOT ADDED - there is already a label in the system with this ID")."\n";} else { if ( (strlen($label_id) < 2) or (strlen($label_name) < 2) ) { echo "
"._QXZ("SCREEN LABEL NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("SCREEN LABEL ADDED")."\n"; $stmt="INSERT INTO vicidial_screen_labels SET label_id='$label_id',label_name='$label_name',active='N',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LABELS', event_type='ADD', record_id='$label_id', event_code='ADMIN ADD LABEL', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=381111111111; } ###################### # ADD=282111111111 adds new screen colors to the system ###################### if ($ADD==282111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_screen_colors where colors_id='$colors_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SCREEN COLORS NOT ADDED - there is already a colors entry in the system with this ID")."\n";} else { if ( (strlen($colors_id) < 2) or (strlen($colors_name) < 2) ) { echo "
"._QXZ("SCREEN COLORS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("SCREEN COLORS ADDED")."\n"; $stmt="INSERT INTO vicidial_screen_colors SET colors_id='$colors_id',colors_name='$colors_name',active='N',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='COLORS', event_type='ADD', record_id='$colors_id', event_code='ADMIN ADD COLORS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=382111111111; } ###################### # ADD=291111111111 adds new contact to the system ###################### if ($ADD==291111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) { $linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname"); if (!$linkALT) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } } else {$linkALT = $link;} echo ""; $stmt="SELECT count(*) from contact_information where first_name='$first_name' and last_name='$last_name' and office_num='$office_num';"; $rslt=mysql_to_mysqli($stmt, $linkALT); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CONTACT NOT ADDED - there is already a contact in the system with this name and number")."\n";} else { if (strlen($last_name) < 2) {echo "
"._QXZ("CONTACT NOT ADDED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("CONTACT ADDED")."\n"; $stmt="INSERT INTO contact_information SET first_name='$first_name',last_name='$last_name',office_num='$office_num',cell_num='$cell_num',other_num1='$other_num1',other_num2='$other_num2',bu_name='$bu_name',department='$department',group_name='$group_name',job_title='$job_title',location='$location';"; $rslt=mysql_to_mysqli($stmt, $linkALT); $contact_id = mysqli_insert_id($linkALT); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTACTS', event_type='ADD', record_id='$contact_id', event_code='ADMIN ADD CONTACT', event_sql=\"$SQL_log\", event_notes='$first_name $last_name $office_num';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=391111111111; } ###################### # ADD=292111111111 adds new settings container to the system ###################### if ($ADD==292111111111) { if ( ( ($LOGmodify_servers!=1) and ($LOGmodify_settings_containers!=1) ) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -settings-containers-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_settings_containers where container_id='$container_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SETTINGS CONTAINER NOT ADDED - there is already a container in the system with this ID")."\n";} else { if ( (strlen($container_id) < 2) or (strlen($container_notes) < 2) ) { echo "
"._QXZ("SETTINGS CONTAINER NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("SETTINGS CONTAINER ADDED")."\n"; $stmt="INSERT INTO vicidial_settings_containers SET container_id='$container_id',container_notes='$container_notes',container_type='$container_type',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTAINERS', event_type='ADD', record_id='$container_id', event_code='ADMIN ADD CONTAINER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=392111111111; } ###################### # ADD=293111111111 adds new status group to the system ###################### if ($ADD==293111111111) { if ( ($LOGmodify_statuses!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_status_groups where status_group_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATUS GROUP NOT ADDED - there is already a group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATUS GROUP NOT ADDED - there is already a campaign in the system with this ID")."\n";} else { if ( (strlen($status_group_id) < 2) or (strlen($status_group_notes) < 2) ) { echo "
"._QXZ("STATUS GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("STATUS GROUP ADDED")."\n"; $stmt="INSERT INTO vicidial_status_groups SET status_group_id='$status_group_id',status_group_notes='$status_group_notes',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='STATUSGROUPS', event_type='ADD', record_id='$status_group_id', event_code='ADMIN ADD STATUS GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=393111111111; } ###################### # ADD=294111111111 adds new automated report to the system ###################### if ($ADD==294111111111) { if ( ($LOGmodify_auto_reports!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_automated_reports where report_id='$report_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AUTOMATED REPORT NOT ADDED - there is already a report in the system with this ID")."\n";} else { if ( (strlen($report_id) < 2) or (strlen($report_name) < 2) ) {echo "
"._QXZ("AUTOMATED REPORT NOT ADDED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("AUTOMATED REPORT ADDED")."\n"; $stmt="INSERT INTO vicidial_automated_reports SET report_id='$report_id',report_name='$report_name',report_url='',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='AUTOREPORTS', event_type='ADD', record_id='$report_id', event_code='ADMIN ADD AUTO REPORT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=394111111111; } ###################### # ADD=295111111111 adds new ip list to the system ###################### if ($ADD==295111111111) { if ( ($LOGmodify_ip_lists!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_ip_lists where ip_list_id='$ip_list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("IP LIST NOT ADDED - there is already a list in the system with this ID")."\n";} else { if ( (strlen($ip_list_id) < 2) or (strlen($ip_list_name) < 2) ) {echo "
"._QXZ("IP LIST NOT ADDED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("IP LIST ADDED")."\n"; $stmt="INSERT INTO vicidial_ip_lists SET ip_list_id='$ip_list_id',ip_list_name='$ip_list_name',active='N',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='IPLISTS', event_type='ADD', record_id='$ip_list_id', event_code='ADMIN ADD IP LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=395111111111; } ###################### # ADD=296111111111 adds new CID group to the system ###################### if ($ADD==296111111111) { if ( ($LOGmodify_statuses!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_cid_groups where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CID GROUP NOT ADDED - there is already a CID group in the system with this ID")."\n";} else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CID GROUP NOT ADDED - there is already a campaign in the system with this ID")."\n";} else { if ( (strlen($cid_group_id) < 2) or (strlen($cid_group_notes) < 2) or (strlen($cid_group_type) < 2) ) { echo "
"._QXZ("CID GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("CID GROUP ADDED")."\n"; $stmt="INSERT INTO vicidial_cid_groups SET cid_group_id='$cid_group_id',cid_group_notes='$cid_group_notes',cid_group_type='$cid_group_type',user_group='$user_group',cid_auto_rotate_minutes='0',cid_auto_rotate_minimum='0',cid_auto_rotate_calls='0',cid_last_auto_rotate='2020-01-01 00:00:01';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CIDGROUPS', event_type='ADD', record_id='$cid_group_id', event_code='ADMIN ADD CID GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } $ADD=396111111111; } ###################### # ADD=297111111111 adds new VM Message group to the system ###################### if ($ADD==297111111111) { if ( ($LOGmodify_statuses!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from leave_vm_message_groups where leave_vm_message_group_id='$leave_vm_message_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("VM MESSAGE GROUP NOT ADDED - there is already a VM MESSAGE GROUP in the system with this ID")."\n";} else { if ( (strlen($leave_vm_message_group_id) < 2) or (strlen($leave_vm_message_group_notes) < 2) or (strlen($active) < 1) ) { echo "
"._QXZ("VM MESSAGE GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("VM MESSAGE GROUP ADDED")."\n"; $stmt="INSERT INTO leave_vm_message_groups SET leave_vm_message_group_id='$leave_vm_message_group_id',leave_vm_message_group_notes='$leave_vm_message_group_notes',active='$active',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='VMMGROUPS', event_type='ADD', record_id='$leave_vm_message_group_id', event_code='ADMIN ADD VMM GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=397111111111; } ###################### # ADD=298111111111 adds new Queue Group to the system ###################### if ($ADD==298111111111) { if ( ($LOGmodify_statuses!=1) or ($add_copy_disabled > 0) ) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; $ADD=198111111111; } else { echo ""; $stmt="SELECT count(*) from vicidial_queue_groups where queue_group='$queue_group';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("QUEUE GROUP NOT ADDED - there is already a QUEUE GROUP in the system with this ID")."\n"; $ADD=198111111111; } else { if ( (strlen($queue_group) < 2) or (strlen($queue_group_name) < 5) or (strlen($active) < 1) ) { echo "
"._QXZ("QUEUE GROUP NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; $ADD=198111111111; } else { echo "
"._QXZ("QUEUE GROUP ADDED")."\n"; $stmt="INSERT INTO vicidial_queue_groups SET queue_group='$queue_group',queue_group_name='$queue_group_name',active='$active',user_group='$user_group';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='QUEUEGROUPS', event_type='ADD', record_id='$queue_group', event_code='ADMIN ADD QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=398111111111; } ###################### # ADD=2111111111111 adds new conference to the system ###################### if ($ADD==2111111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) {echo "
"._QXZ("CONFERENCE NOT ADDED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("CONFERENCE ADDED")."\n"; $stmt="INSERT INTO conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONF', event_type='ADD', record_id='$conf_exten', event_code='ADMIN ADD CONFERENCE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=3111111111111; } ###################### # ADD=21111111111111 adds new vicidial conference to the system ###################### if ($ADD==21111111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AGENT CONFERENCE NOT ADDED - there is already an agent conference in the system with this ID and server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("AGENT CONFERENCE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("AGENT CONFERENCE ADDED")."\n"; $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='VICICONF', event_type='ADD', record_id='$conf_exten', event_code='ADMIN ADD VICIDIAL CONFERENCE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=31111111111111; } ###################### # ADD=22111111111111 adds new vicidial confbridge to the system ###################### if ($ADD==22111111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_confbridges where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("AGENT CONFBRIDGE NOT ADDED - there is already an agent conference in the system with this ID and server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("AGENT CONFBRIDGE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("AGENT CONFBRIDGE ADDED")."\n"; $stmt="INSERT INTO vicidial_confbridges (conf_exten,server_ip) values('$conf_exten','$server_ip');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='VICICONF', event_type='ADD', record_id='$conf_exten', event_code='ADMIN ADD VICIDIAL CONFBRIDGE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=32111111111111; } ###################### # ADD=221111111111111 adds the new system status to the system ###################### if ($ADD==221111111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_campaign_statuses where status='$status_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SYSTEM STATUS NOT ADDED - 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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("SYSTEM STATUS NOT ADDED - 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 "
"._QXZ("SYSTEM STATUS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 8 characters in length")."\n"; echo "
"._QXZ("status name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("SYSTEM STATUS ADDED").": $status_name - $status_id\n"; $stmt="INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine) values('$status_id','$status_name','$selectable','$human_answered','$category','$sale','$dnc','$customer_contact','$not_interested','$unworkable','$scheduled_callbacks','$completed','$min_sec','$max_sec','$answering_machine');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='SYSTEMSTATUSES', 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_to_mysqli($stmt, $link); } } } } $ADD=321111111111111; } ###################### # ADD=231111111111111 adds the new status category to the system ###################### if ($ADD==231111111111111) { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_status_categories where vsc_id='$vsc_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATUS CATEGORY NOT ADDED - there is already a status category in the system with this ID").": $row[0]\n";} else { if ( (strlen($vsc_id) < 2) or (mb_strlen($vsc_id,'utf-8') > 20) or (strlen($vsc_name) < 2) ) { echo "
"._QXZ("STATUS CATEGORY NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("ID must be between 2 and 20 characters in length")."\n"; echo "
"._QXZ("name name must be between 2 and 50 characters in length")."\n"; } else { echo "
"._QXZ("STATUS CATEGORY ADDED").": $vsc_id - $vsc_name\n"; $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 3) and (preg_match('/Y/',$tovdad_display)) ) { $tovdad_display = 'N'; echo "
"._QXZ("ERROR: There are already 4 Status Categories set to TimeOnVDAD Display")."\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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 CATEGORY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } $ADD=331111111111111; } ###################################################################################################### ###################################################################################################### ####### 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 - Admin Screen and Agent Screen Options ###################### if ($ADD=="4A") { if ($LOGmodify_users==1) { echo ""; $enc_pass_nochange=0; if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;} if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) ) { echo "
"._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("Password must be at least $SSrequire_password_length characters long")."\n"; } } else { if ($SSoutbound_autodial_active < 1) { $closer_default_blended = '0'; $delete_filters = '0'; $load_leads = '0'; } if (strlen($agent_choose_territories) < 1) {$agent_choose_territories=0;} $pass_hash=''; $pass_hashSQL=''; if ($SSpass_hash_enabled > 0) { if (strlen($pass) > 1) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass_hashSQL = ",pass_hash='$pass_hash'"; } $pass=''; } $k=0; $new_field_value=''; if (is_array($api_allowed_functions)) {$multi_count = count($api_allowed_functions);} else {$multi_count=0;} $multi_array = $api_allowed_functions; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k] "; $k++; } $api_allowed_functions = " $new_field_value"; $k=0; $new_field_value=''; if (is_array($max_inbound_filter_statuses)) {$multi_count = count($max_inbound_filter_statuses);} else {$multi_count=0;} $multi_array = $max_inbound_filter_statuses; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $max_inbound_filter_statuses = preg_replace("/,$/","",$new_field_value); $k=0; $new_field_value=''; if (is_array($max_inbound_filter_ingroups)) {$multi_count = count($max_inbound_filter_ingroups);} else {$multi_count=0;} $multi_array = $max_inbound_filter_ingroups; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $max_inbound_filter_ingroups = preg_replace("/,$/","",$new_field_value); $user_codeSQL = ",user_code='$user_code'"; if ($SSuser_codes_admin > 0) { $user_codeSQL=''; if ($LOGuser_level >= 9) {$user_codeSQL = ",user_code='$user_code'";} } echo "
"._QXZ("USER MODIFIED - ADMIN").": $user\n"; $stmtA="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',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',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',callcard_admin='$callcard_admin',agent_choose_blended='$agent_choose_blended',realtime_block_user_info='$realtime_block_user_info',custom_fields_modify='$custom_fields_modify',force_change_password='$force_change_password',agent_lead_search_override='$agent_lead_search',modify_shifts='$modify_shifts',modify_phones='$modify_phones',modify_carriers='$modify_carriers',modify_labels='$modify_labels',modify_statuses='$modify_statuses',modify_voicemail='$modify_voicemail',modify_audiostore='$modify_audiostore',modify_moh='$modify_moh',modify_tts='$modify_tts',preset_contact_search='$preset_contact_search',modify_contacts='$modify_contacts',modify_same_user_level='$modify_same_user_level',admin_hide_lead_data='$admin_hide_lead_data',admin_hide_phone_data='$admin_hide_phone_data',agentcall_email='$agentcall_email',agentcall_chat='$agentcall_chat',modify_email_accounts='$modify_email_accounts',failed_login_count=0,alter_admin_interface_options='$alter_admin_interface_options',max_inbound_calls='$max_inbound_calls',modify_custom_dialplans='$modify_custom_dialplans',wrapup_seconds_override='$wrapup_seconds_override',modify_languages='$modify_languages',selected_language='$selected_language',user_choose_language='$user_choose_language',ignore_group_on_search='$ignore_group_on_search',api_list_restrict='$api_list_restrict',api_allowed_functions='$api_allowed_functions',lead_filter_id='$lead_filter_id',admin_cf_show_hidden='$admin_cf_show_hidden',user_hide_realtime='$user_hide_realtime',access_recordings='$access_recordings',modify_colors='$modify_colors',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',api_only_user='$api_only_user',modify_auto_reports='$modify_auto_reports',modify_ip_lists='$modify_ip_lists',ignore_ip_list='$ignore_ip_list',ready_max_logout='$ready_max_logout',export_gdpr_leads='$export_gdpr_leads',pause_code_approval='$pause_code_approval',max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',mute_recordings='$mute_recordings_users',hide_call_log_info='$hide_call_log_info_users',next_dial_my_callbacks='$next_dial_my_callbacks',user_admin_redirect_url='" . mysqli_real_escape_string($link, $user_admin_redirect_url) . "',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number',two_factor_override='$two_factor_override',manual_dial_filter='$manual_dial_filter',user_location='$user_location',download_invalid_files='$download_invalid_files',user_group_two='$user_group_two',modify_dial_prefix='$modify_dial_prefix',inbound_credits='$inbound_credits',hci_enabled='$hci_enabled',manual_dial_lead_id='$manual_dial_lead_id',modify_settings_containers='$modify_settings_containers' $user_codeSQL $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmtA, $link); ### BEGIN check for raising of max_inbound_calls setting, and execute re-enebling of agent selected in-groups if true $max_inbound_calls = intval($max_inbound_calls); $max_inbound_calls_old = intval($max_inbound_calls_old); $SSmax_inbound_auto_reenable = intval($SSmax_inbound_auto_reenable); $max_inbound_NOTES=''; $max_inbound_SQL=''; if ( ($max_inbound_calls > $max_inbound_calls_old) and ($SSmax_inbound_auto_reenable > 0) ) { $stmt = "SELECT campaign_id,blended,closer_campaigns,max_inbound_count,call_count_today,notes,event_date,CHAR_LENGTH(closer_campaigns) as sorder FROM vicidial_max_inbound_cache where user='$user' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) order by sorder desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vmic_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vmic_ct|$stmt|\n";} if ($vmic_ct > 0) { $row=mysqli_fetch_row($rslt); $VMIC_campaign_id = $row[0]; $VMIC_blended = $row[1]; $VMIC_closer_campaigns = $row[2]; $VMIC_max_inbound_count = $row[3]; $VMIC_call_count_today = $row[4]; $VMIC_notes = $row[5]; $VMIC_event_date = $row[6]; if ($DB) {echo "VMIC FOUND: |$user|$VMIC_campaign_id|$VMIC_blended|$VMIC_closer_campaigns|$VMIC_max_inbound_count|$VMIC_call_count_today|$VMIC_notes|$VMIC_event_date|\n";} $stmt = "SELECT closer_campaigns,status FROM vicidial_live_agents where user='$user' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vla_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vla_ct|$stmt|\n";} if ($vla_ct > 0) { $row=mysqli_fetch_row($rslt); $VLA_closer_campaigns = $row[0]; $VLA_status = $row[1]; if ($DB) {echo "VLA FOUND: |$user|$VLA_closer_campaigns|$VLA_status|\n";} } if ( (strlen($VMIC_closer_campaigns) > 2) and ($vla_ct > 0) and (strcmp($VMIC_closer_campaigns, $VLA_closer_campaigns) !== 0) ) { # populate vicidial_live_inbound_agents records for this user $temp_closer_campaigns = $VMIC_closer_campaigns; $in_groups_pre = preg_replace('/-$/','',$temp_closer_campaigns); $in_groups = explode(" ",$in_groups_pre); $in_groups_ct = count($in_groups); $k=1; while ($k < $in_groups_ct) { if (strlen($in_groups[$k])>1) { $stmtB="SELECT group_weight,calls_today,group_grade,calls_today_filtered,daily_limit FROM vicidial_inbound_group_agents where user='$user' and group_id='$in_groups[$k]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB) {echo "$stmtB\n";} $viga_ct = mysqli_num_rows($rslt); if ($viga_ct > 0) { $row=mysqli_fetch_row($rslt); $group_weight = $row[0]; $calls_today = $row[1]; $group_grade = $row[2]; $calls_today_filtered = $row[3]; $daily_limit = $row[4]; } else { $group_weight = 0; $calls_today = 0; $group_grade = 0; $calls_today_filtered = 0; $daily_limit = -1; } $stmtB="INSERT IGNORE INTO vicidial_live_inbound_agents set user='$user',group_id='$in_groups[$k]',group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',last_call_time=NOW(),last_call_finish=NOW(),last_call_time_filtered=NOW(),last_call_finish_filtered=NOW(),daily_limit='$daily_limit' ON DUPLICATE KEY UPDATE group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',daily_limit='$daily_limit';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmtB"; if ($DB) {echo "VLIA INSERT: |$affected_rows|$stmtB|\n";} } $k++; } $stmt = "UPDATE vicidial_live_agents SET closer_campaigns='$VMIC_closer_campaigns',external_ingroups='$VMIC_closer_campaigns',external_blended='$VMIC_blended',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$user' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= $stmt; $max_inbound_NOTES .= "$affected_rows VLA ingroups re-selected"; if ($DB) {echo "VLA FOUND UPDATE: |$affected_rows|$stmt|\n";} if ($affected_rows > 0) {echo "
"._QXZ("USER INBOUND GROUPS RE-SELECTED")."\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='RESELECTED', notes=CONCAT(notes, '|RESELECTED at $SQLdate by $PHP_AUTH_USER') where user='$user' and campaign_id='$VMIC_campaign_id' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) and event_date='$VMIC_event_date';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$affected_rows VMIC updated"; if ($DB) {echo "VMIC FOUND UPDATE: |$affected_rows|$stmt|\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='OLD', notes=CONCAT(notes, '|OLD at $SQLdate by $PHP_AUTH_USER') where user='$user' and campaign_id='$VMIC_campaign_id' and status='NEW';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$affected_rows OTHER updated"; if ($DB) {echo "VMIC OTHER UPDATE: |$affected_rows|$stmt|\n";} } } } ### END check for raising of max_inbound_calls setting, and execute re-enebling of agent selected in-groups if true ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmt_grp_values|$max_inbound_SQL|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='$max_inbound_NOTES';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $user_name = $user; $user_password = $pass; $last_name = $full_name; $is_admin = 'off'; $roleid = 'H5'; $status = 'Active'; $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); ### search for role in ViciDial $stmt = "SELECT vtiger_role FROM vtiger_vicidial_roles where user_level='$user_level';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $vvr_ct = mysqli_num_rows($rslt); if ($vvr_ct > 0) { $row=mysqli_fetch_row($rslt); $roleid = $row[0]; } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $userid = $row[0]; $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} if ($usergroupcount < 1) { $stmt="SELECT user_group FROM vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_groups_ct = mysqli_num_rows($rslt); $k=0; $VD_groups_list=''; while ($k < $VD_groups_ct) { $row=mysqli_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_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $userid = mysqli_insert_id($linkV); $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} #### END CREATE NEW USER RECORD IN VTIGER } ##### END Add/Update user info in Vtiger ###################################### } ### END vtiger integration } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=3; # go to user modification below } ###################### # ADD=4B submit user modifications to the system - ADMIN - Agent Screen Options Only ###################### if ($ADD=="4B") { if ($LOGmodify_users==1) { echo ""; $enc_pass_nochange=0; if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;} if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) ) { echo "
"._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("Password must be at least $SSrequire_password_length characters long")."\n"; } } else { if ($SSoutbound_autodial_active < 1) { $closer_default_blended = '0'; $delete_filters = '0'; $load_leads = '0'; } if (strlen($agent_choose_territories) < 1) {$agent_choose_territories=0;} $pass_hash=''; $pass_hashSQL=''; if ($SSpass_hash_enabled > 0) { if (strlen($pass) > 1) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass_hashSQL = ",pass_hash='$pass_hash'"; } $pass=''; } $k=0; $new_field_value=''; if (is_array($max_inbound_filter_statuses)) {$multi_count = count($max_inbound_filter_statuses);} else {$multi_count=0;} $multi_array = $max_inbound_filter_statuses; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $max_inbound_filter_statuses = preg_replace("/,$/","",$new_field_value); $k=0; $new_field_value=''; if (is_array($max_inbound_filter_ingroups)) {$multi_count = count($max_inbound_filter_ingroups);} else {$multi_count=0;} $multi_array = $max_inbound_filter_ingroups; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $max_inbound_filter_ingroups = preg_replace("/,$/","",$new_field_value); $user_codeSQL = ",user_code='$user_code'"; if ($SSuser_codes_admin > 0) { $user_codeSQL=''; if ($LOGuser_level >= 9) {$user_codeSQL = ",user_code='$user_code'";} } echo "
"._QXZ("USER MODIFIED - ADMIN").": $user\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',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',voicemail_id='$voicemail_id',agent_call_log_view_override='$agent_call_log_view_override',agent_choose_blended='$agent_choose_blended',agent_lead_search_override='$agent_lead_search',preset_contact_search='$preset_contact_search',max_inbound_calls='$max_inbound_calls',wrapup_seconds_override='$wrapup_seconds_override',lead_filter_id='$lead_filter_id',user_hide_realtime='$user_hide_realtime',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',ready_max_logout='$ready_max_logout',failed_login_count=0,max_hopper_calls='$max_hopper_calls',max_hopper_calls_hour='$max_hopper_calls_hour',hide_call_log_info='$hide_call_log_info_users',next_dial_my_callbacks='$next_dial_my_callbacks',max_inbound_filter_enabled='$max_inbound_filter_enabled',max_inbound_filter_statuses='$max_inbound_filter_statuses',max_inbound_filter_ingroups='$max_inbound_filter_ingroups',max_inbound_filter_min_sec='$max_inbound_filter_min_sec',status_group_id='$status_group_id',mobile_number='$mobile_number',user_location='$user_location',user_group_two='$user_group_two',hci_enabled='$hci_enabled' $user_codeSQL $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### BEGIN check for raising of max_inbound_calls setting, and execute re-enebling of agent selected in-groups if true $max_inbound_calls = intval($max_inbound_calls); $max_inbound_calls_old = intval($max_inbound_calls_old); $SSmax_inbound_auto_reenable = intval($SSmax_inbound_auto_reenable); $max_inbound_NOTES=''; $max_inbound_SQL=''; if ( ($max_inbound_calls > $max_inbound_calls_old) and ($SSmax_inbound_auto_reenable > 0) ) { $stmt = "SELECT campaign_id,blended,closer_campaigns,max_inbound_count,call_count_today,notes,event_date,CHAR_LENGTH(closer_campaigns) as sorder FROM vicidial_max_inbound_cache where user='$user' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) order by sorder desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vmic_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vmic_ct|$stmt|\n";} if ($vmic_ct > 0) { $row=mysqli_fetch_row($rslt); $VMIC_campaign_id = $row[0]; $VMIC_blended = $row[1]; $VMIC_closer_campaigns = $row[2]; $VMIC_max_inbound_count = $row[3]; $VMIC_call_count_today = $row[4]; $VMIC_notes = $row[5]; $VMIC_event_date = $row[6]; if ($DB) {echo "VMIC FOUND: |$user|$VMIC_campaign_id|$VMIC_blended|$VMIC_closer_campaigns|$VMIC_max_inbound_count|$VMIC_call_count_today|$VMIC_notes|$VMIC_event_date|\n";} $stmt = "SELECT closer_campaigns,status FROM vicidial_live_agents where user='$user' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vla_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vla_ct|$stmt|\n";} if ($vla_ct > 0) { $row=mysqli_fetch_row($rslt); $VLA_closer_campaigns = $row[0]; $VLA_status = $row[1]; if ($DB) {echo "VLA FOUND: |$user|$VLA_closer_campaigns|$VLA_status|\n";} } if ( (strlen($VMIC_closer_campaigns) > 2) and ($vla_ct > 0) and (strcmp($VMIC_closer_campaigns, $VLA_closer_campaigns) !== 0) ) { # populate vicidial_live_inbound_agents records for this user $temp_closer_campaigns = $VMIC_closer_campaigns; $in_groups_pre = preg_replace('/-$/','',$temp_closer_campaigns); $in_groups = explode(" ",$in_groups_pre); $in_groups_ct = count($in_groups); $k=1; while ($k < $in_groups_ct) { if (strlen($in_groups[$k])>1) { $stmtB="SELECT group_weight,calls_today,group_grade,calls_today_filtered,daily_limit FROM vicidial_inbound_group_agents where user='$user' and group_id='$in_groups[$k]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB) {echo "$stmtB\n";} $viga_ct = mysqli_num_rows($rslt); if ($viga_ct > 0) { $row=mysqli_fetch_row($rslt); $group_weight = $row[0]; $calls_today = $row[1]; $group_grade = $row[2]; $calls_today_filtered = $row[3]; $daily_limit = $row[4]; } else { $group_weight = 0; $calls_today = 0; $group_grade = 0; $calls_today_filtered = 0; $daily_limit = -1; } $stmtB="INSERT IGNORE INTO vicidial_live_inbound_agents set user='$user',group_id='$in_groups[$k]',group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',last_call_time=NOW(),last_call_finish=NOW(),last_call_time_filtered=NOW(),last_call_finish_filtered=NOW(),daily_limit='$daily_limit' ON DUPLICATE KEY UPDATE group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',daily_limit='$daily_limit';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmtB"; if ($DB) {echo "VLIA INSERT: |$affected_rows|$stmtB|\n";} } $k++; } $stmt = "UPDATE vicidial_live_agents SET closer_campaigns='$VMIC_closer_campaigns',external_ingroups='$VMIC_closer_campaigns',external_blended='$VMIC_blended',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$user' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= $stmt; $max_inbound_NOTES .= "$affected_rows VLA ingroups re-selected"; if ($DB) {echo "VLA FOUND UPDATE: |$affected_rows|$stmt|\n";} if ($affected_rows > 0) {echo "
"._QXZ("USER INBOUND GROUPS RE-SELECTED")."\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='RESELECTED', notes=CONCAT(notes, '|RESELECTED at $SQLdate by $PHP_AUTH_USER') where user='$user' and campaign_id='$VMIC_campaign_id' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) and event_date='$VMIC_event_date';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$affected_rows VMIC updated"; if ($DB) {echo "VMIC FOUND UPDATE: |$affected_rows|$stmt|\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='OLD', notes=CONCAT(notes, '|OLD at $SQLdate by $PHP_AUTH_USER') where user='$user' and campaign_id='$VMIC_campaign_id' and status='NEW';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$affected_rows OTHER updated"; if ($DB) {echo "VMIC OTHER UPDATE: |$affected_rows|$stmt|\n";} } } } ### END check for raising of max_inbound_calls setting, and execute re-enebling of agent selected in-groups if true ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmt_grp_values|$max_inbound_SQL|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='$max_inbound_NOTES';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $user_name = $user; $user_password = $pass; $last_name = $full_name; $is_admin = 'off'; $roleid = 'H5'; $status = 'Active'; $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); ### search for role in ViciDial $stmt = "SELECT vtiger_role FROM vtiger_vicidial_roles where user_level='$user_level';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $vvr_ct = mysqli_num_rows($rslt); if ($vvr_ct > 0) { $row=mysqli_fetch_row($rslt); $roleid = $row[0]; } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $userid = $row[0]; $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} if ($usergroupcount < 1) { $stmt="SELECT user_group FROM vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_groups_ct = mysqli_num_rows($rslt); $k=0; $VD_groups_list=''; while ($k < $VD_groups_ct) { $row=mysqli_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_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $userid = mysqli_insert_id($linkV); $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} #### END CREATE NEW USER RECORD IN VTIGER } ##### END Add/Update user info in Vtiger ###################################### } ### END vtiger integration } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $enc_pass_nochange=0; if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;} if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) ) { echo "
"._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("Password must be at least $SSrequire_password_length characters long")."\n"; } } else { $pass_hash=''; $pass_hashSQL=''; if ($SSpass_hash_enabled > 0) { if (strlen($pass) > 1) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass_hashSQL = ",pass_hash='$pass_hash'"; } $pass=''; } $user_codeSQL = ",user_code='$user_code'"; if ($SSuser_codes_admin > 0) { $user_codeSQL=''; if ($LOGuser_level >= 9) {$user_codeSQL = ",user_code='$user_code'";} } echo "
"._QXZ("USER MODIFIED").": $user\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',territory='$territory',user_nickname='$user_nickname',user_new_lead_limit='$user_new_lead_limit',failed_login_count=0,mobile_number='$mobile_number',user_location='$user_location',user_group_two='$user_group_two' $user_codeSQL $pass_hashSQL where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $user_name = $user; $user_password = $pass; $last_name = $full_name; $is_admin = 'off'; $roleid = 'H5'; $status = 'Active'; $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); ### search for role in ViciDial $stmt = "SELECT vtiger_role FROM vtiger_vicidial_roles where user_level='$user_level';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $vvr_ct = mysqli_num_rows($rslt); if ($vvr_ct > 0) { $row=mysqli_fetch_row($rslt); $roleid = $row[0]; } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $userid = $row[0]; $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} if ($usergroupcount < 1) { $stmt="SELECT user_group FROM vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_groups_ct = mysqli_num_rows($rslt); $k=0; $VD_groups_list=''; while ($k < $VD_groups_ct) { $row=mysqli_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_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $userid = mysqli_insert_id($linkV); $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; if ($DB) {echo "|$stmtB|\n";} $rslt=mysql_to_mysqli($stmtB, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_to_mysqli($stmtC, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_to_mysqli($stmtD, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} #### END CREATE NEW USER RECORD IN VTIGER } ##### END Add/Update user info in Vtiger ###################################### } ### END vtiger integration } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ($SSoutbound_autodial_active < 1) { $adaptive_dl_diff_target = '0'; $dl_diff_target_method = 'ADAPT_CALC_ONLY'; $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'; $timer_alt_seconds = '0'; $am_message_exten = '8320'; $vmm_daily_limit = '0'; $amd_send_to_vmx = 'N'; $auto_alt_dial = 'NONE'; $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_campaigns = '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'; $safe_harbor_audio = 'buzz'; $safe_harbor_audio_field = 'DISABLED'; $safe_harbor_menu_id = ''; $survey_camp_record_dir = '/home/survey'; $survey_dtmf_digits = '1238'; $survey_wait_sec = '10'; $survey_first_audio_file = 'US_pol_survey_hello'; $survey_method = 'AGENT_XFER'; $survey_ni_audio_file = 'US_thanks_no_contact'; $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'; $survey_third_audio_file = 'US_thanks_no_contact'; $survey_fourth_audio_file = 'US_thanks_no_contact'; $voicemail_ext = ''; $cpd_amd_action = 'DISABLED'; $cpd_unknown_action = 'DISABLED'; $drop_lockout_time = '0'; $call_count_limit = '0'; $call_count_target = '0'; $lead_order_randomize = 'N'; $lead_order_secondary = 'LEAD_ASCEND'; $amd_inbound_group = ''; $amd_callmenu = ''; } if ( (preg_match('/list_activation/',$stage)) or (preg_match('/test_call/',$stage)) ) { if (preg_match('/test_call/',$stage)) { $p=0; echo "
"._QXZ("TEST CALL").":"; if (strlen($phone_number)<6) { echo " "._QXZ("NOT PLACED, number too small")." - $phone_number"; } else { ### insert a new lead in the system with this phone number $stmtA = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$manual_dial_list_id',status='CTCALL',user='VDAD',called_since_last_reset='Y',entry_date='$SQLdate',last_local_call_time='$SQLdate',called_count='1',first_name='Test',last_name='Call',address1='Test Call',address2='2',address3='3',city='Springfield',state='IL',vendor_lead_code='999999',comments='$campaign_id test call placed $SQLdate',rank='99',owner='Test Outbound Call';"; if ($DB) {echo "$stmtA\n";} $rslt=mysql_to_mysqli($stmtA, $link); $affected_rows = mysqli_affected_rows($link); $lead_id = mysqli_insert_id($link); ### LOG INSERTION Admin Log Table, for lead ### $SQL_log = "$stmtA|"; $SQL_log = preg_replace('/;/', '', $SQL_log); $SQL_log = addslashes($SQL_log); $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LEADS', event_type='ADD', record_id='$lead_id', event_code='ADMIN ADD TEST LEAD', event_sql=\"$SQL_log\", event_notes='';"; $rslt=mysql_to_mysqli($stmt, $link); ### gather list_id overrides $stmt="SELECT campaign_cid_override,cid_group_id FROM vicidial_lists where list_id='$manual_dial_list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $CIDor_ct = mysqli_num_rows($rslt); $campaign_cid_override=''; if ($CIDor_ct > 0) { $row=mysqli_fetch_row($rslt); $campaign_cid_override = $row[0]; $campaign_cid_group_override = $row[1]; } ### gather server information $stmt="SELECT asterisk_version,routing_prefix,server_id FROM servers where server_ip='$old_server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $srv_ct = mysqli_num_rows($rslt); $asterisk_version=''; $routing_prefix=''; if ($srv_ct > 0) { $row=mysqli_fetch_row($rslt); $asterisk_version = $row[0]; $routing_prefix = $row[1]; $server_id = $row[2]; } $CCID_on=0; $CCID=''; $local_DEF = 'Local/'; $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} if (strlen($campaign_vdad_exten) > 0) {$VDAD_dial_exten = "$campaign_vdad_exten";} else {$VDAD_dial_exten = "$SSanswer_transfer_agent";} $major_version = explode('.',$asterisk_version); if ($major_version[0] >= 12) { $VDAD_dial_exten = "$routing_prefix$VDAD_dial_exten"; } if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;} if (preg_match("/x/",$dial_prefix)) {$Local_out_prefix = '';} if (strlen($ext_context) < 1) {$ext_context='default';} if ($omit_phone_code=="Y") {$Ndialstring = "$Local_out_prefix$phone_number";} else {$Ndialstring = "$Local_out_prefix$phone_code$phone_number";} # generate callerID for unique identifier in xfer_log file $PADlead_id = sprintf("%010s", $lead_id); while (strlen($PADlead_id) > 10) {$PADlead_id = substr("$PADlead_id", 1);} # Create unique calleridname to track the call: VmddhhmmssLLLLLLLLLL $VqueryCID = "V$CIDdate$PADlead_id"; if ($CCID_on) {$CIDstring = "\"$VqueryCID\" <$CCID>";} else {$CIDstring = "$VqueryCID";} ### insert a NEW record to the vicidial_manager table to be processed $stmtB = "INSERT INTO vicidial_manager(uniqueid,entry_date,status,response,server_ip,channel,action,callerid,cmd_line_b,cmd_line_c,cmd_line_d,cmd_line_e,cmd_line_f,cmd_line_g,cmd_line_h,cmd_line_i,cmd_line_j,cmd_line_k) values('','$SQLdate','NEW','N','$old_server_ip','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','VDACnote: $campaign_id|$lead_id|$phone_code|$phone_number|OUT|MAIN|99')"; $rslt=mysql_to_mysqli($stmtB, $link); ### insert a SENT record to the vicidial_auto_calls table $stmtC = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$old_server_ip','$campaign_id','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','MAIN','99')"; $rslt=mysql_to_mysqli($stmtC, $link); ### insert a record in the vicidial_dial_log table $stmtD = "INSERT INTO vicidial_dial_log SET caller_code='$VqueryCID',lead_id='$lead_id',server_ip='$old_server_ip',call_date='$SQLdate',extension='$VDAD_dial_exten',channel='$local_DEF$Ndialstring$local_AMP$ext_context',timeout='$Local_dial_timeout',outbound_cid='$CIDstring',context='$ext_context';"; $rslt=mysql_to_mysqli($stmtD, $link); ### log outbound call in the dial cid log $stmt = "INSERT INTO vicidial_dial_cid_log SET caller_code='$VqueryCID',call_date='$SQLdate',call_type='MANUAL',call_alt='MAIN', outbound_cid='$CCID',outbound_cid_type='CAMPAIGN_TEST';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} ### log outbound call in the user dial log $stmt = "INSERT INTO vicidial_user_dial_log SET caller_code='$VqueryCID',user='$PHP_AUTH_USER',call_date='$SQLdate',call_type='M',notes='Admin test call CAMPAIGN_TEST';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); ### log outbound call in the user call log $stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id,preset_name) values('$PHP_AUTH_USER','$SQLdate','ADMIN','$old_server_ip','$phone_number','$Ndialstring','$lead_id','$CCID','','')"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table, for campaign ### $SQL_log = "$stmtA|$stmtB|$stmtC|"; $SQL_log = preg_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='CAMPAIGNS', event_type='OTHER', record_id='$campaign_id', event_code='ADMIN CAMPAIGN TEST CALL', event_sql=\"$SQL_log\", event_notes='Placed call to $phone_code $phone_number from $old_server_ip - $server_id';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmtA|\n|$stmtB|\n|$stmtC|\n";} echo " "._QXZ("PLACED TO")." $phone_code $phone_number "._QXZ("FROM")." $old_server_ip - $server_id \n
"; } } $LIST_ACTIVATE=''; if (preg_match('/list_activation/',$stage)) { $p=0; echo "
"._QXZ("ACTIVE LISTS CHANGED"); if(!is_array($list_active_change)) {$list_active_change=array();} $list_active_change_ct = count($list_active_change); while ($p < $list_active_change_ct) { $list_active_change[$p] = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$list_active_change[$p]); $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_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGNS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN ACTIVE LISTS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|\n|$stmtB|\n";} } } else { if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) { echo "
"._QXZ("CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the campaign name needs to be at least 6 characters in length")."\n"; echo "
|$campaign_name|$active|\n"; } else { if ($form_end != 'END') { echo "
"._QXZ("CAMPAIGN NOT MODIFIED - Please wait for the whole page to load before submitting the form")."\n"; } else { if ($campaign_rec_filename == $stereo_rec_filename) { $stereo_rec_filename = "X".$stereo_rec_filename; echo "
"._QXZ("Stereo Recording Filename identical to Recording Filename, so it has been appended ").": $stereo_rec_filename ($campaign_rec_filename)\n"; } if ( (strlen($parallel_rec_co_filename) > 0) and ( ($campaign_rec_filename == $parallel_rec_co_filename) or ($stereo_rec_filename == $parallel_rec_co_filename) or ($parallel_rec_cm_filename == $parallel_rec_co_filename) or ($parallel_rec_fr_filename == $parallel_rec_co_filename) ) ) { $parallel_rec_co_filename = "CO".$parallel_rec_co_filename; echo "
"._QXZ("Parallel Customer-Only Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_co_filename\n"; } if ( (strlen($parallel_rec_cm_filename) > 0) and ( ($campaign_rec_filename == $parallel_rec_cm_filename) or ($stereo_rec_filename == $parallel_rec_cm_filename) or ($parallel_rec_co_filename == $parallel_rec_cm_filename) or ($parallel_rec_fr_filename == $parallel_rec_cm_filename) ) ) { $parallel_rec_cm_filename = "CM".$parallel_rec_cm_filename; echo "
"._QXZ("Parallel Customer-Muted Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_cm_filename\n"; } if ( (strlen($parallel_rec_fr_filename) > 0) and ( ($campaign_rec_filename == $parallel_rec_fr_filename) or ($stereo_rec_filename == $parallel_rec_fr_filename) or ($parallel_rec_co_filename == $parallel_rec_fr_filename) or ($parallel_rec_cm_filename == $parallel_rec_fr_filename) ) ) { $parallel_rec_fr_filename = "FR".$parallel_rec_fr_filename; echo "
"._QXZ("Parallel Full-Recording Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_fr_filename\n"; } echo "
"._QXZ("CAMPAIGN MODIFIED").": $campaign_id\n"; if ( ($dial_method == 'MANUAL') or ($dial_method == 'INBOUND_MAN') ) { $auto_alt_dial = 'NONE'; } if ( ($dial_method != 'MANUAL') and ($dial_method != 'INBOUND_MAN') ) { $no_hopper_dialing='N'; $agent_dial_owner_only='NONE'; } if ($no_hopper_dialing == 'Y') { $use_auto_hopper='N'; $auto_alt_dial='NONE'; $list_order_mix='DISABLED'; } if ($dial_method == 'MANUAL') { $auto_dial_level='0'; $use_auto_hopper='N'; $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') or ($dial_method == 'SHARED_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 ( (!preg_match('/DISABLED/', $list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} $closer_campaignsSQL = "'$groups_value'"; if ( ($campaign_allow_inbound == 'N') or ($old_campaign_allow_inbound == 'N') ) { $closer_campaignsSQL = 'closer_campaigns'; $groups_list=''; $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $Mcloser_campaigns = $row[0]; $Mcloser_campaigns = preg_replace("/ -$/","",$Mcloser_campaigns); $groups = explode(" ", $Mcloser_campaigns); $o=0; while ($groups_to_print > $o) { $groups_list .= "$group_id_values[$o] - $group_name_values[$o] - $VIG_priority
\n"; $o++; } if (strlen($groups_value)>2) {$groups_value .= " -";} } if ( ($amd_agent_route_options == 'ENABLED') or ($amd_agent_route_options == 'PENDING') ) { $stmt="SELECT count(*) from vicidial_settings_containers where container_id='AMD_AGENT_OPT_$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $AMDAOcount = $row[0]; if ($AMDAOcount < 1) { $stmt = "INSERT INTO vicidial_settings_containers SET container_id='AMD_AGENT_OPT_$campaign_id',container_type='AMD_AGENT_OPTIONS',container_entry='',container_notes='AMD agent options for $campaign_id campaign';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTAINERS', event_type='ADD', record_id='AMD_AGENT_OPT_$campaign_id', event_code='ADMIN ADD CONTAINER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|\n";} } } if ( ($pause_max < 10) or (strlen($pause_max)<2) ) {$pause_max=0;} if ( ($ready_max_logout < 10) or (strlen($ready_max_logout)<2) ) {$ready_max_logout=0;} if ( ($pause_max > 9) and ($pause_max <= $dial_timeout) ) {$pause_max = ($dial_timeout + 10);} if ($dial_timeout < 4) {$dial_timeout='30';} if ( ($manual_auto_next > 0) and ($manual_auto_next < 5) ) {$manual_auto_next='5';} if ( ($agent_select_territories != 'Y') and ($agent_select_territories != 'N') ) {$agent_select_territories='N';} if (strlen($max_inbound_calls_outcome) < 1) {$max_inbound_calls_outcome='DEFAULT';} $hdrtSQL=''; $hdrtMESSAGE=''; if ($hopper_drop_run_trigger == 'Y') { $hdrtSQL = ",hopper_drop_run_trigger='Y'"; $hdrtMESSAGE='Hopper Drop-Run Triggered'; } if ($hopper_drop_run_trigger_all == 'A') { $hdrtSQL = ",hopper_drop_run_trigger='A'"; $hdrtMESSAGE='Hopper All-Drops-Run Triggered'; } if ($demographic_quotas_campaigns == 'ENABLED') {$use_auto_hopper='N';} $prefixSQL=''; if ($LOGmodify_dial_prefix > 0) {$prefixSQL = ",dial_prefix='$dial_prefix',manual_dial_prefix='$manual_dial_prefix',three_way_dial_prefix='$three_way_dial_prefix'";} $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', auto_trim_hopper='$auto_trim_hopper', use_auto_hopper='$use_auto_hopper', auto_hopper_multi='$auto_hopper_multi', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysqli_real_escape_string($link, $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_campaigns',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns=$closer_campaignsSQL,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',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='" . mysqli_real_escape_string($link, $web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysqli_real_escape_string($link, $crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysqli_real_escape_string($link, $start_call_url) . "',dispo_call_url='" . mysqli_real_escape_string($link, $dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysqli_real_escape_string($link, $blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats',api_manual_dial='$api_manual_dial',manual_dial_call_time_check='$manual_dial_call_time_check',lead_order_randomize='$lead_order_randomize',lead_order_secondary='$lead_order_secondary',per_call_notes='$per_call_notes',my_callback_option='$my_callback_option',agent_lead_search='$agent_lead_search',agent_lead_search_method='$agent_lead_search_method',queuemetrics_phone_environment='$queuemetrics_phone_environment',auto_pause_precall='$auto_pause_precall',auto_resume_precall='$auto_resume_precall',auto_pause_precall_code='$auto_pause_precall_code',manual_dial_cid='$manual_dial_cid',post_phone_time_diff_alert='$post_phone_time_diff_alert',custom_3way_button_transfer='$custom_3way_button_transfer',available_only_tally_threshold='$available_only_tally_threshold',available_only_tally_threshold_agents='$available_only_tally_threshold_agents',dial_level_threshold='$dial_level_threshold',dial_level_threshold_agents='$dial_level_threshold_agents',safe_harbor_audio='$safe_harbor_audio',safe_harbor_menu_id='$safe_harbor_menu_id',callback_days_limit='$callback_days_limit',dl_diff_target_method='$dl_diff_target_method',disable_dispo_screen='$disable_dispo_screen',disable_dispo_status='$disable_dispo_status',screen_labels='$screen_labels',status_display_fields='$status_display_fields',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',pllb_grouping='$pllb_grouping',pllb_grouping_limit='$pllb_grouping_limit',call_count_limit='$call_count_limit',call_count_target='$call_count_target',callback_hours_block='$callback_hours_block',callback_list_calltime='$callback_list_calltime',user_group='$user_group',hopper_vlc_dup_check='$hopper_vlc_dup_check',in_group_dial='$in_group_dial',in_group_dial_select='$in_group_dial_select',safe_harbor_audio_field='$safe_harbor_audio_field',pause_after_next_call='$pause_after_next_call',owner_populate='$owner_populate',use_other_campaign_dnc='$use_other_campaign_dnc',allow_emails='$allow_emails',allow_chats='$allow_chats',amd_inbound_group='$amd_inbound_group',amd_callmenu='$amd_callmenu',manual_dial_lead_id='$manual_dial_lead_id',dead_max='$dead_max',dispo_max='$dispo_max',pause_max='$pause_max',dead_max_dispo='$dead_max_dispo',dispo_max_dispo='$dispo_max_dispo',max_inbound_calls='$max_inbound_calls',manual_dial_search_checkbox='$manual_dial_search_checkbox',hide_call_log_info='$hide_call_log_info',timer_alt_seconds='$timer_alt_seconds',wrapup_bypass='$wrapup_bypass',wrapup_after_hotkey='$wrapup_after_hotkey',callback_active_limit='$callback_active_limit',callback_active_limit_override='$callback_active_limit_override',comments_all_tabs='$comments_all_tabs',comments_dispo_screen='$comments_dispo_screen',comments_callback_screen='$comments_callback_screen',qc_comment_history='$qc_comment_history',show_previous_callback='$show_previous_callback',clear_script='$clear_script',cpd_unknown_action='$cpd_unknown_action',manual_dial_search_filter='$manual_dial_search_filter',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',manual_dial_override_field='$manual_dial_override_field',status_display_ingroup='$status_display_ingroup',customer_gone_seconds='$customer_gone_seconds',agent_display_fields='$agent_display_fields',am_message_wildcards='$am_message_wildcards',manual_dial_timeout='$manual_dial_timeout',routing_initiated_recordings='$routing_initiated_recordings',manual_dial_hopper_check='$manual_dial_hopper_check',callback_useronly_move_minutes='$callback_useronly_move_minutes',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',manual_auto_next='$manual_auto_next',manual_auto_show='$manual_auto_show',allow_required_fields='$allow_required_fields',dead_to_dispo='$dead_to_dispo',agent_xfer_validation='$agent_xfer_validation',ready_max_logout='$ready_max_logout',callback_display_days='$callback_display_days',three_way_record_stop='$three_way_record_stop',hangup_xfer_record_start='$hangup_xfer_record_start',scheduled_callbacks_email_alert='$scheduled_callbacks_email_alert',max_inbound_calls_outcome='$max_inbound_calls_outcome',manual_auto_next_options='$manual_auto_next_options',agent_screen_time_display='$agent_screen_time_display',next_dial_my_callbacks='$next_dial_my_callbacks',inbound_no_agents_no_dial_container='$inbound_no_agents_no_dial_container',inbound_no_agents_no_dial_threshold='$inbound_no_agents_no_dial_threshold',cid_group_id='$cid_group_id',pause_max_dispo='$pause_max_dispo',script_top_dispo='$script_top_dispo',dead_trigger_seconds='$dead_trigger_seconds',dead_trigger_action='$dead_trigger_action',dead_trigger_repeat='$dead_trigger_repeat',dead_trigger_filename='$dead_trigger_filename',dead_trigger_url='" . mysqli_real_escape_string($link, $dead_trigger_url) . "',scheduled_callbacks_force_dial='$scheduled_callbacks_force_dial',scheduled_callbacks_auto_reschedule='$scheduled_callbacks_auto_reschedule',scheduled_callbacks_timezones_container='$scheduled_callbacks_timezones_container',three_way_volume_buttons='$three_way_volume_buttons',callback_dnc='$callback_dnc',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings_campaigns',auto_active_list_new='$auto_active_list_new',call_quota_lead_ranking='$call_quota_lead_ranking_campaigns',sip_event_logging='$sip_event_logging_campaigns',campaign_script_two='$campaign_script_two',leave_vm_no_dispo='$leave_vm_no_dispo',leave_vm_message_group_id='$leave_vm_message_group_id',dial_timeout_lead_container='$dial_timeout_lead_container',amd_type='$amd_type',vmm_daily_limit='$vmm_daily_limit',opensips_cid_name='$opensips_cid_name_campaigns',amd_agent_route_options='$amd_agent_route_options',browser_alert_sound='$browser_alert_sound_campaigns',browser_alert_volume='$browser_alert_volume',three_way_record_stop_exception='$three_way_record_stop_exception',pause_max_exceptions='$pause_max_exceptions',daily_call_count_limit='$daily_call_count_limit',daily_limit_manual='$daily_limit_manual',transfer_button_launch='$transfer_button_launch',shared_dial_rank='$shared_dial_rank',agent_search_method='$agent_search_method',clear_form='$clear_form',leave_3way_start_recording='$leave_3way_start_recording',leave_3way_start_recording_exception='$leave_3way_start_recording_exception',calls_waiting_vl_one='$calls_waiting_vl_one',calls_waiting_vl_two='$calls_waiting_vl_two',calls_inqueue_count_one='$calls_inqueue_count_one',calls_inqueue_count_two='$calls_inqueue_count_two',in_man_dial_next_ready_seconds='$in_man_dial_next_ready_seconds',in_man_dial_next_ready_seconds_override='$in_man_dial_next_ready_seconds_override',transfer_no_dispo='$transfer_no_dispo',call_limit_24hour_method='$call_limit_24hour_method',call_limit_24hour_scope='$call_limit_24hour_scope',call_limit_24hour='$call_limit_24hour',call_limit_24hour_override='$call_limit_24hour_override',cid_group_id_two='$cid_group_id_two',incall_tally_threshold_seconds='$incall_tally_threshold_seconds',auto_alt_threshold='$auto_alt_threshold',pause_max_url='$pause_max_url',agent_hide_hangup='$agent_hide_hangup',ig_xfer_list_sort='$ig_xfer_list_sort',script_tab_frame_size='$script_tab_frame_size',max_logged_in_agents='$max_logged_in_agents',user_group_script='$user_group_script',agent_hangup_route='$agent_hangup_route',agent_hangup_value='$agent_hangup_value',agent_hangup_ig_override='$agent_hangup_ig_override',show_confetti='$show_confetti',demographic_quotas='$demographic_quotas_campaigns',demographic_quotas_container='$demographic_quotas_container',demographic_quotas_rerank='$demographic_quotas_rerank',demographic_quotas_list_resets='$demographic_quotas_list_resets',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',dead_stop_recording='$dead_stop_recording',manual_vm_status_updates='$manual_vm_status_updates',force_per_call_notes='$force_per_call_notes',agent_search_ingroup_list='$agent_search_ingroup_list',hopper_hold_inserts='$hopper_hold_inserts',daily_phone_number_call_limit='$daily_phone_number_call_limit',state_descriptions='$state_descriptions',script_tab_height='$script_tab_height',call_log_days='$call_log_days',leave_3way_stop_recording='$leave_3way_stop_recording',manual_minimum_ring_seconds='$manual_minimum_ring_seconds',manual_minimum_attempt_seconds='$manual_minimum_attempt_seconds',manual_minimum_answer_seconds='$manual_minimum_answer_seconds',khomp_settings_container='$khomp_settings_container',stereo_recording='$stereo_recording',stereo_rec_filename='$stereo_rec_filename',stereo_parallel_recording='$stereo_parallel_recording',recording_dtmf_muting='$recording_dtmf_muting',stereo_recording_agent='$stereo_recording_agent',parallel_rec_co_filename='$parallel_rec_co_filename',parallel_rec_cm_filename='$parallel_rec_cm_filename',parallel_rec_fr_filename='$parallel_rec_fr_filename',call_count_limit_restrict='$call_count_limit_restrict',adaptive_percentmax_percentage='$adaptive_percentmax_percentage',hangup_again_link='$hangup_again_link',amd_agent_display='$amd_agent_display',amd_status_map='$amd_status_map' $prefixSQL $hdrtSQL where campaign_id='$campaign_id';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $link); if ($reset_hopper == 'Y') { echo "
"._QXZ("RESETTING CAMPAIGN LEAD HOPPER")."\n"; echo "
- "._QXZ("Wait 1 minute before dialing next number")."\n"; $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','QUEUE','DONE','RHOLD','RQUEUE');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGNS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPAIGN LEAD HOPPER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if ($hopper_drop_run_trigger_all == 'A') { echo "
"._QXZ("Hopper All-Drops-Run Triggered")."\n"; } else { if ($hopper_drop_run_trigger == 'Y') { echo "
"._QXZ("Hopper Drop-Run Triggered")."\n"; } } ### BEGIN check for raising of max_inbound_calls setting, and execute re-enebling of agents with selected in-groups if true $max_inbound_calls = intval($max_inbound_calls); $max_inbound_calls_old = intval($max_inbound_calls_old); $SSmax_inbound_auto_reenable = intval($SSmax_inbound_auto_reenable); $max_inbound_NOTES=''; $max_inbound_SQL=''; if ( ($max_inbound_calls > $max_inbound_calls_old) and ($SSmax_inbound_auto_reenable > 0) ) { $max_in_users=array(); $miu=0; $stmt = "SELECT distinct user FROM vicidial_max_inbound_cache where campaign_id='$campaign_id' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) order by user limit 1000;"; $rslt=mysql_to_mysqli($stmt, $link); $vmicu_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vmicu_ct|$stmt|\n";} while ($vmicu_ct > $miu) { $row=mysqli_fetch_row($rslt); $max_in_users[$miu] = $row[0]; $miu++; } if ($DB) {echo "VMIC AGENTS FOUND: |$miu|\n";} $miu=0; while ($vmicu_ct > $miu) { $stmt = "SELECT '$campaign_id',blended,closer_campaigns,max_inbound_count,call_count_today,notes,event_date,CHAR_LENGTH(closer_campaigns) as sorder FROM vicidial_max_inbound_cache where user='$max_in_users[$miu]' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) order by sorder desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vmic_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vmic_ct|$stmt|\n";} if ($vmic_ct > 0) { $row=mysqli_fetch_row($rslt); $VMIC_campaign_id = $row[0]; $VMIC_blended = $row[1]; $VMIC_closer_campaigns = $row[2]; $VMIC_max_inbound_count = $row[3]; $VMIC_call_count_today = $row[4]; $VMIC_notes = $row[5]; $VMIC_event_date = $row[6]; if ($DB) {echo "VMIC FOUND: |$miu|$max_in_users[$miu]|$VMIC_campaign_id|$VMIC_blended|$VMIC_closer_campaigns|$VMIC_max_inbound_count|$VMIC_call_count_today|$VMIC_notes|$VMIC_event_date|\n";} $stmt = "SELECT closer_campaigns,status FROM vicidial_live_agents where user='$max_in_users[$miu]' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $vla_ct = mysqli_num_rows($rslt); if ($DB) {echo "$vla_ct|$stmt|\n";} if ($vla_ct > 0) { $row=mysqli_fetch_row($rslt); $VLA_closer_campaigns = $row[0]; $VLA_status = $row[1]; if ($DB) {echo "VLA FOUND: |$miu|$max_in_users[$miu]|$VLA_closer_campaigns|$VLA_status|\n";} } if ( (strlen($VMIC_closer_campaigns) > 2) and ($vla_ct > 0) and (strcmp($VMIC_closer_campaigns, $VLA_closer_campaigns) !== 0) ) { # populate vicidial_live_inbound_agents records for this user $temp_closer_campaigns = $VMIC_closer_campaigns; $in_groups_pre = preg_replace('/-$/','',$temp_closer_campaigns); $in_groups = explode(" ",$in_groups_pre); $in_groups_ct = count($in_groups); $k=1; while ($k < $in_groups_ct) { if (strlen($in_groups[$k])>1) { $stmtB="SELECT group_weight,calls_today,group_grade,calls_today_filtered,daily_limit FROM vicidial_inbound_group_agents where user='$max_in_users[$miu]' and group_id='$in_groups[$k]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB) {echo "$stmtB\n";} $viga_ct = mysqli_num_rows($rslt); if ($viga_ct > 0) { $row=mysqli_fetch_row($rslt); $group_weight = $row[0]; $calls_today = $row[1]; $group_grade = $row[2]; $calls_today_filtered = $row[3]; $daily_limit = $row[4]; } else { $group_weight = 0; $calls_today = 0; $group_grade = 0; $calls_today_filtered = 0; $daily_limit = -1; } $stmtB="INSERT IGNORE INTO vicidial_live_inbound_agents set user='$max_in_users[$miu]',group_id='$in_groups[$k]',group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',last_call_time=NOW(),last_call_finish=NOW(),last_call_time_filtered=NOW(),last_call_finish_filtered=NOW(),daily_limit='$daily_limit' ON DUPLICATE KEY UPDATE group_weight='$group_weight',group_grade='$group_grade',calls_today='$calls_today',calls_today_filtered='$calls_today_filtered',daily_limit='$daily_limit';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmtB"; if ($DB) {echo "VLIA INSERT: |$affected_rows|$stmtB|\n";} } $k++; } $stmt = "UPDATE vicidial_live_agents SET closer_campaigns='$VMIC_closer_campaigns',external_ingroups='$VMIC_closer_campaigns',external_blended='$VMIC_blended',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$max_in_users[$miu]' and campaign_id='$VMIC_campaign_id' and last_update_time > DATE_SUB(NOW(), INTERVAL 10 SECOND) order by last_update_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$miu|$affected_rows VLA ingroups re-selected"; if ($DB) {echo "VLA FOUND UPDATE: |$miu|$affected_rows|$stmt|\n";} if ($affected_rows > 0) {echo "
"._QXZ("USER INBOUND GROUPS RE-SELECTED")."\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='RESELECTED', notes=CONCAT(notes, '|RESELECTED at $SQLdate by $PHP_AUTH_USER') where user='$max_in_users[$miu]' and campaign_id='$VMIC_campaign_id' and status='NEW' and closer_campaigns NOT IN('',' ',' -') and (max_inbound_count < $max_inbound_calls) and event_date='$VMIC_event_date';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$miu|$affected_rows VMIC updated"; if ($DB) {echo "VMIC FOUND UPDATE: |$miu|$affected_rows|$stmt|\n";} $stmt = "UPDATE vicidial_max_inbound_cache SET status='OLD', notes=CONCAT(notes, '|OLD at $SQLdate by $PHP_AUTH_USER') where user='$max_in_users[$miu]' and campaign_id='$VMIC_campaign_id' and status='NEW';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $max_inbound_SQL .= "|$stmt"; $max_inbound_NOTES .= "|$affected_rows OTHER updated"; if ($DB) {echo "VMIC OTHER UPDATE: |$affected_rows|$stmt|\n";} } } $miu++; } } ### END check for raising of max_inbound_calls setting, and execute re-enebling of agent selected in-groups if true ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$max_inbound_SQL|"; $SQL_log = preg_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='CAMPAIGNS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN DETAIL', event_sql=\"$SQL_log\", event_notes='$hdrtMESSAGE$max_inbound_NOTES';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the campaign id needs to be at least 2 characters in length")."\n"; echo "
"._QXZ("the campaign status needs to be at least 1 characters in length")."\n"; } else { if (preg_match('/delete/',$stage)) { echo "
"._QXZ("CUSTOM CAMPAIGN STATUS DELETED").": $campaign_id - $status\n"; $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_STATUS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if (preg_match('/modify/', $stage)) { echo "
"._QXZ("CUSTOM CAMPAIGN STATUS MODIFIED").": $campaign_id - $status\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',scheduled_callback='$scheduled_callbacks',completed='$completed',min_sec='$min_sec',max_sec='$max_sec',answering_machine='$answering_machine' where campaign_id='$campaign_id' and status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_STATUS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) { echo "
"._QXZ("CAMPAIGN HOT KEY NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the campaign id needs to be at least 2 characters in length")."\n"; echo "
"._QXZ("the campaign status needs to be at least 1 characters in length")."\n"; echo "
"._QXZ("the campaign hotkey needs to be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("CUSTOM CAMPAIGN HOT KEY DELETED").": $campaign_id - $status - $hotkey\n"; $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_HOTKEY', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; 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'; $timer_alt_seconds = '0'; $am_message_exten = '8320'; $vmm_daily_limit = '0'; $amd_send_to_vmx = 'N'; $auto_alt_dial = 'NONE'; $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_campaigns = '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'; $safe_harbor_audio = 'buzz'; $safe_harbor_audio_field = 'DISABLED'; $safe_harbor_menu_id = ''; $voicemail_ext = ''; } if (preg_match('/list_activation/',$stage)) { $p=0; echo "
"._QXZ("ACTIVE LISTS CHANGED"); if (!is_array($list_active_change)) {$list_active_change=array();} $list_active_change_ct = count($list_active_change); while ($p < $list_active_change_ct) { $list_active_change[$p] = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$list_active_change[$p]); $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_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGNS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN ACTIVE LISTS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|\n|$stmtB|\n";} } else { if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) { echo "
"._QXZ("CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the campaign name needs to be at least 6 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN MODIFIED").": $campaign_id\n"; if ( ($dial_method == 'RATIO') or ($dial_method == 'SHARED_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 ( ($dial_method == 'MANUAL') or ($dial_method == 'INBOUND_MAN') ) { $adlSQL .= "auto_alt_dial='NONE',"; } if ( (!preg_match('/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_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|"; $SQL_log = preg_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='CAMPAIGNS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN BASIC', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($reset_hopper == 'Y') { echo "
"._QXZ("RESETTING CAMPAIGN LEAD HOPPER")."\n"; echo "
- "._QXZ("Wait 1 minute before dialing next number")."\n"; $stmt="DELETE from vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','QUEUE','DONE','RHOLD','RQUEUE');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGNS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPAIGN LEAD HOPPER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; 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 "
"._QXZ("CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; echo "
"._QXZ("attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours")."\n"; echo "
"._QXZ("maximum attempts must be from 1 to 10")."\n"; } else { echo "
"._QXZ("CAMPAIGN LEAD MODIFIED").": $campaign_id - $status - $attempt_delay\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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_RECYCLE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (mb_strlen($pause_code,'utf-8') > 6) or (strlen($pause_code_name) < 2) ) { echo "
"._QXZ("AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("pause_code must be between 1 and 6 characters in length")."\n"; echo "
"._QXZ("pause_code name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("AGENT PAUSE CODE MODIFIED").": $campaign_id - $pause_code - $pause_code_name\n"; if (strlen($time_limit) < 1) {$time_limit='65000';} $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable',time_limit='$time_limit',require_mgr_approval='$require_mgr_approval' where campaign_id='$campaign_id' and pause_code='$pause_code';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PAUSECODE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN PAUSE CODE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("QC SETTINGS NOT MODIFIED - Please go back and look at the data you entered")."\n"; } else { $p=0; $QC_statuses=""; $QC_lists=""; if (!is_array($qc_statuses)) $qc_statuses = array(); $qc_statuses_ct = count($qc_statuses); while ($p < $qc_statuses_ct) { $qc_statuses[$p] = preg_replace('/[^-_0-9\p{L}]/u','',$qc_statuses[$p]); $QC_statuses .= " $qc_statuses[$p]"; $p++; } $p=0; if (!is_array($qc_lists)) $qc_lists = array(); $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 .= " -";} $QC_statuses = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$QC_statuses); $QC_lists = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$QC_lists); echo "
"._QXZ("QC SETTINGS MODIFIED").": $campaign_id\n"; $stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',qc_web_form_address='" . mysqli_real_escape_string($link, $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',qc_scorecard_id='$qc_scorecard_id',qc_statuses_id='$qc_statuses_id',campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGN_QC', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN QC SETTINGS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("SURVEY SETTINGS NOT MODIFIED - Please go back and look at the data you entered")."\n"; } else { echo "
"._QXZ("SURVEY SETTINGS MODIFIED").": $campaign_id\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',survey_menu_id='$survey_menu_id',survey_recording='$survey_recording',survey_wait_sec='$survey_wait_sec',campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGN_SURVEY', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN SURVEY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $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); $list_mix_container = preg_replace("/\<|\>|\'|\"|\\\\|;/", '', $list_mix_container); $mix_method = preg_replace("/\<|\>|\'|\"|\\\\|;/", '', $mix_method); $status = preg_replace("/\<|\>|\'|\"|\\\\|;/", '', $status); $vcl_name = preg_replace("/\<|\>|\'|\"|\\\\|;/", '', $vcl_name); if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_mix_container) < 6) or (strlen($vcl_name) < 2) ) { echo "
"._QXZ("LIST MIX NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("must be between 1 and 20 characters in length")."\n"; echo "
vcl_name "._QXZ("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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX MODIFIED").": $campaign_id - $vcl_id - $vcl_name\n"; } } ##### ADD a list mix container entry ##### if ($stage=='ADD') { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) { echo "
"._QXZ("LIST MIX NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("must be between 1 and 20 characters in length")."\n"; echo "
list_id "._QXZ("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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX MODIFIED").": $campaign_id - $vcl_id - $list_id\n"; } } ##### REMOVE a list mix container entry ##### if ($stage=='REMOVE') { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) { echo "
"._QXZ("LIST MIX NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("must be between 1 and 20 characters in length")."\n"; echo "
list_id "._QXZ("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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $MIXentries = $MT; $MIXentries = explode(":", $row[0]); $Ms_to_print = (count($MIXentries) - 0); if ($Ms_to_print < 2) { echo "
"._QXZ("LIST MIX NOT MODIFIED: You cannot delete the last list_id entry from a list mix")."\n"; } else { $MIXdetailsPCT = explode('|', $MIXentries[$mix_container_item]); $MIXpercentPCT = $MIXdetailsPCT[2]; $q=0; $NEWlist_mix_container=''; 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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX MODIFIED").": $campaign_id - $vcl_id - $list_id - $mix_container_item\n"; } } } ##### ADD a NEW list mix ##### if ($stage=='NEWMIX') { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($vcl_name) < 2) ) { echo "
"._QXZ("LIST MIX NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("must be between 1 and 20 characters in length")."\n"; echo "
vcl_name "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns_list_mix where vcl_id='$vcl_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "
"._QXZ("LIST MIX NOT ADDED - There is already a list mix with this ID in the system")."\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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX ADDED").": $campaign_id - $vcl_id - $vcl_name\n"; } } } } ##### DELETE an existing list mix ##### if ($stage=='DELMIX') { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) { echo "
"._QXZ("LIST MIX NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("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_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX DELETED").": $campaign_id - $vcl_id - $vcl_name\n"; } } ##### Set list mix entry to active ##### if ($stage=='SETACTIVE') { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) { echo "
"._QXZ("LIST MIX NOT ACTIVATED - Please go back and look at the data you entered")."\n"; echo "
vcl_id "._QXZ("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_to_mysqli($stmt, $link); $stmtA="UPDATE vicidial_campaigns_list_mix SET status='ACTIVE' where vcl_id='$vcl_id' and campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX ACTIVE', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST MIX ACTIVATED").": $campaign_id - $vcl_id - $vcl_name\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $SUB=29; $ADD=31; # go to campaign modification form below } ###################### # ADD=401 modify campaign preset in the system ###################### if ($ADD==401) { if ($LOGmodify_campaigns==1) { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($preset_name) < 1) or (strlen($preset_number) < 1) ) { echo "
"._QXZ("PRESET NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("preset name must be between 1 and 40 characters in length")."\n"; echo "
"._QXZ("preset number must be between 2 and 50 characters in length")."\n"; } else { echo "
"._QXZ("PRESET MODIFIED").": $campaign_id - $preset_name - $preset_number\n"; $stmt="UPDATE vicidial_xfer_presets SET preset_dtmf='$preset_dtmf',preset_number='$preset_number',preset_hide_number='$preset_hide_number' where campaign_id='$campaign_id' and preset_name='$preset_name';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PRESET', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN PRESET', event_sql=\"$SQL_log\", event_notes='Preset: $preset_name - $preset_number';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $SUB=201; $ADD=31; # go to campaign modification form below } ###################### # ADD=411 submit list modifications to the system ###################### if ($ADD==411) { if ( ($LOGmodify_lists==1) and (strlen($list_id) > 1) ) { echo ""; if ($stage == 'territory_reset') { $p=0; echo "
"._QXZ("TERRITORIES RESET"); if (!isset($territory_reset) || !is_array($territory_reset)) $territory_reset = array(); $territory_reset_ct = count($territory_reset); $TERR_RESET=""; while ($p < $territory_reset_ct) { $TERR_RESET .= "'$territory_reset[$p]',"; $p++; } $TERR_RESET = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$TERR_RESET); $TERR_RESET = preg_replace("/,$/",'',$TERR_RESET); if (strlen($TERR_RESET) > 1) { $stmt = "UPDATE vicidial_list SET called_since_last_reset='N' where list_id='$list_id' and owner IN($TERR_RESET);"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST TERRITORY RESET', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($DB > 0) {echo "|$stmt|\n";} } } else { if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) { echo "
"._QXZ("LIST NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("list name must be at least 2 characters in length")."\n"; } else { if (strlen($reset_time) < 4) {$reset_time='';} if (strlen($expiration_date) < 10) {$expiration_date='2099-12-31';} $daily_reset_limitSQL=''; if ($LOGuser_level >= 9) {$daily_reset_limitSQL = ",daily_reset_limit='$daily_reset_limit'";} $prefixSQL=''; if ($LOGmodify_dial_prefix > 0) {$prefixSQL = ",dial_prefix='$dial_prefix'";} echo "
"._QXZ("LIST MODIFIED").": $list_id\n"; # update the apinewlead_url value for the list $apinewlead_url_ct=0; $affected_rowsD=0; $stmtD=''; $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$list_id' and entry_type='list' and url_type='apinewlead';"; $rslt=mysql_to_mysqli($stmt, $link); $urls_to_print = mysqli_num_rows($rslt); if ($urls_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $apinewlead_url_ct = $rowx[0]; } if ( ($apinewlead_url_ct > 0) or (strlen($apinewlead_url) > 0) ) { if ($apinewlead_url_ct > 0) { $stmtD="UPDATE vicidial_url_multi SET url_address='" . mysqli_real_escape_string($link, $apinewlead_url) . "' WHERE campaign_id='$list_id' and entry_type='list' and url_type='apinewlead';"; } else { $stmtD="INSERT INTO vicidial_url_multi SET campaign_id='$list_id', entry_type='list', url_type='apinewlead', active='Y',url_address='" . mysqli_real_escape_string($link, $apinewlead_url) . "';"; } $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); } # update the list entry $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',inbound_list_script_override='$inbound_list_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',web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',time_zone_setting='$time_zone_setting',inventory_report='$inventory_report',expiration_date='$expiration_date',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',local_call_time='$local_call_time',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',status_group_id='$status_group_id',user_new_lead_limit='$user_new_lead_limit',default_xfer_group='$default_xfer_group',qc_scorecard_id='$qc_scorecard_id' $daily_reset_limitSQL,auto_active_list_rank='$auto_active_list_rank',qc_statuses_id='$qc_statuses_id',qc_web_form_address='" . mysqli_real_escape_string($link, $qc_web_form_address) . "',inbound_drop_voicemail='$inbound_drop_voicemail',inbound_after_hours_voicemail='$inbound_after_hours_voicemail',auto_alt_threshold='$auto_alt_threshold',cid_group_id='$cid_group_id',weekday_resets_container='$weekday_resets_container' $prefixSQL where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); ## QC Addition for Audited Comments $stmtQC="INSERT INTO vicidial_lists_custom (audit_comments, list_id) VALUES ('" . mysqli_real_escape_string($link, $audit_comments) . "','$list_id') ON DUPLICATE KEY UPDATE audit_comments='" . mysqli_real_escape_string($link, $audit_comments) . "';"; $rslt=mysql_to_mysqli($stmtQC, $link); if ($DB) {echo "|$stmt|$stmtQC|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtQC|$stmtD|"; $SQL_log = preg_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='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST', event_sql=\"$SQL_log\", event_notes='$affected_rowsD';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if ($reset_list == 'Y') { $stmt="SELECT daily_reset_limit,resets_today from vicidial_lists where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > $row[1]) or ($row[0] < 0) ) { echo "
"._QXZ("RESETTING LIST-CALLED-STATUS")."\n"; $stmtB="UPDATE vicidial_lists set resets_today=(resets_today + 1) where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); $row[1] = ($row[1] + 1); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtB|$stmtC|"; $SQL_log = preg_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='LISTS', event_type='RESET', record_id='$list_id', event_code='ADMIN RESET LIST', event_sql=\"$SQL_log\", event_notes='leads reset: $affected_rowsC list resets today: $row[1] limit: $row[0]';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } else { echo "
"._QXZ("CANNOT RESET LIST, LIMIT REACHED").": $row[0] / $row[1]\n"; } } if ($campaign_id != "$old_campaign_id") { echo "
"._QXZ("REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER")." ($old_campaign_id)\n"; $stmtC="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; $rslt=mysql_to_mysqli($stmtC, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=311; # go to list modification form below } ###################### # ADD=4111 modify in-group info in the system ###################### if ($ADD==4111 || $ADD==4811 || $ADD==4911) { if ($SUB=='agents_select') { if ($LOGmodify_users==1) { echo ""; if ( (strlen($OLDuser_group) < 2) or (strlen($group_id) < 2) ) { echo "
"._QXZ("USERS NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("group id and user group must be at least 2 characters in length")."\n"; } else { $stmt="SELECT user,closer_campaigns from vicidial_users where active='Y' and user_group='$OLDuser_group' $LOGadmin_viewable_groupsSQL order by user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $ARIUG_changenotes=''; $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $ARIUG_user[$o] = $rowx[0]; $ARIUG_close[$o] = $rowx[1]; $ARIUG_check[$o] = ''; $stmtA=''; $stmtB=''; if (preg_match("/ $group_id /",$ARIUG_close[$o])) {$ARIUG_check[$o] = 'CHECKED';} if ( ($ARIUG_check[$o]=='') and ($stage=='add') ) { if (strlen($ARIUG_close[$o]) < 4) {$ARIUG_close[$o]=' - ';} $stmtA="UPDATE vicidial_users set closer_campaigns=' $group_id$ARIUG_close[$o]' where user='$ARIUG_user[$o]';"; $rslt=mysql_to_mysqli($stmtA, $link); if ($DB > 0) {echo "|$stmtA|";} $ARIUG_changenotes .= "added $group_id to selected in-groups|"; $ARIUG_code = "USER INGROUP VIGA ADD"; } if ( ($ARIUG_check[$o]=='CHECKED') and ($stage=='remove') ) { $ARIUG_close[$o] = preg_replace("/ $group_id /",' ',$ARIUG_close[$o]); $stmtB="UPDATE vicidial_users set closer_campaigns='$ARIUG_close[$o]' where user='$ARIUG_user[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB > 0) {echo "|$stmtB|";} $ARIUG_changenotes .= "removed $group_id from selected in-groups|"; $ARIUG_code = "USER INGROUP VIGA REMOVE"; } if (strlen($ARIUG_changenotes) > 10) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$ARIUG_user[$o]', event_code='$ARIUG_code', event_sql=\"$SQL_log\", event_notes='$ARIUG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } $o++; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } else { if ($LOGmodify_ingroups==1) { echo ""; if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) { echo "
"._QXZ("GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("group name and group color must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$group_color,/i",$HTMLcolors)) and ( (strlen($group_color) > 7) or (strlen($group_color) < 7) or (!preg_match("/^#/",$group_color)) ) ) { if (!preg_match("/^#/",$group_color)) {$group_color = "#$group_color";} if (strlen($group_color) > 7) {$group_color = substr($group_color,0,7);} while (strlen($group_color) < 7) {$group_color .= '0';} } if ($form_end != 'END') { echo "
"._QXZ("GROUP NOT MODIFIED - Please wait for the whole page to load before submitting the form")."\n"; } else { $p=0; $QC_statuses=""; $QC_lists=""; if (!is_array($qc_statuses)) $qc_statuses = array(); $qc_statuses_ct = count($qc_statuses); while ($p < $qc_statuses_ct) { $qc_statuses[$p] = preg_replace('/[^-_0-9\p{L}]/u','',$qc_statuses[$p]); $QC_statuses .= " $qc_statuses[$p]"; $p++; } $p=0; if (!is_array($qc_lists)) $qc_lists = array(); $qc_lists_ct = count($qc_lists); while ($p < $qc_lists_ct) { $qc_lists[$p] = preg_replace('/[^-_0-9\p{L}]/u','',$qc_lists[$p]); $QC_lists .= " $qc_lists[$p]"; $p++; } if (strlen($QC_statuses)>0) {$QC_statuses .= " -";} if (strlen($QC_lists)>0) {$QC_lists .= " -";} $QC_statuses = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$QC_statuses); $QC_lists = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$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"];} if (strlen($IGhandle_method)<1) { if (isset($_GET["IGhandle_method_"])) {$IGhandle_method=$_GET["IGhandle_method_"];} elseif (isset($_POST["IGhandle_method_"])) {$IGhandle_method=$_POST["IGhandle_method_"];} } if (strlen($IGsearch_method)<1) { if (isset($_GET["IGsearch_method_"])) {$IGsearch_method=$_GET["IGsearch_method_"];} elseif (isset($_POST["IGsearch_method_"])) {$IGsearch_method=$_POST["IGsearch_method_"];} } if (strlen($IGlist_id)<1) { if (isset($_GET["IGlist_id_"])) {$IGlist_id=$_GET["IGlist_id_"];} elseif (isset($_POST["IGlist_id_"])) {$IGlist_id=$_POST["IGlist_id_"];} } if (strlen($IGcampaign_id)<1) { if (isset($_GET["IGcampaign_id_"])) {$IGcampaign_id=$_GET["IGcampaign_id_"];} elseif (isset($_POST["IGcampaign_id_"])) {$IGcampaign_id=$_POST["IGcampaign_id_"];} } if (strlen($IGphone_code)<1) { if (isset($_GET["IGphone_code_"])) {$IGphone_code=$_GET["IGphone_code_"];} elseif (isset($_POST["IGphone_code_"])) {$IGphone_code=$_POST["IGphone_code_"];} } $no_agent_action_value = "$IGgroup_id,$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; if ($DB) {echo "\nNANQUE: |$no_agent_action_value|$no_agent_action|\n";} } 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"; } if ($non_latin < 1) { $no_agent_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]/','',$no_agent_action_value); } else { $no_agent_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9\p{L}]/u','',$no_agent_action_value); } if ($areacode_filter_action == "INGROUP") { if (isset($_GET["IGgroup_id_areacode_filter_action"])) {$IGgroup_id=$_GET["IGgroup_id_areacode_filter_action"];} elseif (isset($_POST["IGgroup_id_areacode_filter_action"])) {$IGgroup_id=$_POST["IGgroup_id_areacode_filter_action"];} if (isset($_GET["IGhandle_method_areacode_filter_action"])) {$IGhandle_method=$_GET["IGhandle_method_areacode_filter_action"];} elseif (isset($_POST["IGhandle_method_areacode_filter_action"])) {$IGhandle_method=$_POST["IGhandle_method_areacode_filter_action"];} if (isset($_GET["IGsearch_method_areacode_filter_action"])) {$IGsearch_method=$_GET["IGsearch_method_areacode_filter_action"];} elseif (isset($_POST["IGsearch_method_areacode_filter_action"])) {$IGsearch_method=$_POST["IGsearch_method_areacode_filter_action"];} if (isset($_GET["IGlist_id_areacode_filter_action"])) {$IGlist_id=$_GET["IGlist_id_areacode_filter_action"];} elseif (isset($_POST["IGlist_id_areacode_filter_action"])) {$IGlist_id=$_POST["IGlist_id_areacode_filter_action"];} if (isset($_GET["IGcampaign_id_areacode_filter_action"])) {$IGcampaign_id=$_GET["IGcampaign_id_areacode_filter_action"];} elseif (isset($_POST["IGcampaign_id_areacode_filter_action"])) {$IGcampaign_id=$_POST["IGcampaign_id_areacode_filter_action"];} if (isset($_GET["IGphone_code_areacode_filter_action"])) {$IGphone_code=$_GET["IGphone_code_areacode_filter_action"];} elseif (isset($_POST["IGphone_code_areacode_filter_action"])) {$IGphone_code=$_POST["IGphone_code_areacode_filter_action"];} if (strlen($IGhandle_method)<1) { if (isset($_GET["IGhandle_method_"])) {$IGhandle_method=$_GET["IGhandle_method_"];} elseif (isset($_POST["IGhandle_method_"])) {$IGhandle_method=$_POST["IGhandle_method_"];} } if (strlen($IGsearch_method)<1) { if (isset($_GET["IGsearch_method_"])) {$IGsearch_method=$_GET["IGsearch_method_"];} elseif (isset($_POST["IGsearch_method_"])) {$IGsearch_method=$_POST["IGsearch_method_"];} } if (strlen($IGlist_id)<1) { if (isset($_GET["IGlist_id_"])) {$IGlist_id=$_GET["IGlist_id_"];} elseif (isset($_POST["IGlist_id_"])) {$IGlist_id=$_POST["IGlist_id_"];} } if (strlen($IGcampaign_id)<1) { if (isset($_GET["IGcampaign_id_"])) {$IGcampaign_id=$_GET["IGcampaign_id_"];} elseif (isset($_POST["IGcampaign_id_"])) {$IGcampaign_id=$_POST["IGcampaign_id_"];} } if (strlen($IGphone_code)<1) { if (isset($_GET["IGphone_code_"])) {$IGphone_code=$_GET["IGphone_code_"];} elseif (isset($_POST["IGphone_code_"])) {$IGphone_code=$_POST["IGphone_code_"];} } $areacode_filter_action_value = "$IGgroup_id,$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; if ($DB) {echo "\nNANQUE: |$areacode_filter_action_value|$areacode_filter_action|\n";} } if ($areacode_filter_action == "EXTENSION") { if (isset($_GET["EXextension_areacode_filter_action"])) {$EXextension=$_GET["EXextension_areacode_filter_action"];} elseif (isset($_POST["EXextension_areacode_filter_action"])) {$EXextension=$_POST["EXextension_areacode_filter_action"];} if (isset($_GET["EXcontext_areacode_filter_action"])) {$EXcontext=$_GET["EXcontext_areacode_filter_action"];} elseif (isset($_POST["EXcontext_areacode_filter_action"])) {$EXcontext=$_POST["EXcontext_areacode_filter_action"];} $areacode_filter_action_value = "$EXextension,$EXcontext"; } if ($non_latin < 1) { $areacode_filter_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]/','',$areacode_filter_action_value); } else { $areacode_filter_action_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9\p{L}]/u','',$areacode_filter_action_value); } if ($ingroup_rec_filename == $stereo_rec_filename) { $stereo_rec_filename = "X".$stereo_rec_filename; echo "
"._QXZ("Stereo Recording Filename identical to Recording Filename, so it has been appended ").": $stereo_rec_filename ($ingroup_rec_filename)\n"; } if ( (strlen($parallel_rec_co_filename) > 0) and ( ($ingroup_rec_filename == $parallel_rec_co_filename) or ($stereo_rec_filename == $parallel_rec_co_filename) or ($parallel_rec_cm_filename == $parallel_rec_co_filename) or ($parallel_rec_fr_filename == $parallel_rec_co_filename) ) ) { $parallel_rec_co_filename = "CO".$parallel_rec_co_filename; echo "
"._QXZ("Parallel Customer-Only Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_co_filename\n"; } if ( (strlen($parallel_rec_cm_filename) > 0) and ( ($ingroup_rec_filename == $parallel_rec_cm_filename) or ($stereo_rec_filename == $parallel_rec_cm_filename) or ($parallel_rec_co_filename == $parallel_rec_cm_filename) or ($parallel_rec_fr_filename == $parallel_rec_cm_filename) ) ) { $parallel_rec_cm_filename = "CM".$parallel_rec_cm_filename; echo "
"._QXZ("Parallel Customer-Muted Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_cm_filename\n"; } if ( (strlen($parallel_rec_fr_filename) > 0) and ( ($ingroup_rec_filename == $parallel_rec_fr_filename) or ($stereo_rec_filename == $parallel_rec_fr_filename) or ($parallel_rec_co_filename == $parallel_rec_fr_filename) or ($parallel_rec_cm_filename == $parallel_rec_fr_filename) ) ) { $parallel_rec_fr_filename = "FR".$parallel_rec_fr_filename; echo "
"._QXZ("Parallel Full-Recording Recording Filename identical to another Recording Filename, so it has been appended ").": $parallel_rec_fr_filename\n"; } echo "
"._QXZ("GROUP MODIFIED ").": $group_id\n"; $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysqli_real_escape_string($link, $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', group_handling='$group_handling', 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_ingroups',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='" . mysqli_real_escape_string($link, $qc_web_form_address) . "',qc_scorecard_id='$qc_scorecard_id',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='" . mysqli_real_escape_string($link, $web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysqli_real_escape_string($link, $start_call_url) . "',dispo_call_url='" . mysqli_real_escape_string($link, $dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination',calculate_estimated_hold_seconds='$calculate_estimated_hold_seconds',add_lead_url='" . mysqli_real_escape_string($link, $add_lead_url) . "',eht_minimum_prompt_filename='$eht_minimum_prompt_filename',eht_minimum_prompt_no_block='$eht_minimum_prompt_no_block',eht_minimum_prompt_seconds='$eht_minimum_prompt_seconds',on_hook_ring_time='$on_hook_ring_time',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',on_hook_cid='$on_hook_cid',action_xfer_cid='$action_xfer_cid',drop_callmenu='$drop_callmenu',after_hours_callmenu='$after_hours_callmenu',user_group='$user_group',max_calls_method='$max_calls_method',max_calls_count='$max_calls_count',max_calls_action='$max_calls_action',dial_ingroup_cid='$dial_ingroup_cid',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',populate_lead_ingroup='$populate_lead_ingroup',drop_lead_reset='$drop_lead_reset',after_hours_lead_reset='$after_hours_lead_reset',nanq_lead_reset='$nanq_lead_reset',wait_time_lead_reset='$wait_time_lead_reset',hold_time_lead_reset='$hold_time_lead_reset',status_group_id='$status_group_id',routing_initiated_recordings='$routing_initiated_recordings',on_hook_cid_number='$on_hook_cid_number',customer_chat_screen_colors='$customer_chat_screen_colors',customer_chat_survey_link='" . mysqli_real_escape_string($link, $customer_chat_survey_link) . "',customer_chat_survey_text='$customer_chat_survey_text',populate_lead_province='$populate_lead_province',areacode_filter='$areacode_filter',areacode_filter_seconds='$areacode_filter_seconds',areacode_filter_action='$areacode_filter_action',areacode_filter_action_value='$areacode_filter_action_value',populate_state_areacode='$populate_state_areacode',inbound_survey='$inbound_survey',inbound_survey_filename='$inbound_survey_filename',inbound_survey_accept_digit='$inbound_survey_accept_digit',inbound_survey_question_filename='$inbound_survey_question_filename',inbound_survey_callmenu='$inbound_survey_callmenu',icbq_expiration_hours='$icbq_expiration_hours',closing_time_action='$closing_time_action',closing_time_now_trigger='$closing_time_now_trigger',closing_time_filename='$closing_time_filename',closing_time_end_filename='$closing_time_end_filename',closing_time_lead_reset='$closing_time_lead_reset',closing_time_option_exten='$closing_time_option_exten',closing_time_option_callmenu='$closing_time_option_callmenu',closing_time_option_voicemail='$closing_time_option_voicemail',closing_time_option_xfer_group='$closing_time_option_xfer_group',closing_time_option_callback_list_id='$closing_time_option_callback_list_id',icbq_call_time_id='$icbq_call_time_id',add_lead_timezone='$add_lead_timezone',icbq_dial_filter='$icbq_dial_filter',populate_lead_source='$populate_lead_source',populate_lead_vendor='$populate_lead_vendor',park_file_name='$park_file_name',waiting_call_url_on='" . mysqli_real_escape_string($link, $waiting_call_url_on) . "',waiting_call_url_off='" . mysqli_real_escape_string($link, $waiting_call_url_off) . "',enter_ingroup_url='" . mysqli_real_escape_string($link, $enter_ingroup_url) . "',cid_cb_confirm_number='$cid_cb_confirm_number',cid_cb_invalid_filter_phone_group='$cid_cb_invalid_filter_phone_group',cid_cb_valid_length='$cid_cb_valid_length',cid_cb_valid_filename='$cid_cb_valid_filename',cid_cb_confirmed_filename='$cid_cb_confirmed_filename',cid_cb_enter_filename='$cid_cb_enter_filename',cid_cb_you_entered_filename='$cid_cb_you_entered_filename',cid_cb_press_to_confirm_filename='$cid_cb_press_to_confirm_filename',cid_cb_invalid_filename='$cid_cb_invalid_filename',cid_cb_reenter_filename='$cid_cb_reenter_filename',cid_cb_error_filename='$cid_cb_error_filename',place_in_line_caller_number_filename='$place_in_line_caller_number_filename',place_in_line_you_next_filename='$place_in_line_you_next_filename', ingroup_script_two='$ingroup_script_two',browser_alert_sound='$browser_alert_sound_ingroups',browser_alert_volume='$browser_alert_volume',answer_signal='$answer_signal_ingroups',qc_statuses_id='$qc_statuses_id',no_agent_delay='$no_agent_delay',agent_search_method='$agent_search_method',populate_lead_comments='$populate_lead_comments',drop_call_seconds_override='$drop_call_seconds_override',populate_lead_owner='$populate_lead_owner',in_queue_nanque='$in_queue_nanque',in_queue_nanque_exceptions='$in_queue_nanque_exceptions',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',second_alert_trigger='$second_alert_trigger',second_alert_trigger_seconds='$second_alert_trigger_seconds',second_alert_filename='$second_alert_filename',second_alert_delay='$second_alert_delay',second_alert_container='$second_alert_container',second_alert_only='$second_alert_only',third_alert_trigger='$third_alert_trigger',third_alert_trigger_seconds='$third_alert_trigger_seconds',third_alert_filename='$third_alert_filename',third_alert_delay='$third_alert_delay',third_alert_container='$third_alert_container',third_alert_only='$third_alert_only',agent_search_list='$agent_search_list',state_descriptions='$state_descriptions',stereo_recording='$stereo_recording',stereo_rec_filename='$stereo_rec_filename',stereo_parallel_recording='$stereo_parallel_recording',recording_dtmf_muting='$recording_dtmf_muting',stereo_recording_agent='$stereo_recording_agent',parallel_rec_co_filename='$parallel_rec_co_filename',parallel_rec_cm_filename='$parallel_rec_cm_filename',parallel_rec_fr_filename='$parallel_rec_fr_filename',xfer_talk_minimum='$xfer_talk_minimum',xfer_talk_minimum_sec='$xfer_talk_minimum_sec' where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); switch($group_handling) { case "PHONE": $ADD="4111"; break; case "EMAIL": $ADD="4811"; break; case "CHAT": $ADD="4911"; break; default: $ADD="4111"; } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } $ADD-=1000; #$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 ""; if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) ) { echo "
"._QXZ("DID NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
did_extension "._QXZ("must be at least 1 character in length")."\n"; } else { $did_entry_list_idSQL=''; if ($SSenable_did_entry_list_id > 0) { $did_entry_list_idSQL=",entry_list_id='$entry_list_id',filter_entry_list_id='$filter_entry_list_id'"; } echo "
"._QXZ("DID MODIFIED").": $did_pattern\n"; $k=0; $new_field_value=''; if (is_array($filter_phone_group_id)) {$multi_count = count($filter_phone_group_id);} else {$multi_count=0;} $multi_array = $filter_phone_group_id; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $filter_phone_group_id = preg_replace("/,$/","",$new_field_value); $k=0; $new_field_value=''; if (is_array($pre_filter_phone_group_id)) {$multi_count = count($pre_filter_phone_group_id);} else {$multi_count=0;} $multi_array = $pre_filter_phone_group_id; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $pre_filter_phone_group_id = preg_replace("/,$/","",$new_field_value); $stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension_dids',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_inbound',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id',record_call='$record_call',filter_inbound_number='$filter_inbound_number',filter_phone_group_id='$filter_phone_group_id',filter_url='" . mysqli_real_escape_string($link, $filter_url) . "',filter_action='$filter_action',filter_extension='$filter_extension',filter_exten_context='$filter_exten_context',filter_voicemail_ext='$filter_voicemail_ext',filter_phone='$filter_phone',filter_server_ip='$filter_server_ip',filter_user='$filter_user',filter_user_unavailable_action='$filter_user_unavailable_action',filter_user_route_settings_ingroup='$filter_user_route_settings_ingroup',filter_group_id='$filter_group_id',filter_call_handle_method='$filter_call_handle_method',filter_agent_search_method='$filter_agent_search_method',filter_list_id='$filter_list_id',filter_campaign_id='$filter_campaign_id',filter_phone_code='$filter_phone_code',filter_menu_id='$filter_menu_id',filter_clean_cid_number='$filter_clean_cid_number',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',user_group='$user_group',filter_dnc_campaign='$filter_dnc_campaign',filter_url_did_redirect='$filter_url_did_redirect',no_agent_ingroup_redirect='$no_agent_ingroup_redirect',no_agent_ingroup_id='$no_agent_ingroup_id',no_agent_ingroup_extension='$no_agent_ingroup_extension',pre_filter_phone_group_id='$pre_filter_phone_group_id',pre_filter_extension='$pre_filter_extension',max_queue_ingroup_calls='$max_queue_ingroup_calls',max_queue_ingroup_id='$max_queue_ingroup_id',max_queue_ingroup_extension='$max_queue_ingroup_extension',did_carrier_description='$did_carrier_description',inbound_route_answer='$inbound_route_answer',pre_filter_recent_call='$pre_filter_recent_call',pre_filter_recent_extension='$pre_filter_recent_extension',alter_cid_name='$alter_cid_name'$did_entry_list_idSQL where did_id='$did_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if (strlen($menu_id) < 1 || strlen($menu_prompt) < 1) { echo "
"._QXZ("CALL MENU NOT MODIFIED - Please go back and look at the data you entered")."\n"; if (strlen($menu_id) < 1) {echo "
menu_id "._QXZ("must be at least 1 character in length")."\n";} if (strlen($menu_prompt) < 1) {echo "
"._QXZ("Call Menu Prompt must be populated. Use sip-silence if you do not actually want to play a prompt")."\n";} } else { echo "
"._QXZ("CALL MENU MODIFIED").": $menu_id\n"; $custom_dialplanSQL=''; if ($LOGmodify_custom_dialplans > 0) {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";} $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',tracking_group='$tracking_group',dtmf_log='$dtmf_log',dtmf_field='$dtmf_field',user_group='$user_group',qualify_sql='$qualify_sql',alt_dtmf_log='$alt_dtmf_log',question='$question',answer_signal='$answer_signal_callmenus'$custom_dialplanSQL where menu_id='$menu_id';"; $rslt=mysql_to_mysqli($stmt, $link); $h=0; $option_value_list='|'; $stmtAX=''; while ($h <= 20) { $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"];} if (isset($_GET["IGvid_enter_filename_$h"])) {$IGvid_enter_filename=$_GET["IGvid_enter_filename_$h"];} elseif (isset($_POST["IGvid_enter_filename_$h"])) {$IGvid_enter_filename=$_POST["IGvid_enter_filename_$h"];} if (isset($_GET["IGvid_id_number_filename_$h"])) {$IGvid_id_number_filename=$_GET["IGvid_id_number_filename_$h"];} elseif (isset($_POST["IGvid_id_number_filename_$h"])) {$IGvid_id_number_filename=$_POST["IGvid_id_number_filename_$h"];} if (isset($_GET["IGvid_confirm_filename_$h"])) {$IGvid_confirm_filename=$_GET["IGvid_confirm_filename_$h"];} elseif (isset($_POST["IGvid_confirm_filename_$h"])) {$IGvid_confirm_filename=$_POST["IGvid_confirm_filename_$h"];} if (isset($_GET["IGvid_validate_digits_$h"])) {$IGvid_validate_digits=$_GET["IGvid_validate_digits_$h"];} elseif (isset($_POST["IGvid_validate_digits_$h"])) {$IGvid_validate_digits=$_POST["IGvid_validate_digits_$h"];} if (isset($_GET["IGvid_container_$h"])) {$IGvid_container=$_GET["IGvid_container_$h"];} elseif (isset($_POST["IGvid_container_$h"])) {$IGvid_container=$_POST["IGvid_container_$h"];} $option_route_value_context = "$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code,$IGvid_enter_filename,$IGvid_id_number_filename,$IGvid_confirm_filename,$IGvid_validate_digits,$IGvid_container"; } if ($non_latin < 1) { $option_value = preg_replace('/[^-\_0-9A-Z]/','',$option_value); $option_description = preg_replace('/[^- \:\/\_0-9a-zA-Z]/','',$option_description); $option_route = preg_replace('/[^-\_0-9a-zA-Z]/', '',$option_route); $option_route_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]/','',$option_route_value); $option_route_value_context = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$option_route_value_context); } else { $option_value = preg_replace('/[^-\_0-9A-Z]/','',$option_value); $option_description = preg_replace('/[^- \:\/\_0-9\p{L}]/u','',$option_description); $option_route = preg_replace('/[^-\_0-9\p{L}]/u', '',$option_route); $option_route_value = preg_replace('/[^-\/\|\_\#\*\,\.\_0-9\p{L}]/u','',$option_route_value); $option_route_value_context = preg_replace('/[^-\,\_0-9\p{L}]/u','',$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_to_mysqli($stmtA, $link); $row=mysqli_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_to_mysqli($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_to_mysqli($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_to_mysqli($stmtA, $link); $row=mysqli_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_to_mysqli($stmtA, $link); $stmtAX .= "$stmtA|"; } } $option_value_list .= "$option_value|"; $h++; } ## delete existing database records that were not in the submit while ($h <= 20) { 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_to_mysqli($stmtA, $link); $row=mysqli_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_to_mysqli($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_to_mysqli($stmtA, $link); $stmtAX .= "$stmtA|"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtAX"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=3511; # go to call menu modification form below } ###################### # ADD=4711 modify filter phone group info in the system ###################### if ($ADD==4711) { if ($LOGmodify_dids==1) { echo ""; if ( (strlen($filter_phone_group_id) < 2) or (strlen($filter_phone_group_name) < 2) or (mb_strlen($filter_phone_group_name,'utf-8') > 40) ) { echo "
"._QXZ("FILTER PHONE GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Filter Phone Group Name and ID must be at least 2 characters in length")."\n"; } else { $stmt="UPDATE vicidial_filter_phone_groups set filter_phone_group_name='$filter_phone_group_name', filter_phone_group_description='$filter_phone_group_description',user_group='$user_group' where filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER PHONE GROUP MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERPHONEGROUPS', event_type='MODIFY', record_id='$filter_phone_group_id', event_code='ADMIN FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=3711; # go to filter phone group modification form below } ###################### # ADD=41111 modify remote agents info in the system ###################### if ($ADD==41111) { if ($LOGmodify_remoteagents==1) { echo ""; $stmt="SELECT count(*) from vicidial_users where user='$user_start' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] < 1) and ($stage != 'ORPHAN') ) {echo "
"._QXZ("REMOTE AGENTS NOT MODIFIED - you must use a valid user as the user_start for remote agents")."\n";} else { if ($row[0] < 1) {echo "
"._QXZ("This Remote Agent does not have a valid User")."
\n";} ### check for closest remote agents to this account to ensure no overlapping $user_finish = ($user_start + $number_of_lines); $user_finish_length = strlen($user_finish); $stmt="SELECT count(*) from vicidial_remote_agents where user_start > '$user_start' and user_start < '$user_finish' and user_start != '$user_start' and (char_length(user_start) <= $user_finish_length);"; if ($DB > 0) {echo "|$stmt|";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("REMOTE AGENTS NOT MODIFIED - your number of lines overlaps with another remote agent")."\n";} else { if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) { echo "
"._QXZ("REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("User ID Start and External Extension must be at least 2 characters in length")."\n"; } else { if ($number_of_lines < 1 || strlen($status)==0) {$status='INACTIVE';} $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',extension_group='$extension_group',on_hook_agent='$on_hook_agent',on_hook_ring_time='$on_hook_ring_time' where remote_agent_id='$remote_agent_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("REMOTE AGENTS MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=31111; # go to remote agents modification form below } ###################### # ADD=42111 modify extenison group entry in the system ###################### if ($ADD==42111) { if ($LOGmodify_remoteagents==1) { echo ""; if ( (strlen($extension_id) < 1) or (strlen($extension_group_id) < 2) or (strlen($extension) < 2) or (strlen($rank) < 1) ) { echo "
"._QXZ("EXTENSION GROUP ENTRY NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Extension group id and extension must be at least 2 characters in length")."\n"; } else { $stmt="UPDATE vicidial_extension_groups set extension_group_id='$extension_group_id', extension='$extension', rank='$rank', campaign_groups='$campaign_groups' where extension_id='$extension_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("EXTENSION GROUP ENTRY MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='EXTENGROUP', event_type='MODIFY', record_id='$extension_id', event_code='ADMIN MODIFY EXTENSION GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=32111; # go to extension group modification form below } ###################### # ADD=411111 modify user group info in the system ###################### if ($ADD==411111) { if ($LOGmodify_usergroups==1) { echo ""; if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) { echo "
"._QXZ("USER GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group name and description must be at least 2 characters in length")."\n"; } else { if ( ($LOGmodify_same_user_level < 1) and ($user_group=="$LOGuser_group") ) { echo _QXZ("You are not allowed to edit your own user group")."\n"; exit; } else { $p=0; $GROUP_shifts=' '; $group_shifts_ct = (is_array($group_shifts) ? count($group_shifts) : -1); while ($p < $group_shifts_ct) { if ($non_latin < 1) { $group_shifts[$p] = preg_replace('/[^- \_0-9a-zA-Z]/','',$group_shifts[$p]); } else { $group_shifts[$p] = preg_replace('/[^- \_0-9\p{L}]/u','',$group_shifts[$p]); } $GROUP_shifts .= "$group_shifts[$p] "; $p++; } $p=0; $VGROUP_vgroups=' '; $vgroup_vgroups_ct = (is_array($agent_status_viewable_groups) ? count($agent_status_viewable_groups) : -1); while ($p < $vgroup_vgroups_ct) { if ($non_latin < 1) { $agent_status_viewable_groups[$p] = preg_replace('/[^- \_0-9a-zA-Z]/','',$agent_status_viewable_groups[$p]); } else { $agent_status_viewable_groups[$p] = preg_replace('/[^- \_0-9\p{L}]/u','',$agent_status_viewable_groups[$p]); } $VGROUP_vgroups .= "$agent_status_viewable_groups[$p] "; $p++; } $p=0; $VGROUP_chatgroups=' '; $vgroup_chatgroups_ct = (is_array($agent_allowed_chat_groups) ? count($agent_allowed_chat_groups) : -1); while ($p < $vgroup_chatgroups_ct) { if ($non_latin < 1) { $agent_allowed_chat_groups[$p] = preg_replace('/[^- \_0-9a-zA-Z]/','',$agent_allowed_chat_groups[$p]); } else { $agent_allowed_chat_groups[$p] = preg_replace('/[^- \_0-9\p{L}]/u','',$agent_allowed_chat_groups[$p]); } $VGROUP_chatgroups .= "$agent_allowed_chat_groups[$p] "; $p++; } $p=0; $Vadmin_viewable_groups=' '; $admin_viewable_groups_ct = (isset($admin_viewable_groups) && is_array($admin_viewable_groups) ? count($admin_viewable_groups) : -1); while ($p < $admin_viewable_groups_ct) { if ($non_latin < 1) { $admin_viewable_groups[$p] = preg_replace('/[^- \_0-9a-zA-Z]/','',$admin_viewable_groups[$p]); } else { $admin_viewable_groups[$p] = preg_replace('/[^- \_0-9\p{L}]/u','',$admin_viewable_groups[$p]); } $Vadmin_viewable_groups .= "$admin_viewable_groups[$p] "; $p++; } $p=0; $Vadmin_viewable_call_times=' '; $admin_viewable_call_times_ct = (isset($admin_viewable_call_times) && is_array($admin_viewable_call_times) ? count($admin_viewable_call_times) : -1); while ($p < $admin_viewable_call_times_ct) { if ($non_latin < 1) { $admin_viewable_call_times[$p] = preg_replace('/[^- \_0-9a-zA-Z]/','',$admin_viewable_call_times[$p]); } else { $admin_viewable_call_times[$p] = preg_replace('/[^- \_0-9\p{L}]/u','',$admin_viewable_call_times[$p]); } $Vadmin_viewable_call_times .= "$admin_viewable_call_times[$p] "; $p++; } $k=0; $new_field_value=""; $multi_count = (is_array($allowed_reports) ? count($allowed_reports) : -1); $multi_array = $allowed_reports; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $allowed_reports = preg_replace("/,$/","",$new_field_value); # update allowed_camapigns with values that the editor cant see http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=5&t=26101 if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { $changer_allowed_campaigns = preg_replace("/ -/",'',$LOGallowed_campaigns); $changer_allowed_campaigns = explode(" ", $changer_allowed_campaigns); $stmt="SELECT allowed_campaigns FROM vicidial_user_groups WHERE user_group='$OLDuser_group';"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $old_allowed_rows = mysqli_num_rows($rslt); if ($old_allowed_rows > 0) { $row=mysqli_fetch_row($rslt); $old_allowed = $row[0]; } if ( (!preg_match('/-ALL/',$old_allowed)) ) { $invis_campaigns=""; $campaigns_value = preg_replace("/ -/",'',$campaigns_value); $old_allowed = preg_replace("/ -/",'',$old_allowed); $old_allowed = explode(" ", $old_allowed); foreach ($old_allowed as $oac) { if (!in_array($oac, $changer_allowed_campaigns)) { $invis_campaigns .= "$oac "; } } $campaigns_value .= " $invis_campaigns-"; } } $custom_rpt_SQL=''; $custom_stmt="show tables like 'vicidial_custom_reports'"; $custom_rslt=mysql_to_mysqli($custom_stmt, $link); if (mysqli_num_rows($custom_rslt)>0) { $custom_report_str=""; if(!isset($allowed_custom_reports) || !is_array($allowed_custom_reports)) {$allowed_custom_reports=array();} if (count($allowed_custom_reports)>0) { for ($q=0; $q|\'|\"|\\\\|;/","",$custom_report_str); $custom_rpt_SQL=",allowed_custom_reports='$custom_report_str'"; } $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',agent_call_log_view='$agent_call_log_view',agent_xfer_consultative='$agent_xfer_consultative',agent_xfer_dial_override='$agent_xfer_dial_override',agent_xfer_vm_transfer='$agent_xfer_vm_transfer',agent_xfer_blind_transfer='$agent_xfer_blind_transfer',agent_xfer_dial_with_customer='$agent_xfer_dial_with_customer',agent_xfer_park_customer_dial='$agent_xfer_park_customer_dial',agent_fullscreen='$agent_fullscreen',allowed_reports='$allowed_reports'$custom_rpt_SQL,webphone_url_override='" . mysqli_real_escape_string($link, $webphone_url_override) . "',webphone_systemkey_override='$webphone_systemkey_override',webphone_dialpad_override='$webphone_dialpad_override',admin_viewable_groups='$Vadmin_viewable_groups',admin_viewable_call_times='$Vadmin_viewable_call_times',agent_allowed_chat_groups='$VGROUP_chatgroups',agent_xfer_park_3way='$agent_xfer_park_3way',admin_ip_list='$admin_ip_list',agent_ip_list='$agent_ip_list',api_ip_list='$api_ip_list',webphone_layout='" . mysqli_real_escape_string($link, $webphone_layout) . "',reports_header_override='$reports_header_override',admin_home_url='" . mysqli_real_escape_string($link, $admin_home_url) . "',allowed_queue_groups='$queue_groups_value',script_id='$script_id' where user_group='$OLDuser_group';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("USER GROUP MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 USER GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $ss_conf_ct = mysqli_num_rows($rslt); if ($ss_conf_ct > 0) { $row=mysqli_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" . mysqli_error());} #echo 'Connected successfully'; #mysql_select_db("$vtiger_dbname", $linkV); $linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname"); if (!$linkV) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } ###################################### ##### BEGIN Add/Update group info in Vtiger $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_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_to_mysqli($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $row=mysqli_fetch_row($rslt); $groupid = $row[0]; $stmtA = "UPDATE vtiger_groups SET description='$group_name' where groupid='$groupid';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); $row=mysqli_fetch_row($rslt); $groupid = ($row[0] + 1); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_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_to_mysqli($stmt, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';"; if ($DB) {echo "|$stmtA|\n";} $rslt=mysql_to_mysqli($stmtA, $linkV); if (!$rslt) {die(_QXZ("Could not execute").': ' . mysqli_error());} #### END CREATE NEW GROUP RECORD IN VTIGER } ##### END Add/Update group info in Vtiger ###################################### } } } } else { echo _QXZ("You do not have permission to view this page")."\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 "\n"; echo "\n"; echo ""; if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) { echo "
"._QXZ("SCRIPT NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Script name, description and text must be at least 2 characters in length")."\n"; } else { if ( (!preg_match("/\|$script_color,/i",$HTMLcolors)) and ( (strlen($script_color) > 7) or (strlen($script_color) < 7) or (!preg_match("/^#/",$script_color)) ) ) { if (!preg_match("/^#/",$script_color)) {$script_color = "#$script_color";} if (strlen($script_color) > 7) {$script_color = substr($rowx[1],0,7);} while (strlen($script_color) < 7) {$script_color .= '0';} } $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysqli_real_escape_string($link, $script_text) . "', active='$active',user_group='$user_group',script_color='$script_color' where script_id='$script_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SCRIPT MODIFIED")."$rjs_debug\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 "\n"; echo "\n"; echo ""; if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) { echo "
"._QXZ("FILTER NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Filter ID, name and SQL must be at least 2 characters in length")."\n"; } else { $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='" . mysqli_real_escape_string($link, $lead_filter_sql) . "',user_group='$user_group' where lead_filter_id='$lead_filter_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERS', 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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) { echo "
"._QXZ("CALL TIME NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID and name must be at least 2 characters in length")."\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', default_afterhours_filename_override='$default_afterhours_filename_override', sunday_afterhours_filename_override='$sunday_afterhours_filename_override', monday_afterhours_filename_override='$monday_afterhours_filename_override', tuesday_afterhours_filename_override='$tuesday_afterhours_filename_override', wednesday_afterhours_filename_override='$wednesday_afterhours_filename_override', thursday_afterhours_filename_override='$thursday_afterhours_filename_override', friday_afterhours_filename_override='$friday_afterhours_filename_override', saturday_afterhours_filename_override='$saturday_afterhours_filename_override',user_group='$user_group' where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CALL TIME MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) { echo "
"._QXZ("STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("State Call Time ID, name and state must be at least 2 characters in length")."\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',user_group='$user_group' where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("STATE CALL TIME MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=3111111111; # go to state call time modification form below } ###################### # ADD=4211111111 modify holiday in the system ###################### if ($ADD==4211111111) { if ($LOGmodify_call_times==1) { echo ""; if ( (strlen($holiday_id) < 2) or (strlen($holiday_name) < 2) or (strlen($holiday_date) < 10) ) { echo "
"._QXZ("HOLIDAY NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Holiday ID, name and date must be populated")."\n"; } else { $ct_default_start = preg_replace('/\D/', '', $ct_default_start); $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); $stmt="UPDATE vicidial_call_time_holidays set holiday_name='$holiday_name', holiday_comments='$holiday_comments', holiday_date='$holiday_date', holiday_status='$holiday_status', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop',user_group='$user_group', default_afterhours_filename_override='$default_afterhours_filename_override',holiday_method='$holiday_method' where holiday_id='$holiday_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("HOLIDAY MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='HOLIDAYS', event_type='MODIFY', record_id='$holiday_id', event_code='ADMIN MODIFY HOLIDAY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=3211111111; # go to holiday modification form below } ###################### # ADD=431111111 modify shift in the system ###################### if ($ADD==431111111) { if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { echo ""; $shift_length_test = preg_replace('/:/i', '',$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) or (!isset($shift_weekdays)) or (!is_array($shift_weekdays)) ) { echo "
"._QXZ("SHIFT DEFINITION NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Shift ID and name must be at least 2 characters in length")."\n"; echo "
"._QXZ("Shift Start Time must be 4 digits in length and be a valid time")."\n"; echo "
"._QXZ("Shift Length must be 5 characters in length and be 24 hours or less")."\n"; echo "
"._QXZ("At least one weekday must be selected")."\n"; } else { $p=0; $SHIFT_weekdays=''; $shift_weekdays_ct = count($shift_weekdays); while ($p < $shift_weekdays_ct) { $shift_weekdays[$p] = preg_replace('/[^0-9]/','',$shift_weekdays[$p]); $SHIFT_weekdays .= "$shift_weekdays[$p]"; $p++; } $SHIFT_weekdays = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$SHIFT_weekdays); $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',report_option='$report_option',user_group='$user_group',report_rank='$report_rank' where shift_id='$shift_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SHIFT MODIFIED")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_phones==1) ) { echo ""; $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) {echo "
"._QXZ("PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server")."\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) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) )) { echo "
"._QXZ("PHONE NOT MODIFIED - Please go back and look at the data you entered")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("registration password must be at least $SSrequire_password_length characters long")."\n"; } } else { $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("PHONE NOT MODIFIED - there is already a Voicemail ID in the system with this ID")."\n";} else { echo "
"._QXZ("PHONE MODIFIED").": $extension\n"; if ( ($voicemail_greeting == '') and (strlen($old_voicemail_greeting) > 0) ) {$voicemail_greeting = '---DELETE---';} $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='" . mysqli_real_escape_string($link, $local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysqli_real_escape_string($link, $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',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent',webphone_auto_answer='$webphone_auto_answer',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',voicemail_instructions='$voicemail_instructions',on_login_report='$show_vm_on_summary',unavail_dialplan_fwd_exten='$unavail_dialplan_fwd_exten',unavail_dialplan_fwd_context='$unavail_dialplan_fwd_context', nva_call_url='" . mysqli_real_escape_string($link, $nva_call_url) . "', nva_search_method='$nva_search_method', nva_error_filename='$nva_error_filename',nva_new_list_id='$nva_new_list_id',nva_new_phone_code='$nva_new_phone_code',nva_new_status='$nva_new_status',webphone_dialbox='$webphone_dialbox',webphone_mute='$webphone_mute',webphone_volume='$webphone_volume',webphone_debug='$webphone_debug',outbound_alt_cid='$outbound_alt_cid',conf_qualify='$conf_qualify',webphone_layout='" . mysqli_real_escape_string($link, $webphone_layout) . "',mohsuggest='$mohsuggest',webphone_settings='$webphone_settings' where extension='$old_extension' and server_ip='$old_server_ip';"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); $stmtB="UPDATE servers SET rebuild_conf_files='Y',sounds_update='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$SSactive_voicemail_server';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC=''; if ($server_ip != $old_server_ip) { $stmtC="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$old_server_ip';"; $rslt=mysql_to_mysqli($stmtC, $link); } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|"; $SQL_log = preg_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 MODIFY PHONE', event_sql=\"$SQL_log\", event_notes='Server IP: $server_ip Old Server IP: $old_server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_phones==1) ) { echo ""; $stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) {echo "
"._QXZ("PHONE ALIAS NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("PHONE ALIAS MODIFIED").": $alias_id\n"; $stmt="UPDATE phones_alias set alias_name='$alias_name', logins_list='$logins_list', user_group='$user_group' where alias_id='$alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 MODIFY PHONE ALIAS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_phones==1) ) { echo ""; $stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) {echo "
"._QXZ("GROUP ALIAS NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { echo "
"._QXZ("GROUP ALIAS MODIFIED").": $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',user_group='$user_group' where group_alias_id='$group_alias_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 MODIFY GROUP ALIAS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $stmt="SELECT count(*) from servers where server_id='$server_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ($server_id != $old_server_id) ) {echo "
"._QXZ("SERVER 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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ($server_ip != $old_server_ip) ) {echo "
"._QXZ("SERVER NOT MODIFIED - there is already a server in the system with this")." server_ip\n";} else { if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) ) ) { echo "
"._QXZ("SERVER NOT MODIFIED - Please go back and look at the data you entered")."\n"; if ($SSrequire_password_length > 0) { echo "
"._QXZ("Conf File Secret must be at least $SSrequire_password_length characters long")."\n"; } echo "


"._QXZ("Go back")."\n"; } else { if (preg_match("/_MXCS/",$SShosted_settings)) { $maxcps_set = $SShosted_settings; $maxcps_set = preg_replace("/MXAG\d+|_BUILD_|DRA|_MXTR\d+|.*_MXCS|VCA\d+| /",'',$maxcps_set); $maxcps_set = preg_replace('/[^0-9]/','',$maxcps_set); if (strlen($maxcps_set)>0) { if ($outbound_calls_per_second > $maxcps_set) { if ($DB > 0) {echo "MAX CPS: |$outbound_calls_per_second|$maxcps_set|\n";} $outbound_calls_per_second = $maxcps_set; } } } if (preg_match("/_MXTR/",$SShosted_settings)) { $maxtrunk_set = $SShosted_settings; $maxtrunk_set = preg_replace("/MXAG\d+|_BUILD_|DRA|_MXCS\d+|.*_MXTR|VCA\d+| /",'',$maxtrunk_set); $maxtrunk_set = preg_replace('/[^0-9]/','',$maxtrunk_set); if (strlen($maxtrunk_set)>0) { if ($max_vicidial_trunks > $maxtrunk_set) { if ($DB > 0) {echo "MAX TRUNK: |$max_vicidial_trunks|$maxtrunk_set|\n";} $max_vicidial_trunks = $maxtrunk_set; } } } $custom_dialplanSQL=''; if ($LOGmodify_custom_dialplans > 0) {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";} $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',external_server_ip='$external_server_ip',active_twin_server_ip='$active_twin_server_ip',user_group='$user_group',auto_restart_asterisk='$auto_restart_asterisk',asterisk_temp_no_restart='$asterisk_temp_no_restart',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',gather_asterisk_output='$gather_asterisk_output',conf_qualify='$conf_qualify',web_socket_url='" . mysqli_real_escape_string($link, $web_socket_url) . "',routing_prefix='$routing_prefix',external_web_socket_url='" . mysqli_real_escape_string($link, $external_web_socket_url) . "',conf_engine='$conf_engine',conf_update_interval='$conf_update_interval',ara_url='" . mysqli_real_escape_string($link, $ara_url) . "'$custom_dialplanSQL where server_id='$old_server_id';"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); echo "
"._QXZ("SERVER MODIFIED").": $server_ip\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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 MODIFY SERVER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_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_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); if ($SUMvicidial_trunks > $MAXvicidial_trunks) { echo "
"._QXZ("SERVER TRUNK RECORD NOT ADDED - the number of trunks is too high").": $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 "
"._QXZ("SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("campaign must be between 3 and 8 characters in length")."\n"; echo "
server_ip "._QXZ("delay must be at least 7 characters")."\n"; echo "
"._QXZ("trunks must be a digit from 0 to 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_to_mysqli($stmt, $link); echo "
"._QXZ("SERVER TRUNK RECORD MODIFIED").": $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 MODIFY SERVER TRUNK', event_sql=\"$SQL_log\", event_notes='Campaign: $campaign_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($template_id) < 1) or (strlen($template_name) < 1) ) {echo "
"._QXZ("CONF TEMPLATE NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_conf_templates set template_name='$template_name',template_contents='$template_contents',user_group='$user_group' where template_id='$template_id';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and user_group='$user_group';"; $rslt=mysql_to_mysqli($stmtA, $link); echo "
"._QXZ("CONF TEMPLATE MODIFIED").": $template_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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 MODIFY CONF TEMPLATE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_carriers==1) ) { echo ""; if ( (strlen($carrier_id) < 1) or (strlen($server_ip) < 7) or (strlen($protocol) < 1) ) {echo "
"._QXZ("CARRIER NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_server_carriers set carrier_name='$carrier_name',registration_string='$registration_string',template_id='$template_id',account_entry='" . mysqli_real_escape_string($link, $account_entry) . "',protocol='$protocol',globals_string='$globals_string',dialplan_entry='$dialplan_entry',server_ip='$server_ip',active='$active',carrier_description='$carrier_description',user_group='$user_group' where carrier_id='$carrier_id';"; $rslt=mysql_to_mysqli($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';"; if ($server_ip == '0.0.0.0') {$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";} $rslt=mysql_to_mysqli($stmtA, $link); echo "
"._QXZ("CARRIER MODIFIED").": $carrier_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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 MODIFY CARRIER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_tts==1) ) { echo ""; if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 5) ) {echo "
"._QXZ("TTS ENTRY NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_tts_prompts set tts_name='$tts_name',active='$active',tts_voice='$tts_voice',tts_text=\"$tts_text\",user_group='$user_group' where tts_id='$tts_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("TTS ENTRY MODIFIED").": $tts_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_moh==1) ) { echo ""; 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 "
"._QXZ("MUSIC ON HOLD ENTRY NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="DELETE FROM vicidial_music_on_hold_files where moh_id='$moh_id' and filename='$filename';"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); echo "
"._QXZ("MUSIC ON HOLD ENTRY MODIFIED").": $moh_id - $filename\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($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 "
MUSIC ON HOLD ENTRY NOT MODIFIED - Please go back and look at the data you entered\n";} else { $stmt="UPDATE vicidial_music_on_hold set moh_name='$moh_name',active='$active',random='$random',user_group='$user_group' where moh_id='$moh_id';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtLIST = $stmt; $mohfiles = $MT; $mohranks = $MT; $stmt="SELECT filename,rank from vicidial_music_on_hold_files where moh_id='$moh_id' order by rank;"; $rsltx=mysql_to_mysqli($stmt, $link); $mohfiles_to_print = mysqli_num_rows($rsltx); $ranks = ($mohfiles_to_print + 1); $o=0; while ($mohfiles_to_print > $o) { $rowx=mysqli_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];} $new_rank = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_rank); $stmt="UPDATE vicidial_music_on_hold_files set rank='$new_rank' where moh_id='$moh_id' and filename='$mohfiles[$o]';"; $rslt=mysql_to_mysqli($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_to_mysqli($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_to_mysqli($stmtA, $link); echo "
"._QXZ("MUSIC ON HOLD ENTRY MODIFIED").": $moh_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtLIST|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=361111111111; # go to music on hold entry modification form below } ###################### # ADD=497111111111 modify VM Message Group record in the system ###################### if ($ADD==497111111111) { if ($LOGmodify_statuses==1) { echo ""; if ($stage == "FILEDELETE") { if ( (strlen($leave_vm_message_group_id) < 2) or (strlen($audio_filename) < 1) or ($leave_vm_message_group_id=='sounds') or ($leave_vm_message_group_id=='agi-bin') or ($leave_vm_message_group_id=='astdb') or ($leave_vm_message_group_id=='keys') ) {echo "
"._QXZ("VM MESSAGE GROUP ENTRY NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="DELETE FROM leave_vm_message_groups_entries where leave_vm_message_group_id='$leave_vm_message_group_id' and audio_filename='$audio_filename';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsA = mysqli_affected_rows($link); if ($DB > 0) {echo "|$affected_rowsA|$stmt|\n";} echo "
"._QXZ("VM MESSAGE GROUP ENTRY MODIFIED").": $leave_vm_message_group_id - $filename\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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='VMMGROUP', event_type='MODIFY', record_id='$leave_vm_message_group_id', event_code='ADMIN MODIFY VMM GROUP', event_sql=\"$SQL_log\", event_notes='FILE DELETE $affected_rowsA';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { if ( (strlen($leave_vm_message_group_id) < 2) or (strlen($leave_vm_message_group_notes) < 5) or ($leave_vm_message_group_id=='sounds') or ($leave_vm_message_group_id=='agi-bin') or ($leave_vm_message_group_id=='astdb') or ($leave_vm_message_group_id=='keys') ) {echo "
VM MESSAGE GROUP ENTRY NOT MODIFIED - Please go back and look at the data you entered\n";} else { $stmt="UPDATE leave_vm_message_groups set leave_vm_message_group_notes='$leave_vm_message_group_notes',active='$active',user_group='$user_group' where leave_vm_message_group_id='$leave_vm_message_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsA = mysqli_affected_rows($link); if ($DB > 0) {echo "|$affected_rowsA|$stmt|\n";} $stmtLIST = $stmt; $vmmgfiles = $MT; $vmmgname = $MT; $vmmgrank = $MT; $vmmgstart = $MT; $vmmgend = $MT; $stmt="SELECT audio_filename,audio_name,rank,time_start,time_end from leave_vm_message_groups_entries where leave_vm_message_group_id='$leave_vm_message_group_id' order by rank;"; $rsltx=mysql_to_mysqli($stmt, $link); $vmmgfiles_to_print = mysqli_num_rows($rsltx); $ranks = ($vmmgfiles_to_print + 1); $o=0; while ($vmmgfiles_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $vmmgfiles[$o] = $rowx[0]; $vmmgname[$o] = $rowx[1]; $vmmgrank[$o] = $rowx[2]; $vmmgstart[$o] = $rowx[3]; $vmmgend[$o] = $rowx[4]; $o++; } $o=0; $affected_rowsB=""; while ($vmmgfiles_to_print > $o) { $new_rank=0; $Ffilename = $vmmgfiles[$o]; $Ffilename_start = "TM_START_$vmmgfiles[$o]"; $Ffilename_end = "TM_END_$vmmgfiles[$o]"; $Ffilename_name = "DS_NAME_$vmmgfiles[$o]"; if (isset($_GET[$Ffilename])) {$new_rank=$_GET[$Ffilename];} elseif (isset($_POST[$Ffilename])) {$new_rank=$_POST[$Ffilename];} if (isset($_GET[$Ffilename_start])) {$new_start=$_GET[$Ffilename_start];} elseif (isset($_POST[$Ffilename_start])) {$new_start=$_POST[$Ffilename_start];} if (isset($_GET[$Ffilename_end])) {$new_end=$_GET[$Ffilename_end];} elseif (isset($_POST[$Ffilename_end])) {$new_end=$_POST[$Ffilename_end];} if (isset($_GET[$Ffilename_name])) {$new_name=$_GET[$Ffilename_name];} elseif (isset($_POST[$Ffilename_name])) {$new_name=$_POST[$Ffilename_name];} $new_rank = preg_replace('/[^0-9]/','',$new_rank); $new_start = preg_replace('/[^0-9]/','',$new_start); $new_end = preg_replace('/[^0-9]/','',$new_end); if ($non_latin < 1) { $new_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$new_name); } else { $new_name = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$new_name); } $stmt="UPDATE leave_vm_message_groups_entries set rank='$new_rank',time_start='$new_start',time_end='$new_end',audio_name='$new_name' where leave_vm_message_group_id='$leave_vm_message_group_id' and audio_filename='$vmmgfiles[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsB = mysqli_affected_rows($link); if ($DB > 0) {echo "|$affected_rowsB|$stmt|\n";} $stmtLIST .= "|$stmt"; $o++; } $affected_rowsC=""; if (strlen($audio_filename) > 0) { $stmt="INSERT INTO leave_vm_message_groups_entries set audio_filename='$audio_filename',rank='$ranks',leave_vm_message_group_id='$leave_vm_message_group_id',audio_name='$audio_name',time_start='$time_start',time_end='$time_end';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsC = mysqli_affected_rows($link); if ($DB > 0) {echo "|$affected_rowsC|$stmt|\n";} $stmtLIST .= "|$stmt"; } echo "
"._QXZ("VM MESSAGE GROUP ENTRY MODIFIED").": $leave_vm_message_group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtLIST|$stmtA|"; $SQL_log = preg_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='VMMGROUP', event_type='MODIFY', record_id='$leave_vm_message_group_id', event_code='ADMIN MODIFY VMM GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rowsA $affected_rowsB $affected_rowsC';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=397111111111; # go to VM Message Group entry modification form below } ###################### # ADD=498111111111 modify Queue Group record in the system ###################### if ($ADD==498111111111) { if ($LOGmodify_statuses==1) { echo ""; if ( (strlen($queue_group) < 2) or (strlen($queue_group_name) < 5) ) {echo "
QUEUE GROUP ENTRY NOT MODIFIED - Please go back and look at the data you entered\n";} else { $stmt="UPDATE vicidial_queue_groups set queue_group_name='$queue_group_name',active='$active',user_group='$user_group',included_inbound_groups='$qg_groups_value',included_campaigns='$qg_campaigns_value' where queue_group='$queue_group';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsA = mysqli_affected_rows($link); if ($DB > 0) {echo "|$affected_rowsA|$stmt|\n";} $stmtLIST = $stmt; echo "
"._QXZ("QUEUE GROUP ENTRY MODIFIED").": $queue_group\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtLIST|$stmtA|"; $SQL_log = preg_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='QUEUEGROUP', event_type='MODIFY', record_id='$queue_group', event_code='ADMIN MODIFY QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rowsA $affected_rowsB $affected_rowsC';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=398111111111; # go to Queue Group entry modification form below } ###################### # ADD=471111111111 modify voicemail record in the system ###################### if ($ADD==471111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_voicemail==1) ) { echo ""; if ( (strlen($voicemail_id) < 2) or (strlen($fullname) < 2) ) {echo "
"._QXZ("VOICEMAIL BOX NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { if ( ($voicemail_greeting == '') and (strlen($old_voicemail_greeting) > 0) ) {$voicemail_greeting = '---DELETE---';} $stmtA="UPDATE vicidial_voicemail set fullname='$fullname',active='$active',pass='$pass',email='$email',delete_vm_after_email='$delete_vm_after_email',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting',on_login_report='$show_vm_on_summary' where voicemail_id='$voicemail_id';"; $rslt=mysql_to_mysqli($stmtA, $link); if ($DB) {echo "|$stmtA|";} $stmtB="SELECT active_voicemail_server from system_settings;"; $rslt=mysql_to_mysqli($stmtB, $link); $row=mysqli_fetch_row($rslt); $active_voicemail_server = $row[0]; $sounds_updateSQL=''; if ($SSallow_voicemail_greeting > 0) {$sounds_updateSQL = ",sounds_update='Y'";} $stmtC="UPDATE servers SET rebuild_conf_files='Y'$sounds_updateSQL where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';"; $rslt=mysql_to_mysqli($stmtC, $link); echo "
"._QXZ("VOICEMAIL BOX MODIFIED").": $voicemail_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=371111111111; # go to voicemail entry modification form below } ###################### # ADD=481111111111 modify screen label record in the system ###################### if ($ADD==481111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_labels==1) ) { echo ""; if ( (strlen($label_id) < 2) or (strlen($label_name) < 2) ) {echo "
"._QXZ("SCREEN LABEL NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_screen_labels set label_name='$label_name',active='$active',label_hide_field_logs='$label_hide_field_logs',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',user_group='$user_group',label_lead_id='$label_lead_id',label_list_id='$label_list_id',label_entry_date='$label_entry_date',label_gmt_offset_now='$label_gmt_offset_now',label_source_id='$label_source_id',label_called_since_last_reset='$label_called_since_last_reset',label_status='$label_status',label_user='$label_user',label_date_of_birth='$label_date_of_birth',label_country_code='$label_country_code',label_last_local_call_time='$label_last_local_call_time',label_called_count='$label_called_count',label_rank='$label_rank',label_owner='$label_owner',label_entry_list_id='$label_entry_list_id' where label_id='$label_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SCREEN LABEL MODIFIED").": $label_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LABEL', event_type='MODIFY', record_id='$label_id', event_code='ADMIN MODIFY LABEL', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=381111111111; # go to screen label entry modification form below } ###################### # ADD=482111111111 modify screen colors record in the system ###################### if ($ADD==482111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_colors==1) ) { echo ""; if ( (strlen($colors_id) < 2) or (strlen($colors_name) < 2) ) {echo "
"._QXZ("SCREEN COLORS NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { if ( (strlen($menu_background) > 6) or (strlen($menu_background) < 6) ) { if (strlen($menu_background) > 6) {$menu_background = substr($menu_background,0,6);} while (strlen($menu_background) < 6) {$menu_background .= '0';} } if ( (strlen($frame_background) > 6) or (strlen($frame_background) < 6) ) { if (strlen($frame_background) > 6) {$frame_background = substr($frame_background,0,6);} while (strlen($frame_background) < 6) {$frame_background .= '0';} } if ( (strlen($std_row1_background) > 6) or (strlen($std_row1_background) < 6) ) { if (strlen($std_row1_background) > 6) {$std_row1_background = substr($std_row1_background,0,6);} while (strlen($std_row1_background) < 6) {$std_row1_background .= '0';} } if ( (strlen($std_row2_background) > 6) or (strlen($std_row2_background) < 6) ) { if (strlen($std_row2_background) > 6) {$std_row2_background = substr($std_row2_background,0,6);} while (strlen($std_row2_background) < 6) {$std_row2_background .= '0';} } if ( (strlen($std_row3_background) > 6) or (strlen($std_row3_background) < 6) ) { if (strlen($std_row3_background) > 6) {$std_row3_background = substr($std_row3_background,0,6);} while (strlen($std_row3_background) < 6) {$std_row3_background .= '0';} } if ( (strlen($std_row4_background) > 6) or (strlen($std_row4_background) < 6) ) { if (strlen($std_row4_background) > 6) {$std_row4_background = substr($std_row4_background,0,6);} while (strlen($std_row4_background) < 6) {$std_row4_background .= '0';} } if ( (strlen($std_row5_background) > 6) or (strlen($std_row5_background) < 6) ) { if (strlen($std_row5_background) > 6) {$std_row5_background = substr($std_row5_background,0,6);} while (strlen($std_row5_background) < 6) {$std_row5_background .= '0';} } if ( (strlen($alt_row1_background) > 6) or (strlen($alt_row1_background) < 6) ) { if (strlen($alt_row1_background) > 6) {$alt_row1_background = substr($alt_row1_background,0,6);} while (strlen($alt_row1_background) < 6) {$alt_row1_background .= '0';} } if ( (strlen($alt_row2_background) > 6) or (strlen($alt_row2_background) < 6) ) { if (strlen($alt_row2_background) > 6) {$alt_row2_background = substr($alt_row2_background,0,6);} while (strlen($alt_row2_background) < 6) {$alt_row2_background .= '0';} } if ( (strlen($alt_row3_background) > 6) or (strlen($alt_row3_background) < 6) ) { if (strlen($alt_row3_background) > 6) {$alt_row3_background = substr($alt_row3_background,0,6);} while (strlen($alt_row3_background) < 6) {$alt_row3_background .= '0';} } if ( (strlen($button_color) > 6) or (strlen($button_color) < 6) ) { if (strlen($button_color) > 6) {$button_color = substr($button_color,0,6);} while (strlen($button_color) < 6) {$button_color .= '0';} } $stmt="UPDATE vicidial_screen_colors set colors_name='$colors_name',active='$active',menu_background='$menu_background',frame_background='$frame_background',std_row1_background='$std_row1_background',std_row2_background='$std_row2_background',std_row3_background='$std_row3_background',std_row4_background='$std_row4_background',std_row5_background='$std_row5_background',alt_row1_background='$alt_row1_background',alt_row2_background='$alt_row2_background',alt_row3_background='$alt_row3_background',button_color='$button_color',user_group='$user_group',web_logo='$web_logo' where colors_id='$colors_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SCREEN COLORS MODIFIED").": $colors_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='COLORS', event_type='MODIFY', record_id='$colors_id', event_code='ADMIN MODIFY COLORS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=382111111111; # go to screen colors entry modification form below } ###################### # ADD=491111111111 modify contact record in the system ###################### if ($ADD==491111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_contacts==1) ) { echo ""; if (strlen($contact_id) < 1) {echo "
"._QXZ("CONTACT NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) { $linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname"); if (!$linkALT) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } } else {$linkALT = $link;} $stmt="UPDATE contact_information set first_name='$first_name',last_name='$last_name',office_num='$office_num',cell_num='$cell_num',other_num1='$other_num1',other_num2='$other_num2',bu_name='$bu_name',department='$department',group_name='$group_name',job_title='$job_title',location='$location' where contact_id='$contact_id';"; $rslt=mysql_to_mysqli($stmt, $linkALT); echo "
"._QXZ("CONTACT MODIFIED").": $contact_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTACTS', event_type='MODIFY', record_id='$contact_id', event_code='ADMIN MODIFY CONTACT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=391111111111; # go to contact entry modification form below } ###################### # ADD=492111111111 modify settings container record in the system ###################### if ($ADD==492111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_settings_containers==1) ) { echo ""; if ( (strlen($container_id) < 2) or (strlen($container_notes) < 2) ) {echo "
"._QXZ("SETTINGS CONTAINER NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $container_entrySQL = ",container_entry='" . mysqli_real_escape_string($link, $container_entry) ."'"; if ( ($container_type == 'READ_ONLY') or ($stage == 'READ_ONLY') ) {$container_entrySQL = '';} $stmt="UPDATE vicidial_settings_containers set container_notes='$container_notes',container_type='$container_type',user_group='$user_group' $container_entrySQL where container_id='$container_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SETTINGS CONTAINER MODIFIED").": $container_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTAINERS', event_type='MODIFY', record_id='$container_id', event_code='ADMIN MODIFY CONTAINER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=392111111111; # go to settings container entry modification form below } ###################### # ADD=493111111111 modify status group record in the system ###################### if ($ADD==493111111111) { if ($LOGmodify_statuses==1) { echo ""; if (strlen($status_group_id) < 2) {echo "
"._QXZ("STATUS GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { if ($stage == 'add') { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { echo ""; $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id='$status_group_id' and status='$status_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATUS GROUP STATUS NOT ADDED - there is already a status in the status group with this name")."\n";} else { $stmt="SELECT count(*) from vicidial_statuses where status='$status_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("STATUS GROUP STATUS NOT ADDED - there is already a global-status in the system with this name")."\n";} else { if ( (strlen($status_group_id) < 2) or (strlen($status_id) < 1) or (strlen($status_name) < 2) ) { echo "
"._QXZ("STATUS GROUP STATUS NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 8 characters in length")."\n"; echo "
"._QXZ("status name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("STATUS GROUP STATUS ADDED").": $status_group_id - $status_id\n"; $stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine) values('$status_id','$status_name','$selectable','$status_group_id','$human_answered','$category','$sale','$dnc','$customer_contact','$not_interested','$unworkable','$scheduled_callbacks','$completed','$min_sec','$max_sec','$answering_machine');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_status_groups set modify_stamp='$SQLdate' where status_group_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='STATUSGROUPS', event_type='ADD', record_id='$status_group_id', event_code='ADMIN ADD STATUS GROUP STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } } elseif ($stage == 'delete') { echo "
"._QXZ("STATUS GROUP STATUS DELETED").": $status_group_id - $status\n"; $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$status_group_id' and status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_status_groups set modify_stamp='$SQLdate' where status_group_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='STATUSGROUPS', event_type='DELETE', record_id='$status_group_id', event_code='ADMIN DELETE STATUS GROUP STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } elseif ($stage == 'modify') { echo "
"._QXZ("STATUS GROUP STATUS MODIFIED").": $status_group_id - $status\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',scheduled_callback='$scheduled_callbacks',completed='$completed',min_sec='$min_sec',max_sec='$max_sec',answering_machine='$answering_machine' where campaign_id='$status_group_id' and status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_status_groups set modify_stamp='$SQLdate' where status_group_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='STATUSGROUPS', event_type='MODIFY', record_id='$status_group_id', event_code='ADMIN MODIFY STATUS GROUP STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } else { if (strlen($status_group_notes) < 2) {echo "
"._QXZ("STATUS GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_status_groups set status_group_notes='$status_group_notes',user_group='$user_group' where status_group_id='$status_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("STATUS GROUP MODIFIED").": $status_group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='STATUSGROUPS', event_type='MODIFY', record_id='$status_group_id', event_code='ADMIN MODIFY STATUS GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=393111111111; # go to status group entry modification form below } ###################### # ADD=494111111111 modify automated report record in the system ###################### if ($ADD==494111111111) { if ($LOGmodify_auto_reports==1) { echo ""; if ( (strlen($report_id) < 2) or (strlen($report_name) < 2) ) {echo "
"._QXZ("AUTOMATED REPORT NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $p=0; $REPORT_weekdays=''; if(!is_array($report_weekdays)) {$report_weekdays=array();} $report_weekdays_ct = count($report_weekdays); while ($p <= $report_weekdays_ct) { $report_weekdays[$p] = preg_replace('/[^0-9]/','',$report_weekdays[$p]); $REPORT_weekdays .= "$report_weekdays[$p]"; $p++; } $stmt="UPDATE vicidial_automated_reports set report_name='$report_name',report_server='$report_server',report_times='$report_times',report_weekdays='$REPORT_weekdays',report_monthdays='$report_monthdays',report_destination='$report_destination',email_from='$email_from',email_to='$email_to',email_subject='$email_subject',ftp_server='$ftp_server',ftp_user='" . mysqli_real_escape_string($link, $ftp_user) ."',ftp_pass='" . mysqli_real_escape_string($link, $ftp_pass) ."',ftp_directory='$ftp_directory',report_url='" . mysqli_real_escape_string($link, $report_url) ."',run_now_trigger='$run_now_trigger',active='$active',user_group='$user_group',filename_override='$filename_override' where report_id='$report_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("AUTOMATED REPORT MODIFIED").": $report_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_replace("/;|\\\\/", '', $SQL_log); $SQL_log = preg_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='AUTOREPORTS', event_type='MODIFY', record_id='$report_id', event_code='ADMIN MODIFY AUTO REPORT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=394111111111; # go to automated report entry modification form below } ###################### # ADD=496111111111 modify CID group record in the system ###################### if ($ADD==496111111111) { if ($LOGmodify_statuses==1) { echo ""; if (strlen($cid_group_id) < 2) {echo "
"._QXZ("CID GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { if ($stage == 'SKIP') { $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and outbound_cid='$outbound_cid' and active='Y' and cid_description NOT IN('NOROTATE','NO-ROTATE','NO_ROTATE','INACTIVE','DONOTUSE') and cid_description NOT LIKE \"%NOROTATE%\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CID GROUP CID IS NOT ACTIVE - you cannot skip a CID that is not active")."
\n";} else { if ( (strlen($cid_group_id) < 2) or (strlen($outbound_cid) < 6) ) { echo "
"._QXZ("CID GROUP CID NOT SKIPPED - Please go back and look at the data you entered")."
\n"; if ($DB) {echo "|$cid_group_id|$outbound_cid|\n";} } else { ### BEGIN set the next CID to active and the current one to inactive ### $outbound_cid_next=''; $stmt="SELECT outbound_cid from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and outbound_cid!='$outbound_cid' and cid_description NOT IN('NOROTATE','NO-ROTATE','NO_ROTATE','INACTIVE','DONOTUSE') and cid_description NOT LIKE \"%NOROTATE%\" order by CAST(cid_description as SIGNED INTEGER) limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $accids_to_print = mysqli_num_rows($rslt); if ($accids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $outbound_cid_next = $rowx[0]; } if (strlen($outbound_cid_next) < 6) { if ($DB) {echo " skip CID Group rotate, next CID could not be found: $cid_group_id ($stmt)\n";} } else { $stmtA="UPDATE vicidial_campaign_cid_areacodes SET cid_description='$dateint',active='Y' where campaign_id='$cid_group_id' and outbound_cid='$outbound_cid_next';"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA=mysqli_affected_rows($link); $stmtB="UPDATE vicidial_cid_groups SET cid_auto_rotate_calls='0',cid_last_auto_rotate=NOW(),cid_auto_rotate_cid='$outbound_cid_next' where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB=mysqli_affected_rows($link); $stmtC="UPDATE vicidial_campaign_cid_areacodes SET cid_description='NOROTATE',active='N' where campaign_id='$cid_group_id' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC=mysqli_affected_rows($link); ### END set the next CID to active and the current one to inactive ### echo "
"._QXZ("CID GROUP CID SKIPPED").": $cid_group_id - $outbound_cid - "._QXZ("NEXT CID").": $outbound_cid_next
\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|"; $SQL_log = preg_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='CIDGROUPS', event_type='MODIFY', record_id='$cid_group_id', event_code='ADMIN SKIP CID GROUP ENTRY', event_sql=\"$SQL_log\", event_notes='CID: $outbound_cid - NEXT CID: $outbound_cid_next - affected rows: $affected_rowsA|$affected_rowsB|$affected_rowsC|';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } elseif ($stage == 'ADD') { $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and areacode='$areacode' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("CID GROUP CID NOT ADDED - there is already an entry for this group with this CID")."
\n";} else { if ( (strlen($cid_group_id) < 2) or (strlen($areacode) < 2) or (strlen($outbound_cid) < 6) ) { echo "
"._QXZ("CID GROUP CID NOT ADDED - Please go back and look at the data you entered")."
\n"; if ($DB) {echo "|$cid_group_id|$areacode|$outbound_cid|\n";} } else { echo "
"._QXZ("CID GROUP CID ADDED").": $cid_group_id - $areacode - $outbound_cid
\n"; $stmt="INSERT INTO vicidial_campaign_cid_areacodes(campaign_id,areacode,outbound_cid,cid_description) values('$cid_group_id','$areacode','$outbound_cid','$cid_description');"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_cid_groups set modify_stamp='$SQLdate' where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CIDGROUPS', event_type='ADD', record_id='$cid_group_id', event_code='ADMIN ADD CID GROUP ENTRY', event_sql=\"$SQL_log\", event_notes='CID: $areacode - $outbound_cid';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } elseif ($stage == 'DELETE') { $not_allowed_campaigns_ct=0; $stmt="SELECT count(*) from vicidial_campaigns where cid_group_id='$cid_group_id' $notLOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $accidsX_to_print = mysqli_num_rows($rslt); if ($accidsX_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $not_allowed_campaigns_ct = $rowx[0]; } $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' and areacode='$areacode' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] < 1) or ($not_allowed_campaigns_ct > 0) ) {echo "
"._QXZ("CID GROUP CID NOT DELETED - this entry does not exist")."
\n";} else { if ( (strlen($cid_group_id) < 2) or (strlen($areacode) < 2) or (strlen($outbound_cid) < 6) ) { echo "
"._QXZ("CID GROUP CID NOT DELETED - Please go back and look at the data you entered")."
\n"; } else { echo "
"._QXZ("CID GROUP CID DELETED").": $cid_group_id - $areacode - $outbound_cid
\n"; $stmt="DELETE FROM vicidial_campaign_cid_areacodes WHERE campaign_id='$cid_group_id' and areacode='$areacode' and outbound_cid='$outbound_cid';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_cid_groups set modify_stamp='$SQLdate' where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CIDGROUPS', event_type='DELETE', record_id='$cid_group_id', event_code='ADMIN DELETE CID GROUP ENTRY', event_sql=\"$SQL_log\", event_notes='CID: $areacode - $outbound_cid';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } elseif ($stage == 'MODIFY') { $not_allowed_campaigns_ct=0; $stmt="SELECT count(*) from vicidial_campaigns where cid_group_id='$cid_group_id' $notLOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $accidsX_to_print = mysqli_num_rows($rslt); if ($accidsX_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $not_allowed_campaigns_ct = $rowx[0]; } if ($not_allowed_campaigns_ct > 0) {echo "
"._QXZ("CID GROUP CID NOT MODIFIED - this entry does not exist")."
\n";} else { $stmt="SELECT areacode,outbound_cid,active,cid_description,call_count_today from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' order by areacode,outbound_cid"; $rslt=mysql_to_mysqli($stmt, $link); $accids_to_print = mysqli_num_rows($rslt); $o=0; while ($accids_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xareacode[$o] = $rowx[0]; $Xoutbound_cid[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xcid_description[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $o++; } $accid_modified=0; $stmt_log=''; $accid_log=''; $o=0; while ($accids_to_print > $o) { $Factive_value=''; $Fcid_description_value=''; $Factive = "active_$Xareacode[$o]_$Xoutbound_cid[$o]"; $Fcid_description = "cid_description_$Xareacode[$o]_$Xoutbound_cid[$o]"; if (isset($_GET[$Factive])) {$Factive_value=$_GET[$Factive];} elseif (isset($_POST[$Factive])) {$Factive_value=$_POST[$Factive];} if (isset($_GET[$Fcid_description])) {$Fcid_description_value=$_GET[$Fcid_description];} elseif (isset($_POST[$Fcid_description])) {$Fcid_description_value=$_POST[$Fcid_description];} if ($non_latin < 1) { $Fcid_description_value = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$Fcid_description_value); } else { $Fcid_description_value = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$Fcid_description_value); } $Factive_value = preg_replace('/[^A-Z]/','',$Factive_value); # echo "$cid_group_id - $Xareacode[$o] - $Xoutbound_cid[$o] - $Factive($Factive_value|$Xactive[$o]) - $Fcid_description($Fcid_description_value|$Xcid_description[$o])
"; if ( ($Factive_value == $Xactive[$o]) and ($Fcid_description_value == $Xcid_description[$o]) ) { # echo "
AREACODE CID NOT MODIFIED - Please go back and look at the data you entered
\n"; } else { $accid_modified++; echo ""._QXZ("CID GROUP CID MODIFIED").": $Xareacode[$o] - $Xoutbound_cid[$o]
\n"; $stmt="UPDATE vicidial_campaign_cid_areacodes SET active='$Factive_value',cid_description='$Fcid_description_value' WHERE campaign_id='$cid_group_id' and areacode='$Xareacode[$o]' and outbound_cid='$Xoutbound_cid[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_cid_groups set modify_stamp='$SQLdate' where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmt_log .= "$stmt|$stmtB|"; $accid_log .= "CID: $Xareacode[$o] - $Xoutbound_cid[$o] - $Factive_value - $Fcid_description_value|"; } $o++; } if ($accid_modified > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt_log|"; $SQL_log = preg_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='CIDGROUPS', event_type='MODIFY', record_id='$cid_group_id', event_code='ADMIN MODIFY CID GROUP ENTRY', event_sql=\"$SQL_log\", event_notes='$accid_modified CIDs MODIFIED. CHANGES: $accid_log';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { if (strlen($cid_group_notes) < 2) {echo "
"._QXZ("CID GROUP NOT MODIFIED - Please go back and look at the data you entered")."\n";} else { $stmt="UPDATE vicidial_cid_groups set cid_group_notes='$cid_group_notes',user_group='$user_group',cid_auto_rotate_minutes='$cid_auto_rotate_minutes',cid_auto_rotate_minimum='$cid_auto_rotate_minimum' where cid_group_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CID GROUP MODIFIED").": $cid_group_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CIDGROUPS', event_type='MODIFY', record_id='$cid_group_id', event_code='ADMIN MODIFY CID GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=396111111111; # go to CID group entry modification form below } ###################### # ADD=4111111111111 modify conference record in the system ###################### if ($ADD==4111111111111) { if ($LOGast_admin_access==1) { echo ""; $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) {echo "
"._QXZ("CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("CONFERENCE NOT MODIFIED - Please go back and look at the data you entered")."\n"; } else { echo "
"._QXZ("CONFERENCE MODIFIED").": $conf_exten\n"; $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONF', event_type='MODIFY', record_id='$conf_exten', event_code='ADMIN MODIFY CONFERENCE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) {echo "
"._QXZ("AGENT CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("AGENT CONFERENCE NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back")."\n"; } else { echo "
"._QXZ("AGENT CONFERENCE MODIFIED").": $conf_exten\n"; $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',extension='$extension' where conf_exten='$old_conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='VICICONF', event_type='MODIFY', record_id='$conf_exten', event_code='ADMIN MODIFY VICIDIAL CONFERENCE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=31111111111111; # go to vicidial conference modification form below } ###################### # ADD=42111111111111 modify vicidial confbridge record in the system ###################### if ($ADD==42111111111111) { if ($LOGast_admin_access==1) { echo ""; $stmt="SELECT count(*) from vicidial_confbridges where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 0) and ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) {echo "
"._QXZ("AGENT CONFBRIDGE NOT MODIFIED - there is already a Conference in the system with this extension-server")."\n";} else { if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("AGENT CONFBRIDGE NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "


"._QXZ("Go back").""; } else { echo "
"._QXZ("AGENT CONFBRIDGE MODIFIED").": $conf_exten\n"; $stmt="UPDATE vicidial_confbridges set conf_exten='$conf_exten',extension='$extension' where conf_exten='$old_conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='VICICONF', event_type='MODIFY', record_id='$conf_exten', event_code='ADMIN MODIFY VICIDIAL CONFBRIDGE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=32111111111111; # go to vicidial confbridge modification form below } ###################### # ADD=411111111111111 modify vicidial system settings ###################### if ($ADD==411111111111111) { if ($LOGmodify_servers==1) { echo ""; if ( ($SSrequire_password_length > 0) and ( ($SSrequire_password_length > strlen($default_phone_registration_password)) or ( ($SSrequire_password_length > strlen($default_phone_login_password)) or ( ($SSrequire_password_length > strlen($default_server_password)) ) ) ) ) { echo "
"._QXZ("SYSTEM SETTINGS NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("The default passwords must be at least $SSrequire_password_length characters long")."\n"; } else { echo "
"._QXZ("SYSTEM SETTINGS MODIFIED")."\n"; $k=0; $new_field_value=''; if (is_array($reports_use_slave_db)) {$multi_count = count($reports_use_slave_db);} else {$multi_count=0;} $multi_array = $reports_use_slave_db; while ($k < $multi_count) { $new_field_value .= "$multi_array[$k],"; $k++; } $new_field_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_field_value); $reports_use_slave_db = preg_replace("/,$/","",$new_field_value); $m=0; $new_altlog_value=''; if (is_array($tables_use_alt_log_db)) {$altlog_count = count($tables_use_alt_log_db);} else {$altlog_count=0;} $altlog_array = $tables_use_alt_log_db; while ($m < $altlog_count) { $new_altlog_value .= "$altlog_array[$m],"; $m++; } $new_altlog_value = preg_replace("/\<|\>|\'|\"|\\\\|;/","",$new_altlog_value); $tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value); $custom_dialplanSQL=''; if ($LOGmodify_custom_dialplans > 0) {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";} $custom_stmt="show tables like 'vicidial_custom_reports'"; $custom_rslt=mysql_to_mysqli($custom_stmt, $link); $custom_reports_slave_SQL=''; if (mysqli_num_rows($custom_rslt)>0) { if (is_array($custom_reports_use_slave_db)) { for ($q=0; $q|\'|\"|\\\\|;/","",$custom_reports_slave_SQL); $custom_reports_slave_SQL=",custom_reports_use_slave_db='$custom_reports_slave_SQL'"; } $stmt="SELECT count(*) from servers where active='Y' and active_asterisk_server='Y';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $active_asterisk_servers = $row[0]; if ($row[0] < 1) {$row[0] = '1';} if (preg_match("/_MXCS/",$SShosted_settings)) { $maxcps_set = $SShosted_settings; $maxcps_set = preg_replace("/MXAG\d+|_BUILD_|DRA|_MXTR\d+|.*_MXCS|VCA\d+| /",'',$maxcps_set); $maxcps_set = preg_replace('/[^0-9]/','',$maxcps_set); $maxcps_set = ($maxcps_set * $row[0]); if (strlen($maxcps_set)>0) { if ($outbound_calls_per_second > $maxcps_set) { if ($DB > 0) {echo "MAX CPS: |$outbound_calls_per_second|$maxcps_set|\n";} $outbound_calls_per_second = $maxcps_set; } } } # update the apinewlead_url value for the system $stmtD="UPDATE vicidial_url_multi SET url_address='" . mysqli_real_escape_string($link, $apinewlead_url) . "' WHERE campaign_id='-SYSTEM-API-NEWLEAD-' and entry_type='system' and url_type='apinewlead';"; $rslt=mysql_to_mysqli($stmtD, $link); $update_apinewlead_rows=mysqli_affected_rows($link); # update the system settings $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='" . mysqli_real_escape_string($link, $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='" . mysqli_real_escape_string($link, $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='" . mysqli_real_escape_string($link, $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',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',label_lead_id='$label_lead_id',label_list_id='$label_list_id',label_entry_date='$label_entry_date',label_gmt_offset_now='$label_gmt_offset_now',label_source_id='$label_source_id',label_called_since_last_reset='$label_called_since_last_reset',label_status='$label_status',label_user='$label_user',label_date_of_birth='$label_date_of_birth',label_country_code='$label_country_code',label_last_local_call_time='$label_last_local_call_time',label_called_count='$label_called_count',label_rank='$label_rank',label_owner='$label_owner',label_entry_list_id='$label_entry_list_id',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='" . mysqli_real_escape_string($link, $chat_url) . "',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url',hide_inactive_lists='$hide_inactive_lists',allow_manage_active_lists='$allow_manage_active_lists',expired_lists_inactive='$expired_lists_inactive',did_system_filter='$did_system_filter',anyone_callback_inactive_lists='$anyone_callback_inactive_lists',enable_gdpr_download_deletion='$enable_gdpr_download_deletion',source_id_display='$source_id_display',agent_logout_link='$agent_logout_link',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings_system',user_admin_redirect='$user_admin_redirect',list_status_modification_confirmation='$list_status_modification_confirmation',sip_event_logging='$sip_event_logging_system',call_quota_lead_ranking='$call_quota_lead_ranking_system',enable_second_script='$enable_second_script',enable_first_webform='$enable_first_webform',recording_buttons='$recording_buttons',opensips_cid_name='$opensips_cid_name_system',require_password_length='$require_password_length',user_account_emails='$user_account_emails',outbound_cid_any='$outbound_cid_any',entries_per_page='$entries_per_page',browser_call_alerts='$browser_call_alerts',queuemetrics_pausereason='$queuemetrics_pausereason',inbound_answer_config='$inbound_answer_config',enable_international_dncs='$enable_international_dncs',web_loader_phone_strip='$web_loader_phone_strip',manual_dial_phone_strip='$manual_dial_phone_strip',daily_call_count_limit='$daily_call_count_limit',allow_shared_dial='$allow_shared_dial',agent_search_method='$agent_search_method_system',phone_defaults_container='$phone_defaults_container',qc_claim_limit='$qc_claim_limit',qc_expire_days='$qc_expire_days',two_factor_auth_hours='$two_factor_auth_hours',two_factor_container='$two_factor_container',agent_hidden_sound='$agent_hidden_sound',agent_hidden_sound_volume='$agent_hidden_sound_volume',agent_hidden_sound_seconds='$agent_hidden_sound_seconds',agent_screen_timer='$agent_screen_timer',call_limit_24hour='$call_limit_24hour',allowed_sip_stacks='$allowed_sip_stacks',agent_hide_hangup='$agent_hide_hangup',allow_web_debug='$allow_web_debug',max_logged_in_agents='$max_logged_in_agents',user_codes_admin='$user_codes_admin',login_kickall='$login_kickall',abandon_check_queue='$abandon_check_queue',agent_notifications='$agent_notifications',demographic_quotas='$demographic_quotas_system',log_latency_gaps='$log_latency_gaps',inbound_credits='$inbound_credits',weekday_resets='$weekday_resets',two_factor_auth_agent_hours='$two_factor_auth_agent_hours',hopper_hold_inserts='$hopper_hold_inserts',coldstorage_server_ip='$coldstorage_server_ip',coldstorage_dbname='$coldstorage_dbname',coldstorage_login='$coldstorage_login',coldstorage_pass='$coldstorage_pass',coldstorage_port='$coldstorage_port',enhanced_agent_monitoring='$enhanced_agent_monitoring',agent_hide_dial_fail='$agent_hide_dial_fail',agent_man_dial_filter='$agent_man_dial_filter',agent_3way_dial_filter='$agent_3way_dial_filter',stereo_recording='$stereo_recording',recording_dtmf_detection='$recording_dtmf_detection',recording_dtmf_muting='$recording_dtmf_muting',stereo_parallel_recording='$stereo_parallel_recording',db_crashed_tables_check='$db_crashed_tables_check',xfer_min_container='$xfer_min_container',max_inbound_auto_reenable='$max_inbound_auto_reenable',amd_status_map='$amd_status_map'$custom_dialplanSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $update_main_rows=mysqli_affected_rows($link); if ($DB) {echo "$update_main_rows|$stmt|\n";} $event_notes="Updated: $update_main_rows|"; if ( ($meetme_enter_login_filename != $SSmeetme_enter_login_filename) or ($meetme_enter_leave3way_filename != $SSmeetme_enter_leave3way_filename) ) {$reload_dialplan_on_servers=1;} $stmtB=''; $stmtC=''; if ($reload_dialplan_on_servers > 0) { $stmtB="UPDATE system_settings set reload_timestamp=NOW();"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC="UPDATE servers set rebuild_conf_files='Y' where active='Y' and active_asterisk_server='Y' and generate_vicidial_conf='Y';"; $rslt=mysql_to_mysqli($stmtC, $link); } $update_gdpr_users_stmt="update vicidial_users set export_gdpr_leads='$enable_gdpr_download_deletion' where export_gdpr_leads>$enable_gdpr_download_deletion"; $update_gdpr_users_rslt=mysql_to_mysqli($update_gdpr_users_stmt, $link); $update_gdpr_rows=mysqli_affected_rows($link); if ($update_gdpr_rows>0) { $event_notes.=" $update_gdpr_rows "._QXZ("GDPR-enabled users downgraded due to setting change"); } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|$stmtC|$stmtD|"; $SQL_log = preg_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='$event_notes|$update_apinewlead_rows';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_statuses==1) ) { echo ""; if (preg_match('/delete/',$stage)) { if ( (strlen($status) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$status)) ) { echo "
"._QXZ("SYSTEM STATUS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the system status cannot be a reserved status").": B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; echo "
"._QXZ("the system status needs to be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("SYSTEM STATUS DELETED").": $status\n"; $stmt="DELETE FROM vicidial_statuses where status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE FROM vicidial_campaign_hotkeys where status='$status';"; $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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='SYSTEMSTATUSES', 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_to_mysqli($stmt, $link); } } if (preg_match('/modify/', $stage)) { if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) { echo "
"._QXZ("SYSTEM STATUS NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the system status needs to be at least 1 characters in length")."\n"; echo "
"._QXZ("the system status name needs to be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("SYSTEM STATUS MODIFIED").": $status\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',scheduled_callback='$scheduled_callbacks',completed='$completed',min_sec='$min_sec',max_sec='$max_sec',answering_machine='$answering_machine' where status='$status';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='SYSTEMSTATUSES', 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_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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) or ($LOGmodify_statuses==1) ) { echo ""; if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) ) { echo "
"._QXZ("STATUS CATEGORY NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the status category cannot be a reserved category").": UNDEFINED\n"; echo "
"._QXZ("the status category needs to be at least 2 characters in length")."\n"; } else { if (preg_match('/delete/',$stage)) { echo "
"._QXZ("STATUS CATEGORY DELETED").": $vsc_id\n"; $stmt="DELETE FROM vicidial_status_categories where vsc_id='$vsc_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 CATEGORY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if (preg_match('/modify/', $stage)) { echo "
"._QXZ("STATUS CATEGORY MODIFIED").": $vsc_id\n"; $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] > 3) and (preg_match('/Y/',$tovdad_display)) ) { $tovdad_display = 'N'; echo "
"._QXZ("ERROR: There are already 4 Status Categories set to TimeOnVDAD Display")."\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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 CATEGORY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if (preg_match('/delete/',$stage)) { if ( (strlen($code) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$code)) ) { echo "
"._QXZ("QC STATUS CODE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the qc status code cannot be a reserved status").": B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; echo "
"._QXZ("the qc status code needs to be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("QC STATUS CODE DELETED").": $code\n"; $stmt="DELETE FROM vicidial_qc_codes where code='$code';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } if (preg_match('/modify/', $stage)) { if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) { echo "
"._QXZ("QC STATUS CODE NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("the qc status code needs to be at least 1 characters in length")."\n"; echo "
"._QXZ("the qc status code name needs to be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("QC STATUS CODE MODIFIED").": $code\n"; $stmt="UPDATE vicidial_qc_codes SET code_name='$code_name' where code='$code';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) { echo "
"._QXZ("USER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("User be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("USER DELETION CONFIRMATION").": $user\n"; echo "

"._QXZ("Click here to delete user")." $user


\n"; } $ADD='3'; # go to user modification below } ###################### # ADD=51 confirmation before deletion of campaign ###################### if ($ADD==51) { echo ""; if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) { echo "
"._QXZ("CAMPAIGN NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Campaign_id be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CAMPAIGN DELETION CONFIRMATION").": $campaign_id\n"; echo "

"._QXZ("Click here to delete campaign")." $campaign_id


\n"; } $ADD='31'; # go to campaign modification below } ###################### # ADD=52 confirmation before logging all agents out of campaign of campaign ###################### if ($ADD==52) { echo ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Campaign_id be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("AGENT LOGOUT CONFIRMATION").": $campaign_id\n"; echo "

"._QXZ("Click here to log all agents out of")." $campaign_id


\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 (preg_match('/IN/i', $stage)) {$group_id=$campaign_id;} echo ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("VDAC NOT CLEARED FOR CAMPAIGN - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Campaign_id be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("VDAC CLEAR CONFIRMATION").": $campaign_id\n"; echo "

"._QXZ("Click here to delete the oldest LIVE record in VDAC for")." $campaign_id


\n"; } # go to campaign modification below if (preg_match('/IN/i', $stage)) {$ADD='3111';} else {$ADD='31';} } ###################### # ADD=511 confirmation before deletion of list ###################### if ($ADD==511) { echo ""; if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) { echo "
"._QXZ("LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("List_id be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("LIST DELETION CONFIRMATION").": $list_id\n"; echo "

"._QXZ("Click here to delete list and all of its leads")." $list_id


\n"; } $ADD='311'; # go to list modification below } ###################### # ADD=531 confirmation before deletion of drop list ###################### if ($ADD==531) { echo ""; if ( (strlen($dl_id) < 2) or ($LOGdelete_lists < 1) ) { echo "
"._QXZ("DROP LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("dl_id be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("DROP LIST DELETION CONFIRMATION").": $dl_id\n"; echo "

"._QXZ("Click here to delete drop list")." $dl_id


\n"; } $ADD='331'; # go to drop list modification below } ###################### # ADD=512 confirmation before clearing of list ###################### if ($ADD==512) { echo ""; if ( (strlen($list_id) < 2) or ($LOGuser_level < 9) or ($LOGdelete_lists < 1) or ($LOGmodify_lists < 1) or ($LOGmodify_leads < 1) ) { echo "
"._QXZ("LIST NOT CLEARED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("List_id must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("LIST CLEAR CONFIRMATION").": $list_id\n"; echo "

"._QXZ("Click here to clear list and all of its leads")." $list_id


\n"; } $ADD='311'; # go to list modification below } ###################### # ADD=5111 confirmation before deletion of in-group ###################### if ($ADD==5111) { echo ""; if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) { echo "
"._QXZ("IN-GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Group_id "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("IN-GROUP DELETION CONFIRMATION").": $group_id\n"; echo "

"._QXZ("Click here to delete in-group")." $group_id


\n"; } $ADD='3111'; # go to in-group modification below } ###################### # ADD=5311 confirmation before deletion of did ###################### if ($ADD==5311) { echo ""; if ( (strlen($did_id) < 1) or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("DID NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
did_id "._QXZ("must be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("DID DELETION CONFIRMATION").": $menu_id\n"; echo "

"._QXZ("Click here to delete DID")." $did_id


\n"; } $ADD='3311'; # go to did modification below } ###################### # ADD=5511 confirmation before deletion of call menu ###################### if ($ADD==5511) { echo ""; if ( (strlen($menu_id) < 2) or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("CALL MENU NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
menu_id "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CALL MENU DELETION CONFIRMATION").": $menu_id\n"; echo "

"._QXZ("Click here to delete CALL MENU")." $menu_id


\n"; } $ADD='3511'; # go to call menu modification below } ###################### # ADD=5711 confirmation before deletion of filter phone group ###################### if ($ADD==5711) { echo ""; if ( (strlen($filter_phone_group_id) < 2) or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("FILTER PHONE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
filter_phone_group_id "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("FILTER PHONE GROUP DELETION CONFIRMATION").": $filter_phone_group_id\n"; echo "

"._QXZ("Click here to delete FILTER PHONE GROUP")." $filter_phone_group_id


\n"; } $ADD='3711'; # go to filter phone group modification below } ###################### # ADD=51111 confirmation before deletion of remote agent record ###################### if ($ADD==51111) { echo ""; if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) { echo "
"._QXZ("REMOTE AGENT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Remote_agent_id "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("REMOTE AGENT DELETION CONFIRMATION").": $remote_agent_id\n"; echo "

"._QXZ("Click here to delete remote agent")." $remote_agent_id


\n"; } $ADD='31111'; # go to remote agent modification below } ###################### # ADD=52111 confirmation before deletion of extension group record ###################### if ($ADD==52111) { echo ""; if ( (strlen($extension_id) < 1) or ($LOGdelete_remote_agents < 1) ) { echo "
"._QXZ("EXTENSION GROUP ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
extension_id "._QXZ("must be at least 1 characters in length")."\n"; } else { echo "
"._QXZ("EXTENSION GROUP ENTRY DELETION CONFIRMATION").": $extension_id\n"; echo "

"._QXZ("Click here to delete extension group entry")." $extension_id


\n"; } $ADD='32111'; # go to extension group modification below } ###################### # ADD=511111 confirmation before deletion of user group record ###################### if ($ADD==511111) { echo ""; if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) { echo "
"._QXZ("USER GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
User_group "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("USER GROUP DELETION CONFIRMATION").": $user_group\n"; echo "

"._QXZ("Click here to delete user group")." $user_group


\n"; } $ADD='311111'; # go to user group modification below } ###################### # ADD=5111111 confirmation before deletion of script record ###################### if ($ADD==5111111) { echo ""; if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) { echo "
"._QXZ("SCRIPT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Script_id "._QXZ("must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("SCRIPT DELETION CONFIRMATION").": $script_id\n"; echo "

"._QXZ("Click here to delete script")." $script_id


\n"; } $ADD='3111111'; # go to script modification below } ###################### # ADD=51111111 confirmation before deletion of filter record ###################### if ($ADD==51111111) { echo ""; if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) { echo "
"._QXZ("FILTER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Filter ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("FILTER DELETION CONFIRMATION").": $lead_filter_id\n"; echo "

"._QXZ("Click here to delete filter")." $lead_filter_id


\n"; } $ADD='31111111'; # go to filter modification below } ###################### # ADD=511111111 confirmation before deletion of call time record ###################### if ($ADD==511111111) { echo ""; if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("CALL TIME NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CALL TIME DELETION CONFIRMATION").": $call_time_id\n"; echo "

"._QXZ("Click here to delete call time")." $call_time_id


\n"; } $ADD='311111111'; # go to call time modification below } ###################### # ADD=5111111111 confirmation before deletion of state call time record ###################### if ($ADD==5111111111) { echo ""; if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("STATE CALL TIME NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("STATE CALL TIME DELETION CONFIRMATION").": $call_time_id\n"; echo "

"._QXZ("Click here to delete state call time")." $call_time_id


\n"; } $ADD='3111111111'; # go to state call time modification below } ###################### # ADD=5211111111 confirmation before deletion of holiday record ###################### if ($ADD==5211111111) { echo ""; if ( (strlen($holiday_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("HOLIDAY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Holiday ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("HOLIDAY DELETION CONFIRMATION").": $holiday_id\n"; echo "

"._QXZ("Click here to delete holiday")." $holiday_id


\n"; } $ADD='3211111111'; # go to holiday modification below } ###################### # ADD=531111111 confirmation before deletion of shift record ###################### if ($ADD==531111111) { echo ""; if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("SHIFT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Shift ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("SHIFT DELETION CONFIRMATION").": $shift_id\n"; echo "

"._QXZ("Click here to delete shift")." $shift_id


\n"; } $ADD='331111111'; # go to call time modification below } ###################### # ADD=51111111111 confirmation before deletion of phone record ###################### if ($ADD==51111111111) { echo ""; if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("PHONE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Extension be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("PHONE DELETION CONFIRMATION").": $extension - $server_ip\n"; echo "

"._QXZ("Click here to delete phone")." $extension - $server_ip


\n"; } $ADD='31111111111'; # go to phone modification below } ###################### # ADD=52111111111 confirmation before deletion of phone alias record ###################### if ($ADD==52111111111) { echo ""; if ( (strlen($alias_id) < 1) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("PHONE ALIAS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Alias ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("PHONE ALIAS DELETION CONFIRMATION").": $alias_id\n"; echo "

"._QXZ("Click here to delete phone alias")." $alias_id


\n"; } $ADD='32111111111'; # go to phone alias modification below } ###################### # ADD=53111111111 confirmation before deletion of group alias record ###################### if ($ADD==53111111111) { echo ""; if ( (strlen($group_alias_id) < 1) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("GROUP ALIAS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group Alias ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("GROUP ALIAS DELETION CONFIRMATION").": $group_alias_id\n"; echo "

"._QXZ("Click here to delete group alias")." $group_alias_id


\n"; } $ADD='33111111111'; # go to group alias modification below } ###################### # ADD=511111111111 confirmation before deletion of server record ###################### if ($ADD==511111111111) { echo ""; if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("SERVER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Server ID be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("SERVER DELETION CONFIRMATION").": $server_id - $server_ip\n"; echo "

"._QXZ("Click here to delete server")." $server_id - $server_ip


\n"; } $ADD='311111111111'; # go to server modification below } ###################### # ADD=521111111111 confirmation before clearing agent conferences ###################### if ($ADD==521111111111) { echo ""; if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("AGENT CONFERENCES NOT CLEARED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Server ID be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("AGENT CONFERENCES CLEARING CONFIRMATION").": $server_id - $server_ip\n"; echo "

"._QXZ("Click here to clear agent conferences")." $server_id - $server_ip


\n"; } $ADD='311111111111'; # go to server modification below } ###################### # ADD=531111111111 confirmation before deletion of conf template record ###################### if ($ADD==531111111111) { echo ""; if (strlen($template_id) < 2) { echo "
"._QXZ("CONF TEMPLATE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Template ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CONF TEMPLATE DELETION CONFIRMATION").": $template_id - $template_name\n"; echo "

"._QXZ("Click here to delete conf template")." $template_id - $template_name


\n"; } $ADD='331111111111'; # go to conf template modification below } ###################### # ADD=541111111111 confirmation before deletion of carrier record ###################### if ($ADD==541111111111) { echo ""; if (strlen($carrier_id) < 2) { echo "
"._QXZ("CARRIER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Carrier ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CARRIER DELETION CONFIRMATION").": $carrier_id - $carrier_name\n"; echo "

"._QXZ("Click here to delete carrier")." $carrier_id - $carrier_name


\n"; } $ADD='341111111111'; # go to carrier modification below } ###################### # ADD=551111111111 confirmation before deletion of tts record ###################### if ($ADD==551111111111) { echo ""; if (strlen($tts_id) < 2) { echo "
"._QXZ("TTS ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("TTS ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("TTS ENTRY DELETION CONFIRMATION").": $tts_id - $tts_name\n"; echo "

"._QXZ("Click here to delete tts entry")." $tts_id - $tts_name


\n"; } $ADD='351111111111'; # go to tts entry modification below } ###################### # ADD=561111111111 confirmation before deletion of music on hold record ###################### if ($ADD==561111111111) { echo ""; if (strlen($moh_id) < 2) { echo "
"._QXZ("MUSIC ON HOLD ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("MOH ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("MUSIC ON HOLD ENTRY DELETION CONFIRMATION").": $moh_id - $moh_name\n"; echo "

"._QXZ("Click here to delete music on hold entry")." $moh_id - $moh_name


\n"; } $ADD='361111111111'; # go to music on hold entry modification below } ###################### # ADD=571111111111 confirmation before deletion of voicemail record ###################### if ($ADD==571111111111) { echo ""; if (strlen($voicemail_id) < 2) { echo "
"._QXZ("VOICEMAIL BOX NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Voicemail ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("VOICEMAIL BOX DELETION CONFIRMATION").": $voicemail_id - $fullname\n"; echo "

"._QXZ("Click here to delete voicemail box")." $voicemail_id - $fullname


\n"; } $ADD='371111111111'; # go to voicemail entry modification below } ###################### # ADD=581111111111 confirmation before deletion of screen label record ###################### if ($ADD==581111111111) { echo ""; if (strlen($label_id) < 2) { echo "
"._QXZ("SCREEN LABEL NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Label ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("SCREEN LABEL DELETION CONFIRMATION").": $label_id - $label_name\n"; echo "

"._QXZ("Click here to delete screen label")." $label_id - $label_name


\n"; } $ADD='381111111111'; # go to screen label entry modification below } ###################### # ADD=582111111111 confirmation before deletion of screen colors record ###################### if ($ADD==582111111111) { echo ""; if (strlen($colors_id) < 2) { echo "
"._QXZ("SCREEN COLROS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Colors ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("SCREEN COLORS DELETION CONFIRMATION").": $colors_id - $colors_name\n"; echo "

"._QXZ("Click here to delete screen colors")." $colors_id - $colors_name


\n"; } $ADD='382111111111'; # go to screen colors entry modification below } ###################### # ADD=591111111111 confirmation before deletion of contact record ###################### if ($ADD==591111111111) { echo ""; if (strlen($contact_id) < 1) { echo "
"._QXZ("CONTACT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Contact ID must be at least 1 character in length")."\n"; } else { echo "
"._QXZ("CONTACT DELETION CONFIRMATION").": $contact_id - $first_name - $last_name\n"; echo "

"._QXZ("Click here to delete contact")." $contact_id - $first_name - $last_name


\n"; } $ADD='391111111111'; # go to contact entry modification below } ###################### # ADD=592111111111 confirmation before deletion of settings container record ###################### if ($ADD==592111111111) { echo ""; if ( ($LOGmodify_servers==1) or ($LOGmodify_settings_containers==1) ) { if (strlen($container_id) < 2) { echo "
"._QXZ("SETTINGS CONTAINER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Container ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("SETTINGS CONTAINER DELETION CONFIRMATION").": $container_id - $container_notes\n"; echo "

"._QXZ("Click here to delete settings container")." $container_id - $container_notes


\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD='392111111111'; # go to settings container entry modification below } ###################### # ADD=593111111111 confirmation before deletion of status group record ###################### if ($ADD==593111111111) { echo ""; if (strlen($status_group_id) < 2) { echo "
"._QXZ("STATUS GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Status Group ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("STATUS GROUP DELETION CONFIRMATION").": $status_group_id\n"; echo "

"._QXZ("Click here to delete status group")." $status_group_id


\n"; } $ADD='393111111111'; # go to status groups entry modification below } ###################### # ADD=594111111111 confirmation before deletion of automated report record ###################### if ($ADD==594111111111) { echo ""; if (strlen($report_id) < 2) { echo "
"._QXZ("AUTOMATED REPORT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Report ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("AUTOMATED REPORT DELETION CONFIRMATION").": $report_id - $report_name\n"; echo "

"._QXZ("Click here to delete automated report")." $report_id - $report_name


\n"; } $ADD='394111111111'; # go to automated report entry modification below } ###################### # ADD=595111111111 confirmation before deletion of IP List record ###################### if ($ADD==595111111111) { echo ""; if (strlen($ip_list_id) < 2) { echo "
"._QXZ("IP LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("IP LIST ID must be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("IP LIST DELETION CONFIRMATION").": $ip_list_id - $ip_list_name\n"; echo "

"._QXZ("Click here to delete IP List")." $ip_list_id - $ip_list_name


\n"; } $ADD='395111111111'; # go to IP LIST entry modification below } ###################### # ADD=596111111111 confirmation before deletion of CID group record ###################### if ($ADD==596111111111) { echo ""; if (strlen($cid_group_id) < 2) { echo "
"._QXZ("CID GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("CID Group ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("CID GROUP DELETION CONFIRMATION").": $cid_group_id\n"; echo "

"._QXZ("Click here to delete CID group")." $cid_group_id


\n"; } $ADD='396111111111'; # go to CID Group entry modification below } ###################### # ADD=597111111111 confirmation before deletion of VM Message group record ###################### if ($ADD==597111111111) { echo ""; if (strlen($leave_vm_message_group_id) < 2) { echo "
"._QXZ("VM MESSAGE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("VM Message Group ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("VM MESSAGE GROUP DELETION CONFIRMATION").": $leave_vm_message_group_id\n"; echo "

"._QXZ("Click here to delete VM Message group")." $leave_vm_message_group_id


\n"; } $ADD='397111111111'; # go to VM Message Group entry modification below } ###################### # ADD=598111111111 confirmation before deletion of Queue Group record ###################### if ($ADD==598111111111) { echo ""; if (strlen($queue_group) < 2) { echo "
"._QXZ("QUEUE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("QUEUE Group ID be at least 2 characters in length")."\n"; } else { echo "
"._QXZ("QUEUE GROUP DELETION CONFIRMATION").": $queue_group\n"; echo "

"._QXZ("Click here to delete Queue Group")." $queue_group


\n"; } $ADD='398111111111'; # go to Queue Group entry modification below } ###################### # ADD=5111111111111 confirmation before deletion of conference record ###################### if ($ADD==5111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("CONFERENCE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Conference must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("CONFERENCE DELETION CONFIRMATION").": $conf_exten - $server_ip\n"; echo "

"._QXZ("Click here to delete phone")." $conf_exten - $server_ip


\n"; } $ADD='3111111111111'; # go to conference modification below } ###################### # ADD=51111111111111 confirmation before deletion of vicidial conference record ###################### if ($ADD==51111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("AGENT CONFERENCE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Conference must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("AGENT CONFERENCE DELETION CONFIRMATION").": $conf_exten - $server_ip\n"; echo "

"._QXZ("Click here to delete Conference")." $conf_exten - $server_ip


\n"; } $ADD='31111111111111'; # go to vicidial conference modification below } ###################### # ADD=52111111111111 confirmation before deletion of vicidial confbridge record ###################### if ($ADD==52111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("AGENT CONFBRIDGE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("ConfBridge must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP be at least 7 characters in length")."\n"; } else { echo "
"._QXZ("AGENT CONFBRIDGE DELETION CONFIRMATION").": $conf_exten - $server_ip\n"; echo "

"._QXZ("Click here to delete ConfBridge")." $conf_exten - $server_ip


\n"; } $ADD='32111111111111'; # go to vicidial confbridge modification below } ###################################################################################################### ###################################################################################################### ####### 6 series, delete records ###################################################################################################### ###################################################################################################### ###################### # ADD=6 delete user record ###################### if ($ADD==6) { echo ""; if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) { echo "
"._QXZ("USER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("User be at least 2 characters in length")."\n"; } else { if ( ($LOGmodify_same_user_level < 1) and ($user=='$PHP_AUTH_USER') ) { echo _QXZ("You are not allowed to edit your own user")."\n"; exit; } else { $stmt="SELECT count(*) from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("USER NOT FOUND").": $user\n";} else { $stmtA="DELETE from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="DELETE from vicidial_campaign_agents where user='$user';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC="DELETE from vicidial_inbound_group_agents where user='$user';"; $rslt=mysql_to_mysqli($stmtC, $link); $stmtD="UPDATE vicidial_remote_agents SET status='INACTIVE' where user_start='$user';"; $rslt=mysql_to_mysqli($stmtD, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|"; $SQL_log = preg_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='USERS', event_type='DELETE', record_id='$user', event_code='ADMIN DELETE USER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("USER DELETION COMPLETED").": $user\n"; echo "

\n"; } } } $ADD='0'; # go to user list } ###################### # ADD=61 delete campaign record ###################### if ($ADD==61) { echo ""; if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) { echo "
"._QXZ("CAMPAIGN NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Campaign_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { $stmtA="DELETE from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL limit 1;"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="DELETE from vicidial_campaign_agents where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); $stmtC="DELETE from vicidial_live_agents where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); $stmtD="DELETE from vicidial_campaign_statuses where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="DELETE from vicidial_campaign_hotkeys where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); $stmtF="INSERT INTO vicidial_callbacks_archive SELECT * from vicidial_callbacks where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtF, $link); $affected_rowsF = mysqli_affected_rows($link); $stmtG="DELETE from vicidial_callbacks where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtG, $link); $affected_rowsG = mysqli_affected_rows($link); $stmtH="DELETE from vicidial_campaign_stats where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtH, $link); $affected_rowsH = mysqli_affected_rows($link); $stmtI="DELETE from vicidial_campaign_stats_debug where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtI, $link); $affected_rowsI = mysqli_affected_rows($link); $stmtJ="DELETE from vicidial_lead_recycle where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtJ, $link); $affected_rowsJ = mysqli_affected_rows($link); $stmtK="DELETE from vicidial_campaign_server_stats where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtK, $link); $affected_rowsK = mysqli_affected_rows($link); $stmtL="DELETE from vicidial_server_trunks where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtL, $link); $affected_rowsL = mysqli_affected_rows($link); $stmtM="DELETE from vicidial_pause_codes where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtM, $link); $affected_rowsM = mysqli_affected_rows($link); $stmtN="DELETE from vicidial_campaigns_list_mix where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtN, $link); $affected_rowsN = mysqli_affected_rows($link); $stmtO="DELETE from vicidial_xfer_presets where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtO, $link); $affected_rowsO = mysqli_affected_rows($link); $stmtP="DELETE from vicidial_xfer_stats where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtP, $link); $affected_rowsP = mysqli_affected_rows($link); $stmtQ="DELETE from vicidial_campaign_cid_areacodes where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtQ, $link); $affected_rowsQ = mysqli_affected_rows($link); $stmtR="DELETE from vicidial_url_multi where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtR, $link); $affected_rowsR = mysqli_affected_rows($link); echo "
"._QXZ("REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER")." ($campaign_id)\n"; $stmtS="DELETE from vicidial_hopper where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtS, $link); $affected_rowsS = mysqli_affected_rows($link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|$stmtF|$stmtG|$stmtH|$stmtI|$stmtJ|$stmtK|$stmtL|$stmtM|$stmtN|$stmtO|$stmtP|$stmtQ|$stmtR|$stmtS|"; $SQL_log = preg_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='CAMPAIGNS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN', event_sql=\"$SQL_log\", event_notes='$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE|$affected_rowsF|$affected_rowsG|$affected_rowsH|$affected_rowsI|$affected_rowsJ|$affected_rowsK|$affected_rowsL|$affected_rowsM|$affected_rowsN|$affected_rowsO|$affected_rowsP|$affected_rowsQ|$affected_rowsR|$affected_rowsS';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CAMPAIGN DELETION COMPLETED").": $campaign_id\n"; echo "

\n"; } } $ADD='10'; # go to campaigns list } ###################### # ADD=62 Logout all agents from a campaign ###################### if ($ADD==62) { if ($LOGmodify_campaigns==1) { echo ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered")."\n"; echo "
Campaign_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmtLOG=''; $usersLOG=''; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { $now_date_epoch = date('U'); $inactive_epoch = ($now_date_epoch - 60); $stmt = "SELECT user,campaign_id,UNIX_TIMESTAMP(last_update_time),extension,status,conf_exten,server_ip from vicidial_live_agents where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "
$stmt\n";} $vla_ct = mysqli_num_rows($rslt); $k=0; while ($vla_ct > $k) { $row=mysqli_fetch_row($rslt); $VLA_user[$k] = $row[0]; $VLA_campaign_id[$k] = $row[1]; $VLA_update_time[$k] = $row[2]; $VLA_extension[$k] = $row[3]; $VLA_status[$k] = $row[4]; $VLA_conf_exten[$k] = $row[5]; $VLA_server_ip[$k] = $row[6]; $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_to_mysqli($stmt, $link); if ($DB) {echo "
$stmt\n";} $val_ct = mysqli_num_rows($rslt); if ($val_ct > 0) { $row=mysqli_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
"._QXZ("VAL VALUES").": $VAL_agent_log_id|$VAL_status|$VAL_lead_id\n";} if ( ($VAL_wait_epoch < 1) or ( ($VAL_status == 'PAUSE') and ($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', pause_type='ADMIN' where agent_log_id='$VAL_agent_log_id';"; $stmtLOG .= "$stmt|"; } 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';"; $stmtLOG .= "$stmt|"; } 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 "
$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmtLOG .= "$stmt|"; } 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';"; $stmtLOG .= "$stmt|"; } 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';"; $stmtLOG .= "$stmt|"; } } } } if ($DB) {echo "
$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); } } $stmt="DELETE from vicidial_live_agents where user='$VLA_user[$k]';"; if ($DB) {echo "
$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmtLOG .= "$stmt|"; if (strlen($VAL_user_group) < 1) { $stmt = "SELECT user_group FROM vicidial_users where user='$VLA_user[$k]' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "
$stmt\n";} $val_ct = mysqli_num_rows($rslt); if ($val_ct > 0) { $row=mysqli_fetch_row($rslt); $VAL_user_group = $row[0]; } } $local_DEF = 'Local/5555'; $local_AMP = '@'; $ext_context = 'default'; $kick_local_channel = "$local_DEF$VLA_conf_exten[$k]$local_AMP$ext_context"; $queryCID = "ULGH3457$StarTtimE"; $stmtC="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$VLA_server_ip[$k]','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; if ($DB) {echo "
$stmtC\n";} $rslt=mysql_to_mysqli($stmtC, $link); $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group,extension) values('$VLA_user[$k]','LOGOUT','$VLA_campaign_id[$k]','$SQLdate','$now_date_epoch','$VAL_user_group','MGR LOGOUT: $PHP_AUTH_USER');"; if ($DB) {echo "
$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $stmtLOG .= "$stmt|"; $usersLOG .= "$VLA_user[$k]|"; ############################################# ##### START QUEUEMETRICS LOGGING LOOKUP ##### $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_loginout,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,queuemetrics_pe_phone_append,queuemetrics_pause_type,queuemetrics_pausereason FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "
$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); if ($qm_conf_ct > 0) { $row=mysqli_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]; $queuemetrics_loginout = $row[6]; $queuemetrics_addmember_enabled = $row[7]; $queuemetrics_dispo_pause = $row[8]; $queuemetrics_pe_phone_append = $row[9]; $queuemetrics_pause_type = $row[10]; $queuemetrics_pausereason = $row[11]; } ##### END QUEUEMETRICS LOGGING LOOKUP ##### ########################################### if ($enable_queuemetrics_logging > 0) { $QM_LOGOFF = 'AGENTLOGOFF'; if ($queuemetrics_loginout=='CALLBACK') {$QM_LOGOFF = 'AGENTCALLBACKLOGOFF';} $linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass","$queuemetrics_dbname"); if (!$linkB) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } $agents='@agents'; $agent_logged_in=''; $time_logged_in='0'; $stmtB = "SELECT agent,time_id,data1 FROM queue_log where agent='Agent/$VLA_user[$k]' and verb IN('AGENTLOGIN','AGENTCALLBACKLOGIN') and time_id > $check_time order by time_id desc limit 1;"; $rsltB=mysql_to_mysqli($stmtB, $linkB); if ($DB) {echo "
$stmtB\n";} $qml_ct = mysqli_num_rows($rsltB); if ($qml_ct > 0) { $row=mysqli_fetch_row($rsltB); $agent_logged_in = $row[0]; $time_logged_in = $row[1]; $RAWtime_logged_in = $row[1]; $phone_logged_in = $row[2]; } $time_logged_in = ($now_date_epoch - $time_logged_in); if ($time_logged_in > 1000000) {$time_logged_in=1;} if ($queuemetrics_loginout == 'NONE') { $pause_typeSQL=''; if ($queuemetrics_pause_type > 0) {$pause_typeSQL=",data5='ADMIN'";} $stmt = "INSERT INTO queue_log SET `partition`='P01',time_id='$now_date_epoch',call_id='NONE',queue='NONE',agent='Agent/$VLA_user[$k]',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='LOGOFF'$pause_typeSQL;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $linkB); $affected_rows = mysqli_affected_rows($linkB); } if ($queuemetrics_addmember_enabled > 0) { $queuemetrics_phone_environment=''; $stmt = "SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$VLA_campaign_id[$k]' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "
$stmt\n";} $cqpe_ct = mysqli_num_rows($rslt); if ($cqpe_ct > 0) { $row=mysqli_fetch_row($rslt); $queuemetrics_phone_environment = $row[0]; } if ( ($time_logged_in < 1) or ($queuemetrics_loginout == 'NONE') ) { $stmtB = "SELECT agent,time_id,data3 FROM queue_log where agent='Agent/$VLA_user[$k]' and verb='PAUSEREASON' and data1='LOGIN' order by time_id desc limit 1;"; $rsltB=mysql_to_mysqli($stmtB, $linkB); if ($DB) {echo "
$stmtB\n";} $qml_ct = mysqli_num_rows($rsltB); if ($qml_ct > 0) { $row=mysqli_fetch_row($rsltB); $agent_logged_in = $row[0]; $time_logged_in = $row[1]; $RAWtime_logged_in = $row[1]; $phone_logged_in = $row[2]; } $time_logged_in = ($now_date_epoch - $time_logged_in); if ($time_logged_in > 1000000) {$time_logged_in=1;} } $stmt = "SELECT distinct queue FROM queue_log where time_id >= $RAWtime_logged_in and agent='$agent_logged_in' and verb IN('ADDMEMBER','ADDMEMBER2') and queue != '$VLA_campaign_id[$k]' order by time_id desc;"; $rslt=mysql_to_mysqli($stmt, $linkB); if ($DB) {echo "$stmt\n";} $amq_conf_ct = mysqli_num_rows($rslt); $i=0; while ($i < $amq_conf_ct) { $row=mysqli_fetch_row($rslt); $AMqueue[$i] = $row[0]; $i++; } ### add the logged-in campaign as well $AMqueue[$i] = $VLA_campaign_id[$k]; $i++; $amq_conf_ct++; $i=0; while ($i < $amq_conf_ct) { $pe_append=''; if ( ($queuemetrics_pe_phone_append > 0) and (strlen($queuemetrics_phone_environment)>0) ) { $qm_extension = explode('/',$phone_logged_in); $pe_append = "-$qm_extension[1]"; } $stmt = "INSERT INTO queue_log SET `partition`='P01',time_id='$now_date_epoch',call_id='NONE',queue='$AMqueue[$i]',agent='$agent_logged_in',verb='REMOVEMEMBER',data1='$phone_logged_in',serverid='$queuemetrics_log_id',data4='$queuemetrics_phone_environment$pe_append';"; $rslt=mysql_to_mysqli($stmt, $linkB); $affected_rows = mysqli_affected_rows($linkB); $i++; } } if ($queuemetrics_loginout != 'NONE') { $stmtB = "INSERT INTO queue_log SET `partition`='P01',time_id='$now_date_epoch',call_id='NONE',queue='NONE',agent='$agent_logged_in',verb='$QM_LOGOFF',serverid='$queuemetrics_log_id',data1='$phone_logged_in',data2='$time_logged_in';"; if ($DB) {echo "
$stmtB\n";} $rsltB=mysql_to_mysqli($stmtB, $linkB); } } echo "\n"; $k++; } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtLOG"; $SQL_log = preg_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='CAMPAIGNS', event_type='LOGOUT', record_id='$campaign_id', event_code='ADMIN LOGOUT CAMPAIGN AGENTS', event_sql=\"$SQL_log\", event_notes='Users logged out: $usersLOG';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("AGENT LOGOUT COMPLETED").": $campaign_id\n"; echo "

\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD='31'; # go to campaign modification below } ###################### # ADD=63 Emergency VDAC Jam Clear ###################### if ($ADD==63) { if ($LOGmodify_campaigns==1) { if (preg_match('/IN/i', $stage)) {$group_id=$campaign_id;} echo ""; if (strlen($campaign_id) < 2) { echo "
"._QXZ("VDAC NOT CLEARED FOR CAMPAIGN - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Campaign_id be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { $stmt="DELETE from vicidial_auto_calls where status='LIVE' and campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by call_time limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGNS', event_type='RESET', record_id='$campaign_id', event_code='ADMIN RESET CAMPAIGN JAM', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LAST VDAC RECORD CLEARED FOR CAMPAIGN").": $campaign_id\n"; echo "

\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } # go to campaign modification below if (preg_match('/IN/i', $stage)) {$ADD='3111';} else {$ADD='31';} } ###################### # ADD=65 delete campaign lead recycle in the system ###################### if ($ADD==65) { if ($LOGmodify_campaigns==1) { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("CAMPAIGN LEAD RECYCLE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; echo "
"._QXZ("attempt delay must be at least 120 seconds")."\n"; echo "
"._QXZ("maximum attempts must be from 1 to 10")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { echo "
"._QXZ("CAMPAIGN LEAD RECYCLE DELETED").": $campaign_id - $status - $attempt_delay\n"; $stmt="DELETE FROM vicidial_lead_recycle where campaign_id='$campaign_id' and status='$status' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_RECYCLE', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("AUTO ALT DIAL STATUS NOT DELETED - this auto alt dial status is not in this campaign")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("AUTO ALT DIAL STATUS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { echo "
"._QXZ("AUTO ALT DIAL STATUS DELETED").": $campaign_id - $status\n"; $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $auto_alt_dial_statuses = preg_replace("/\s$status\s/i", " ",$row[0]); $stmtB="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses',campaign_changedate='$SQLdate' where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_ALTDIALS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN ALT DIAL', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) { echo "
"._QXZ("CAMPAIGN PAUSE CODE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("pause code must be between 1 and 6 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN PAUSE CODE NOT FOUND").": $campaign_id - $pause_code\n";} else { echo "
"._QXZ("CAMPAIGN PAUSE CODE DELETED").": $campaign_id - $pause_code\n"; $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PAUSECODES', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN PAUSE CODE', event_sql=\"$SQL_log\", event_notes='Status: $pause_code';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\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 ""; $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN DIAL STATUS NOT REMOVED - this dial status is not selected for this campaign")."\n";} else { if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("CAMPAIGN DIAL STATUS NOT REMOVED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN NOT FOUND").": $campaign_id\n";} else { echo "
"._QXZ("CAMPAIGN DIAL STATUS REMOVED").": $campaign_id - $status\n"; $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $dial_statuses = preg_replace("/\s$status\s/i", " ",$row[0]); $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses',campaign_changedate='$SQLdate' where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CAMPAIGN_DIALSTATUSES', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN DIAL STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } #$SUB=28; $ADD=31; # go to campaign modification form below } ###################### # ADD=601 delete preset in the system ###################### if ($ADD==601) { if ($LOGmodify_campaigns==1) { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($preset_name) < 1) ) { echo "
"._QXZ("CAMPAIGN PRESET NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("preset name must be between 1 and 40 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_xfer_presets where campaign_id='$campaign_id' and preset_name='$preset_name' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CAMPAIGN PRESET NOT FOUND").": $campaign_id - $preset_name\n";} else { echo "
"._QXZ("CAMPAIGN PRESET DELETED").": $campaign_id - $preset_name\n"; $stmt="DELETE FROM vicidial_xfer_presets where campaign_id='$campaign_id' and preset_name='$preset_name' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE FROM vicidial_xfer_stats where campaign_id='$campaign_id' and preset_name='$preset_name' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="UPDATE vicidial_campaigns set campaign_changedate='$SQLdate' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='CAMPAIGN_PRESETS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN PRESET', event_sql=\"$SQL_log\", event_notes='Preset: $preset_name';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $SUB=201; $ADD=31; # go to campaign modification form below } ###################### # ADD=611 delete list record and all leads within it ###################### if ($ADD==611) { echo ""; if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) { echo "
"._QXZ("LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
List_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("LIST NOT FOUND").": $list_id\n";} else { $stmt="DELETE from vicidial_lists where list_id='$list_id' $LOGallowed_campaignsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER")." ($list_id)\n"; $stmtA="DELETE from vicidial_hopper where list_id='$list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmtA, $link); echo "
"._QXZ("REMOVING LIST LEADS FROM LIST TABLE")."\n"; $stmtB="DELETE from vicidial_list where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='LISTS', 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_to_mysqli($stmt, $link); echo "
"._QXZ("LIST DELETION COMPLETED").": $list_id\n"; echo "

\n"; } } $ADD='100'; # go to lists list } ###################### # ADD=612 clear list record and all leads within it ###################### if ($ADD==612) { echo ""; if ( ( strlen($list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGuser_level < 9) or ($LOGdelete_lists < 1) or ($LOGmodify_lists < 1) or ($LOGmodify_leads < 1) ) { echo "
"._QXZ("LIST NOT Cleared - Please go back and look at the data you entered")."\n"; echo "
List_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("LIST NOT FOUND").": $list_id\n";} else { echo "
"._QXZ("REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER")." ($list_id)\n"; $stmt="DELETE from vicidial_hopper where list_id='$list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rowsH = mysqli_affected_rows($link); echo ": $affected_rowsH "._QXZ("records")."\n"; # If custom fields are enabled, go through each lead looking for custom data to delete before deleting all standard lead data in this list $custom_records_deleted=0; if ($SScustom_fields_enabled > 0) { echo "
"._QXZ("REMOVING LEADS CUSTOM FIELDS RECORDS")."\n"; $cld_lead_id=array(); $cld_entry_list_id=array(); $stmt="SELECT lead_id,entry_list_id from vicidial_list where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $cld_to_print = mysqli_num_rows($rslt); $o=0; while ($cld_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cld_lead_id[$o] = $rowx[0]; $cld_entry_list_id[$o] = $rowx[1]; $cld_entry_list_id[$o] = preg_replace('/[^0-9]/','',$cld_entry_list_id[$o]); $o++; } $o=0; while ($cld_to_print > $o) { if (strlen($cld_entry_list_id[$o]) > 0) { $stmtC="SHOW TABLES LIKE \"custom_$cld_entry_list_id[$o]\";"; if ($DB>0) {echo "$stmt";} $rsltC=mysql_to_mysqli($stmtC, $link); $tablecount_to_print = mysqli_num_rows($rsltC); if ($tablecount_to_print > 0) { $stmtC="DELETE from custom_$cld_entry_list_id[$o] where lead_id='$cld_lead_id[$o]';"; $rsltC=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); $custom_records_deleted = ($custom_records_deleted + $affected_rowsC); } } $o++; } echo ": $custom_records_deleted "._QXZ("records")."\n"; } echo "
"._QXZ("REMOVING LEADS FROM LIST TABLE")."\n"; $stmtA="DELETE from vicidial_list where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); echo ": $affected_rowsA "._QXZ("records")."\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtC|"; $SQL_log = preg_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='LISTS', event_type='CLEAR', record_id='$list_id', event_code='ADMIN CLEARED LIST', event_sql=\"$SQL_log\", event_notes='Leads removed: $affected_rowsA Custom Fields records removed: $custom_records_deleted Hopper records removed: $affected_rowsH';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("LIST CLEARING COMPLETED").": $list_id\n"; echo "

\n"; } } $ADD='311'; # go to list modify page } ###################### # ADD=631 delete drop list record ###################### if ($ADD==631) { echo ""; if ( ( strlen($dl_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_lists < 1) ) { echo "
"._QXZ("DROP LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
dl_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("DROP LIST NOT FOUND").": $dl_id\n";} else { $stmt="DELETE from vicidial_drop_lists where dl_id='$dl_id' $LOGallowed_campaignsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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='DROPLISTS', event_type='DELETE', record_id='$dl_id', event_code='ADMIN DELETE DROP LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("DROP LIST DELETION COMPLETED").": $dl_id\n"; echo "

\n"; } } $ADD='130'; # go to drop lists list } ###################### # ADD=6111 delete in-group record ###################### if ($ADD==6111) { echo ""; if ( (strlen($group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_ingroups < 1) ) { echo "
"._QXZ("IN-GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Group_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$group_id' and group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("IN-GROUP NOT FOUND").": $group_id\n";} else { $stmtA="DELETE from vicidial_inbound_groups where group_id='$group_id' and group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmtA, $link); $affected_rowsA = mysqli_affected_rows($link); $stmtB="DELETE from vicidial_inbound_group_agents where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); $stmtC="DELETE from vicidial_live_inbound_agents where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtC, $link); $affected_rowsC = mysqli_affected_rows($link); $stmtD="DELETE from vicidial_campaign_stats where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rowsD = mysqli_affected_rows($link); $stmtE="DELETE from vicidial_campaign_stats_debug where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); $affected_rowsE = mysqli_affected_rows($link); $stmtF="DELETE from vicidial_url_multi where campaign_id='$group_id';"; $rslt=mysql_to_mysqli($stmtF, $link); $affected_rowsF = mysqli_affected_rows($link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|$stmtF|"; $SQL_log = preg_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='$affected_rowsA|$affected_rowsB|$affected_rowsC|$affected_rowsD|$affected_rowsE|$affected_rowsF';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("IN-GROUP DELETION COMPLETED").": $group_id\n"; echo "

\n"; } } switch($group_handling) { case "EMAIL": $ADD="1800"; break; case "CHAT": $ADD="1900"; break; case "PHONE": $ADD="1000"; break; default: $ADD="1000"; } } ###################### # ADD=6311 delete did record ###################### if ($ADD==6311) { echo ""; if ( (strlen($did_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("DID NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
did_id "._QXZ("must be at least 1 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_inbound_dids where did_id='$did_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("DID NOT FOUND").": $did_id\n";} else { $stmt="DELETE from vicidial_inbound_dids where did_id='$did_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("DID DELETION COMPLETED").": $did_id\n"; echo "

\n"; } } $ADD='1300'; # go to did list } ###################### # ADD=6511 delete call menu record ###################### if ($ADD==6511) { echo ""; if ( (strlen($menu_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("CALL MENU NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
menu_id "._QXZ("must be at least 1 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_call_menu where menu_id='$menu_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CALL MENU NOT FOUND").": $menu_id\n";} else { $stmt="DELETE from vicidial_call_menu where menu_id='$menu_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE from vicidial_call_menu_options where menu_id='$menu_id' limit 17;"; $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("CALL MENU DELETION COMPLETED").": $menu_id\n"; echo "

\n"; } } $ADD='1500'; # go to call menu list } ###################### # ADD=6711 delete filter phone group record ###################### if ($ADD==6711) { echo ""; if ( (strlen($filter_phone_group_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) ) { echo "
"._QXZ("FILTER PHONE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
filter_phone_group_id "._QXZ("must be at least 1 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("FILTER PHONE GROUP NOT FOUND").": $filter_phone_group_id\n";} else { $stmt="DELETE from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE from vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA"; $SQL_log = preg_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='FILTERPHONEGROUPS', event_type='DELETE', record_id='$filter_phone_group_id', event_code='ADMIN DELETE FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER PHONE GROUP DELETION COMPLETED").": $filter_phone_group_id\n"; echo "

\n"; } } $ADD='1700'; # go to filter phone group list } ###################### # ADD=61111 delete remote agent record ###################### if ($ADD==61111) { echo ""; if ( (strlen($remote_agent_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) { echo "
"._QXZ("REMOTE AGENT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Remote_agent_id "._QXZ("must 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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("REMOTE AGENT DELETION COMPLETED").": $remote_agent_id\n"; echo "

\n"; } $ADD='10000'; # go to remote agents list } ###################### # ADD=62111 delete extension group record ###################### if ($ADD==62111) { echo ""; if ( (strlen($extension_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_remote_agents < 1) ) { echo "
"._QXZ("EXTENSION GROUP ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
extension_id "._QXZ("must be at least 1 characters in length")."\n"; } else { $stmt="DELETE from vicidial_extension_groups where extension_id='$extension_id' limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='EXTENGROUP', event_type='DELETE', record_id='$extension_id', event_code='ADMIN DELETE EXTENSION GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("EXTENSION GROUP ENTRY DELETION COMPLETED").": $extension_id\n"; echo "

\n"; } $ADD='12000'; # go to extension group list } ###################### # ADD=611111 delete user group record ###################### if ($ADD==611111) { echo ""; if ( (strlen($user_group) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_user_groups < 1) ) { echo "
"._QXZ("USER GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
User_group "._QXZ("must be at least 2 characters in length")."\n"; } else { if ( ($LOGmodify_same_user_level < 1) and ($user_group=="$LOGuser_group") ) { echo _QXZ("You are not allowed to edit your own user group")."\n"; exit; } else { $stmt="SELECT count(*) from vicidial_user_groups where user_group='$user_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("USER GROUP NOT FOUND").": $user_group\n";} else { $stmt="DELETE from vicidial_user_groups where user_group='$user_group' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 USER GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("USER GROUP DELETION COMPLETED").": $user_group\n"; echo "

\n"; } } } $ADD='100000'; # go to user group list } ###################### # ADD=6111111 delete script record ###################### if ($ADD==6111111) { echo ""; if ( (strlen($script_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_scripts < 1) ) { echo "
"._QXZ("SCRIPT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
Script_id "._QXZ("must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_scripts where script_id='$script_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SCRIPT NOT FOUND").": $script_id\n";} else { $stmt="DELETE from vicidial_scripts where script_id='$script_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("SCRIPT DELETION COMPLETED").": $script_id\n"; echo "

\n"; } } $ADD='1000000'; # go to script list } ###################### # ADD=61111111 delete filter record ###################### if ($ADD==61111111) { echo ""; if ( (strlen($lead_filter_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_filters < 1) ) { echo "
"._QXZ("FILTER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Filter ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_lead_filters where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("LEAD FILTER NOT FOUND").": $lead_filter_id\n";} else { $stmt="DELETE from vicidial_lead_filters where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='FILTERS', event_type='DELETE', record_id='$lead_filter_id', event_code='ADMIN DELETE FILTERS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("FILTER DELETION COMPLETED").": $lead_filter_id\n"; echo "

\n"; } } $ADD='10000000'; # go to filter list } ###################### # ADD=611111111 delete call times record ###################### if ($ADD==611111111) { echo ""; if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("CALL TIME NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_call_times where call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CALL TIME NOT FOUND").": $call_time_id\n";} else { $stmtA="UPDATE vicidial_lists set local_call_time='campaign' where local_call_time='$call_time_id';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="DELETE from vicidial_call_times where call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("CALL TIME DELETION COMPLETED").": $call_time_id\n"; echo "

\n"; } } $ADD='100000000'; # go to call times list } ###################### # ADD=6111111111 delete state call times record ###################### if ($ADD==6111111111) { echo ""; if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("STATE CALL TIME NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Call Time ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_state_call_times where state_call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CALL TIME NOT FOUND").": $call_time_id\n";} else { $stmtA="DELETE from vicidial_state_call_times where state_call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($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_to_mysqli($stmt, $link); $sct_to_print = mysqli_num_rows($rslt); $sct_list=''; $o=0; while ($sct_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $sct_ids[$o] = "$rowx[0]"; $sct_states[$o] = "$rowx[1]"; $o++; } $o=0; while ($sct_to_print > $o) { $sct_states[$o] = preg_replace("/\|$call_time_id\|/i", '|',$sct_states[$o]); $stmtB="UPDATE vicidial_call_times set ct_state_call_times='$sct_states[$o]' where call_time_id='$sct_ids[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); echo "$stmtB\n"; echo "State Rule Removed: $sct_ids[$o]
\n"; $o++; } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("STATE CALL TIME DELETION COMPLETED").": $call_time_id\n"; echo "

\n"; } } $ADD='1000000000'; # go to call times list } ###################### # ADD=6211111111 delete holiday record ###################### if ($ADD==6211111111) { echo ""; if ( (strlen($holiday_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("HOLIDAY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Holiday ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_call_time_holidays where holiday_id='$holiday_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("HOLIDAY NOT FOUND").": $holiday_id\n";} else { $stmtA="DELETE from vicidial_call_time_holidays where holiday_id='$holiday_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT call_time_id,ct_holidays from vicidial_call_times where ct_holidays LIKE \"%|$holiday_id|%\" order by call_time_id;"; $rslt=mysql_to_mysqli($stmt, $link); $hct_to_print = mysqli_num_rows($rslt); $hct_list=''; $o=0; while ($hct_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $hct_ids[$o] = "$rowx[0]"; $hct_holidays[$o] = "$rowx[1]"; $o++; } $o=0; while ($hct_to_print > $o) { $hct_holidays[$o] = preg_replace("/\|$holiday_id\|/i", '|',$hct_holidays[$o]); $stmtB="UPDATE vicidial_call_times set ct_holidays='$hct_holidays[$o]' where call_time_id='$hct_ids[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB) {echo "|$stmtB|\n";} echo "Holiday Rule Removed: $hct_ids[$o]
\n"; $o++; } ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|"; $SQL_log = preg_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='HOLIDAYS', event_type='DELETE', record_id='$holiday_id', event_code='ADMIN DELETE HOLIDAY', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("HOLIDAY DELETION COMPLETED").": $holiday_id\n"; echo "

\n"; } } $ADD='1200000000'; # go to holidays list } ###################### # ADD=631111111 delete shift record ###################### if ($ADD==631111111) { echo ""; if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) ) { echo "
"._QXZ("SHIFT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Shift ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_shifts where shift_id='$shift_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SHIFT NOT FOUND").": $shift_id\n";} else { $stmt="DELETE from vicidial_shifts where shift_id='$shift_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("SHIFT DELETION COMPLETED").": $shift_id\n"; echo "

\n"; } } $ADD='130000000'; # go to shifts list } ###################### # ADD=61111111111 delete phone record ###################### if ($ADD==61111111111) { echo ""; if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("PHONE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Extension must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must be at least 7 characters in length")."\n"; } else { $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("PHONE NOT FOUND").": $extension - $server_ip\n";} else { $stmt="DELETE from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($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_to_mysqli($stmtA, $link); $stmtB="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$SSactive_voicemail_server';"; $rslt=mysql_to_mysqli($stmtB, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("PHONE DELETION COMPLETED").": $extension - $server_ip\n"; echo "

\n"; } } $ADD='10000000000'; # go to phone list } ###################### # ADD=62111111111 delete phone alias record ###################### if ($ADD==62111111111) { echo ""; if ( (strlen($alias_id) < 2) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("PHONE ALIAS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Alias ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from phones_alias where alias_id='$alias_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("PHONE ALIAS NOT FOUND").": $alias_id\n";} else { $stmt="DELETE from phones_alias where alias_id='$alias_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 DELETE PHONE ALIAS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("PHONE ALIAS DELETION COMPLETED").": $alias_id\n"; echo "

\n"; } } $ADD='12000000000'; # go to phone alias list } ###################### # ADD=63111111111 delete group alias record ###################### if ($ADD==63111111111) { echo ""; if ( (strlen($group_alias_id) < 2) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("GROUP ALIAS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Group Alias ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("GROUP ALIAS NOT FOUND").": $group_alias_id\n";} else { $stmt="DELETE from groups_alias where group_alias_id='$group_alias_id' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 DELETE GROUP ALIAS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("GROUP ALIAS DELETION COMPLETED").": $group_alias_id\n"; echo "

\n"; } } $ADD='13000000000'; # go to group alias list } ###################### # ADD=611111111111 delete server record ###################### if ($ADD==611111111111) { echo ""; if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) or ($LOGmodify_servers!=1) ) { echo "
"._QXZ("SERVER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Server ID must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must be at least 7 characters in length")."\n"; } else { $stmt="SELECT count(*) from servers where server_id='$server_id' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SERVER NOT FOUND").": $server_id - $server_ip\n";} else { $stmt="DELETE from servers where server_id='$server_id' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("SERVER DELETION COMPLETED").": $server_id - $server_ip\n"; echo "

\n"; } } $ADD='100000000000'; # go to server list } ###################### # ADD=622111111111 clear agent conferences ###################### if ($ADD==622111111111) { echo ""; if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) or ($LOGmodify_servers!=1) ) { echo "
"._QXZ("AGENT CONFERENCES NOT CLEARED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Server ID must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must be at least 7 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_conferences where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CONFERENCES NOT FOUND").": $server_id - $server_ip\n";} else { $stmt="UPDATE vicidial_conferences SET extension='' where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $VCaffected_rows = mysqli_affected_rows($link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CLEAR', record_id='$server_id', event_code='ADMIN CONF CLEAR', event_sql=\"$SQL_log\", event_notes='$VCaffected_rows entries cleared';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("AGENT CONFERENCES CLEAR COMPLETED").": $server_id - $server_ip\n"; echo "

\n"; } } $ADD=311111111111; # go to server modification form below } ###################### # ADD=621111111111 delete vicidial server trunk record in the system ###################### if ($ADD==621111111111) { if ($LOGmodify_servers==1) { echo ""; if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) { echo "
"._QXZ("SERVER TRUNK RECORD NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("campaign must be between 3 and 8 characters in length")."\n"; echo "
"._QXZ("Server IP must be at least 7 characters")."\n"; } else { $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SERVER TRUNK NOT FOUND").": $campaign_id - $server_ip\n";} else { echo "
"._QXZ("SERVER TRUNK RECORD DELETED").": $campaign_id - $server_ip\n"; $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 SERVER TRUNK', event_sql=\"$SQL_log\", event_notes='Campaign: $campaign_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=311111111111; # go to server modification form below } ###################### # ADD=631111111111 delete conf template record ###################### if ($ADD==631111111111) { echo ""; if ( (strlen($template_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("CONF TEMPLATE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Template ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_conf_templates where template_id='$template_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("TEMPLATE NOT FOUND").": $template_id\n";} else { $stmtA="UPDATE phones SET template_id='' where template_id='$template_id';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="UPDATE vicidial_server_carriers SET template_id='' where template_id='$template_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';"; $rslt=mysql_to_mysqli($stmtC, $link); $stmtD="DELETE from vicidial_conf_templates where template_id='$template_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmtD, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|"; $SQL_log = preg_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 DELETE CONF TEMPLATE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CONF TEMPLATE DELETION COMPLETED").": $server_id - $server_ip\n"; echo "

\n"; } } $ADD='130000000000'; # go to conf template list } ###################### # ADD=641111111111 delete carrier record ###################### if ($ADD==641111111111) { echo ""; if ( (strlen($carrier_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("CARRIER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Carrier ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_server_carriers where carrier_id='$carrier_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CARRIER NOT FOUND").": $carrier_id\n";} else { $stmt="SELECT server_ip from vicidial_server_carriers where carrier_id='$carrier_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $CARRIERserver_ip = $row[0]; $stmt="DELETE from vicidial_server_carriers where carrier_id='$carrier_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$CARRIERserver_ip';"; if ($CARRIERserver_ip == '0.0.0.0') {$stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";} $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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 DELETE CARRIER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CARRIER DELETION COMPLETED").": $carrier_id\n"; echo "

\n"; } } $ADD='140000000000'; # go to carrier list } ###################### # ADD=651111111111 delete tts record ###################### if ($ADD==651111111111) { echo ""; if ( (strlen($tts_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("TTS ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("TTS ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_tts_prompts where tts_id='$tts_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("TTS NOT FOUND").": $tts_id\n";} else { $stmt="DELETE from vicidial_tts_prompts where tts_id='$tts_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("TTS DELETION COMPLETED").": $tts_id\n"; echo "

\n"; } } $ADD='150000000000'; # go to tts entry list } ###################### # ADD=661111111111 delete music on hold record ###################### if ($ADD==661111111111) { echo ""; if ( (strlen($moh_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("MUSIC ON HOLD ENTRY NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("MOH ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_music_on_hold where moh_id='$moh_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("MUSIC ON HOLD NOT FOUND").": $moh_id\n";} else { $stmt="UPDATE vicidial_music_on_hold SET remove='Y' where moh_id='$moh_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="DELETE from vicidial_music_on_hold_files where moh_id='$moh_id';"; $rslt=mysql_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("MUSIC ON HOLD DELETION COMPLETED").": $moh_id\n"; echo "

\n"; } } $ADD='160000000000'; # go to music on hold entry list } ###################### # ADD=671111111111 delete voicemail record ###################### if ($ADD==671111111111) { echo ""; if ( (strlen($voicemail_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("VOICEMAIL BOX NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Voicemail ID be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("VOICEMAIL BOX NOT FOUND").": $voicemail_id\n";} else { $stmt="DELETE from vicidial_voicemail where voicemail_id='$voicemail_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmt="SELECT active_voicemail_server from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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_to_mysqli($stmtA, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("VOICEMAIL BOX DELETION COMPLETED").": $voicemail_id\n"; echo "

\n"; } } $ADD='170000000000'; # go to voicemail entry list } ###################### # ADD=681111111111 delete screen labels record ###################### if ($ADD==681111111111) { echo ""; if ( (strlen($label_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("SCREEN LABEL NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Label ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_screen_labels where label_id='$label_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SCREEN LABEL NOT FOUND").": $label_id\n";} else { $stmt="DELETE from vicidial_screen_labels where label_id='$label_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LABEL', event_type='DELETE', record_id='$label_id', event_code='ADMIN DELETE LABEL', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SCREEN LABEL DELETION COMPLETED").": $label_id\n"; echo "

\n"; } } $ADD='180000000000'; # go to screen labels entry list } ###################### # ADD=682111111111 delete screen colors record ###################### if ($ADD==682111111111) { echo ""; if ( (strlen($colors_id) < 2) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("SCREEN COLORS NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Colors ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_screen_colors where colors_id='$colors_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SCREEN COLORS NOT FOUND").": $colors_id\n";} else { $stmt="DELETE from vicidial_screen_colors where colors_id='$colors_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='COLORS', event_type='DELETE', record_id='$colors_id', event_code='ADMIN DELETE COLORS', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SCREEN COLORS DELETION COMPLETED").": $label_id\n"; echo "

\n"; } } $ADD='182000000000'; # go to screen colors entry list } ###################### # ADD=691111111111 delete contact record ###################### if ($ADD==691111111111) { echo ""; if ( (strlen($contact_id) < 1) or ($CoNfIrM != 'YES') ) { echo "
"._QXZ("CONTACT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Contact ID must be at least 1 character in length")."\n"; } else { if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) { $linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname"); if (!$linkALT) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } } else {$linkALT = $link;} $stmt="DELETE from contact_information where contact_id='$contact_id';"; $rslt=mysql_to_mysqli($stmt, $linkALT); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTACTS', event_type='DELETE', record_id='$contact_id', event_code='ADMIN DELETE CONTACT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CONTACT DELETION COMPLETED").": $contact_id\n"; echo "

\n"; } $ADD='190000000000'; # go to contacts entry list } ###################### # ADD=692111111111 delete settings container record ###################### if ($ADD==692111111111) { echo ""; if ( (strlen($container_id) < 2) or ($CoNfIrM != 'YES') or ( ($LOGmodify_servers!=1) and ($LOGmodify_settings_containers!=1) ) ) { echo "
"._QXZ("SETTINGS CONTAINER NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Container ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_settings_containers where container_id='$container_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("SETTINGS CONTAINER NOT FOUND").": $container_id\n";} else { $stmt="DELETE from vicidial_settings_containers where container_id='$container_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='CONTAINERS', event_type='DELETE', record_id='$container_id', event_code='ADMIN DELETE CONTAINER', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("SETTINGS CONTAINER DELETION COMPLETED").": $container_id\n"; echo "

\n"; } } $ADD='192000000000'; # go to settings container entry list } ###################### # ADD=693111111111 delete status groups record ###################### if ($ADD==693111111111) { echo ""; if ( (strlen($status_group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_statuses!=1) ) { echo "
"._QXZ("STATUS GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Status Group ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_status_groups where status_group_id='$status_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("STATUS GROUP NOT FOUND").": $status_group_id\n";} else { $stmt="DELETE from vicidial_status_groups where status_group_id='$status_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='STATUSGROUPS', event_type='DELETE', record_id='$status_group_id', event_code='ADMIN DELETE STATUS GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("STATUS GROUP DELETION COMPLETED").": $status_group_id\n"; echo "

\n"; } } $ADD='193000000000'; # go to status groups entry list } ###################### # ADD=694111111111 delete automated report record ###################### if ($ADD==694111111111) { echo ""; if ( (strlen($report_id) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_auto_reports!=1) ) { echo "
"._QXZ("AUTOMATED REPORT NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Report ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_automated_reports where report_id='$report_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("AUTOMATED REPORT NOT FOUND").": $report_id\n";} else { $stmt="DELETE from vicidial_automated_reports where report_id='$report_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='AUTOREPORTS', event_type='DELETE', record_id='$report_id', event_code='ADMIN DELETE AUTO REPORT', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("AUTOMATED REPORT DELETION COMPLETED").": $report_id\n"; echo "

\n"; } } $ADD='194000000000'; # go to automated report entry list } ###################### # ADD=695111111111 delete IP List record ###################### if ($ADD==695111111111) { echo ""; if ( (strlen($ip_list_id) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_ip_lists!=1) ) { echo "
"._QXZ("IP LIST NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("IP LIST ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_ip_lists where ip_list_id='$ip_list_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("IP LIST NOT FOUND").": $report_id\n";} else { $stmt="DELETE from vicidial_ip_lists where ip_list_id='$ip_list_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='IPLISTS', event_type='DELETE', record_id='$ip_list_id', event_code='ADMIN DELETE IP LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("IP LIST DELETION COMPLETED").": $ip_list_id\n"; echo "

\n"; } } $ADD='195000000000'; # go to IP List entry list } ###################### # ADD=696111111111 delete CID groups record ###################### if ($ADD==696111111111) { echo ""; if ( (strlen($cid_group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_statuses!=1) ) { echo "
"._QXZ("CID GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("CID Group ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_cid_groups where cid_group_id='$cid_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("CID GROUP NOT FOUND").": $cid_group_id\n";} else { $stmt="DELETE from vicidial_cid_groups where cid_group_id='$cid_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="DELETE from vicidial_campaign_cid_areacodes WHERE campaign_id='$cid_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); if ($DB) {echo "$affected_rowsB|$stmtB|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='CIDGROUPS', event_type='DELETE', record_id='$cid_group_id', event_code='ADMIN DELETE CID GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rowsB CIDS deleted';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("CID GROUP DELETION COMPLETED").": $cid_group_id\n"; echo "

\n"; } } $ADD='196000000000'; # go to CID groups entry list } ###################### # ADD=697111111111 delete VM Message groups record ###################### if ($ADD==697111111111) { echo ""; if ( (strlen($leave_vm_message_group_id) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_statuses!=1) ) { echo "
"._QXZ("VM MESSAGE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("VM Message Group ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from leave_vm_message_groups where leave_vm_message_group_id='$leave_vm_message_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("VM MESSAGE GROUP NOT FOUND").": $leave_vm_message_group_id\n";} else { $stmt="DELETE from leave_vm_message_groups where leave_vm_message_group_id='$leave_vm_message_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtB="DELETE from leave_vm_message_groups_entries WHERE leave_vm_message_group_id='$leave_vm_message_group_id';"; $rslt=mysql_to_mysqli($stmtB, $link); $affected_rowsB = mysqli_affected_rows($link); if ($DB) {echo "$affected_rowsB|$stmtB|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtB|"; $SQL_log = preg_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='VMMGROUPS', event_type='DELETE', record_id='$leave_vm_message_group_id', event_code='ADMIN DELETE VMM GROUP', event_sql=\"$SQL_log\", event_notes='$affected_rowsB VMMS deleted';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("VM MESSAGE GROUP DELETION COMPLETED").": $leave_vm_message_group_id\n"; echo "

\n"; } } $ADD='197000000000'; # go to VM Message groups entry list } ###################### # ADD=698111111111 delete Queue Groups record ###################### if ($ADD==698111111111) { echo ""; if ( (strlen($queue_group) < 2) or ($CoNfIrM != 'YES') or ($LOGmodify_statuses!=1) ) { echo "
"._QXZ("QUEUE GROUP NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Queue Group ID must be at least 2 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("QUEUE GROUP NOT FOUND").": $queue_group\n";} else { $stmt="DELETE from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='QUEUEGROUPS', event_type='DELETE', record_id='$queue_group', event_code='ADMIN DELETE QUEUE GROUP', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("QUEUE GROUP DELETION COMPLETED").": $queue_group\n"; echo "

\n"; } } $ADD='198000000000'; # go to Queue Groups entry list } ###################### # ADD=6111111111111 delete conference record ###################### if ($ADD==6111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("CONFERENCE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Conference must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must 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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("CONFERENCE DELETION COMPLETED").": $conf_exten - $server_ip\n"; echo "

\n"; } $ADD='1000000000000'; # go to conference list } ###################### # ADD=61111111111111 delete vicidial conference record ###################### if ($ADD==61111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("AGENT CONFERENCE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("Conference must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must 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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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_to_mysqli($stmt, $link); echo "
"._QXZ("AGENT CONFERENCE DELETION COMPLETED").": $conf_exten - $server_ip\n"; echo "

\n"; } $ADD='10000000000000'; # go to vicidial conference list } ###################### # ADD=62111111111111 delete vicidial confbridge record ###################### if ($ADD==62111111111111) { echo ""; if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) { echo "
"._QXZ("AGENT CONFBRIDGE NOT DELETED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("ConfBridge must be at least 2 characters in length")."\n"; echo "
"._QXZ("Server IP must be at least 7 characters in length")."\n"; } else { $stmt="DELETE from vicidial_confbridges where conf_exten='$conf_exten' and server_ip='$server_ip' limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 CONFBRIDGE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("AGENT CONFBRIDGE DELETION COMPLETED").": $conf_exten - $server_ip\n"; echo "

\n"; } $ADD='12000000000000'; # go to vicidial confbridge list } ###################################################################################################### ###################################################################################################### ####### 3 series, record modification forms ###################################################################################################### ###################################################################################################### ###################### # ADD=3 modify user info in the system ###################### if ($ADD==3) { if ($LOGmodify_users==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3&user=$user"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,voicemail_id,agent_call_log_view_override,callcard_admin,agent_choose_blended,realtime_block_user_info,custom_fields_modify,force_change_password,agent_lead_search_override,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts,preset_contact_search,modify_contacts,modify_same_user_level,admin_hide_lead_data,admin_hide_phone_data,agentcall_email,modify_email_accounts,failed_login_count,last_login_date,last_ip,alter_admin_interface_options,max_inbound_calls,modify_custom_dialplans,wrapup_seconds_override,modify_languages,selected_language,user_choose_language,ignore_group_on_search,api_list_restrict,api_allowed_functions,lead_filter_id,agentcall_chat,admin_cf_show_hidden,user_hide_realtime,access_recordings,modify_colors,user_nickname,user_new_lead_limit,api_only_user,modify_auto_reports,modify_ip_lists,ignore_ip_list,ready_max_logout,export_gdpr_leads,pause_code_approval,max_hopper_calls,max_hopper_calls_hour,mute_recordings,hide_call_log_info,next_dial_my_callbacks,user_admin_redirect_url,max_inbound_filter_enabled,max_inbound_filter_statuses,max_inbound_filter_ingroups,max_inbound_filter_min_sec,status_group_id,mobile_number,two_factor_override,manual_dial_filter,user_location,download_invalid_files,user_group_two,failed_login_attempts_today,failed_login_count_today,failed_last_ip_today,failed_last_type_today,modify_dial_prefix,inbound_credits,hci_enabled,manual_dial_lead_id,modify_settings_containers from vicidial_users where user='$user' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $voicemail_id = $row[76]; $agent_call_log_view_override = $row[77]; $callcard_admin = $row[78]; $agent_choose_blended = $row[79]; $realtime_block_user_info = $row[80]; $custom_fields_modify = $row[81]; $force_change_password = $row[82]; $agent_lead_search_override = $row[83]; $modify_shifts = $row[84]; $modify_phones = $row[85]; $modify_carriers = $row[86]; $modify_labels = $row[87]; $modify_statuses = $row[88]; $modify_voicemail = $row[89]; $modify_audiostore = $row[90]; $modify_moh = $row[91]; $modify_tts = $row[92]; $preset_contact_search = $row[93]; $modify_contacts = $row[94]; $modify_same_user_level = $row[95]; $admin_hide_lead_data = $row[96]; $admin_hide_phone_data = $row[97]; $agentcall_email = $row[98]; $modify_email_accounts = $row[99]; $failed_login_count = $row[100]; $last_login_date = $row[101]; $last_ip = $row[102]; $alter_admin_interface_options = $row[103]; $max_inbound_calls = $row[104]; $modify_custom_dialplans = $row[105]; $wrapup_seconds_override = $row[106]; $modify_languages = $row[107]; $selected_language = $row[108]; $user_choose_language = $row[109]; $ignore_group_on_search = $row[110]; $api_list_restrict = $row[111]; $api_allowed_functions = $row[112]; $lead_filter_id = $row[113]; $agentcall_chat = $row[114]; $admin_cf_show_hidden = $row[115]; $user_hide_realtime = $row[116]; $access_recordings = $row[117]; $modify_colors = $row[118]; $user_nickname = $row[119]; $user_new_lead_limit = $row[120]; $api_only_user = $row[121]; $modify_auto_reports = $row[122]; $modify_ip_lists = $row[123]; $ignore_ip_list = $row[124]; $ready_max_logout = $row[125]; $export_gdpr_leads = $row[126]; $pause_code_approval = $row[127]; $max_hopper_calls = $row[128]; $max_hopper_calls_hour =$row[129]; $mute_recordings_users = $row[130]; $hide_call_log_info_users = $row[131]; $next_dial_my_callbacks=$row[132]; $user_admin_redirect_url=$row[133]; $max_inbound_filter_enabled=$row[134]; $max_inbound_filter_statuses=$row[135]; $max_inbound_filter_ingroups=$row[136]; $max_inbound_filter_min_sec=$row[137]; $status_group_id = $row[138]; $mobile_number = $row[139]; $two_factor_override = $row[140]; $manual_dial_filter = $row[141]; $user_location = $row[142]; $download_invalid_files=$row[143]; $user_group_two = $row[144]; $failed_login_attempts_today=$row[145]; $failed_login_count_today=$row[146]; $failed_last_ip_today = $row[147]; $failed_last_type_today=$row[148]; $modify_dial_prefix = $row[149]; $inbound_credits = $row[150]; $hci_enabled = $row[151]; $manual_dial_lead_id = $row[152]; $modify_settings_containers = $row[153]; } else { # Need to declare these to avoid errors $alert_enabled=0; $last_login_date="0000-00-00 00:00:00"; $failed_login_count=0; $failed_login_count_today=0; $last_ip=""; $failed_last_type_today=""; $failed_login_attempts_today=""; # $USER_inbound_calls_today=0; # $USER_inbound_calls_today_filtered=0; # $USER_hopper_calls_today=0; # $USER_hopper_calls_hour=0; $max_inbound_filter_statuses=""; $max_inbound_filter_ingroups=""; $user_custom_one=""; $user_custom_two=""; $user_custom_three=""; $user_custom_four=""; $user_custom_five=""; $user_admin_redirect_url=""; } ##### latest 2FA auth record data $last_auth=''; $stmt="SELECT auth_exp_date,auth_stage,auth_attempts from vicidial_two_factor_auth where user='$user' order by auth_date desc limit 1"; $rslt=mysql_to_mysqli($stmt, $link); $auths_to_print = mysqli_num_rows($rslt); if ($auths_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $auth_exp_date = $rowx[0]; $auth_stage = $rowx[1]; $auth_attempts = $rowx[2]; $last_auth = "     $auth_exp_date - $auth_stage - $auth_attempts"; } if ( ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) or ( ($LOGmodify_same_user_level < 1) and ($LOGuser_level > 8) and ($user_level > 8) ) ) { echo "
"._QXZ("You do not have permissions to modify this user").": $user\n"; } else { echo "
"._QXZ("MODIFY A USERS RECORD").": $user\n"; if ( ($LOGuser_level > 8) and ($LOGalter_admin_interface > 0) ) {echo "\n";} else { if ($LOGalter_agent_interface == "1") {echo "\n";} else {echo "\n";} } if ($SScustom_fields_enabled < 1) { echo "\n"; } echo "\n"; echo "\n"; echo "
\n"; echo "\n"; if ($SSpass_hash_enabled > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSuser_codes_admin > 0) { $user_codes_ct=0; $raw_user_codes_admin_data="|empty\n"; $user_code_container_menu=''; $uc_selected=0; if ($SSuser_codes_admin == '2') { if (file_exists('user_codes_admin.txt')) $user_codes_admin_ARY = file('user_codes_admin.txt'); } else { $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_CODES_SYSTEM';"; $rslt=mysql_to_mysqli($stmt, $link); $uc_to_print = mysqli_num_rows($rslt); if ($uc_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $raw_user_codes_admin_data = $rowx[0]; } $user_codes_admin_ARY = explode("\n",$raw_user_codes_admin_data); } $user_codes_admin_ct = count($user_codes_admin_ARY); $o=0; while ($user_codes_admin_ct > $o) { if ( (!preg_match("/^;/",$user_codes_admin_ARY[$o])) and (strlen($user_codes_admin_ARY[$o]) > 0) ) { $user_codes_ct++; $user_code_item_ARY = explode('|',$user_codes_admin_ARY[$o]); $user_code_item_ARY[0] = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_code_item_ARY[0]); $user_code_item_ARY[1] = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$user_code_item_ARY[1]); if (mb_strlen($user_code_item_ARY[1],'utf-8')>50) {$user_code_item_ARY[1] = mb_substr($user_code_item_ARY[1],0,50,'utf-8') . '...';} $user_code_container_menu .= "\n"; } else { $user_code_container_menu .= "value=\"$user_code_item_ARY[0]\">$user_code_item_ARY[0]\n"; } } $o++; } if ($uc_selected < 1) {$user_code_container_menu .= "\n";} if ($LOGuser_level >= 9) { echo "\n"; } else { echo "\n"; } } else { echo "\n"; } ##### get container entry for USER_LOCATIONS_SYSTEM for pulldown menu $raw_location_data=";location|description\n|default\n"; $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_LOCATIONS_SYSTEM';"; $rslt=mysql_to_mysqli($stmt, $link); $loc_to_print = mysqli_num_rows($rslt); if ($loc_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $raw_location_data = $rowx[0]; } $location_ARY = explode("\n",$raw_location_data); $location_ct = count($location_ARY); $location_container_menu=''; $loc_selected=0; $o=0; while ($location_ct > $o) { if ( (!preg_match("/^;/",$location_ARY[$o])) and (strlen($location_ARY[$o]) > 2) and (preg_match("/\|/",$location_ARY[$o])) ) { $location_item_ARY = explode('|',$location_ARY[$o]); if (mb_strlen($location_item_ARY[1],'utf-8')>50) {$location_item_ARY[1] = mb_substr($location_item_ARY[1],0,50,'utf-8') . '...';} $location_container_menu .= "\n"; } $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $Uterrs_to_print = mysqli_num_rows($rslt); $Uterrs_list=''; $o=0; while ($Uterrs_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Uterrs_list .= "$rowx[0] - $rowx[1]
\n"; $o++; } echo "\n"; } if ($SSuser_new_lead_limit > 0) { echo "\n"; echo "\n"; } else { echo "\n"; } if ( ($LOGuser_level > 7) and ( ($LOGalter_agent_interface == "1") or ($LOGalter_admin_interface > 0) ) ) { echo "\n"; echo "\n"; echo "\n"; if ($SSuser_territories_active > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_emails > 0) { echo "\n"; } else { echo "\n"; } if ($SSallow_chats > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; } if ($SSenable_languages > 0) { echo "\n"; echo "\n"; } else { echo "\n"; } echo "\n"; if ($SSmute_recordings > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSuser_hide_realtime_enabled > 0) { $red_enabledBEGIN=''; $red_enabledEND=''; if ($user_hide_realtime > 0) {$red_enabledBEGIN=''; $red_enabledEND='';} echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSinbound_credits > 0) { $ICC_triggered=''; if ($inbound_credits == '0') {$ICC_triggered = "     "._QXZ("Inbound Calls Credits Zero Balance")."";} echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; ### BEGIN get status group listings for dynamic pulldown menu ### $stmt="SELECT status_group_id,status_group_notes from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); $status_groups_menu=''; $status_groups_selected=0; $o=0; while ($status_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $status_groups_menu .= "\n"; $o++; } $sglinkB=''; $sglinkE=''; if (strlen($status_group_id)>1) { $sglinkB=""; $sglinkE=''; } echo "\n"; ### END get status group listings for dynamic pulldown menu ### if (!isset($campaign_js_rank) || strlen($campaign_js_rank) < 2) {$campaign_js_rank="''"; $campaign_js_rank_ct=0;} if (!isset($campaign_js_grade) || strlen($campaign_js_grade) < 2) {$campaign_js_grade="''"; $campaign_js_grade_ct=0;} if (!isset($ingroup_js_rank) || strlen($ingroup_js_rank) < 2) {$ingroup_js_rank="''"; $ingroup_js_rank_ct=0;} if (!isset($ingroup_js_grade) || strlen($ingroup_js_grade) < 2) {$ingroup_js_grade="''"; $ingroup_js_grade_ct=0;} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSqc_features_active > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ($SShopper_hold_inserts > 0) { echo "\n"; } else { echo "\n"; } } if ( ($LOGuser_level > 8) and ($LOGalter_admin_interface > 0) ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ( (preg_match('/\-ALL/i', $LOGallowed_campaigns)) ) { echo "\n"; } else { echo "\n"; } if ($SSuser_admin_redirect > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; if ($SSlog_recording_access > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SScustom_fields_enabled > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_emails > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; if ($SSenable_languages > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_auto_reports > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if (preg_match("/cf_encrypt/",$SSactive_modules)) {echo "\n";} else {echo "\n";} echo "\n"; if ($SSallow_ip_lists > 0) { echo "\n"; echo "\n"; # } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ( ( ($LOGmodify_same_user_level > 0) or ($LOGalter_admin_interface > 0) ) and ($LOGuser_level > 8) ) { echo "\n"; } if ( ($LOGmodify_same_user_level < 1) or ($LOGuser_level < 9) ) { echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; } if ( ($LOGalter_admin_interface < 1) or ($LOGuser_level < 9) ) { echo "\n"; } else { echo "\n"; } } echo "\n"; echo "
"._QXZ("User Number").": $user$NWB#users-user$NWE
"._QXZ("PASSWORD IS ENCRYPTED, ONLY ENTER IN A PASSWORD BELOW IF YOU WANT TO CHANGE IT")."!
"._QXZ("Password").": $NWB#users-pass$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Force Change Password").": $NWB#users-force_change_password$NWE
"._QXZ("Last Login Info").": $last_login_date - $failed_login_count - $last_ip $last_auth$NWB#users-last_login_date$NWE   "; if ($LOGuser_level > 8) { if ($failed_login_attempts_today > 0) { echo " "._QXZ("Failed logins today").": $failed_login_attempts_today - $failed_login_count_today - $failed_last_ip_today - $failed_last_type_today"; } else { echo " "._QXZ("Logins summary").""; } } echo "
"._QXZ("Full Name").": $NWB#users-full_name$NWE
"._QXZ("User Level").": $NWB#users-user_level$NWE
"._QXZ("User Group").": $NWB#users-user_group$NWE
"._QXZ("Phone Login").": $NWB#users-phone_login$NWE
"._QXZ("Phone Pass").": $NWB#users-phone_pass$NWE\n"; if ( ($SSuser_account_emails == 'SEND_NO_PASS') or ($SSuser_account_emails == 'SEND_WITH_PASS') ) {echo "   "._QXZ("send this user a login link email")."";} echo "
"._QXZ("Active").": $NWB#users-active$NWE
"._QXZ("Voicemail ID").": "._QXZ("voicemail chooser")."$NWB#users-voicemail_id$NWE
"._QXZ("Email").": $NWB#users-email$NWE
"._QXZ("Mobile Number").": $NWB#users-mobile_number$NWE
"._QXZ("User Code").": $NWB#users-optional$NWE
"._QXZ("User Code").": $user_code   $NWB#users-optional$NWE
"._QXZ("User Code").": $NWB#users-optional$NWE
"._QXZ("User Location").": $NWB#users-user_location$NWE
"; if (strlen($user_group_two) > 0) { echo ""._QXZ("VERM Secondary User Group").""; echo ":
"._QXZ("Main Territory").": $NWB#users-optional$NWE
"._QXZ("User Nickname").": $NWB#users-user_nickname$NWE
"._QXZ("User Territories").": $Uterrs_list
"._QXZ("User New Lead Limits").": "._QXZ("User List Limit Overrides for this user")."
"._QXZ("Overall Limit").": $NWB#users-user_new_lead_limit$NWE
"._QXZ("AGENT INTERFACE OPTIONS").":
"._QXZ("Agent Choose Ingroups").": $NWB#users-agent_choose_ingroups$NWE
"._QXZ("Agent Choose Blended").": $NWB#users-agent_choose_blended$NWE
"._QXZ("Agent Choose Territories").": $NWB#users-agent_choose_territories$NWE
"._QXZ("Hot Keys Active").": $NWB#users-hotkeys_active$NWE
"._QXZ("Scheduled Callbacks").": $NWB#users-scheduled_callbacks$NWE
"._QXZ("Agent-Only Callbacks").": $NWB#users-agentonly_callbacks$NWE
"._QXZ("Next-Dial My Callbacks Override").": $NWB#users-next_dial_my_callbacks$NWE
"._QXZ("Agent Call Manual").": $NWB#users-agentcall_manual$NWE
"._QXZ("Manual Dial Filter Override").": $NWB#users-manual_dial_filter$NWE
"._QXZ("Manual Dial by Lead ID Override").": $NWB#users-manual_dial_lead_id$NWE
"._QXZ("Agent Call Email").": $NWB#users-agentcall_email$NWE
"._QXZ("Agent Call Chat").": $NWB#users-agentcall_chat$NWE
"._QXZ("Agent Recording").": $NWB#users-agent_recording$NWE
"._QXZ("Agent Transfers").": $NWB#users-agent_transfers$NWE
"._QXZ("Closer Default Blended").": $NWB#users-closer_default_blended$NWE
"._QXZ("User Choose Language").": $NWB#users-user_choose_language$NWE
"._QXZ("Selected Language").": $NWB#users-selected_language$NWE
"._QXZ("Agent Recording Override").": $NWB#users-agent_recording_override$NWE
"._QXZ("Mute Recordings Override").": $NWB#users-mute_recordings$NWE
"._QXZ("Agent Alter Customer Data Override").": $NWB#users-alter_custdata_override$NWE
"._QXZ("Agent Alter Customer Phone Override").": $NWB#users-alter_custphone_override$NWE
"._QXZ("Agent Shift Enforcement Override").": $NWB#users-agent_shift_enforcement_override$NWE
"._QXZ("Agent Call Log View Override").": $NWB#users-agent_call_log_view_override$NWE
"._QXZ("Campaign Hide Call Log Override").": $NWB#users-hide_call_log_info$NWE
"._QXZ("Agent Lead Search Override").": $NWB#users-agent_lead_search_override$NWE
"._QXZ("Lead Filter").": "; echo "$NWB#users-lead_filter_id$NWE "._QXZ("only enabled with no-hopper manual dialing").""; echo "
$red_enabledBEGIN"._QXZ("User Hide in RealTime").": $red_enabledEND$NWB#users-user_hide_realtime$NWE
"._QXZ("Alert Enabled").": $alert_enabled $NWB#users-alert_enabled$NWE
"._QXZ("Allow Alerts").": $NWB#users-allow_alerts$NWE
"._QXZ("Preset Contact Search").": $NWB#users-preset_contact_search$NWE
"._QXZ("Max Inbound Calls").": $NWB#users-max_inbound_calls$NWE     "._QXZ("inbound calls today").": $USER_inbound_calls_today
"._QXZ("Max Inbound Calls Filtering Enabled").": $NWB#users-max_inbound_filter_enabled$NWE     "._QXZ("inbound filtered calls today").": $USER_inbound_calls_today_filtered
"._QXZ("Max Inbound Calls Filtering Options").":
"; echo "\n"; echo "\n"; echo "
"._QXZ("Filter Statuses").":$NWB#users-max_inbound_filter_statuses$NWE  
"; echo "
"._QXZ("Filter In-Groups").":$NWB#users-max_inbound_filter_ingroups$NWE  
"; echo "
"._QXZ("Filter Minimum Seconds").":$NWB#users-max_inbound_filter_min_sec$NWE  
"; echo "
"._QXZ("Inbound Calls Credits").": $NWB#users-inbound_credits$NWE$ICC_triggered
"._QXZ("Max Manual Dial Hopper Calls").": $NWB#users-max_hopper_calls$NWE     "._QXZ("hopper calls today").": $USER_hopper_calls_today
"._QXZ("Max Manual Dial Hopper Calls Per Hour").": $NWB#users-max_hopper_calls_hour$NWE     "._QXZ("hopper calls this hour").": $USER_hopper_calls_hour
"._QXZ("Wrap Seconds Override").": $NWB#users-wrapup_seconds_override$NWE
"._QXZ("Agent Ready Max Logout Override").": $NWB#users-ready_max_logout$NWE
$sglinkB"._QXZ("Additional Status Group")."$sglinkE: $NWB#users-status_group_id$NWE
"._QXZ("Campaign Ranks").": $NWB#users-campaign_ranks$NWE
\n"; echo "\n"; echo "$RANKcampaigns_list"; echo "
\n"; echo "
"._QXZ("Inbound Groups").": $NWB#users-closer_campaigns$NWE
\n"; echo "\n"; echo "$RANKgroups_list"; echo "
\n"; echo "
"._QXZ("Custom")." 1: $NWB#users-custom_one$NWE
"._QXZ("Custom")." 2: $NWB#users-custom_one$NWE
"._QXZ("Custom")." 3: $NWB#users-custom_one$NWE
"._QXZ("Custom")." 4: $NWB#users-custom_one$NWE
"._QXZ("Custom")." 5: $NWB#users-custom_one$NWE
"._QXZ("QC Enabled").": $NWB#users-qc_enabled$NWE
"._QXZ("QC User Level").": $NWB#users-qc_user_level$NWE
"._QXZ("QC Pass").": $NWB#users-qc_pass$NWE
"._QXZ("QC Finish").": $NWB#users-qc_finish$NWE
"._QXZ("QC Commit").": $NWB#users-qc_commit$NWE
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"._QXZ("HCI Enabled").": $NWB#users-hci_enabled$NWE
"; echo ""; echo "
"._QXZ("ADMIN REPORT OPTIONS").":
"._QXZ("Realtime Block User Info").": $NWB#users-realtime_block_user_info$NWE
"._QXZ("Admin Hide Lead Data").": $NWB#users-admin_hide_lead_data$NWE
"._QXZ("Admin Hide Phone Data").": $NWB#users-admin_hide_phone_data$NWE
"._QXZ("Search Lead Ignore Group Restrictions").": $NWB#users-ignore_group_on_search$NWE
"._QXZ("Search Lead Ignore Group Restrictions").": $ignore_group_on_search $NWB#users-ignore_group_on_search$NWE
"._QXZ("User Admin Redirect URL").": $NWB#users-user_admin_redirect_url$NWE
"._QXZ("ADMIN INTERFACE OPTIONS").":
"._QXZ("View Reports").": $NWB#users-view_reports$NWE
"._QXZ("Access Recordings").": $NWB#users-access_recordings$NWE
"._QXZ("Alter Agent Interface Options").": $NWB#users-alter_agent_interface_options$NWE
"._QXZ("Modify Users").": $NWB#users-modify_sections$NWE
"._QXZ("Change Agent Campaign").": $NWB#users-change_agent_campaign$NWE
"._QXZ("Delete Users").": $NWB#users-delete_users$NWE
"._QXZ("Modify User Groups").": $NWB#users-modify_sections$NWE
"._QXZ("Delete User Groups").": $NWB#users-delete_user_groups$NWE
"._QXZ("Modify Lists").": $NWB#users-modify_sections$NWE
"._QXZ("Delete Lists").": $NWB#users-delete_lists$NWE
"._QXZ("Load Leads").": $NWB#users-load_leads$NWE
"._QXZ("Modify Leads").": $NWB#users-modify_leads$NWE
"._QXZ("GDPR-Compliant Export Delete Leads").": $NWB#users-export_gdpr_leads$NWE
"._QXZ("Download Lists").": $NWB#users-download_lists$NWE
"._QXZ("Export Reports").": $NWB#users-export_reports$NWE
"._QXZ("Delete From DNC Lists").": $NWB#users-delete_from_dnc$NWE
"._QXZ("Custom Fields Modify").": $NWB#users-custom_fields_modify$NWE
"._QXZ("Modify Campaigns").": $NWB#users-modify_sections$NWE
"._QXZ("Campaign Detail").": $NWB#users-campaign_detail$NWE
"._QXZ("Modify Campaign Dial Prefix").": $NWB#users-modify_dial_prefix$NWE
"._QXZ("Delete Campaigns").": $NWB#users-delete_campaigns$NWE
"._QXZ("Modify In-Groups").": $NWB#users-modify_sections$NWE
"._QXZ("Delete In-Groups").": $NWB#users-delete_ingroups$NWE
"._QXZ("Modify DIDs").": $NWB#users-modify_sections$NWE
"._QXZ("Delete DIDs").": $NWB#users-delete_ingroups$NWE
"._QXZ("Modify Custom Dialplans").": $NWB#users-modify_custom_dialplans$NWE
"._QXZ("Modify Remote Agents").": $NWB#users-modify_sections$NWE
"._QXZ("Delete Remote Agents").": $NWB#users-delete_remote_agents$NWE
"._QXZ("Modify Scripts").": $NWB#users-modify_sections$NWE
"._QXZ("Delete Scripts").": $NWB#users-delete_scripts$NWE
"._QXZ("Modify Filters").": $NWB#users-modify_sections$NWE
"._QXZ("Delete Filters").": $NWB#users-delete_filters$NWE
"._QXZ("AGC Admin Access").": $NWB#users-ast_admin_access$NWE
"._QXZ("AGC Delete Phones").": $NWB#users-ast_delete_phones$NWE
"._QXZ("Modify Call Times").": $NWB#users-modify_call_times$NWE
"._QXZ("Delete Call Times").": $NWB#users-delete_call_times$NWE
"._QXZ("Modify Servers").": $NWB#users-modify_servers$NWE
"._QXZ("Modify Shifts").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Phones").": $NWB#users-modify_phones$NWE
"._QXZ("Modify Carriers").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Email Accounts").": $NWB#users-modify_email_accounts$NWE
"._QXZ("Modify Labels").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Colors").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Languages").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Statuses").": $NWB#users-modify_statuses$NWE
"._QXZ("Modify Voicemail").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Audio Store").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Music On Hold").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Settings Containers").": $NWB#users-modify_sections$NWE
"._QXZ("Modify TTS").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Contacts").": $NWB#users-modify_sections$NWE
"._QXZ("CallCard Access").": $NWB#users-modify_sections$NWE
"._QXZ("Modify Automated Reports").": $NWB#users-modify_sections$NWE
"._QXZ("Add Timeclock Log Record").": $NWB#users-add_timeclock_log$NWE
"._QXZ("Modify Timeclock Log Record").": $NWB#users-modify_timeclock_log$NWE
"._QXZ("Delete Timeclock Log Record").": $NWB#users-delete_timeclock_log$NWE
"._QXZ("Manager Shift Enforcement Override").": $NWB#users-manager_shift_enforcement_override$NWE
"._QXZ("Manager Pause Code Approval").": $NWB#users-pause_code_approval$NWE
"._QXZ("Admin Custom Fields Show Hidden").": $NWB#users-admin_cf_show_hidden$NWE
"._QXZ("SECURITY OPTIONS, Only enable if needed").":
"._QXZ("Modify IP Lists").": $NWB#users-modify_ip_lists$NWE
"._QXZ("Ignore IP List").": $NWB#users-ignore_ip_lists$NWE
"._QXZ("Two Factor Auth Override").": $NWB#users-two_factor_override$NWE
"._QXZ("API USER OPTIONS, Only enable if needed").":
"._QXZ("Agent API Access").": $NWB#users-vdc_agent_api_access$NWE
"._QXZ("API List Restrict").": $NWB#users-api_list_restrict$NWE
"._QXZ("API Allowed Functions").": $NWB#users-api_allowed_functions$NWE
"._QXZ("DISABLE ADMIN AND AGENT SCREEN OPTIONS").":
"._QXZ("API Only User").": $NWB#users-api_only_user$NWE
"._QXZ("LEVEL 9 ADMIN OPTIONS").":
"._QXZ("Modify Same User Level").": $NWB#users-modify_same_user_level$NWE
"._QXZ("Download Invalid Files").": $NWB#users-download_invalid_files$NWE
"._QXZ("Alter Admin Interface Options").": $NWB#users-alter_admin_interface_options$NWE
\n"; if ($LOGdelete_users > 0) { echo "

"._QXZ("DELETE THIS USER")."\n"; } echo "

"._QXZ("Click here for user time sheet")."\n"; echo "

"._QXZ("Click here for user status")."\n"; echo "

"._QXZ("Click here for user stats")."\n"; echo "

"._QXZ("Click here for user multiple day status detail report")."\n"; echo "

"._QXZ("Click here for user CallBack Holds")."\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this record")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=31 modify campaign info in the system - Detail view ###################### if ( ($LOGcampaign_detail < 1) and ($ADD==31) ) {$ADD=34;} # send to Basic if not allowed if ( ($ADD==31) and ( (!preg_match("/$campaign_id/i", $LOGallowed_campaigns)) and (!preg_match("/ALL-CAMPAIGNS/i",$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 ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31&campaign_id=$campaign_id&SUB=$SUB"; $modify_footer_refresh=1; } if ($stage=='show_dialable') { $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='hide_dialable') { $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='show_leadscount') { $stmt="UPDATE vicidial_campaigns set display_leads_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='hide_leadscount') { $stmt="UPDATE vicidial_campaigns set display_leads_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } $stmt="SELECT enable_vtiger_integration,vtiger_url from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,in_group_dial,in_group_dial_select,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,allow_chats,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,call_quota_process_running,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two,incall_tally_threshold_seconds,auto_alt_threshold,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti,demographic_quotas,demographic_quotas_container,demographic_quotas_rerank,demographic_quotas_list_resets,demographic_quotas_last_rerank,custom_one,custom_two,custom_three,custom_four,custom_five,dead_stop_recording,manual_vm_status_updates,force_per_call_notes,agent_search_ingroup_list,hopper_hold_inserts,daily_phone_number_call_limit,state_descriptions,script_tab_height,call_log_days,leave_3way_stop_recording,manual_minimum_ring_seconds,manual_minimum_attempt_seconds,manual_minimum_answer_seconds,khomp_settings_container,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,call_count_limit_restrict,adaptive_percentmax_percentage,hangup_again_link,amd_agent_display,amd_status_map from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $campaign_name = $row[1]; $campaign_active = $row[2]; $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]; $park_ext = $row[9]; $park_file_name = $row[10]; $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_campaigns = $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]; $use_custom_cid = $row[142]; $scheduled_callbacks_alert = $row[143]; $queuemetrics_callstatus = $row[144]; $extension_appended_cidname = $row[145]; $scheduled_callbacks_count = $row[146]; $manual_dial_override = $row[147]; $blind_monitor_warning = $row[148]; $blind_monitor_message = $row[149]; $blind_monitor_filename = $row[150]; $inbound_queue_no_dial = $row[151]; $timer_action_destination = $row[152]; $enable_xfer_presets = $row[153]; $hide_xfer_number_to_dial = $row[154]; $manual_dial_prefix = $row[155]; $customer_3way_hangup_logging = $row[156]; $customer_3way_hangup_seconds = $row[157]; $customer_3way_hangup_action = $row[158]; $ivr_park_call = $row[159]; $ivr_park_call_agi = $row[160]; $manual_preview_dial = $row[161]; $realtime_agent_time_stats = $row[162]; $use_auto_hopper = $row[163]; $auto_hopper_multi = $row[164]; $auto_trim_hopper = $row[165]; $api_manual_dial = $row[166]; $manual_dial_call_time_check = $row[167]; $display_leads_count = $row[168]; $lead_order_randomize = $row[169]; $lead_order_secondary = $row[170]; $per_call_notes = $row[171]; $my_callback_option = $row[172]; $agent_lead_search = $row[173]; $agent_lead_search_method = $row[174]; $queuemetrics_phone_environment = $row[175]; $auto_pause_precall = $row[176]; $auto_resume_precall = $row[177]; $auto_pause_precall_code = $row[178]; $manual_dial_cid = $row[179]; $post_phone_time_diff_alert = $row[180]; $custom_3way_button_transfer = $row[181]; $available_only_tally_threshold = $row[182]; $available_only_tally_threshold_agents = $row[183]; $dial_level_threshold = $row[184]; $dial_level_threshold_agents = $row[185]; $safe_harbor_audio = $row[186]; $safe_harbor_menu_id = $row[187]; $survey_menu_id = $row[188]; $callback_days_limit = $row[189]; $dl_diff_target_method = $row[190]; $disable_dispo_screen = $row[191]; $disable_dispo_status = $row[192]; $screen_labels = $row[193]; $status_display_fields = $row[194]; $na_call_url = $row[195]; $survey_recording = $row[196]; $pllb_grouping = $row[197]; $pllb_grouping_limit = $row[198]; $call_count_limit = $row[199]; $call_count_target = $row[200]; $callback_hours_block = $row[201]; $callback_list_calltime = $row[202]; $user_group = $row[203]; $hopper_vlc_dup_check = $row[204]; $in_group_dial = $row[205]; $in_group_dial_select = $row[206]; $safe_harbor_audio_field = $row[207]; $pause_after_next_call = $row[208]; $owner_populate = $row[209]; $use_other_campaign_dnc = $row[210]; $allow_emails = $row[211]; $amd_inbound_group = $row[212]; $amd_callmenu = $row[213]; $survey_wait_sec = $row[214]; $manual_dial_lead_id = $row[215]; $dead_max = $row[216]; $dispo_max = $row[217]; $pause_max = $row[218]; $dead_max_dispo = $row[219]; $dispo_max_dispo = $row[220]; $max_inbound_calls = $row[221]; $manual_dial_search_checkbox = $row[222]; $hide_call_log_info = $row[223]; $timer_alt_seconds = $row[224]; $wrapup_bypass = $row[225]; $wrapup_after_hotkey = $row[226]; $callback_active_limit = $row[227]; $callback_active_limit_override = $row[228]; $allow_chats = $row[229]; $comments_all_tabs = $row[230]; $comments_dispo_screen = $row[231]; $comments_callback_screen = $row[232]; $qc_comment_history = $row[233]; $show_previous_callback = $row[234]; $clear_script = $row[235]; $cpd_unknown_action = $row[236]; $manual_dial_search_filter=$row[237]; $web_form_address_three=$row[238]; $manual_dial_override_field=$row[239]; $status_display_ingroup=$row[240]; $customer_gone_seconds=$row[241]; $agent_display_fields=$row[242]; $am_message_wildcards=$row[243]; $manual_dial_timeout=$row[244]; $routing_initiated_recordings=$row[245]; $manual_dial_hopper_check=$row[246]; $callback_useronly_move_minutes=$row[247]; $ofcom_uk_drop_calc=$row[248]; $manual_auto_next=$row[249]; $manual_auto_show=$row[250]; $allow_required_fields=$row[251]; $dead_to_dispo=$row[252]; $agent_xfer_validation=$row[253]; $ready_max_logout=$row[254]; $callback_display_days=$row[255]; $three_way_record_stop=$row[256]; $hangup_xfer_record_start=$row[257]; $scheduled_callbacks_email_alert=$row[258]; $max_inbound_calls_outcome=$row[259]; $manual_auto_next_options=$row[260]; $agent_screen_time_display=$row[261]; $next_dial_my_callbacks=$row[262]; $inbound_no_agents_no_dial_container=$row[263]; $inbound_no_agents_no_dial_threshold=$row[264]; $cid_group_id=$row[265]; $pause_max_dispo=$row[266]; $script_top_dispo=$row[267]; $dead_trigger_seconds=$row[268]; $dead_trigger_action=$row[269]; $dead_trigger_repeat=$row[270]; $dead_trigger_filename=$row[271]; $dead_trigger_url=$row[272]; $scheduled_callbacks_force_dial=$row[273]; $scheduled_callbacks_auto_reschedule=$row[274]; $scheduled_callbacks_timezones_container=$row[275]; $three_way_volume_buttons=$row[276]; $callback_dnc=$row[277]; $manual_dial_validation=$row[278]; $mute_recordings_campaigns=$row[279]; $auto_active_list_new=$row[280]; $call_quota_lead_ranking_campaigns=$row[281]; $call_quota_process_running=$row[282]; $sip_event_logging_campaigns=$row[283]; $campaign_script_two=$row[284]; $leave_vm_no_dispo=$row[285]; $leave_vm_message_group_id=$row[286]; $dial_timeout_lead_container=$row[287]; $amd_type=$row[288]; $vmm_daily_limit=$row[289]; $opensips_cid_name_campaigns=$row[290]; $amd_agent_route_options=$row[291]; $browser_alert_sound_campaigns=$row[292]; $browser_alert_volume=$row[293]; $three_way_record_stop_exception=$row[294]; $pause_max_exceptions=$row[295]; $hopper_drop_run_trigger=$row[296]; $daily_call_count_limit=$row[297]; $daily_limit_manual=$row[298]; $transfer_button_launch=$row[299]; $shared_dial_rank=$row[300]; $agent_search_method=$row[301]; $qc_scorecard_id=$row[302]; $qc_statuses_id=$row[303]; $clear_form=$row[304]; $leave_3way_start_recording=$row[305]; $leave_3way_start_recording_exception=$row[306]; $calls_waiting_vl_one=$row[307]; $calls_waiting_vl_two=$row[308]; $calls_inqueue_count_one=$row[309]; $calls_inqueue_count_two=$row[310]; $in_man_dial_next_ready_seconds=$row[311]; $in_man_dial_next_ready_seconds_override=$row[312]; $transfer_no_dispo=$row[313]; $call_limit_24hour_method=$row[314]; $call_limit_24hour_scope=$row[315]; $call_limit_24hour=$row[316]; $call_limit_24hour_override=$row[317]; $cid_group_id_two=$row[318]; $incall_tally_threshold_seconds=$row[319]; $auto_alt_threshold=$row[320]; $pause_max_url=$row[321]; $agent_hide_hangup=$row[322]; $ig_xfer_list_sort=$row[323]; $script_tab_frame_size=$row[324]; $max_logged_in_agents=$row[325]; $user_group_script=$row[326]; $agent_hangup_route=$row[327]; $agent_hangup_value=$row[328]; $agent_hangup_ig_override=$row[329]; $show_confetti=$row[330]; $demographic_quotas_campaigns=$row[331]; $demographic_quotas_container=$row[332]; $demographic_quotas_rerank=$row[333]; $demographic_quotas_list_resets=$row[334]; $demographic_quotas_last_rerank=$row[335]; $custom_one = $row[336]; $custom_two = $row[337]; $custom_three = $row[338]; $custom_four = $row[339]; $custom_five = $row[340]; $dead_stop_recording = $row[341]; $manual_vm_status_updates = $row[342]; $force_per_call_notes = $row[343]; $agent_search_ingroup_list = $row[344]; $hopper_hold_inserts = $row[345]; $daily_phone_number_call_limit = $row[346]; $state_descriptions = $row[347]; $script_tab_height = $row[348]; $call_log_days = $row[349]; $leave_3way_stop_recording = $row[350]; $manual_minimum_ring_seconds = $row[351]; $manual_minimum_attempt_seconds = $row[352]; $manual_minimum_answer_seconds = $row[353]; $khomp_settings_container = $row[354]; $stereo_recording = $row[355]; $stereo_rec_filename = $row[356]; $stereo_parallel_recording = $row[357]; $recording_dtmf_muting = $row[358]; $stereo_recording_agent = $row[359]; $parallel_rec_co_filename = $row[360]; $parallel_rec_cm_filename = $row[361]; $parallel_rec_fr_filename = $row[362]; $call_count_limit_restrict = $row[363]; $adaptive_percentmax_percentage = $row[364]; $hangup_again_link = $row[365]; $amd_agent_display = $row[366]; $amd_status_map = $row[367]; if (preg_match('/DISABLED/', $list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} else {$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;} if ($auto_alt_dial == 'MULTI_LEAD') {$ALTmultiDISABLE=1; $ALTmultiLINK=""._QXZ("Multi-Alt-Settings")."";} else {$ALTmultiDISABLE=0; $ALTmultiLINK='';} $stmt="SELECT count(*) from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] < 1) { $mixes_list="\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' $LOGallowed_campaignsSQL limit 1"; $rslt=mysql_to_mysqli($stmt, $link); $mixes_to_print = mysqli_num_rows($rslt); $mixes_list="\n"; $o=0; while ($mixes_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $mixes_list .= "\n"; $mixname_list["ACTIVE"] = "$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 $whereLOGadmin_viewable_groupsSQL 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_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $Dgroups_menu=''; $Dgroups_selected=0; $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Dgroups_menu .= "\n"; $o++; } if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} $nxLOGadmin_viewable_groupsSQL = $LOGadmin_viewable_groupsSQL; if (strlen($xfer_groupsSQL) < 6) {$nxLOGadmin_viewable_groupsSQL = $whereLOGadmin_viewable_groupsSQL;} ##### get in-groups listings for dynamic transfer group pulldown list menu $stmt="SELECT group_id,group_name from vicidial_inbound_groups $xfer_groupsSQL $nxLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} ##### get in-groups listings for dynamic AMD inbound group pulldown list menu $stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $AMDgroups_to_print = mysqli_num_rows($rslt); $AMDgroups_menu=''; $AMDgroups_selected=0; $o=0; while ($AMDgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $AMDgroups_menu .= "\n"; $o++; } if ($AMDgroups_selected < 1) {$AMDgroups_menu .= "\n";} else {$AMDgroups_menu .= "\n";} ##### get callmenus listings for dynamic AMD callmenu pulldown list menu $stmt="SELECT menu_id from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $AMDmenus_to_print = mysqli_num_rows($rslt); $AMDmenus_menu=''; $AMDmenus_selected=0; $o=0; while ($AMDmenus_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $AMDmenus_menu .= "\n"; $o++; } if ($AMDmenus_selected < 1) {$AMDmenus_menu .= "\n";} else {$AMDmenus_menu .= "\n";} ##### get agent screen label listings for dynamic pulldown list menu $stmt="SELECT label_id,label_name from vicidial_screen_labels where active='Y' $LOGadmin_viewable_groupsSQL order by label_id;"; $rslt=mysql_to_mysqli($stmt, $link); $labels_to_print = mysqli_num_rows($rslt); $labels_menu=''; $o=0; while ($labels_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $labels_menu .= "\n"; $o++; } ##### get status groups for the lists and in-groups within this campaign $stmt="SELECT status_group_id from vicidial_lists where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $camp_status_groups=''; if ($DB) {echo "$lists_to_print|$stmt|\n";} $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (strlen($rowx[0]) > 0) {$camp_status_groups .= "'$rowx[0]',";} $o++; } $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); $stmt="SELECT status_group_id from vicidial_inbound_groups where status_group_id NOT IN('','NONE') and group_id IN('$closer_campaigns') $LOGadmin_viewable_groupsSQL ;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$lists_to_print|$stmt|\n";} $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (strlen($rowx[0]) > 0) {$camp_status_groups .= "'$rowx[0]',";} $o++; } # $camp_status_groups = preg_replace('/.$/i','',$camp_status_groups); $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,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses where status NOT IN('INCALL','QUEUE') order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$statuses_to_print|$stmt|\n";} $statuses_list=''; $dial_statuses_list=''; $qc_statuses_list=''; $survey_ni_status_list=''; $LRstatuses_list=''; $HKstatuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list .= "\n"; if ($rowx[0] != 'CBHOLD') { $dial_statuses_list .= "\n"; if ($survey_ni_status == $rowx[0]) { $survey_ni_status_list .= "\n"; } else { $survey_ni_status_list .= "\n"; } } $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (preg_match('/Y/i', $rowx[2])) {$HKstatuses_list .= "\n";} $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); $VMMGmenus_menu .= "\n"; $o++; } if ($VMMGmenus_selected < 1) {$VMMGmenus_menu .= "\n";} else {$VMMGmenus_menu .= "\n";} $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id IN($camp_status_groups'$campaign_id') and status NOT IN('INCALL','QUEUE') $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $Cstatuses_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$Cstatuses_to_print|$stmt|\n";} $o=0; $LRstatuses_list=''; $HKstatuses_list=''; while ($Cstatuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list .= "\n"; if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (preg_match('/Y/i', $rowx[2])) {$HKstatuses_list .= "\n";} $qc_statuses_list .= " $campaign_id:
"; echo "\n"; echo ""; echo ""; echo ""; echo ""; if ($SSoutbound_autodial_active > 0) { echo ""; echo ""; echo ""; echo ""; } echo ""; if ( ($enable_xfer_presets == 'ENABLED') or ($enable_xfer_presets == 'STAGING') ) { echo ""; } if ($SScampaign_cid_areacodes_enabled == '1') { echo ""; } if ($SSqc_features_active > 0) { echo ""; } if ($SSoutbound_autodial_active < 1) { echo "\n"; } echo "\n"; echo "
  "._QXZ("Basic")." "._QXZ("Detail")." "._QXZ("Statuses").""._QXZ("HotKeys").""._QXZ("Lead Recycling").""._QXZ("Auto Alt Dial").""._QXZ("List Mix").""._QXZ("Survey").""._QXZ("Pause Codes").""._QXZ("Presets").""._QXZ("AC-CID").""._QXZ("QC")." "._QXZ("Real-Time")."
\n"; echo "
\n"; echo ""; echo "
\n"; if ($SUB < 1) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_webform > 0) { echo "\n"; } if ($SSenable_third_webform > 0) { echo "\n"; } echo "\n"; echo "\n"; if ($SSallow_emails > 0) { echo "\n"; } else { echo "\n"; } if ($SSallow_chats > 0) { echo "\n"; } else { echo "\n"; } if ($SSoutbound_autodial_active > 0) { echo "\n"; $o=0; while ($Ds_to_print > $o) { $o++; $Dstatus = $Dstatuses[$o]; echo "\n"; } else { echo "$Dstatus - $statname_list[$Dstatus]         \n"; echo ""._QXZ("REMOVE")."\n"; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SScall_quota_lead_ranking > 0) { ##### get container listings for dynamic call quota lead ranking pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='CALL_QUOTA' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $cqlr_to_print = mysqli_num_rows($rslt); $call_quota_container_menu=''; $cqlr_selected=0; $o=0; while ($cqlr_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $call_quota_container_menu .= "\n"; $o++; } echo "\n"; echo "\n"; } else { echo "\n"; } if ($SSdemographic_quotas > 0) { ##### get container listings for demographic quotas pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='DEMOGRAPHIC_QUOTAS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $cqlr_to_print = mysqli_num_rows($rslt); $demo_quota_container_menu=''; $cqlr_selected=0; $o=0; while ($cqlr_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $demo_quota_container_menu .= "\n"; $o++; } $DQdebug = "   "._QXZ("DQ Debug")." | "._QXZ("DQ Report").""; if ($demographic_quotas_campaigns == 'INVALID') {$DQdebug = "   "._QXZ("DQ configuration invalid")."$DQdebug";} if ($demographic_quotas_campaigns == 'COMPLETE') {$DQdebug = "   "._QXZ("DQ goals have been met")."$DQdebug";} echo "\n"; if ($demographic_quotas_campaigns == 'COMPLETE') { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; if ($SSofcom_uk_drop_calc > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; if ($SSdaily_call_count_limit > 0) { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ($SScall_limit_24hour > 0) { echo "\n"; echo "\n"; echo "\n"; ##### get container listings for 24-hour call limit override pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='CALL_LIMITS_OVERRIDE' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $clo_to_print = mysqli_num_rows($rslt); $call_limit_24hour_override_container_menu=''; $clo_selected=0; $o=0; while ($clo_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $call_limit_24hour_override_container_menu .= "\n"; $o++; } echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SShopper_hold_inserts > 0) { echo "\n"; } else { echo "\n"; } if ( (preg_match("/RATIO|ADAPT/",$dial_method)) and ($SSdisable_auto_dial > 0) ) { echo "\n"; } $shared_options=''; if ($SSallow_shared_dial > 0) {$shared_options="";} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_shared_dial > 0) { echo "\n"; } else {echo "";} echo "\n"; echo "\n"; ##### get container listings for dynamic in-group list pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='INGROUP_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $inand_to_print = mysqli_num_rows($rslt); $inbound_no_agents_no_dial_container_menu=''; $inand_selected=0; $o=0; while ($inand_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $inbound_no_agents_no_dial_container_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; } ##### get container listings for dynamic dial timeout lead container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='DIAL_TIMEOUTS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $dial_timeout_lead_container_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $dial_timeout_lead_container_menu .= "\n"; $o++; } echo "\n"; if ($LOGmodify_dial_prefix > 0) { echo "\n"; echo "\n"; } else { echo ""; } echo "\n"; $DID_edit_link_BEGIN=''; $DID_edit_link_END=''; if (strlen($campaign_cid) > 0) { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$campaign_cid' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); if ($dids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $DID_edit_link_BEGIN = ""; $DID_edit_link_END=''; } } echo "\n"; echo "\n"; if ($SScampaign_cid_areacodes_enabled == '1') { ##### get vicidial_cid_groups listings for dynamic pulldown list $stmt="SELECT cid_group_id,cid_group_type,cid_group_notes from vicidial_cid_groups $whereLOGadmin_viewable_groupsSQL order by cid_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $cid_groups_to_print = mysqli_num_rows($rslt); $cid_groups_menu=''; $cid_groups_two_menu=''; $cid_groups_selected=0; $cid_groups_two_selected=0; $o=0; while ($cid_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cid_groups_menu .= "\n"; $cid_groups_two_menu .= "\n"; $o++; } echo "\n"; echo "\n"; } else { echo ""; } if ($SSopensips_cid_name == '1') { echo "";} if ($SSoutbound_autodial_active > 0) { echo "\n"; if ( ($SSagent_search_method == 1) or ($SSagent_search_method == 3) ) { echo "\n"; } else { echo ""; } } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSmute_recordings =='1') { echo "\n"; } else { echo "\n"; } if ( ($SSstereo_recording =='1') or ($SSstereo_recording =='2') or ($SSstereo_recording =='3') or ($SSstereo_recording =='4') or ($SSstereo_recording =='5') ) { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ( ( ($SSstereo_recording =='1') or ($SSstereo_recording =='2') or ($SSstereo_recording =='3') or ($SSstereo_recording =='4') or ($SSstereo_recording =='5') ) and ($SSstereo_parallel_recording == '1') ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting >= 2) ) and ($SSrecording_dtmf_detection == '1') ) { $SYSTEM_DTMF_MUTING_OVERRIDE=''; if ($SSrecording_dtmf_muting >= 2) {$SYSTEM_DTMF_MUTING_OVERRIDE = ""._QXZ("SYSTEM OVERRIDE ENABLED").": $SSrecording_dtmf_muting "._QXZ("SECONDS")."";} echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= '';} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= '';} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= '';} echo "\n"; if ($SSbrowser_call_alerts > 0) { echo "\n"; } else { echo "\n"; } echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($am_message_wildcards == 'Y') { $vam_count=0; $stmt="SELECT count(*) from vicidial_amm_multi where campaign_id='$campaign_id' and entry_type='campaign';"; $rslt=mysql_to_mysqli($stmt, $link); $vam_to_print = mysqli_num_rows($rslt); if ($vam_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vam_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($SSoutbound_autodial_active > 0) { $AMD_extra=''; $ViciAMD_settings=''; $amd_agent_displayHTML="\n";; $SSviciamd_enabled = intval($SSviciamd_enabled); if ($SSviciamd_enabled > 0) { if ($amd_type == 'ViciAMD') { $VAMD_container_exists=0; $stmt="SELECT count(*) from vicidial_settings_containers where container_id='VAMD_SETTINGS_$campaign_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_grab = mysqli_num_rows($rslt); if ($rows_to_grab > 0) { $rowz=mysqli_fetch_row($rslt); $VAMD_container_exists = $rowz[0]; } if ($VAMD_container_exists < 1) { $stmt="INSERT INTO vicidial_settings_containers(SELECT 'VAMD_SETTINGS_$campaign_id','ViciAMD Settings for $campaign_id',container_type,user_group,container_entry,NOW() from vicidial_settings_containers where container_id='VAMD_SETTINGS_NEW_TEMPLATE');"; $rslt=mysql_to_mysqli($stmt, $link); } $ViciAMD_settings="     "._QXZ("ViciAMD Settings").""; } $AMD_extra=""; $amd_agent_displayHTML="\n"; } echo "\n"; echo "\n"; $amdaro_B=''; $amdaro_E=''; if ( ($amd_agent_route_options == 'ENABLED') or ($amd_agent_route_options == 'PENDING') ) { $amdaro_B=""; $amdaro_E=""; } echo "\n$amd_agent_displayHTML"; ##### get container listings for dynamic AMD_STATUS_MAP container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='AMD_STATUS_MAP' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $asm_to_print = mysqli_num_rows($rslt); $amd_status_map_menu=''; $pws_selected=0; $o=0; while ($asm_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $amd_status_map_menu .= "\n"; $o++; } $amd_status_map_menu .= "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($KHOMP_enabled > 0) { ##### get container listings for dynamic khomp settings container for khomp_settings_container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='KHOMP_SETTINGS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $twrse_to_print = mysqli_num_rows($rslt); $khomp_settings_menu=''; $twrse_selected=0; $o=0; while ($twrse_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $khomp_settings_menu .= "\n"; $o++; } echo "\n"; } else {echo "\n";} } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $eswHTML=''; $cfwHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= '';} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= '';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($LOGmodify_dial_prefix > 0) { echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic phone number list container for three_way_record_stop_exception pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='PHONE_NUMBERS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $twrse_to_print = mysqli_num_rows($rslt); $three_way_record_stop_exception_menu=''; $twrse_selected=0; $o=0; while ($twrse_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $three_way_record_stop_exception_menu .= "\n"; $o++; } echo "\n"; echo "\n"; ##### get container listings for dynamic phone number list container for three_way_record_stop_exception pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='PHONE_NUMBERS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $twrse_to_print = mysqli_num_rows($rslt); $leave_3way_start_recording_exception_menu=''; $twrse_selected=0; $o=0; while ($twrse_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $leave_3way_start_recording_exception_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $php_timezones=0; $stmt="SELECT count(*) from vicidial_phone_codes where php_tz!='';"; $rslt=mysql_to_mysqli($stmt, $link); $phptz_ct_to_print = mysqli_num_rows($rslt); if ($phptz_ct_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $php_timezones = $rowx[0]; } if ($php_timezones > 0) { ##### get timezone_list listings for dynamic pulldown list menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='TIMEZONE_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $tzlc_to_print = mysqli_num_rows($rslt); $scheduled_callbacks_timezones_container_menu=''; $tzlc_selected=0; $o=0; while ($tzlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $scheduled_callbacks_timezones_container_menu .= "\n"; $o++; } echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "\n"; $ACHR_title = "-"._QXZ("no value required")."-"; $ACHR_chooser = ''; if ($agent_hangup_route=='MESSAGE') { $ACHR_title = _QXZ("Agent Hangup Message"); $ACHR_chooser = " "._QXZ("audio chooser")." "; } if ($agent_hangup_route=='EXTENSION') { $ACHR_title = _QXZ("Agent Hangup Dialplan Extension"); $ACHR_chooser = ''; } if ($agent_hangup_route=='IN_GROUP') { $ACHR_title = _QXZ("Agent Hangup In-Group"); $ACHR_chooser = " "._QXZ("in-group chooser")." "; if (strlen($agent_hangup_value) > 0) { $ACHR_title = ""._QXZ("Agent Hangup In-Group").""; } } if ($agent_hangup_route=='CALLMENU') { $ACHR_title = _QXZ("Agent Hangup Call Menu"); $ACHR_chooser = " "._QXZ("call menu chooser")." "; if (strlen($agent_hangup_value) > 0) { $ACHR_title = ""._QXZ("Agent Hangup Call Menu").""; } } echo "\n"; echo "\n"; if ($SSagent_hide_hangup > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic pause max codes exceptions pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='PAUSE_CODES_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $csea_to_print = mysqli_num_rows($rslt); $pause_max_exceptions_container_menu=''; $csea_selected=0; $o=0; while ($csea_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $pause_max_exceptions_container_menu .= "\n"; $o++; } if ($o < 1) {$pause_max_exceptions_container_menu .= "\n";} echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic WEEKDAY_TIMERANGE_SECONDS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='WEEKDAY_TIMERANGE_SECONDS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $in_man_dial_next_ready_seconds_override_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $in_man_dial_next_ready_seconds_override_menu .= "\n"; $o++; } echo "\n"; if ($SSmax_logged_in_agents > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; if ($SSsip_event_logging > 0) { ##### get container listings for dynamic sip event logging actions pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='SIP_EVENT_ACTIONS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $csea_to_print = mysqli_num_rows($rslt); $sip_event_actions_container_menu=''; $csea_selected=0; $o=0; while ($csea_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $sip_event_actions_container_menu .= "\n"; $o++; } echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSuser_territories_active > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; } if ( ($screen_labels=='--SYSTEM-SETTINGS--') or (strlen($screen_labels)<2) ) {$ASLlink = "$PHP_SELF?ADD=311111111111111";} else {$ASLlink = "$PHP_SELF?ADD=381111111111&label_id=$screen_labels";} echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic STATE_DESCRIPTIONS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='STATE_DESCRIPTIONS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $sdb_to_print = mysqli_num_rows($rslt); $state_descriptions_menu=''; $sdb_selected=0; $o=0; while ($sdb_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $state_descriptions_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for Calls In Queue Count Display pulldown menus $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='CALLS_IN_QUEUE_COUNT' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $csea_to_print = mysqli_num_rows($rslt); $calls_inqueue_count_one_container_menu=''; $calls_inqueue_count_two_container_menu=''; $csea_selected_one=0; $csea_selected_two=0; $o=0; while ($csea_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $calls_inqueue_count_one_container_menu .= "\n"; $calls_inqueue_count_two_container_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } $calls_inqueue_count_one_container_menu .= "\n"; $calls_inqueue_count_two_container_menu .= "value=\"DISABLED\">---"._QXZ("DISABLED")."---\n"; $o++; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSmanual_dial_validation =='1') { echo "\n"; } else { if ($SSmanual_dial_validation =='2') { echo "\n"; } else { echo "\n"; } } echo "\n"; echo "\n"; echo "\n"; if ($SSsip_event_logging > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSmanual_auto_next > 0) { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ($SSoutbound_autodial_active > 0) { echo "\n"; echo "\n"; } echo "\n"; # if ($SSoutbound_autodial_active > 0) # { # echo "\n"; # } echo "\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' $LOGadmin_viewable_groupsSQL order by group_alias_id;"; $rslt=mysql_to_mysqli($stmt, $link); $group_alias_to_print = mysqli_num_rows($rslt); $group_alias_menu=''; $group_alias_selected=0; $o=0; while ($group_alias_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_alias_menu .= "\n"; $o++; } echo "\n"; } if ($SSenable_vtiger_integration > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } if ($SSenable_queuemetrics_logging > 0) { echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; } if ( ($agent_servers_count > 1) and ($phones_alias_count > 0) ) { echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; } echo "\n"; echo "\n"; if ($start_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$campaign_id' and entry_type='campaign' and url_type='start';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($dispo_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$campaign_id' and entry_type='campaign' and url_type='dispo';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($na_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$campaign_id' and entry_type='campaign' and url_type='noagent';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$campaign_id' and entry_type='campaign' and url_type='talk';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($campaign_allow_inbound == 'Y') { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; if ($allow_closers == 'Y') { echo "\n"; } echo "\n"; echo "\n"; echo "
"._QXZ("Campaign ID").": $campaign_id$NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign Name").": $NWB#campaigns-campaign_name$NWE
"._QXZ("Campaign Description").": $NWB#campaigns-campaign_description$NWE
"._QXZ("Campaign Change Date").": $campaign_changedate   $NWB#campaigns-campaign_changedate$NWE
"._QXZ("Campaign Login Date").": $campaign_logindate   $NWB#campaigns-campaign_logindate$NWE
"._QXZ("Campaign Call Date").": $campaign_calldate   $NWB#campaigns-campaign_calldate$NWE
\n"; $temp_chart_title = _QXZ("8 Day outbound call count for this campaign"); horizontal_bar_chart($campaign_id,'8','campaign',$link,'total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Active").": $NWB#campaigns-active$NWE
"._QXZ("Admin User Group").": $NWB#campaigns-user_group$NWE
"._QXZ("Park Music-on-Hold").": "._QXZ("moh chooser")." $NWB#campaigns-park_ext$NWE
"._QXZ("Web Form").": $NWB#campaigns-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Web Form Two").": $NWB#campaigns-web_form_address$NWE
"._QXZ("Web Form Three").": $NWB#campaigns-web_form_address$NWE
"._QXZ("Web Form Target").": $NWB#campaigns-web_form_target$NWE
"._QXZ("Allow Closers").": $NWB#campaigns-allow_closers$NWE
"._QXZ("Allow Emails").": $NWB#campaigns-allow_emails$NWE
"._QXZ("Allow Chats").": $NWB#campaigns-allow_chats$NWE
"._QXZ("Allow Inbound and Blended").": $NWB#campaigns-campaign_allow_inbound$NWE
"._QXZ("Dial Status")." $o: \n"; if ($DEFstatusDISABLED > 0) { echo "$Dstatus - $statname_list[$Dstatus]         \n"; echo "REMOVE
"._QXZ("Add A Dial Status to Call").":   \n"; echo "     $NWB#campaigns-dial_status$NWE
"._QXZ("List Order").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { if (file_exists('options.php')) {require('options.php');} if (isset($camp_lead_order_random) && $camp_lead_order_random > 0) { echo "$NWB#campaigns-lead_order$NWE\n"; } else { echo "$NWB#campaigns-lead_order$NWE\n"; } } echo "
"._QXZ("List Order Randomize").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-lead_order_randomize$NWE"; } echo "
"._QXZ("List Order Secondary").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-lead_order_secondary$NWE"; } echo "
"._QXZ("List Mix").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-list_order_mix$NWE"; } echo "
"._QXZ("Lead Filter").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-lead_filter_id$NWE"; } echo "
"._QXZ("Auto Active List New").": $NWB#campaigns-auto_active_list_new$NWE
"; if ($cqlr_selected > 0) {echo ""._QXZ("Call Quota Lead Ranking")."";} else {echo _QXZ("Call Quota Lead Ranking");} echo ": $NWB#campaigns-call_quota_lead_ranking$NWE
"._QXZ("Demographic Quotas").": $NWB#campaigns-demographic_quotas$NWE $DQdebug
"._QXZ("All Demographic Quota goals have been filled for this campaign")."
"._QXZ("Demographic Quotas Force Re-Rank").": $NWB#campaigns-demographic_quotas_rerank$NWE   "._QXZ("last re-rank").": $demographic_quotas_last_rerank
"._QXZ("Demographic Quotas List Resets").": $NWB#campaigns-demographic_quotas_list_resets$NWE
"; if ($cqlr_selected > 0) {echo ""._QXZ("Demographic Quotas Container")."";} else {echo _QXZ("Demographic Quotas Container");} echo ": $NWB#campaigns-demographic_quotas_container$NWE
"._QXZ("Hopper Drop-Run Trigger").":   "._QXZ("All Drops").": $NWB#campaigns-hopper_drop_run_trigger$NWE
"._QXZ("Drop Lockout Time").": $NWB#campaigns-drop_lockout_time$NWE
"._QXZ("UK OFCOM Drop Calculation").": $NWB#settings-ofcom_uk_drop_calc$NWE
"._QXZ("Call Count Limit").": $NWB#campaigns-call_count_limit$NWE
"._QXZ("Call Count Target").": $NWB#campaigns-call_count_target$NWE
"._QXZ("Call Count Limit Manual Restrict").": $NWB#campaigns-call_count_limit_restrict$NWE
"._QXZ("Daily Call Count Limit").": $NWB#campaigns-daily_call_count_limit$NWE
"._QXZ("Daily Call Limit Manual").": $NWB#settings-daily_limit_manual$NWE
"._QXZ("Daily Phone Number Call Limit System-wide").": $NWB#campaigns-daily_phone_number_call_limit$NWE
"._QXZ("24-Hour Called Count Limit Method").": $NWB#campaigns-call_limit_24hour_method$NWE
"._QXZ("24-Hour Called Count Limit Scope").": $NWB#campaigns-call_limit_24hour_scope$NWE
"._QXZ("24-Hour Called Count Limit").": $NWB#campaigns-call_limit_24hour$NWE
"; if ($clo_selected > 0) {echo ""._QXZ("24-Hour Called Count Limit Override")."";} else {echo _QXZ("24-Hour Called Count Limit Override");} echo ": $NWB#campaigns-call_limit_24hour_override$NWE
"._QXZ("Minimum Hopper Level").": $NWB#campaigns-hopper_level$NWE
"._QXZ("Automatic Hopper Level").": $NWB#campaigns-use_auto_hopper$NWE
"._QXZ("Automatic Hopper Multiplier").": $NWB#campaigns-auto_hopper_multi$NWE
"._QXZ("Auto Trim Hopper").": $NWB#campaigns-auto_trim_hopper$NWE
"._QXZ("Hopper VLC Dup Check").": $NWB#campaigns-hopper_vlc_dup_check$NWE
"._QXZ("Manual Dial Hopper Check").": $NWB#campaigns-manual_dial_hopper_check$NWE
"._QXZ("Force Reset of Hopper").": $NWB#campaigns-force_reset_hopper$NWE
"._QXZ("Hopper Hold Inserts").": $NWB#campaigns-hopper_hold_inserts$NWE
"._QXZ("Auto-dialing has been disabled on this system")."
"._QXZ("Dial Method").": $NWB#campaigns-dial_method$NWE
"._QXZ("Auto Dial Level").": (0 = "._QXZ("off").")$NWB#campaigns-auto_dial_level$NWE       "._QXZ("ADAPT OVERRIDE")."
"._QXZ("Auto Dial Level Threshold").": $NWB#campaigns-dial_level_threshold$NWE       "._QXZ("agents").":
"._QXZ("Available Only Tally").": $NWB#campaigns-available_only_ratio_tally$NWE
"._QXZ("Available Only Tally Threshold").": $NWB#campaigns-available_only_tally_threshold$NWE       "._QXZ("agents").":
"._QXZ("Agent In-Call Tally Seconds Threshold").": "._QXZ("digits only")." $NWB#campaigns-incall_tally_threshold_seconds$NWE
"._QXZ("Drop Percentage Limit").": % $NWB#campaigns-adaptive_dropped_percentage$NWE
"._QXZ("Maximum Adapt Dial Level").": "._QXZ("number only")." $NWB#campaigns-adaptive_maximum_level$NWE
"._QXZ("Latest Server Time").": 4 "._QXZ("digits only")." $NWB#campaigns-adaptive_latest_server_time$NWE
"._QXZ("Adapt Percent-Max Percentage").": % $NWB#campaigns-adaptive_percentmax_percentage$NWE
"._QXZ("Adapt Intensity Modifier").": $NWB#campaigns-adaptive_intensity$NWE
"._QXZ("Dial Level Difference Target").": $NWB#campaigns-adaptive_dl_diff_target$NWE
"._QXZ("Dial Level Difference Target Method").": $NWB#campaigns-dl_diff_target_method$NWE
"._QXZ("Concurrent Transfers").": $NWB#campaigns-concurrent_transfers$NWE
"._QXZ("Queue Priority").": $NWB#campaigns-queue_priority$NWE
"._QXZ("Shared Dial Rank").": $NWB#campaigns-shared_dial_rank$NWE
"._QXZ("Multiple Campaign Drop Rate Group").": $NWB#campaigns-drop_rate_group$NWE
"._QXZ("Inbound Queue No Dial").": $NWB#campaigns-inbound_queue_no_dial$NWE
"; if ($inand_selected > 0) {echo ""._QXZ("Inbound No-Agents No-Dial")."";} else {echo _QXZ("Inbound No-Agents No-Dial");} echo ": $NWB#campaigns-inbound_no_agents_no_dial_container$NWE
"._QXZ("Inbound No-Agents No-Dial Threshold").": "._QXZ("number only")." $NWB#campaigns-inbound_no_agents_no_dial_threshold$NWE
"._QXZ("Auto Alt-Number Dialing").": $NWB#campaigns-auto_alt_dial$NWE $ALTmultiLINK
"._QXZ("Auto Alt-Number Dialing Threshold").": "._QXZ("number only")." $NWB#campaigns-auto_alt_threshold$NWE
"._QXZ("Next Agent Call").": $NWB#campaigns-next_agent_call$NWE
"._QXZ("Local Call Time").": $NWB#campaigns-local_call_time$NWE
\n"; $stmt="SELECT ct_state_call_times,ct_holidays from vicidial_call_times where call_time_id='$local_call_time';"; $rslt=mysql_to_mysqli($stmt, $link); $call_times_to_print = mysqli_num_rows($rslt); if ($call_times_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ct_state_call_times = $rowx[0]; $ct_holidays = $rowx[1]; $state_rules = explode('|',$ct_state_call_times); $holidays = explode('|',$ct_holidays); $ct_srs = ((count($state_rules)) - 2); $ct_hld = ((count($holidays)) - 2); if ($ct_srs < 0) {$ct_srs=0;} if ($ct_hld < 0) {$ct_hld=0;} echo ""._QXZ("State rules defined for this call time").": $ct_srs     "._QXZ("Holidays defined for this call time").": $ct_hld\n"; } else {echo ""._QXZ("Call time not found")."!: $local_call_time\n";} echo "
"._QXZ("Dial Timeout").": "._QXZ("in seconds")."$NWB#campaigns-dial_timeout$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("Dial Timeout Lead Container")."";} else {echo _QXZ("Dial Timeout Lead Container");} echo ": $NWB#campaigns-dial_timeout_lead_container$NWE
"._QXZ("Dial Prefix").": "._QXZ("for")." 91NXXNXXXXXX "._QXZ("value would be 9, for no dial prefix use X")."$NWB#campaigns-dial_prefix$NWE
"._QXZ("Manual Dial Prefix").": $NWB#campaigns-manual_dial_prefix$NWE
"._QXZ("Omit Phone Code").": $NWB#campaigns-omit_phone_code$NWE
$DID_edit_link_BEGIN"._QXZ("Campaign CallerID")."$DID_edit_link_END: $NWB#campaigns-campaign_cid$NWE\n"; $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and campaign_cid_override != '' and active='Y' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {echo " "._QXZ("LIST OVERRIDE ACTIVE")."";} echo "
"._QXZ("Custom CallerID").": $NWB#campaigns-use_custom_cid$NWE
"; if ($cid_groups_selected > 0) {echo ""._QXZ("CID Group")."";} else {echo _QXZ("CID Group");} echo ": $NWB#campaigns-cid_group_id$NWE
"; if ($cid_groups_two_selected > 0) {echo ""._QXZ("CID Group Failover")."";} else {echo _QXZ("CID Group Failover");} echo ": $NWB#campaigns-cid_group_id_two$NWE
"._QXZ("Campaign CID Name").": $NWB#campaigns-opensips_cid_name$NWE\n"; } else {echo "
"._QXZ("Routing Extension").": $NWB#campaigns-campaign_vdad_exten$NWE
"._QXZ("Agent Search Method Override").": $NWB#campaigns-agent_search_method$NWE
"._QXZ("Campaign Rec exten").": $NWB#campaigns-campaign_rec_exten$NWE
"._QXZ("Campaign Recording").": $NWB#campaigns-campaign_recording$NWE
"._QXZ("Campaign Rec Filename").": $NWB#campaigns-campaign_rec_filename$NWE
"._QXZ("Recording Delay").": "._QXZ("in seconds")."$NWB#campaigns-allcalls_delay$NWE
"._QXZ("Routing Initiated Recording").": $NWB#campaigns-routing_initiated_recordings$NWE
"._QXZ("Mute Recording Button").": $NWB#campaigns-mute_recordings$NWE
"._QXZ("Stereo Call Recordings").": $NWB#campaigns-stereo_recording$NWE
"._QXZ("Stereo Recording Agent Control").": $NWB#campaigns-stereo_recording_agent$NWE
"._QXZ("Stereo Rec Filename").": $NWB#campaigns-stereo_rec_filename$NWE
"._QXZ("Parallel Stereo Recordings").": $NWB#campaigns-stereo_parallel_recording$NWE
"._QXZ("Parallel Customer-Only Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Parallel Customer-Muted Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Parallel Full-Recording Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Recording DTMF Muting").": $NWB#campaigns-recording_dtmf_muting$NWE $SYSTEM_DTMF_MUTING_OVERRIDE
"._QXZ("Call Notes Per Call").": $NWB#campaigns-per_call_notes$NWE
"._QXZ("Per Call Notes Required").": $NWB#campaigns-force_per_call_notes$NWE
"._QXZ("Comments All Tabs").": $NWB#campaigns-comments_all_tabs$NWE
"._QXZ("Comments Dispo Screen").": $NWB#campaigns-comments_dispo_screen$NWE
"._QXZ("Comments Callback Screen").": $NWB#campaigns-comments_callback_screen$NWE
"._QXZ("QC Comments History").": $NWB#campaigns-qc_comment_history$NWE
"._QXZ("Hide Call Log Info").": $NWB#campaigns-hide_call_log_info$NWE
"._QXZ("Call Log View Days").": $NWB#campaigns-call_log_days$NWE
"._QXZ("Agent Lead Search").": $NWB#campaigns-agent_lead_search$NWE
"._QXZ("Agent Lead Search Method").": $NWB#campaigns-agent_lead_search_method$NWE
"._QXZ("Agent Search In-Group List Restrict").": $NWB#campaigns-agent_search_ingroup_list$NWE
"._QXZ("Script").": $NWB#campaigns-campaign_script$NWE\n"; $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and agent_script_override != '' and active='Y' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {echo " "._QXZ("LIST OVERRIDE ACTIVE")."";} echo "
"._QXZ("Script Two").": $NWB#campaigns-campaign_script$NWE
"._QXZ("Clear Script").": $NWB#campaigns-clear_script$NWE
"._QXZ("User Group Script Override").": $NWB#campaigns-user_group_script$NWE
"._QXZ("Script Tab Frame Location").": $NWB#campaigns-script_tab_frame_size$NWE
"._QXZ("Script Tab Height Override").": $NWB#campaigns-script_tab_height$NWE
"._QXZ("Clear Form Tab").": $NWB#campaigns-clear_form$NWE
"._QXZ("Get Call Launch").": $NWB#campaigns-get_call_launch$NWE
"._QXZ("Agent Browser Call Alert Sound").":   \n"; echo " "._QXZ("volume").":   "; echo ""._QXZ("play selected sound")." $NWB#campaigns-browser_alert_sound$NWE  
"._QXZ("Show Confetti").": $NWB#campaigns-show_confetti$NWE
"._QXZ("Answering Machine Message").": "._QXZ("audio chooser")." $NWB#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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {echo " "._QXZ("LIST OVERRIDE ACTIVE")."";} echo "
"._QXZ("Voicemail Message Daily Limit").": $NWB#campaigns-vmm_daily_limit$NWE
"._QXZ("WaitForSilence Options").": $NWB#campaigns-waitforsilence_options$NWE
"._QXZ("Manual VM Status Updates").": $NWB#campaigns-manual_vm_status_updates$NWE
"._QXZ("AM Message Wildcards").": $NWB#campaigns-am_message_wildcards$NWE "._QXZ("AM Message Wildcards Defined").": $vam_count
"._QXZ("AM Message Wildcards").": $NWB#campaigns-am_message_wildcards$NWE
"._QXZ("ViciAMD Agent Display").": $NWB#campaigns-amd_agent_display$NWE
"._QXZ("AMD Type").": $NWB#campaigns-amd_type$NWE$ViciAMD_settings
"._QXZ("AMD send to Action").": $NWB#campaigns-amd_send_to_vmx$NWE
$amdaro_B"._QXZ("AMD Agent Route Options")."$amdaro_E: $NWB#campaigns-amd_agent_route_options$NWE
"; if ($pws_selected > 0) {echo ""._QXZ("AMD Status Map")."";} else {echo _QXZ("AMD Status Map");} echo ": $NWB#campaigns-amd_status_map$NWE"; if ( (strlen($SSamd_status_map) > 0) and (!preg_match("/^DISABLED$/i",$SSamd_status_map)) ) {echo "   "._QXZ("System AMD Status Map set")."";} else {echo "   "._QXZ("no system AMD Status Map set")."";} echo "
"._QXZ("CPD AMD Action").": $NWB#campaigns-cpd_amd_action$NWE
"._QXZ("CPD Unknown Action").": $NWB#campaigns-cpd_unknown_action$NWE
"._QXZ("AMD Inbound Group").": $NWB#campaigns-amd_inbound_group$NWE\n"; echo "
"._QXZ("AMD Call Menu").": $NWB#campaigns-amd_callmenu$NWE\n"; echo "
"; if ($twrse_selected > 0) {echo ""._QXZ("KHOMP Settings")."";} else {echo _QXZ("KHOMP Settings");} echo ": $NWB#campaigns-khomp_settings_container$NWE
"._QXZ("VM Message Group").": $NWB#campaigns-leave_vm_message_group_id$NWE\n"; echo "
"._QXZ("Leave VM No Dispo").": $NWB#campaigns-leave_vm_no_dispo$NWE\n"; echo "
"._QXZ("Transfer-Conf DTMF")." 1: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 1: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf DTMF")." 2: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 2: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 3: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 4: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 5: $NWB#campaigns-xferconf_a_dtmf$NWE
"._QXZ("Enable Transfer Presets").": $NWB#campaigns-enable_xfer_presets$NWE
"._QXZ("Hide Transfer Number to Dial").": $NWB#campaigns-hide_xfer_number_to_dial$NWE
"._QXZ("PrePopulate Transfer Preset").": $NWB#campaigns-prepopulate_transfer_preset$NWE
"._QXZ("Quick Transfer Button").": $NWB#campaigns-quick_transfer_button$NWE
"._QXZ("Transfer-Conf Button Launch").": $NWB#campaigns-transfer_button_launch$NWE
"._QXZ("Transfer No Dispo").": $NWB#campaigns-transfer_no_dispo$NWE
"._QXZ("Custom 3-Way Button Transfer").": $NWB#campaigns-custom_3way_button_transfer$NWE
"._QXZ("3-Way Call Outbound CallerID").": $NWB#campaigns-three_way_call_cid$NWE
"._QXZ("3-Way Call Dial Prefix").": $NWB#campaigns-three_way_dial_prefix$NWE
"._QXZ("3-Way Volume Buttons").": $NWB#campaigns-three_way_volume_buttons$NWE
"._QXZ("Customer 3-Way Hangup Logging").": $NWB#campaigns-customer_3way_hangup_logging$NWE
"._QXZ("Customer 3-Way Hangup Seconds").": $NWB#campaigns-customer_3way_hangup_seconds$NWE
"._QXZ("Customer 3-Way Hangup Action").": $NWB#campaigns-customer_3way_hangup_action$NWE
"._QXZ("3-Way Recording Stop").": $NWB#campaigns-three_way_record_stop$NWE
"; if ($twrse_selected > 0) {echo ""._QXZ("3-Way Recording Stop Exception")."";} else {echo _QXZ("3-Way Recording Stop Exception");} echo ": $NWB#campaigns-three_way_record_stop_exception$NWE
"._QXZ("Leave 3-Way Start Recording").": $NWB#campaigns-leave_3way_start_recording$NWE
"; if ($twrse_selected > 0) {echo ""._QXZ("Leave 3-Way Start Recording Exception")."";} else {echo _QXZ("Leave 3-Way Start Recording Exception");} echo ": $NWB#campaigns-leave_3way_start_recording_exception$NWE
"._QXZ("Leave 3-Way Stop Recording").": $NWB#campaigns-leave_3way_stop_recording$NWE
"._QXZ("Hangup Xfer Recording Start").": $NWB#campaigns-hangup_xfer_record_start$NWE
"._QXZ("Park Call IVR").": $NWB#campaigns-ivr_park_call$NWE
"._QXZ("Park Call IVR AGI").": $NWB#campaigns-ivr_park_call_agi$NWE
"._QXZ("Timer Action").": $NWB#campaigns-timer_action$NWE
"._QXZ("Timer Action Message").": $NWB#campaigns-timer_action_message$NWE
"._QXZ("Timer Action Seconds").": $NWB#campaigns-timer_action_seconds$NWE
"._QXZ("Timer Action Destination").": $NWB#campaigns-timer_action_destination$NWE
"._QXZ("Scheduled Callbacks").": $NWB#campaigns-scheduled_callbacks$NWE
"._QXZ("Scheduled Callbacks Alert").": $NWB#campaigns-scheduled_callbacks_alert$NWE
"._QXZ("Send Callbacks Email").": $NWB#campaigns-scheduled_callbacks_email_alert$NWE
"._QXZ("Scheduled Callbacks Count").": $NWB#campaigns-scheduled_callbacks_count$NWE
"._QXZ("Scheduled Callbacks Days Limit").": $NWB#campaigns-callback_days_limit$NWE
"._QXZ("Scheduled Callbacks Hours Block").": $NWB#campaigns-callback_hours_block$NWE
"._QXZ("Scheduled Callbacks Calltime Block").": $NWB#campaigns-callback_list_calltime$NWE
"._QXZ("Scheduled Callbacks Active Limit").": $NWB#campaigns-callback_active_limit$NWE
"._QXZ("Scheduled Callbacks Active Limit Override").": $NWB#campaigns-callback_active_limit_override$NWE
"._QXZ("Scheduled Callbacks Display Days").": $NWB#campaigns-callback_display_days$NWE
"._QXZ("Anyone Callbacks DNC Filter").": $NWB#campaigns-callback_dnc$NWE
"._QXZ("My Callbacks Checkbox Default").": $NWB#campaigns-my_callback_option$NWE
"._QXZ("Show Previous Callback").": $NWB#campaigns-show_previous_callback$NWE
"._QXZ("Scheduled Callbacks Useronly Move Minutes").": $NWB#campaigns-callback_useronly_move_minutes$NWE
"._QXZ("Next-Dial My Callbacks").": $NWB#campaigns-next_dial_my_callbacks$NWE
"._QXZ("Scheduled Callbacks Force Dial").": $NWB#campaigns-scheduled_callbacks_force_dial$NWE
"; if ($tzlc_selected > 0) {echo ""._QXZ("Scheduled Callbacks Local Timezones")."";} else {echo _QXZ("Scheduled Callbacks Local Timezones");} echo ": "; } else { echo "
"._QXZ("Scheduled Callbacks Local Timezones").": "._QXZ("Feature Disabled,
Administrator must update phone codes for this feature to work").".
"; } echo "$NWB#campaigns-scheduled_callbacks_timezones_container$NWE
"._QXZ("Scheduled Callbacks Auto Reschedule").": $NWB#campaigns-scheduled_callbacks_auto_reschedule$NWE
"._QXZ("Drop Call Seconds").": $NWB#campaigns-drop_call_seconds$NWE
"._QXZ("Drop Action").": $NWB#campaigns-drop_action$NWE
"._QXZ("Safe Harbor Exten").": $NWB#campaigns-safe_harbor_exten$NWE
"._QXZ("Safe Harbor Audio").": "._QXZ("audio chooser")." $NWB#campaigns-safe_harbor_audio$NWE
"._QXZ("Safe Harbor Audio Field").": $NWB#campaigns-safe_harbor_audio_field$NWE
"._QXZ("Safe Harbor Call Menu").": $NWB#campaigns-safe_harbor_menu_id$NWE
"._QXZ("Voicemail").": "._QXZ("voicemail chooser")."$NWB#campaigns-voicemail_ext$NWE
"._QXZ("Drop Transfer Group").": $NWB#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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {echo " "._QXZ("LIST OVERRIDE ACTIVE")."";} echo "
"._QXZ("Agent Call Hangup Route").": $NWB#campaigns-agent_hangup_route$NWE
$ACHR_title: $ACHR_chooser$NWB#campaigns-agent_hangup_value$NWE
"._QXZ("Agent Hangup In-Group Override").": $NWB#campaigns-agent_hangup_ig_override$NWE
"._QXZ("Hide Customer Hangup Button").": $NWB#campaigns-agent_hide_hangup$NWE
"._QXZ("Show Hangup Again Link").": $NWB#campaigns-hangup_again_link$NWE
"._QXZ("Disable Dispo Screen").": $NWB#campaigns-disable_dispo_screen$NWE
"._QXZ("Disable Dispo Status").": $NWB#campaigns-disable_dispo_status$NWE
"._QXZ("Script on top of Dispo").": $NWB#campaigns-script_top_dispo$NWE
"._QXZ("Wrap Up Seconds").": $NWB#campaigns-wrapup_seconds$NWE
"._QXZ("Wrap Up Message").": $NWB#campaigns-wrapup_message$NWE
"._QXZ("Wrap Up Bypass").": $NWB#campaigns-wrapup_bypass$NWE
"._QXZ("Wrap Up After Hotkey").": $NWB#campaigns-wrapup_after_hotkey$NWE
"._QXZ("Dead Call Trigger Action").": $NWB#campaigns-dead_trigger_action$NWE
"._QXZ("Dead Call Trigger Seconds").": $NWB#campaigns-dead_trigger_seconds$NWE
"._QXZ("Dead Call Trigger Repeat").": $NWB#campaigns-dead_trigger_repeat$NWE
"._QXZ("Dead Call Trigger Audio").": "._QXZ("audio chooser")." $NWB#campaigns-dead_trigger_filename$NWE
"._QXZ("Dead Call Trigger URL").": $NWB#campaigns-dead_trigger_url$NWE
"._QXZ("Dead Call Max Seconds").": $NWB#campaigns-dead_max$NWE
"._QXZ("Dead Call Max Status").": $NWB#campaigns-dead_max_dispo$NWE
"._QXZ("Dead Call to Dispo Only").": $NWB#campaigns-dead_to_dispo$NWE
"._QXZ("Dead Call Stop Recording").": $NWB#campaigns-dead_stop_recording$NWE
"._QXZ("Dispo Call Max Seconds").": $NWB#campaigns-dispo_max$NWE
"._QXZ("Dispo Call Max Status").": $NWB#campaigns-dispo_max_dispo$NWE
"._QXZ("Agent Pause Max Seconds").": $NWB#campaigns-pause_max$NWE
"._QXZ("Agent Pause Max Status").": $NWB#campaigns-pause_max_dispo$NWE
"; if ($csea_selected > 0) {echo ""._QXZ("Agent Pause Max Exceptions")."";} else {echo _QXZ("Agent Pause Max Exceptions");} echo ": $NWB#campaigns-pause_max_exceptions$NWE
"._QXZ("Pause Max URL").": $NWB#campaigns-pause_max_url$NWE
"._QXZ("Agent Ready Max Seconds Logout").": $NWB#campaigns-ready_max_logout$NWE
"._QXZ("Inbound Manual Dial Agent Forced Ready Seconds").": $NWB#campaigns-in_man_dial_next_ready_seconds$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("InMan Agent Forced Ready Override Container")."";} else {echo _QXZ("InMan Agent Forced Ready Override Container");} echo ": $NWB#campaigns-in_man_dial_next_ready_seconds_override$NWE
"._QXZ("Max Logged-In Agents").": $NWB#campaigns-max_logged_in_agents$NWE
"._QXZ("Customer Gone Warning Seconds").": $NWB#campaigns-customer_gone_seconds$NWE
"; if ($csea_selected > 0) {echo ""._QXZ("SIP Event Actions")."";} else {echo _QXZ("SIP Event Actions");} echo ": $NWB#campaigns-sip_event_logging$NWE
"._QXZ("Use Internal DNC List").": $NWB#campaigns-use_internal_dnc$NWE
"._QXZ("Use Campaign DNC List").": $NWB#campaigns-use_campaign_dnc$NWE
"._QXZ("Other Campaign DNC").": $NWB#campaigns-use_other_campaign_dnc$NWE
"._QXZ("Agent Pause Codes Active").": $NWB#campaigns-agent_pause_codes_active$NWE
"._QXZ("Auto Pause Pre-Call Work").": $NWB#campaigns-auto_pause_precall$NWE
"._QXZ("Auto Resume Pre-Call Work").": $NWB#campaigns-auto_resume_precall$NWE
"._QXZ("Auto Pause Pre-Call Code").": $NWB#campaigns-auto_pause_precall_code$NWE
"._QXZ("Campaign Stats Refresh").": $NWB#campaigns-campaign_stats_refresh$NWE
"._QXZ("Real-Time Agent Time Stats").": $NWB#campaigns-realtime_agent_time_stats$NWE
"._QXZ("Disable Alter Customer Data").": $NWB#campaigns-disable_alter_custdata$NWE
"._QXZ("Disable Alter Customer Phone").": $NWB#campaigns-disable_alter_custphone$NWE
"._QXZ("Allow No-Hopper-Leads Logins").": $NWB#campaigns-no_hopper_leads_logins$NWE
"._QXZ("No Hopper Dialing").": $NWB#campaigns-no_hopper_dialing$NWE
"._QXZ("Owner Only Dialing").": $NWB#campaigns-agent_dial_owner_only$NWE
"._QXZ("Owner Populate").": $NWB#campaigns-owner_populate$NWE
"._QXZ("Agent Select Territories").": $NWB#campaigns-agent_select_territories$NWE
"._QXZ("Agent Display Dialable Leads").": $NWB#campaigns-agent_display_dialable_leads$NWE
"._QXZ("Agent Screen Labels").": $NWB#campaigns-screen_labels$NWE
"._QXZ("Allow Required Fields").": $NWB#campaigns-allow_required_fields$NWE
"._QXZ("Status Display Fields").": $NWB#campaigns-status_display_fields$NWE
"._QXZ("Status Display In-Group").": $NWB#campaigns-status_display_ingroup$NWE
"; if ($sdb_selected > 0) {echo ""._QXZ("State Descriptions Banner")."";} else {echo _QXZ("State Descriptions Banner");} echo ": $NWB#campaigns-state_descriptions$NWE
"._QXZ("Agent Display Fields").": $NWB#campaigns-agent_display_fields$NWE
"._QXZ("Agent Screen Time Display").": $NWB#campaigns-agent_screen_time_display$NWE
"._QXZ("Agent Display Queue Count").": $NWB#campaigns-display_queue_count$NWE
"; if ($csea_selected_one > 0) {echo ""._QXZ("Calls In Queue Count Display")." 1";} else {echo _QXZ("Calls In Queue Count Display")." 1";} echo ": $NWB#campaigns-calls_inqueue_count$NWE
"; if ($csea_selected_two > 0) {echo ""._QXZ("Calls In Queue Count Display")." 2";} else {echo _QXZ("Calls In Queue Count Display")." 2";} echo ": $NWB#campaigns-calls_inqueue_count$NWE
"._QXZ("Agent View Calls in Queue").": $NWB#campaigns-view_calls_in_queue$NWE
"._QXZ("View Calls in Queue Launch").": $NWB#campaigns-view_calls_in_queue_launch$NWE
"._QXZ("Calls in Queue Extra Column 1").": $NWB#campaigns-calls_waiting_vl_one$NWE
"._QXZ("Calls in Queue Extra Column 2").": $NWB#campaigns-calls_waiting_vl_one$NWE
"._QXZ("Agent Grab Calls in Queue").": $NWB#campaigns-grab_calls_in_queue$NWE
"._QXZ("Agent Call Re-Queue Button").": $NWB#campaigns-call_requeue_button$NWE
"._QXZ("Agent Pause After Each Call").": $NWB#campaigns-pause_after_each_call$NWE
"._QXZ("Agent Pause After Next Call Link").": $NWB#campaigns-pause_after_next_call$NWE
"._QXZ("Manual Dial Override").": $NWB#campaigns-manual_dial_override$NWE
"._QXZ("Manual Dial Override Field").": $NWB#campaigns-manual_dial_override_field$NWE
"._QXZ("Manual Dial List ID").": $NWB#campaigns-manual_dial_list_id$NWE
"._QXZ("Manual Dial Filter").": $NWB#campaigns-manual_dial_filter$NWE
"._QXZ("Manual Preview Dial").": $NWB#campaigns-manual_preview_dial$NWE
"._QXZ("Manual Dial Search Checkbox").": $NWB#campaigns-manual_dial_search_checkbox$NWE
"._QXZ("Manual Dial Search Filter").": $NWB#campaigns-manual_dial_search_filter$NWE
"._QXZ("Manual Dial by Lead ID").": $NWB#campaigns-manual_dial_lead_id$NWE
"._QXZ("Manual Call Time Check").": $NWB#campaigns-manual_dial_call_time_check$NWE
"._QXZ("Manual Dial Validation").": $NWB#campaigns-manual_dial_validation$NWE
"._QXZ("Manual Dial Validation").": "._QXZ("Y")." $NWB#campaigns-manual_dial_validation$NWE
"._QXZ("Manual Dial API").": $NWB#campaigns-api_manual_dial$NWE
"._QXZ("Manual Dial CID").": $NWB#campaigns-manual_dial_cid$NWE
"._QXZ("Manual Dial Timeout").": "._QXZ("in seconds")." $NWB#campaigns-manual_dial_timeout$NWE
"._QXZ("Manual Minimum Ring Seconds").": "._QXZ("in seconds")." $NWB#campaigns-manual_minimum_ring_seconds$NWE
"._QXZ("Manual Minimum Attempt Seconds").": "._QXZ("in seconds")." $NWB#campaigns-manual_minimum_attempt_seconds$NWE
"._QXZ("Manual Minimum Answer Seconds").": "._QXZ("in seconds")." $NWB#campaigns-manual_minimum_answer_seconds$NWE
"._QXZ("Phone Post Time Difference Alert").": $NWB#campaigns-post_phone_time_diff_alert$NWE
"._QXZ("In-Group Manual Dial").": $NWB#campaigns-in_group_dial$NWE
"._QXZ("In-Group Manual Dial Select").": $NWB#campaigns-in_group_dial_select$NWE
"._QXZ("Manual Auto Next Seconds").": $NWB#campaigns-manual_auto_next$NWE
"._QXZ("Manual Auto Next Options").": $NWB#campaigns-manual_auto_next_options$NWE
"._QXZ("Manual Auto Next Show Timer").": $NWB#campaigns-manual_auto_show$NWE
"._QXZ("Manual Alt Num Dialing").": $NWB#campaigns-alt_number_dialing$NWE
"._QXZ("Timer Alt Seconds").": $NWB#campaigns-timer_alt_seconds$NWE
"._QXZ("Agent Screen Clipboard Copy").": $NWB#campaigns-agent_clipboard_copy$NWE
"._QXZ("Agent Screen Extended Alt Dial").": $NWB#campaigns-agent_extended_alt_dial$NWE
"._QXZ("Group Alias Allowed").": $NWB#campaigns-agent_allow_group_alias$NWE
"._QXZ("Default Group Alias").": $NWB#campaigns-default_group_alias$NWE
"._QXZ("Vtiger Search Category").": $NWB#campaigns-vtiger_search_category$NWE
"._QXZ("Vtiger Search Dead Accounts").": $NWB#campaigns-vtiger_search_dead$NWE
"._QXZ("Vtiger Create Call Record").": $NWB#campaigns-vtiger_create_call_record$NWE
"._QXZ("Vtiger Create Lead Record").": $NWB#campaigns-vtiger_create_lead_record$NWE
"._QXZ("Vtiger Status Call").": $NWB#campaigns-vtiger_status_call$NWE
"._QXZ("Vtiger Screen Login").": $NWB#campaigns-vtiger_screen_login$NWE
"._QXZ("QM CallStatus Override").": $NWB#campaigns-queuemetrics_callstatus$NWE
"._QXZ("QM Phone Environment").": $NWB#campaigns-queuemetrics_phone_environment$NWE
"._QXZ("PLLB Grouping").": $NWB#campaigns-pllb_grouping$NWE
"._QXZ("PLLB Grouping Limit").": $NWB#campaigns-pllb_grouping_limit$NWE
"._QXZ("CRM Popup Login").": $NWB#campaigns-crm_popup_login$NWE
"._QXZ("CRM Popup Address").": $NWB#campaigns-crm_login_address$NWE
"._QXZ("Start Call URL").": $NWB#campaigns-start_call_url$NWE "._QXZ("Alternate Start URLs Defined").": $vum_count
"._QXZ("Start Call URL").": $NWB#campaigns-start_call_url$NWE
"._QXZ("Dispo Call URL").": $NWB#campaigns-dispo_call_url$NWE "._QXZ("Alternate Dispo URLs Defined").": $vum_count
"._QXZ("Dispo Call URL").": $NWB#campaigns-dispo_call_url$NWE
"._QXZ("No Agent Call URL").": $NWB#campaigns-na_call_url$NWE "._QXZ("Alternate No Agent URLs Defined").": $vum_count
"._QXZ("No Agent Call URL").": $NWB#campaigns-na_call_url$NWE
"._QXZ("Talk Seconds URLs").": $NWB#campaigns-talk_sec_url$NWE "._QXZ("Talk Seconds URLs Defined").": $vum_count
"._QXZ("Extension Append CID").": $NWB#campaigns-extension_appended_cidname$NWE
"._QXZ("Blind Monitor Warning").": $NWB#campaigns-blind_monitor_warning$NWE
"._QXZ("Blind Monitor Notice").": $NWB#campaigns-blind_monitor_message$NWE
"._QXZ("Blind Monitor Filename").": "._QXZ("audio chooser")." $NWB#campaigns-blind_monitor_filename$NWE
"._QXZ("Custom 1").": $NWB#campaigns-custom_fields$NWE
"._QXZ("Custom 2").": $NWB#campaigns-custom_fields$NWE
"._QXZ("Custom 3").": $NWB#campaigns-custom_fields$NWE
"._QXZ("Custom 4").": $NWB#campaigns-custom_fields$NWE
"._QXZ("Custom 5").": $NWB#campaigns-custom_fields$NWE
"._QXZ("Max Inbound Calls").": $NWB#campaigns-max_inbound_calls$NWE
"._QXZ("Max Inbound Calls Outcome").": $NWB#campaigns-max_inbound_calls_outcome$NWE
"._QXZ("Allowed Inbound Groups").":
"; echo " $NWB#campaigns-closer_campaigns$NWE
\n"; echo "$groups_list"; echo "
"._QXZ("Default Transfer Group").": $NWB#campaigns-default_xfer_group$NWE
"._QXZ("Agent Transfer In-Group Validation").": $NWB#campaigns-agent_xfer_validation$NWE
"._QXZ("Transfer In-Group Sort Order").": $NWB#campaigns-ig_xfer_list_sort$NWE
"._QXZ("Allowed Transfer Groups").":
"; echo " $NWB#campaigns-xfer_groups$NWE
\n"; echo "$XFERgroups_list"; echo "
\n"; if ($SSbrowser_call_alerts > 0) { $bas=0; $bas_embed_output=''; while ($browser_alert_sounds_listARY_ct > $bas) { $bas_embed_output .= "\n"; $bas++; } echo "$bas_embed_output"; echo "\n"; } echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSoutbound_autodial_active > 0) { echo "
"._QXZ("LISTS WITHIN THIS CAMPAIGN").":   $NWB#campaign_lists$NWE\n"; echo "
\n"; echo ""; $LISTlink='stage=LISTIDDOWN'; $NAMElink='stage=LISTNAMEDOWN'; $CALLTIMElink='stage=CALLTIMEDOWN'; $TALLYlink='stage=TALLYDOWN'; $ACTIVElink='stage=ACTIVEDOWN'; $CAMPAIGNlink='stage=CAMPAIGNDOWN'; $CALLDATElink='stage=CALLDATEDOWN'; $SQLorder='order by list_id'; if (preg_match('/LISTIDUP/i', $stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} if (preg_match('/LISTIDDOWN/i', $stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} if (preg_match('/LISTNAMEUP/i', $stage)) {$SQLorder='order by list_name asc'; $NAMElink='stage=LISTNAMEDOWN';} if (preg_match('/LISTNAMEDOWN/i', $stage)) {$SQLorder='order by list_name desc'; $NAMElink='stage=LISTNAMEUP';} if (preg_match('/CALLTIMEUP/i', $stage)) {$SQLorder='order by local_call_time asc'; $CALLTIMElink='stage=CALLTIMEDOWN';} if (preg_match('/CALLTIMEDOWN/i', $stage)) {$SQLorder='order by local_call_time desc'; $CALLTIMElink='stage=CALLTIMEUP';} if (preg_match('/TALLYUP/i', $stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} if (preg_match('/TALLYDOWN/i', $stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} if (preg_match('/ACTIVEUP/i', $stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} if (preg_match('/ACTIVEDOWN/i', $stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} if (preg_match('/CAMPAIGNUP/i',$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} if (preg_match('/CAMPAIGNUP/i', $stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} if (preg_match('/CALLDATEUP/i', $stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} if (preg_match('/CALLDATEDOWN/i', $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,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id and campaign_id='$campaign_id' $LOGallowed_campaignsSQL group by list_id $SQLorder"; if ($SSadmin_list_counts < 1) {$stmt="SELECT list_id,list_name,list_description,'X' as tally,active,list_lastcalldate,campaign_id,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists where campaign_id='$campaign_id' $LOGallowed_campaignsSQL $SQLorder";} $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $last_list_statuses=""; $camp_lists=""; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); $last_list_statuses.="$row[0]|$row[4]|"; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo ""; echo ""; echo ""; echo ""; if ($row[8] == 'campaign') {echo "";} else {echo "";} echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "\n"; echo "
"._QXZ("LIST ID").""._QXZ("LIST NAME").""._QXZ("DESCRIPTION").""._QXZ("LEADS COUNT").""._QXZ("Call Time").""._QXZ("ACTIVE").""._QXZ("LAST CALL DATE")."MODIFY
$row[0] $row[1] $row[2] $row[3] $row[8] $row[8] "._QXZ("$row[4]").""; if (preg_match('/Y/',$row[4])) { $active_lists++; $camp_lists .= "'$row[0]',"; echo ""; } else { $inactive_lists++; echo ""; if ($row[7] < $EXPtestdate) {echo ""._QXZ("EXP")."";} else {echo " ";} echo " $row[5]"._QXZ("MODIFY")."
"; echo ""; echo "

\n"; if ($lead_filter_id=="NONE") {$filterSQL="";} else { $filterSQL = $filtersql_list[$lead_filter_id]; $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = preg_replace('/^and|and$|^or|or$/i', '',$filterSQL); } if (strlen($filterSQL)>4) {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} $camp_lists = preg_replace('/.$/i','',$camp_lists); echo "
"._QXZ("This campaign has")." $active_lists "._QXZ("active lists and")." $inactive_lists "._QXZ("inactive lists")."

\n"; $dial_statuses_original = $dial_statuses; if ( ($display_leads_count == 'Y') and (strlen($camp_lists) > 3) ) { # grab names of global statuses and statuses in the selected campaign $stmt="SELECT status,status_name,completed from vicidial_statuses order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_name_list["$rowx[0]"] = "$rowx[1]"; $statuses_complete_list["$rowx[0]"] = "$rowx[2]"; $o++; } $stmt="SELECT status,status_name,completed from vicidial_campaign_statuses where campaign_id IN($camp_status_groups'$campaign_id') $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $Cstatuses_to_print = mysqli_num_rows($rslt); $o=0; while ($Cstatuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_name_list["$rowx[0]"] = "$rowx[1]"; $statuses_complete_list["$rowx[0]"] = "$rowx[2]"; $o++; } # end grab status names echo "
"._QXZ("STATUSES WITHIN THE ACTIVE LISTS FOR THIS CAMPAIGN").":\n"; echo " - "._QXZ("HIDE")."
"; if ($SSexpanded_list_stats > 0) { echo "\n"; $dialable_total=0; $complete_total=0; $fSQL = ''; $stmt="SELECT lead_filter_sql from vicidial_lead_filters where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $filters_to_print = mysqli_num_rows($rslt); if ($filters_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $filterSQL = $rowx[0]; $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = preg_replace('/^and|and$|^or|or$/i', '',$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} } echo "\n"; } else { echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME").""._QXZ("CALLED").""._QXZ("NOT CALLED").""._QXZ("DIALABLE").""._QXZ("PENETRATION")."
\n"; echo "\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 IN($camp_lists) group by status,called_since_last_reset order by status,called_since_last_reset;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($statuses_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($dispo,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $dispo => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} if ($dispo == 'CBHOLD') { $CLB=""; $CLE=""; } else { $CLB=''; $CLE=''; } if ($SSexpanded_list_stats > 0) { ### call function to calculate dialable leads $single_status=1; $only_return=0; $dial_statuses=" $dispo -"; if ($statuses_complete_list[$dispo] == 'Y') {$Xdialable_count=0;} else {$Xdialable_count = dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,$fSQL,$only_return);} $dialable_total = ($dialable_total + $Xdialable_count); ### get number of complete calls of this status for penetration calculations $Xcomplete_count = complete_leads($DB,$link,$dial_statuses,$camp_lists,$call_count_limit,$single_status,$campaign_id); $complete_total = ($complete_total + $Xcomplete_count); $dispo_total = ($lead_list['Y'][$dispo] + $lead_list['N'][$dispo]); if ( ($Xcomplete_count < 1) or ($dispo_total < 1) ) {$complete_pct = "0";} else { $complete_pct = intval(($Xcomplete_count / $dispo_total) * 100); } echo "\n"; } else { echo "\n"; } $o++; } } if ($SSexpanded_list_stats > 0) { if ( ($complete_total < 1) or ($lead_list['count'] < 1) ) {$total_complete_pct = "0";} else {$total_complete_pct = intval(($complete_total / $lead_list['count']) * 100);} echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; } echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$dispo$CLE$statuses_name_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]." $Xdialable_count $complete_pct%  
$CLB$dispo$CLE$statuses_name_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]    
"._QXZ("TOTAL")."$lead_list[count]$dialable_total $total_complete_pct%  
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\n"; unset($lead_list); } else { echo ""._QXZ("SHOW LEAD STATUSES IN THIS CAMPAIGN")."

"; } echo "
\n"; if ($display_dialable_count == 'Y') { ### call function to calculate and print dialable leads $single_status=0; $only_return=0; $dial_statuses = $dial_statuses_original; dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,$fSQL,$only_return); echo " - "._QXZ("HIDE")."

"; } else { echo ""._QXZ("Popup Dialable Leads Count").""; echo " - "._QXZ("SHOW")."

"; } $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' $LOGallowed_campaignsSQL and status IN('READY','RHOLD','RQUEUE');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); $hopper_leads = "$rowx[0]"; echo _QXZ("This campaign has")." $hopper_leads "._QXZ("leads in the dial hopper")."

\n"; echo ""._QXZ("Click here to see what leads are in the hopper right now")."

\n"; echo ""._QXZ("Click here to see a VDAD report for this campaign")."

\n"; } echo ""._QXZ("Click here to see all CallBack Holds in this campaign")."

\n"; if ($SSoutbound_autodial_active > 0) { if ( ($SStest_campaign_calls > 0) and ($campaign_active == 'Y') ) { ##### get list of active asterisk server for dynamic pulldown list menu $stmt="SELECT server_id,server_ip from servers where active='Y' and active_asterisk_server='Y' $LOGadmin_viewable_groupsSQL order by server_id;"; $rslt=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rslt); $servers_menu="\n"; $os=0; while ($servers_to_print > $os) { $rowx=mysqli_fetch_row($rslt); $servers_menu .= "\n"; $os++; } echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Test Outbound Call").": "; echo _QXZ("code").":   "; echo _QXZ("number").":   "; echo _QXZ("server").":   "; echo "   $NWB#settings-test_campaign_calls$NWE


\n"; } else { echo _QXZ("Test calling disabled")."

\n"; } } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this campaign")."\n"; echo "

"._QXZ("Click here to see the debug report for this campaign")."
\n"; } echo "
\n"; } ##### CAMPAIGN CUSTOM STATUSES ##### 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_to_mysqli($stmt, $link); $cats_to_print = mysqli_num_rows($rslt); $cats_list=""; $o=0; while ($cats_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cats_list .= "\n"; $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); $o++; } $status_group_overrides_OUTPUT=''; $status_group_overrides_OUTPUT .= ""._QXZ("ALLOWED IN-GROUPS USING A STATUS GROUP OVERRIDE").":
\n"; $status_group_overrides_OUTPUT .= "\n"; $stmt="SELECT closer_campaigns from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $cg_to_print = mysqli_num_rows($rslt); if ($cg_to_print > 0) { $row=mysqli_fetch_row($rslt); $closer_campaigns = $row[0]; $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); } $stmt="SELECT group_id,group_name from vicidial_inbound_groups where status_group_id NOT IN('','NONE') and group_id IN('$closer_campaigns') $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ig_to_print = mysqli_num_rows($rslt); $sgo_ig=0; while ($ig_to_print > $sgo_ig) { $row=mysqli_fetch_row($rslt); $status_group_overrides_OUTPUT .= "\n"; $sgo_ig++; } $status_group_overrides_OUTPUT .= "
$row[0] $row[1]

\n"; $status_group_overrides_OUTPUT .= ""._QXZ("CAMPAIGN LISTS USING A STATUS GROUP OVERRIDE").":
\n"; $status_group_overrides_OUTPUT .= "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where status_group_id NOT IN('','NONE') and campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $list_to_print = mysqli_num_rows($rslt); $sgo_li=0; while ($list_to_print > $sgo_li) { $row=mysqli_fetch_row($rslt); $status_group_overrides_OUTPUT .= "\n"; $sgo_li++; } $status_group_overrides_OUTPUT .= "
$row[0] $row[1]

\n"; $sgo_total = ($sgo_ig + $sgo_li); $sgo_message=''; if ($sgo_total > 0) {$sgo_message = "$sgo_total "._QXZ("STATUS GROUP OVERRIDES USED, see list at bottom")."";} echo "
\n"; echo "
"._QXZ("CUSTOM STATUSES WITHIN THIS CAMPAIGN").":   $NWB#campaign_statuses$NWE   $sgo_message
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $cats_to_print = mysqli_num_rows($rslt); $cats_list=""; $o=0; while ($cats_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cats_list .= "\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,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $AScategory = $rowx[4]; $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("STATUS").""._QXZ("DESCRIPTION").""._QXZ("CATEGORY").""._QXZ("AGENT SELECTABLE").""._QXZ("HUMAN ANSWER").""._QXZ("SALE").""._QXZ("DNC").""._QXZ("CUSTOMER CONTACT").""._QXZ("NOT INTERESTED").""._QXZ("UNWORKABLE").""._QXZ("SCHEDULED CALLBACK").""._QXZ("COMPLETED").""._QXZ("ANSWERING MACHINE").""._QXZ("MIN SEC").""._QXZ("MAX SEC").""._QXZ("MODIFY/DELETE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$rowx[0]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "         \n"; echo "   \n"; if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) { echo ""._QXZ("DELETE")."\n"; } else { echo ""._QXZ("DELETE")."\n"; } echo "
\n"; echo "
"._QXZ("ADD NEW CUSTOM CAMPAIGN STATUS")."
\n"; echo "\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo _QXZ("Description").":   \n"; echo _QXZ("Selectable").":   \n"; echo _QXZ("Human Answer").":  
\n"; echo _QXZ("Sale").":   \n"; echo _QXZ("DNC").":   \n"; echo _QXZ("Customer Contact").":   \n"; echo _QXZ("Not Interested").":  
\n"; echo _QXZ("Unworkable").":   \n"; echo _QXZ("Callback").":   \n"; echo _QXZ("Completed").":   \n"; echo _QXZ("Answering Machine").":   \n"; echo _QXZ("Category").": \n"; echo "  
\n"; echo "
\n"; echo "


\n"; echo "$status_group_overrides_OUTPUT"; } ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
"._QXZ("CUSTOM HOT KEYS WITHIN THIS CAMPAIGN").":   $NWB#campaign_hotkeys$NWE
\n"; echo "\n"; echo "\n"; $stmt="SELECT status,hotkey,status_name,selectable,campaign_id from vicidial_campaign_hotkeys where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by hotkey;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("HOT KEY").""._QXZ("STATUS").""._QXZ("DESCRIPTION").""._QXZ("DELETE")."
$rowx[1]$rowx[0]$rowx[2]"._QXZ("DELETE")."
\n"; echo "
"._QXZ("ADD NEW CUSTOM CAMPAIGN HOT KEY")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Hotkey").":   \n"; echo _QXZ("Status").":   \n"; echo "
\n"; echo "

\n"; } ##### CAMPAIGN 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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (preg_match('/Y/', $rowx[1])) {$camp_lists .= "'$rowx[0]',";} $o++; } $camp_lists = preg_replace('/.$/i','',$camp_lists); $stmt="SELECT recycle_id,campaign_id,status,attempt_delay,attempt_maximum,active from vicidial_lead_recycle where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $recycle_to_print = mysqli_num_rows($rslt); $o=0; while ($recycle_to_print > $o) { $rowx=mysqli_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 "

"._QXZ("LEAD RECYCLING WITHIN THIS CAMPAIGN").":   $NWB#lead_recycle$NWE
\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $counts_to_print = mysqli_num_rows($rslt); if ($counts_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $recycle_limit = $rowx[0]; } } if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("STATUS").""._QXZ("ATTEMPT DELAY").""._QXZ("ATTEMPT MAXIMUM").""._QXZ("LEADS AT LIMIT").""._QXZ("ACTIVE")." "._QXZ("DELETE")."
  $RECYCLE_status[$o]
\n"; echo "\n"; echo "\n"; echo "
$recycle_limit   "._QXZ("DELETE")."
\n"; echo "
"._QXZ("ADD NEW CAMPAIGN LEAD RECYCLE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo _QXZ("Attempt Delay").": \n"; echo _QXZ("Attempt Maximum").": \n"; echo "
\n"; echo "

\n"; echo "
\n"; echo "* "._QXZ("Lead counts taken from active lists in the campaign only").".\n"; } ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

"._QXZ("AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN").":   $NWB#auto_alt_dial_statuses$NWE
\n"; echo "\n"; echo "\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 (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $o++; echo "\n"; echo "\n"; } echo "
"._QXZ("STATUSES").""._QXZ("DELETE")."
$AADstatuses[$o]"._QXZ("DELETE")."
\n"; echo "
"._QXZ("ADD NEW AUTO ALT NUMBER DIALING STATUS")."
\n"; echo "\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo "
\n"; echo "

\n"; } ##### CAMPAIGN PAUSE CODES ##### if ($SUB==27) { echo "

"._QXZ("AGENT PAUSE CODES FOR THIS CAMPAIGN").":   $NWB#pause_codes$NWE
\n"; echo "\n"; echo ""; if ($SSenable_pause_code_limits > 0) { echo ""; } echo "\n"; $stmt="SELECT pause_code,pause_code_name,billable,campaign_id,time_limit,require_mgr_approval from vicidial_pause_codes where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by pause_code;"; $rslt=mysql_to_mysqli($stmt, $link); $pause_codes_to_print = mysqli_num_rows($rslt); $o=0; while ($pause_codes_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; if ($SSenable_pause_code_limits > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("PAUSE CODES").""._QXZ("BILLABLE").""._QXZ("TIME LIMIT").""._QXZ("MGR APPROVAL").""._QXZ("MODIFY").""._QXZ("DELETE")."
$rowx[0]\n"; echo "\n"; echo "\n"; echo "  \n"; if ($SSenable_pause_code_limits < 1) {echo "\n";} echo "
"._QXZ("DELETE")."
\n"; echo "
"._QXZ("ADD NEW AGENT PAUSE CODE")."
\n"; echo "\n"; echo "\n"; echo _QXZ("Pause Code").": \n"; echo "   "._QXZ("Name").": \n"; echo "   "._QXZ("Billable").":
\n"; echo "   "._QXZ("Mgr Approve").": \n"; if ($SSenable_pause_code_limits > 0) { echo "   "._QXZ("Time Limit").": \n"; } echo "

\n"; echo "

\n"; } ##### CAMPAIGN 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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $qc_lists_list=''; $p=0; while ($lists_to_print > $p) { $rowx=mysqli_fetch_row($rslt); $qc_lists_list .= "NONE"; $o=0; while ($containers_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCcontainers_list .= "\n"; $qc_containers_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get scorecards listings for pulldown $stmt="SELECT qc_scorecard_id,scorecard_name from quality_control_scorecards where active='Y' order by qc_scorecard_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scorecards_to_print = mysqli_num_rows($rslt); $QCscorecards_list=""; $o=0; while ($scorecards_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCscorecards_list .= "\n"; $scorecardname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get scripts listings for pulldown $stmt="SELECT script_id,script_name from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); $QCscripts_list=""; $o=0; while ($scripts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCscripts_list .= "\n"; $scriptname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get shifts listings for pulldown $stmt="SELECT shift_id,shift_name from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); $QCshifts_list=""; $o=0; while ($shifts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCshifts_list .= "\n"; $shiftname_list["$rowx[0]"] = "$rowx[1]"; $o++; } echo "

"._QXZ("QC SETTINGS FOR THIS CAMPAIGN").":
\n"; echo "
\n"; # echo "\n"; # echo "\n"; # echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("QC Enabled").": $NWB#campaigns-qc_enabled$NWE
"._QXZ("QC Statuses").":
$NWB#campaigns-qc_statuses$NWE
$qc_statuses_list
QC Lists:
$NWB#campaigns-qc_lists$NWE
$qc_lists_list
\n"; echo ""._QXZ("QC Statuses").": $NWB#campaigns-qc_statuses_id$NWE
"._QXZ("QC Scorecard").": $NWB#campaigns-qc_scorecard$NWE
"._QXZ("QC WebForm").": $NWB#campaigns-qc_web_form_address$NWE
"._QXZ("QC Script").": $NWB#campaigns-qc_script$NWE
"._QXZ("QC Shift").": $NWB#campaigns-qc_shift_id$NWE
"._QXZ("QC Get Record Launch").": $NWB#campaigns-qc_get_record_launch$NWE
"._QXZ("QC Show Recording").": $NWB#campaigns-qc_show_recording$NWE
\n"; echo "

\n"; } ##### CAMPAIGN SURVEY SETTINGS ##### if ($SUB=='20A') { echo "

"._QXZ("SURVEY SETTINGS FOR THIS CAMPAIGN").":
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "
"._QXZ("Survey First Audio File").": "._QXZ("audio chooser")." $NWB#campaigns-survey_first_audio_file$NWE
"._QXZ("Survey DTMF Digits").": $NWB#campaigns-survey_dtmf_digits$NWE
"._QXZ("Survey Not Interested Digit").": $NWB#campaigns-survey_ni_digit$NWE
"._QXZ("Survey Wait Seconds").": $NWB#campaigns-survey_wait_sec$NWE
"._QXZ("Survey Opt-in Audio File").": "._QXZ("audio chooser")." $NWB#campaigns-survey_opt_in_audio_file$NWE
"._QXZ("Survey Not Interested Audio File").": "._QXZ("audio chooser")." $NWB#campaigns-survey_ni_audio_file$NWE
"._QXZ("Survey Method").": $NWB#campaigns-survey_method$NWE
"._QXZ("Survey No-Response Action").": $NWB#campaigns-survey_no_response_action$NWE
"._QXZ("Survey Not Interested Status").": $NWB#campaigns-survey_ni_status$NWE
"._QXZ("Survey Third Digit").": $NWB#campaigns-survey_third_digit$NWE
"._QXZ("Survey Third Audio File").": "._QXZ("audio chooser")." $NWB#campaigns-survey_third_audio_file$NWE
"._QXZ("Survey Third Status").": $NWB#campaigns-survey_third_status$NWE
"._QXZ("Survey Third Extension").": $NWB#campaigns-survey_third_exten$NWE
"._QXZ("Survey Fourth Digit").": $NWB#campaigns-survey_fourth_digit$NWE
"._QXZ("Survey Fourth Audio File").": "._QXZ("audio chooser")." $NWB#campaigns-survey_fourth_audio_file$NWE
"._QXZ("Survey Fourth Status").": $NWB#campaigns-survey_fourth_status$NWE
"._QXZ("Survey Fourth Extension").": $NWB#campaigns-survey_fourth_exten$NWE
"._QXZ("Survey Response Digit Map").": $NWB#campaigns-survey_response_digit_map$NWE
"._QXZ("Survey Survey Xfer Extension").": $NWB#campaigns-survey_xfer_exten$NWE
"._QXZ("Survey Campaign Recording Directory").": $NWB#campaigns-survey_camp_record_dir$NWE
"._QXZ("Voicemail").": "._QXZ("voicemail chooser")." $NWB#campaigns-voicemail_ext$NWE
"._QXZ("Survey Call Menu").": $NWB#campaigns-survey_menu_id$NWE
"._QXZ("Survey Recording").": $NWB#campaigns-survey_recording$NWE
\n"; echo "

\n"; } ##### CAMPAIGN PRESETS ##### if ($SUB==201) { $preset_status=_QXZ("set to ").'INACTIVE'; $stmt="SELECT enable_xfer_presets,campaign_name from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "DEBUG: |$campaigns_to_print|$stmt|\n";} if ($campaigns_to_print > 0) { $row=mysqli_fetch_row($rslt); $enable_xfer_presets = $row[0]; $campaign_name = $row[1]; if ($enable_xfer_presets == 'ENABLED') {$preset_status=_QXZ("set to ").'ENABLED';} if ($enable_xfer_presets == 'STAGING') {$preset_status=_QXZ("set to ").'STAGING';} if ($enable_xfer_presets == 'CONTACTS') {$preset_status=_QXZ("set to ").'CONTACTS';} } else { echo "
"._QXZ("CAMPAIGN DOES NOT EXIST")." - $campaign_id
\n"; exit; } $stmt="SELECT preset_name,preset_number,preset_dtmf,preset_hide_number from vicidial_xfer_presets where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by preset_name;"; $rslt=mysql_to_mysqli($stmt, $link); $presets_to_print = mysqli_num_rows($rslt); echo "

$presets_to_print "._QXZ("PRESETS FOR THIS CAMPAIGN")." ($campaign_id - $campaign_name): $preset_status   $NWB#xfer_presets$NWE
\n"; echo "
"._QXZ("ADD NEW PRESET")." -
\n"; echo "\n"; echo "\n"; echo _QXZ("Preset Name").": \n"; echo " "._QXZ("Number").": \n"; echo " "._QXZ("DTMF").": \n"; echo "   "._QXZ("Hide Number").":  \n"; echo "
\n"; echo "

\n"; echo "
\n"; echo "\n"; $o=0; while ($presets_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
# "._QXZ("PRESET NAME").""._QXZ("NUMBER").""._QXZ("DTMF").""._QXZ("HIDE").""._QXZ("MODIFY").""._QXZ("DELETE")."
$o $rowx[0]\n"; echo "\n"; echo "\n"; echo "  "._QXZ("DELETE")."
\n"; } ##### CAMPAIGN AREACODE CID ##### if ($SUB==202) { $checkbox_list=''; $checkbox_count=0; echo "

"._QXZ("AREACODE CIDS FOR THIS CAMPAIGN").":   $NWB#campaign_cid_areacodes$NWE
\n"; if ($use_custom_cid != 'AREACODE') {echo "
"._QXZ("The campaign setting Custom CallerID is not set to AREACODE")."!
";} echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; $stmt="SELECT areacode,outbound_cid,active,cid_description,call_count_today from vicidial_campaign_cid_areacodes where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by areacode,outbound_cid;"; $rslt=mysql_to_mysqli($stmt, $link); $accids_to_print = mysqli_num_rows($rslt); $o=0; while ($accids_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xareacode[$o] = $rowx[0]; $Xoutbound_cid[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xcid_description[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $checkbox_list .= "|active_$Xareacode[$o]_$Xoutbound_cid[$o]"; $o++; $checkbox_count++; } echo "\n"; $o=0; while ($accids_to_print > $o) { $ct = ($o + 1); if ($ct == '1') { $bgcolor='bgcolor="#'. $SSstd_row1_background .'"'; $bgac = $Xareacode[$o]; } else { $bgct=0; if ($Xareacode[$o] != $bgac) { if (preg_match("/1$|3$|5$|7$|9$/i", $bgct)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} $bgct++; $bgac = $Xareacode[$o]; } } $DID_edit_link_BEGIN=''; $DID_edit_link_END=''; if (strlen($Xoutbound_cid[$o]) > 0) { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$Xoutbound_cid[$o]' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); if ($dids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $DID_edit_link_BEGIN = ""; $DID_edit_link_END=''; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
#"._QXZ("AREACODE").""._QXZ("CID NUMBER").""._QXZ("DESCRIPTION").""._QXZ("ACTIVE")."
"._QXZ("select all")."
"._QXZ("CALLS").""._QXZ("DELETE")."
  $ct   $Xareacode[$o]   $DID_edit_link_BEGIN$Xoutbound_cid[$o]$DID_edit_link_END\n"; if ($Xactive[$o] == 'Y') { echo ""; } else { echo ""; } echo "   $Xcall_count_today[$o]   "._QXZ("DELETE")."
\n"; echo "

\n"; echo "
"._QXZ("ADD NEW AREACODE CID")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Areacode").": \n"; echo _QXZ("Outbound CID").":
\n"; echo _QXZ("Description").": \n"; echo "
\n"; echo "

\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this campaign")." AC-CID\n"; } # echo "
\n"; } if ($SUB < 1) { echo "

\n"; echo ""._QXZ("LOG ALL AGENTS OUT OF THIS CAMPAIGN")."

\n"; # echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

\n"; if ($LOGdelete_campaigns > 0) { echo "

"._QXZ("DELETE THIS CAMPAIGN")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=34 modify campaign info in the system - Basic View ###################### if ( ($ADD==34) and ( (!preg_match("/$campaign_id/i", $LOGallowed_campaigns)) and (!preg_match("/ALL-CAMPAIGNS/i",$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 ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31&campaign_id=$campaign_id&SUB=$SUB"; $modify_footer_refresh=1; } if ($stage=='show_dialable') { $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='hide_dialable') { $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='show_leadscount') { $stmt="UPDATE vicidial_campaigns set display_leads_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); } if ($stage=='hide_leadscount') { $stmt="UPDATE vicidial_campaigns set display_leads_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($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,display_leads_count,user_group,allow_emails,call_count_limit,allow_chats,web_form_address_three,manual_vm_status_updates from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $closer_campaigns = $row[42]; $dial_method = $row[46]; $adaptive_intensity = $row[51]; $auto_alt_dial = $row[54]; $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]; $campaign_allow_inbound = $row[65]; $default_xfer_group = $row[67]; $drop_lockout_time = $row[116]; $display_leads_count = $row[130]; $user_group = $row[131]; $allow_emails = $row[132]; $call_count_limit = $row[133]; $allow_chats = $row[134]; $web_form_address_three=$row[135]; if (preg_match('/DISABLED/', $list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} else {$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;} if ($auto_alt_dial == 'MULTI_LEAD') {$ALTmultiDISABLE=1; $ALTmultiLINK=""._QXZ("Multi-Alt-Settings")."";} else {$ALTmultiDISABLE=0; $ALTmultiLINK='';} ##### get status groups for the lists and in-groups within this campaign $stmt="SELECT status_group_id from vicidial_lists where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $camp_status_groups=''; if ($DB) {echo "$lists_to_print|$stmt|\n";} $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (strlen($rowx[0]) > 0) {$camp_status_groups .= "'$rowx[0]',";} $o++; } $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); $stmt="SELECT status_group_id from vicidial_inbound_groups where status_group_id NOT IN('','NONE') and group_id IN('$closer_campaigns') $LOGadmin_viewable_groupsSQL ;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$lists_to_print|$stmt|\n";} $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (strlen($rowx[0]) > 0) {$camp_status_groups .= "'$rowx[0]',";} $o++; } # $camp_status_groups = preg_replace('/.$/i','',$camp_status_groups); $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $statuses_list=''; $dial_statuses_list=''; $LRstatuses_list=''; $HKstatuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list .= "\n"; if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (preg_match('/Y/i', $rowx[2])) {$HKstatuses_list .= "\n";} $o++; } $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id IN($camp_status_groups'$campaign_id') $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $Cstatuses_to_print = mysqli_num_rows($rslt); $o=0; while ($Cstatuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list .= "\n"; if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (preg_match('/Y/i', $rowx[2])) {$HKstatuses_list .= "\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' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] < 1) { $mixes_list="\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' $LOGallowed_campaignsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $mixes_to_print = mysqli_num_rows($rslt); $mixes_list="\n"; $o=0; while ($mixes_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $mixes_list .= "\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 "\n"; echo ""; echo ""; echo ""; if ($SSoutbound_autodial_active > 0) { echo ""; } echo "\n"; echo "\n"; if ($SSoutbound_autodial_active < 1) { echo ""; } echo "
$campaign_id:   "._QXZ("Basic View")." "._QXZ("Detail View")." "._QXZ("List Mix")." "._QXZ("Real-Time Screen")."  
\n"; if ($SUB < 1) { echo "
\n"; echo ""; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_emails > 0) { echo "\n"; } if ($SSallow_chats > 0) { echo "\n"; } if ($SSoutbound_autodial_active > 0) { echo "\n"; $o=0; while ($Ds_to_print > $o) { $o++; $Dstatus = $Dstatuses[$o]; echo "\n"; } else { echo "$Dstatus - $statname_list[$Dstatus]         \n"; echo ""._QXZ("REMOVE")."\n"; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ( (preg_match("/RATIO|ADAPT/",$dial_method)) and ($SSdisable_auto_dial > 0) ) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Campaign ID").": $campaign_id$NWB#campaigns-campaign_id$NWE
"._QXZ("Campaign Name").": $NWB#campaigns-campaign_name$NWE
"._QXZ("Campaign Description").": $row[57]$NWB#campaigns-campaign_description$NWE
"._QXZ("Campaign Change Date").": $campaign_changedate   $NWB#campaigns-campaign_changedate$NWE
"._QXZ("Campaign Login Date").": $campaign_logindate   $NWB#campaigns-campaign_logindate$NWE
"._QXZ("Active").": $NWB#campaigns-active$NWE
"._QXZ("Admin User Group").": "._QXZ("$user_group")." $NWB#campaigns-user_group$NWE
"._QXZ("Park Music-on-Hold").": $row[10] $NWB#campaigns-park_ext$NWE
"._QXZ("Web Form").": $row[11]$NWB#campaigns-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Allow Closers").": "._QXZ("$row[12]")." $NWB#campaigns-allow_closers$NWE
"._QXZ("Default Transfer Group").": "._QXZ("$default_xfer_group")." $NWB#campaigns-default_xfer_group$NWE
"._QXZ("Allow Emails").": "._QXZ("$allow_emails")." $NWB#campaigns-allow_emails$NWE
"._QXZ("Allow Chats").": "._QXZ("$allow_chats")." $NWB#campaigns-allow_chats$NWE
"._QXZ("Allow Inbound and Blended").": "._QXZ("$campaign_allow_inbound")." $NWB#campaigns-campaign_allow_inbound$NWE
"._QXZ("Dial Status")." $o: \n"; if ($DEFstatusDISABLED > 0) { echo "$Dstatus - $statname_list[$Dstatus]         \n"; echo _QXZ("REMOVE")."
"._QXZ("Add A Dial Status to Call").":   \n"; echo "     $NWB#campaigns-dial_status$NWE
"._QXZ("List Order").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { if (file_exists('options.php')) {require('options.php');} if (isset($camp_lead_order_random) && $camp_lead_order_random > 0) { echo "$NWB#campaigns-lead_order$NWE"; } else { echo "$NWB#campaigns-lead_order$NWE"; } } echo "
"._QXZ("List Mix").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-list_order_mix$NWE"; } echo "
"._QXZ("Lead Filter").": "; if ($ALTmultiDISABLE > 0) { echo " $ALTmultiLINK"; } else { echo "$NWB#campaigns-lead_filter_id$NWE"; } echo "
"._QXZ("Minimum Hopper Level").": $NWB#campaigns-hopper_level$NWE
"._QXZ("Force Reset of Hopper").": $NWB#campaigns-force_reset_hopper$NWE
"._QXZ("Auto-dialing has been disabled on this system")."
"._QXZ("Dial Method").": $NWB#campaigns-dial_method$NWE
"._QXZ("Auto Dial Level").": (0 = "._QXZ("off").")$NWB#campaigns-auto_dial_level$NWE
"._QXZ("Adapt Intensity Modifier").": $NWB#campaigns-adaptive_intensity$NWE
"._QXZ("Script").": "._QXZ("$script_id")."
"._QXZ("Get Call Launch").": "._QXZ("$get_call_launch")."
\n"; echo "
\n"; if ($SSoutbound_autodial_active > 0) { echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("LISTS WITHIN THIS CAMPAIGN").":   $NWB#campaign_lists$NWE\n"; echo "
\n"; echo ""; $LISTlink='stage=LISTIDDOWN'; $NAMElink='stage=LISTNAMEDOWN'; $CALLTIMElink='stage=CALLTIMEDOWN'; $TALLYlink='stage=TALLYDOWN'; $ACTIVElink='stage=ACTIVEDOWN'; $CAMPAIGNlink='stage=CAMPAIGNDOWN'; $CALLDATElink='stage=CALLDATEDOWN'; $SQLorder='order by list_id'; if (preg_match('/LISTIDUP/i', $stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} if (preg_match('/LISTIDDOWN/i', $stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} if (preg_match('/LISTNAMEUP/i', $stage)) {$SQLorder='order by list_name asc'; $NAMElink='stage=LISTNAMEDOWN';} if (preg_match('/LISTNAMEDOWN/i', $stage)) {$SQLorder='order by list_name desc'; $NAMElink='stage=LISTNAMEUP';} if (preg_match('/CALLTIMEUP/i', $stage)) {$SQLorder='order by local_call_time asc'; $CALLTIMElink='stage=CALLTIMEDOWN';} if (preg_match('/CALLTIMEDOWN/i', $stage)) {$SQLorder='order by local_call_time desc'; $CALLTIMElink='stage=CALLTIMEUP';} if (preg_match('/TALLYUP/i', $stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} if (preg_match('/TALLYDOWN/i', $stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} if (preg_match('/ACTIVEUP/i', $stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} if (preg_match('/ACTIVEDOWN/i', $stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} if (preg_match('/CAMPAIGNUP/i',$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} if (preg_match('/CAMPAIGNUP/i', $stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} if (preg_match('/CALLDATEUP/i', $stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} if (preg_match('/CALLDATEDOWN/i', $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,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id and campaign_id='$campaign_id' $LOGallowed_campaignsSQL group by list_id $SQLorder"; if ($SSadmin_list_counts < 1) {$stmt="SELECT list_id,list_name,list_description,'X' as tally,active,list_lastcalldate,campaign_id,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists where campaign_id='$campaign_id' $LOGallowed_campaignsSQL $SQLorder";} $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $camp_lists=""; $last_list_statuses=""; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); $last_list_statuses.="$row[0]|$row[4]|"; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo ""; echo ""; echo ""; echo ""; if ($row[8] == 'campaign') {echo "";} else {echo "";} echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "\n"; echo "
"._QXZ("LIST ID").""._QXZ("LIST NAME").""._QXZ("DESCRIPTION").""._QXZ("LEADS COUNT").""._QXZ("Call Time").""._QXZ("ACTIVE").""._QXZ("LAST CALL DATE").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] $row[8] $row[8] "._QXZ("$row[4]").""; if (preg_match('/Y/',$row[4])) { $active_lists++; $camp_lists .= "'$row[0]',"; echo ""; } else { $inactive_lists++; echo ""; if ($row[7] < $EXPtestdate) {echo ""._QXZ("EXP")."";} else {echo " ";} echo " $row[5]"._QXZ("MODIFY")."
"; echo ""; echo "

\n"; echo "
\n"; if ($lead_filter_id=="NONE") {$filterSQL="";} else { $filterSQL = $filtersql_list[$lead_filter_id]; $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = preg_replace('/^and|and$|^or|or$/i', '',$filterSQL); } if (strlen($filterSQL)>4) {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} $camp_lists = preg_replace('/.$/i','',$camp_lists); echo _QXZ("This campaign has")." $active_lists "._QXZ("active lists and")." $inactive_lists "._QXZ("inactive lists")."

\n"; if ( ($display_leads_count == 'Y') and (strlen($camp_lists) > 3) ) { # grab names of global statuses and statuses in the selected campaign $stmt="SELECT status,status_name from vicidial_statuses order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_name_list["$rowx[0]"] = "$rowx[1]"; $o++; } $stmt="SELECT status,status_name from vicidial_campaign_statuses where campaign_id IN($camp_status_groups'$campaign_id') $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $Cstatuses_to_print = mysqli_num_rows($rslt); $o=0; while ($Cstatuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_name_list["$rowx[0]"] = "$rowx[1]"; $o++; } # end grab status names echo "
"._QXZ("STATUSES WITHIN THE ACTIVE LISTS FOR THIS CAMPAIGN").":\n"; echo " - "._QXZ("HIDE")."
"; echo "\n"; echo "\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 IN($camp_lists) group by status,called_since_last_reset order by status,called_since_last_reset;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($statuses_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($dispo,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $dispo => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} if ($dispo == 'CBHOLD') { $CLB=""; $CLE=""; } else { $CLB=''; $CLE=''; } echo "\n"; $o++; } } echo "\n"; echo "\n"; echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$dispo$CLE$statuses_name_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\n"; unset($lead_list); } else { echo ""._QXZ("SHOW LEAD STATUSES IN THIS CAMPAIGN")."

"; } if ($display_dialable_count == 'Y') { ### call function to calculate and print dialable leads $single_status=0; $only_return=0; dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,$fSQL,$only_return); echo " - "._QXZ("HIDE")."

"; } else { echo "Popup Dialable Leads Count"; echo " - "._QXZ("SHOW")."

"; } $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY','RHOLD','RQUEUE') $LOGallowed_campaignsSQL;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); $hopper_leads = "$rowx[0]"; echo _QXZ("This campaign has")." $hopper_leads "._QXZ("leads in the dial hopper")."

\n"; echo ""._QXZ("Click here to see what leads are in the hopper right now")."

\n"; echo ""._QXZ("Click here to see a VDAD report for this campaign")."

\n"; } echo ""._QXZ("Click here to see all CallBack Holds in this campaign")."

\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this campaign")."
\n"; } echo "\n"; echo "
\n"; ### list of agent rank or skill-level for this campaign echo "
\n"; echo "
"._QXZ("AGENT RANKS FOR THIS CAMPAIGN").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT user_group from vicidial_user_groups where ( (allowed_campaigns LIKE \"%-ALL-CAMPAIGNS-%\") or (allowed_campaigns LIKE \"% $campaign_id %\") ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $USERgroups_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$USERgroups_to_print|$stmt\n";} $USERgroupsSQL="''"; $i=0; while ($i < $USERgroups_to_print) { $row=mysqli_fetch_row($rslt); $USERgroupsSQL .= ",'$row[0]'"; $i++; } $stmt="SELECT user,full_name from vicidial_users where user_group IN($USERgroupsSQL) and active='Y' order by user;"; $rslt=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$users_to_print|$stmt\n";} $U_user=array(); $U_full_name=array(); $i=0; while ($i < $users_to_print) { $row=mysqli_fetch_row($rslt); $U_user[$i] = $row[0]; $U_full_name[$i] = $row[1]; $i++; } $o=0; while ($users_to_print > $o) { $temp_user = $U_user[$o]; $temp_name = $U_full_name[$o]; $campaign_rank='n/a'; $calls_today='n/a'; $campaign_grade='n/a'; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $stmt="SELECT campaign_rank,calls_today,campaign_grade from vicidial_campaign_agents where user='$U_user[$o]' and campaign_id='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $USERdetails_to_print = mysqli_num_rows($rslt); if ($USERdetails_to_print > 0) { $row=mysqli_fetch_row($rslt); $campaign_rank = $row[0]; $calls_today = $row[1]; $campaign_grade = $row[2]; } $o++; echo "\n"; } echo "
"._QXZ("USER")."     "._QXZ("RANK")."     "._QXZ("GRADE")."     "._QXZ("CALLS TODAY")."
$temp_user - $temp_name$campaign_rank$campaign_grade$calls_today

\n"; echo ""._QXZ("LOG ALL AGENTS OUT OF THIS CAMPAIGN")."

\n"; if ($LOGdelete_campaigns > 0) { echo "

"._QXZ("DELETE THIS CAMPAIGN")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=31 or 34 and SUB=29 for list mixes ###################### if ( ( ($ADD==34) or ($ADD==31) ) and ( (!preg_match("/$campaign_id/i", $LOGallowed_campaigns)) and (!preg_match("/ALL-CAMPAIGNS/i",$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) { ##### CAMPAIGN 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' $LOGallowed_campaignsSQL order by list_id;"; $rslt=mysql_to_mysqli($stmt, $link); $mixlists_to_print = mysqli_num_rows($rslt); $mixlists_list=""; $o=0; while ($mixlists_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $mixlists_list .= "\n"; $mixlistsname_list["$rowx[0]"] = "$rowx[1]"; $o++; } echo "

"._QXZ("LIST MIXES FOR THIS CAMPAIGN").":   $NWB#campaigns-list_order_mix$NWE
\n"; echo "
"._QXZ("WARNING, we only recommend List Mix for advanced users, Please read the Manager Manual")."
\n"; $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses = mysqli_num_rows($rslt); if ($statuses > 0) { $rowy=mysqli_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' $LOGallowed_campaignsSQL order by status, vcl_id;"; $rslt=mysql_to_mysqli($stmt, $link); $listmixes = mysqli_num_rows($rslt); $o=0; while ($listmixes > $o) { $rowx=mysqli_fetch_row($rslt); $vcl_id=$rowx[0]; $o++; if ($o < 2) {$tablecolor='bgcolor="#'. $SSalt_row2_background .'"'; $bgcolor='bgcolor="#'. $SSalt_row2_background .'"';} else { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$tablecolor='bgcolor="#'. $SSstd_row2_background .'"'; $bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$tablecolor='bgcolor="#'. $SSstd_row1_background .'"'; $bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} } echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; } else {echo ""._QXZ("$rowx[5]")."\n";} echo "\n"; echo "\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) { $Dsql .= "'$Dstatuses[$r]',"; $r++; } $Dsql = preg_replace("/,$/","",$Dsql); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $q++; } echo "\n"; echo "\n"; echo "\n"; $X='X'; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$vcl_id:\n"; echo "\n"; echo "     "._QXZ("DELETE LIST MIX")."
"._QXZ("Status").": \n"; if ($rowx[5]=='INACTIVE') { echo ""._QXZ("$rowx[5]")."\n"; echo ""._QXZ("SET TO ACTIVE").""._QXZ("Method").":\n"; echo "
"._QXZ("LIST ID").""._QXZ("PRIORITY").""._QXZ("% MIX").""._QXZ("STATUSES").""._QXZ("")."
\n"; echo "\n"; echo ""._QXZ("List").": $MIXdetailsLIST   "._QXZ("REMOVE")."\n"; echo " \n"; echo ""._QXZ("ADD")."   \n"; echo ""._QXZ("REMOVE")."\n"; echo "
\n"; echo _QXZ("Difference")." %: \n"; echo "   \n"; echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("List").": \n"; if ($q > 39) {$AE_disabled = 'DISABLED';} else {$AE_disabled = '';} echo "\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "
"._QXZ("CHANGE").": \n"; echo ""._QXZ("ALL")."   \n"; echo ""._QXZ("EMPTY")."\n"; echo "
\n"; echo " \n"; echo ""._QXZ("ADD")."   \n"; echo ""._QXZ("REMOVE")."\n"; echo "
\n"; } echo "

"._QXZ("ADD NEW LIST MIX")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Mix ID").": "._QXZ("Mix Name").": "._QXZ("Mix Method").": "; echo "
"._QXZ("List").": "._QXZ("Dial Status").":  
\n"; echo "
\n"; } } if (!isset($SUB) || $SUB=="") {echo "
\n";} } ###################### # ADD=30 campaign not allowed ###################### if ($ADD==30) { echo "
\n"; echo ""; echo _QXZ("You do not have permission to view campaign")." $campaign_id\n"; } ###################### # ADD=32 display all campaign statuses ###################### if ($ADD==32) { echo "
\n"; echo ""; echo "
"._QXZ("CUSTOM CAMPAIGN STATUSES LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=22&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("STATUSES").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT status from vicidial_campaign_statuses where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY STATUSES")."
\n"; } ###################### # ADD=33 display all campaign hotkeys ###################### if ($ADD==33) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN HOTKEYS LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=23&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("HOTKEYS").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT status from vicidial_campaign_hotkeys where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by hotkey;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY HOTKEYS")."
\n"; } ###################### # ADD=35 display all campaign lead recycle entries ###################### if ($ADD==35) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN LEAD RECYCLE LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=25&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("LEAD RECYCLES").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT status from vicidial_lead_recycle where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY LEAD RECYCLES")."
\n"; } ###################### # ADD=36 display all campaign auto-alt dial entries ###################### if ($ADD==36) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN LEAD AUTO-ALT DIAL LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=26&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("AUTO-ALT DIAL").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if (strlen($row[0])<3) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY AUTO-ALT DIAL")."
\n"; } ###################### # ADD=37 display all campaign agent pause codes ###################### if ($ADD==37) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN AGENT PAUSE CODE LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=27&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("PAUSE CODES").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT pause_code from vicidial_pause_codes where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by pause_code;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY PAUSE CODES")."
\n"; } ###################### # ADD=39 display all campaign list mixes ###################### if ($ADD==39) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN LIST MIX LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $o++; } $o=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("LIST MIX").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT vcl_id from vicidial_campaigns_list_mix where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by status,vcl_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY LIST MIX")."
\n"; } ###################### # ADD=301 display all campaign presets ###################### if ($ADD==301) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN PRESET LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name,enable_xfer_presets from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "DEBUG: |$campaigns_to_print|$stmt|\n";} $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $enable_xfer_presets_list[$o] = $row[2]; $o++; } $o=0; $k=0; while ($campaigns_to_print > $o) { if ( ($enable_xfer_presets_list[$o] == 'ENABLED') or ($enable_xfer_presets_list[$o] == 'STAGING') ) { if (preg_match('/1$|3$|5$|7$|9$/i', $k)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=201&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $k++; } $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("PRESETS").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "; $stmt="SELECT preset_name from vicidial_xfer_presets where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL order by preset_name;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } if ($p<1) {echo ""._QXZ("NONE")."";} echo ""._QXZ("MODIFY PRESETS")."
\n"; } ###################### # ADD=302 display campaign areacode cid counts ###################### if ($ADD==302) { echo "
\n"; echo ""; echo "
"._QXZ("CAMPAIGN AREACODE CID LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name,use_custom_cid from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $o=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); $campaigns_id_list[$o] = $row[0]; $campaigns_name_list[$o] = $row[1]; $use_custom_cid_list[$o] = $row[2]; $o++; } $o=0; $k=0; while ($campaigns_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $k)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31&SUB=202&campaign_id=$campaigns_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo "\n"; $k++; $o++; } echo "
"._QXZ("CAMPAIGN").""._QXZ("NAME").""._QXZ("CUSTOM CID").""._QXZ("AC-CIDS").""._QXZ("MODIFY")."
$campaigns_id_list[$o] $campaigns_name_list[$o] "._QXZ("$use_custom_cid_list[$o]")." "; $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id='$campaigns_id_list[$o]' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($campstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } echo ""._QXZ("MODIFY AC-CIDS")."
\n"; } ###################### # ADD=311 modify list info in the system ###################### if ($ADD==311) { if ($LOGmodify_lists==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311&list_id=$list_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; if ($SSexpired_lists_inactive > 0) { $expired_check=0; $stmt="SELECT count(*) from vicidial_lists where list_id='$list_id' and expiration_date < \"$REPORTdate\";"; $rslt=mysql_to_mysqli($stmt, $link); $Cexp_to_print = mysqli_num_rows($rslt); if ($Cexp_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $expired_check = "$rowx[0]"; } if ($DB) {echo "$expired_check|$stmt|\n";} if ($expired_check > 0) { $stmt = "UPDATE vicidial_lists SET active='N' where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $ELaffected_rows = mysqli_affected_rows($link); if ($DB) {echo "|$stmt|\n";} ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN AUTO EXPIRE LIST', event_sql=\"$SQL_log\", event_notes='LIST: $list_id CHANGED: $ELaffected_rows';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("NOTICE: expired list set to inactive")."\n"; } } $stmt="SELECT vicidial_lists.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,web_form_address,web_form_address_two,time_zone_setting,inventory_report,IFNULL(audit_comments,0),expiration_date,DATE_FORMAT(expiration_date,'%Y%m%d'),na_call_url,local_call_time,web_form_address_three,status_group_id,user_new_lead_limit,inbound_list_script_override,default_xfer_group,daily_reset_limit,resets_today,auto_active_list_rank,inbound_drop_voicemail,inbound_after_hours_voicemail,qc_scorecard_id,qc_statuses_id,qc_web_form_address,auto_alt_threshold,cid_group_id,dial_prefix,weekday_resets_container from vicidial_lists left outer join vicidial_lists_custom on vicidial_lists.list_id=vicidial_lists_custom.list_id where vicidial_lists.list_id='$list_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} if(mysqli_num_rows($rslt)==0) {echo "
"._QXZ("List ID $list_id does not exist")."\n"; exit;} $row=mysqli_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]; $web_form_address = $row[17]; $web_form_address_two = $row[18]; $time_zone_setting = $row[19]; $inventory_report = $row[20]; $audit_comments = $row[21]; $expiration_date = $row[22]; $expiration_dateINT = $row[23]; $na_call_url = $row[24]; $list_local_call_time = $row[25]; $web_form_address_three = $row[26]; $status_group_id = $row[27]; $user_new_lead_limit = $row[28]; $inbound_list_script_override = $row[29]; $default_xfer_group = $row[30]; $daily_reset_limit = $row[31]; $resets_today = $row[32]; $auto_active_list_rank = $row[33]; $inbound_drop_voicemail = $row[34]; $inbound_after_hours_voicemail = $row[35]; $qc_scorecard_id = $row[36]; $qc_statuses_id = $row[37]; $qc_web_form_address = $row[38]; $auto_alt_threshold = $row[39]; $cid_group_id = $row[40]; $dial_prefix = $row[41]; $weekday_resets_container = $row[42]; # 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,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list["$rowx[0]"] = "$rowx[1]"; $statuses_complete_list["$rowx[0]"] = "$rowx[11]"; $o++; } $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id='$campaign_id' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $Cstatuses_to_print = mysqli_num_rows($rslt); $o=0; while ($Cstatuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $statuses_list["$rowx[0]"] = "$rowx[1]"; $statuses_complete_list["$rowx[0]"] = "$rowx[12]"; $o++; } # end grab status names ##### get scripts listings for pulldown $Lscripts_list = "\n"; $stmt="SELECT script_id,script_name from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); $o=0; while ($scripts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Lscripts_list .= "\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 $whereLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $Dgroups_menu=''; $Dgroups_selected=0; $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Dgroups_menu .= "\n"; $o++; } if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} echo "
"._QXZ("MODIFY A LISTS RECORD").": $list_id
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSweekday_resets > 0) { ##### get container listings for dynamic WEEKDAY_TIMERANGE_SECONDS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='LIST_WEEKDAY_RESETS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $weekday_resets_container_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $weekday_resets_container_menu .= "\n"; $o++; } echo "\n"; } else { echo "\n"; } if ($LOGuser_level >= 9) { echo "\n"; } else { $daily_reset_limitTEXT = $daily_reset_limit; if ($daily_reset_limit < 0) {$daily_reset_limitTEXT=_QXZ("none");} echo "\n"; } echo "\n"; echo "\n"; if($audit_comments=='1') { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $DID_edit_link_BEGIN=''; $DID_edit_link_END=''; if (strlen($campaign_cid_override) > 0) { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$campaign_cid_override' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); if ($dids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $DID_edit_link_BEGIN = ""; $DID_edit_link_END=''; } } echo "\n"; if ($SScampaign_cid_areacodes_enabled == '1') { ##### get vicidial_cid_groups listings for dynamic pulldown list $stmt="SELECT cid_group_id,cid_group_type,cid_group_notes from vicidial_cid_groups $whereLOGadmin_viewable_groupsSQL order by cid_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $cid_groups_to_print = mysqli_num_rows($rslt); $cid_groups_menu=''; $cid_groups_selected=0; $o=0; while ($cid_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cid_groups_menu .= "\n"; $o++; } echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; ##### get status group listings for dynamic pulldown menu $stmt="SELECT status_group_id,status_group_notes from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); $status_groups_menu=''; $status_groups_selected=0; $o=0; while ($status_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $status_groups_menu .= "\n"; $o++; } $sglinkB=''; $sglinkE=''; if (strlen($status_group_id)>1) { $sglinkB=""; $sglinkE=''; } ##### get in-groups listings for dynamic transfer group pulldown list menu $xfer_groupsSQL=''; $stmt="SELECT closer_campaigns,xfer_groups from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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')"; $nxLOGadmin_viewable_groupsSQL = $LOGadmin_viewable_groupsSQL; if (strlen($xfer_groupsSQL) < 6) {$nxLOGadmin_viewable_groupsSQL = $whereLOGadmin_viewable_groupsSQL;} $stmt="SELECT group_id,group_name from vicidial_inbound_groups $xfer_groupsSQL $nxLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} echo "\n"; if ($SSqc_features_active>0) { ##### get QC status container listings for pulldown $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='QC_TEMPLATE' order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $containers_to_print = mysqli_num_rows($rslt); $QCcontainers_list=""; $o=0; while ($containers_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCcontainers_list .= "\n"; $qc_containers_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get scorecards listings for pulldown $stmt="SELECT qc_scorecard_id,scorecard_name from quality_control_scorecards where active='Y' order by qc_scorecard_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scorecards_to_print = mysqli_num_rows($rslt); $QCscorecards_list=""; $o=0; while ($scorecards_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCscorecards_list .= "\n"; $scorecardname_list["$rowx[0]"] = "$rowx[1]"; $o++; } echo "\n"; echo "\n"; echo "\n"; } echo "\n"; if ($SSenable_second_webform > 0) { echo "\n"; } if ($SSenable_third_webform > 0) { echo "\n"; } if ($na_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$list_id' and entry_type='list' and url_type='noagent';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } $apinewlead_url=''; $stmt="SELECT url_address from vicidial_url_multi where campaign_id='$list_id' and entry_type='list' and url_type='apinewlead';"; $rslt=mysql_to_mysqli($stmt, $link); $urls_to_print = mysqli_num_rows($rslt); if ($urls_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $apinewlead_url = $rowx[0]; } echo "\n"; echo "\n"; if ($LOGmodify_dial_prefix > 0) { echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSuser_new_lead_limit > 0) { $stmt="SELECT no_hopper_dialing from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $no_hopper_dialing = $row[0]; $no_hopper_dialing_warning=''; if ($no_hopper_dialing == 'N') {$no_hopper_dialing_warning=" "._QXZ("CAMPAIGN NO HOPPER DIALING DISABLED")."";} echo "\n"; } else { echo "\n"; } if ($SScall_quota_lead_ranking > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("List ID").": $list_id$NWB#lists-list_id$NWE
"._QXZ("List Name").": $NWB#lists-list_name$NWE
"._QXZ("List Description").": $NWB#lists-list_description$NWE
"._QXZ("Campaign").": $NWB#lists-campaign_id$NWE"; if (!preg_match("/\|$campaign_id\|/",$camp_list)) {echo "
    "._QXZ("CAMPAIGN DOES NOT EXIST")."";} echo "
"._QXZ("Active").": $NWB#lists-active$NWE \n"; if ( ($expiration_dateINT < $EXPtestdate) and ($active == 'Y') ) {echo "     "._QXZ("LIST EXPIRED AND SET TO ACTIVE")."";} echo "
"._QXZ("Reset Lead-Called-Status for this list").": $NWB#lists-reset_list$NWE
"._QXZ("Reset Times").": $NWB#lists-reset_time$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("Weekday Resets Container")."";} else {echo _QXZ("Weekday Resets Container");} echo ": $NWB#lists-weekday_resets_container$NWE
"._QXZ("Daily Reset Limit").":   "._QXZ("Resets Today").": $resets_today   $NWB#lists-daily_reset_limit$NWE
"._QXZ("Daily Reset Limit").": $daily_reset_limitTEXT   "._QXZ("Resets Today").": $resets_today   $NWB#lists-daily_reset_limit$NWE
"._QXZ("Expiration Date").": \n"; echo " $NWB#lists-expiration_date$NWE \n"; if ($expiration_dateINT < $EXPtestdate) { if ($active == 'Y') {echo "     "._QXZ("LIST EXPIRED AND SET TO ACTIVE")."";} else {echo "     "._QXZ("LIST EXPIRED")."";} } echo "
"; if ($list_local_call_time == 'campaign') {echo _QXZ("Local Call Time").": ";} else {echo ""._QXZ("Local Call Time").": ";} echo "$NWB#lists-local_call_time$NWE
"._QXZ("Audit Comments").": $NWB#lists-audit_comments$NWE
"._QXZ("Audit Comments").": $NWB#lists-audit_comments$NWE
"._QXZ("List Change Date").": $list_changedate   $NWB#lists-list_changedate$NWE
"._QXZ("List Last Call Date").": $list_lastcalldate   $NWB#lists-list_lastcalldate$NWE
"._QXZ("Agent Script Override").": $NWB#lists-agent_script_override$NWE
"._QXZ("Inbound Script Override").": $NWB#lists-inbound_list_script_override$NWE
"._QXZ("Inbound Drop Voicemail Override").": "._QXZ("voicemail chooser")."$NWB#lists-inbound_drop_voicemail$NWE
"._QXZ("Inbound After Hours Voicemail Override").": "._QXZ("voicemail chooser")."$NWB#lists-inbound_after_hours_voicemail$NWE
$DID_edit_link_BEGIN"._QXZ("Campaign CID Override")."$DID_edit_link_END: $NWB#lists-campaign_cid_override$NWE
"; if ($cid_groups_selected > 0) {echo ""._QXZ("Campaign CID Group Override")."";} else {echo _QXZ("Campaign CID Group Override");} echo ": $NWB#lists-cid_group_id$NWE
"._QXZ("Answering Machine Message Override").": "._QXZ("audio chooser")." $NWB#lists-am_message_exten_override$NWE
"._QXZ("Drop Inbound Group Override").": $NWB#lists-drop_inbound_group_override$NWE
$sglinkB"._QXZ("Status Group Override")."$sglinkE: $NWB#lists-status_group_id$NWE
"._QXZ("QC Statuses").": $NWB#lists-qc_statuses_id$NWE
"._QXZ("QC Scorecard Override").": $NWB#lists-qc_scorecard_override$NWE
"._QXZ("QC WebForm").": $NWB#lists-qc_web_form_address$NWE
"._QXZ("Web Form").": $NWB#lists-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Web Form Two").": $NWB#lists-web_form_address$NWE
"._QXZ("Web Form Three").": $NWB#lists-web_form_address$NWE
"._QXZ("No Agent Call URL").": $NWB#lists-na_call_url$NWE "._QXZ("Alternate No Agent URLs Defined").": $vum_count
"._QXZ("No Agent Call URL").": $NWB#lists-na_call_url$NWE
"._QXZ("API New Lead URL").": $NWB#lists-apinewlead_url$NWE
"._QXZ("Auto Alt Threshold Override").": "._QXZ("number only")." $NWB#lists-auto_alt_threshold$NWE
"._QXZ("Dial Prefix Override").": $NWB#lists-dial_prefix$NWE
"._QXZ("Transfer-Conf Number 1 Override").": $NWB#lists-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number 2 Override").": $NWB#lists-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number 3 Override").": $NWB#lists-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number 4 Override").": $NWB#lists-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number 5 Override").": $NWB#lists-xferconf_a_dtmf$NWE
"._QXZ("Default Transfer Group").": $NWB#lists-default_xfer_group$NWE
"._QXZ("User New Lead Limit").": $NWB#lists-user_new_lead_limit$NWE $no_hopper_dialing_warning   "._QXZ("User Overrides for this list")."
"._QXZ("Auto Active List Rank").": $NWB#lists-auto_active_list_rank$NWE
"._QXZ("Inventory Report").": $NWB#lists-inventory_report$NWE
"._QXZ("Time Zone Setting").": $NWB#lists-time_zone_setting$NWE
\n"; echo "
\n"; echo "
"._QXZ("STATUSES WITHIN THIS LIST").":
\n"; if ($SSexpanded_list_stats > 0) { echo "\n"; $dialable_total=0; $complete_total=0; $fSQL = ''; $stmt="SELECT dial_statuses,local_call_time,lead_filter_id,drop_lockout_time,call_count_limit from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $dial_statuses = $row[0]; $local_call_time = $row[1]; $lead_filter_id = $row[2]; $drop_lockout_time = $row[3]; $call_count_limit = $row[4]; $stmt="SELECT lead_filter_sql from vicidial_lead_filters where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $filters_to_print = mysqli_num_rows($rslt); if ($filters_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $filterSQL = $rowx[0]; $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = preg_replace('/^and|and$|^or|or$/i', '',$filterSQL); if (strlen($filterSQL)>4) {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} } echo "\n"; } else { echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME").""._QXZ("CALLED").""._QXZ("NOT CALLED").""._QXZ("DIALABLE").""._QXZ("PENETRATION")."
\n"; echo "\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_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($statuses_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { #while (list($dispo,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $dispo => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} if ($dispo == 'CBHOLD') { $CLB=""; $CLE=""; } else { $CLB=''; $CLE=''; } if ($SSexpanded_list_stats > 0) { ### call function to calculate dialable leads $single_status=1; $only_return=0; $dial_statuses=" $dispo -"; $camp_lists=$list_id; if ($statuses_complete_list[$dispo] == 'Y') {$Xdialable_count=0;} else {$Xdialable_count = dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$call_count_limit,$single_status,$fSQL,$only_return);} $dialable_total = ($dialable_total + $Xdialable_count); ### get number of complete calls of this status for penetration calculations $Xcomplete_count = complete_leads($DB,$link,$dial_statuses,$camp_lists,$call_count_limit,$single_status,$campaign_id); $complete_total = ($complete_total + $Xcomplete_count); $dispo_total = ($lead_list['Y'][$dispo] + $lead_list['N'][$dispo]); if ( ($Xcomplete_count < 1) or ($dispo_total < 1) ) {$complete_pct = "0";} else { $complete_pct = intval(($Xcomplete_count / $dispo_total) * 100); } echo "\n"; } else { echo "\n"; } $o++; } } if ($SSexpanded_list_stats > 0) { if ( ($complete_total < 1) or ($lead_list['count'] < 1) ) {$total_complete_pct = "0";} else {$total_complete_pct = intval(($complete_total / $lead_list['count']) * 100);} echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; } echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]." $Xdialable_count $complete_pct%  
$CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]    
"._QXZ("TOTAL")."$lead_list[count]$dialable_total $total_complete_pct%  
SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
TOTAL$lead_list[count]

\n"; unset($lead_list); echo "
\n"; echo "
"._QXZ("TIME ZONES WITHIN THIS LIST").":
\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; $plus='+'; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($statuses_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } if ($lead_list['count'] > 0) { # while (list($tzone,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $tzone => $blank) { $LOCALzone=3600 * $tzone; $LOCALdate=gmdate("D j M Y H:i", time() + $LOCALzone); if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} else {$DISPtzone = "$tzone";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } } echo "\n"; echo "\n"; echo "
"._QXZ("GMT OFFSET NOW (local time)").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\n"; unset($lead_list); echo "
\n"; echo "
"._QXZ("OWNERS WITHIN THIS LIST").":
\n"; if ($SSuser_territories_active > 0) { ### if territories are active in the system then allow for selected-territory called-since-last-reset resetting echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $owners_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($owners_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($owner,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $owner => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $CLB=''; $CLE=''; echo "\n"; $o++; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "
"._QXZ("OWNER").""._QXZ("CALLED").""._QXZ("NOT CALLED").""._QXZ("RESET")."
$CLB$owner$CLE".$lead_list['Y'][$owner]."".$lead_list['N'][$owner]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]
\n"; echo "\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_to_mysqli($stmt, $link); $owners_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($owners_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($owner,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $owner => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $CLB=''; $CLE=''; echo "\n"; $o++; } } echo "\n"; echo "\n"; } echo "
"._QXZ("OWNER").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$owner$CLE".$lead_list['Y'][$owner]."".$lead_list['N'][$owner]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\n"; unset($lead_list); echo "
\n"; echo "
"._QXZ("RANKS WITHIN THIS LIST").":
\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $ranks_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($ranks_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($rank,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $rank => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $CLB=''; $CLE=''; echo "\n"; $o++; } } echo "\n"; echo "\n"; echo "
"._QXZ("RANK").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$rank$CLE".$lead_list['Y'][$rank]."".$lead_list['N'][$rank]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\n"; unset($lead_list); if ($SScountry_code_list_stats > 0) { echo "
\n"; echo "
"._QXZ("COUNTRY CODES WITHIN THIS LIST").":
\n"; echo "\n"; echo "\n"; $leads_in_list = 0; $leads_in_list_N = 0; $leads_in_list_Y = 0; $stmt="SELECT country_code,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by country_code,called_since_last_reset order by country_code,called_since_last_reset;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $ranks_to_print = mysqli_num_rows($rslt); $o=0; $lead_list['count'] = 0; $lead_list['Y'] = array(); $lead_list['N'] = array(); $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($ranks_to_print > $o) { $rowx=mysqli_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'; } #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_reset][$rowx[0]])) {$lead_list[$since_reset][$rowx[0]]=0;} if (!isset($lead_list[$since_resetX][$rowx[0]])) {$lead_list[$since_resetX][$rowx[0]]=0;} $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]); $o++; } $o=0; if ($lead_list['count'] > 0) { # while (list($rank,) = each($lead_list[$since_reset])) foreach($lead_list[$since_reset] as $rank => $blank) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $CLB=''; $CLE=''; echo "\n"; $o++; } } echo "\n"; echo "\n"; echo "
"._QXZ("CODE").""._QXZ("CALLED").""._QXZ("NOT CALLED")."
$CLB$rank$CLE".$lead_list['Y'][$rank]."".$lead_list['N'][$rank]."
"._QXZ("SUBTOTALS")."$lead_list[Y_count]$lead_list[N_count]
"._QXZ("TOTAL")."$lead_list[count]

\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_to_mysqli($stmt, $link); $status_called_to_print = mysqli_num_rows($rslt); $status = $MT; $o=0; $sts=0; $first_row=1; $all_called_first=1000; $all_called_last=0; $all_called_count=array(); $leads_in_sts=array(); while ($status_called_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (!isset($all_called_count[$rowx[1]])) {$all_called_count[$rowx[1]]=0;} $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];} } if (!isset($leads_in_sts[$sts])) {$leads_in_sts[$sts]=0;} $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 "
\n"; echo "
"._QXZ("CALLED COUNTS WITHIN THIS LIST").":
\n"; echo "\n"; echo ""; $first = $all_called_first; while ($first <= $all_called_last) { if (preg_match('/1$|3$|5$|7$|9$/i', $first)) {$AB='bgcolor="#AFEEEE"';} else{$AB='bgcolor="#E0FFFF"';} if ($first >= 100) {$Fplus='+';} else {$Fplus='';} echo ""; $first++; } echo "\n"; $sts=0; $statuses_called_to_print = count($status); while ($statuses_called_to_print > $sts) { $Pstatus = $status[$sts]; if (preg_match("/1$|3$|5$|7$|9$/i", $sts)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"'; $AB='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"'; $AB='bgcolor="#'. $SSstd_row2_background .'"';} # echo "$status[$sts]|$status_called_first[$sts]|$status_called_last[$sts]|$leads_in_sts[$sts]|\n"; # echo "$status[$sts]|"; echo ""; $first = $all_called_first; while ($first <= $all_called_last) { if (preg_match("/1$|3$|5$|7$|9$/i", $sts)) { if (preg_match('/1$|3$|5$|7$|9$/i', $first)) {$AB='bgcolor="#'. $SSstd_row1_background .'"';} else{$AB='bgcolor="#'. $SSstd_row2_background .'"';} } else { if (preg_match("/0$|2$|4$|6$|8$/i", $first)) {$AB='bgcolor="#'. $SSstd_row1_background .'"';} else{$AB='bgcolor="#'. $SSstd_row2_background .'"';} } $called_printed=0; $o=0; while ($status_called_to_print > $o) { if ( ($count_statuses[$o] == "$Pstatus") and ($count_called[$o] == "$first") ) { $called_printed++; echo ""; } $o++; } if (!$called_printed) {echo "";} $first++; } echo "\n\n"; $sts++; } echo ""; $first = $all_called_first; while ($first <= $all_called_last) { if (preg_match('/1$|3$|5$|7$|9$/i', $first)) {$AB='bgcolor="#AFEEEE"';} else{$AB='bgcolor="#E0FFFF"';} echo ""; $first++; } echo "\n"; echo "
"._QXZ("STATUS").""._QXZ("STATUS NAME")."$first$Fplus"._QXZ("SUBTOTAL")."
$Pstatus".(isset($statuses_list[$Pstatus]) ? $statuses_list["$Pstatus"] : "")." $count_count[$o]  ".(isset($leads_in_sts[$sts]) ? $leads_in_sts[$sts] : "0")."
"._QXZ("TOTAL")."$all_called_count[$first]$leads_in_list

\n"; if ($SSdaily_call_count_limit > 0) { echo "
\n"; echo "
"._QXZ("TODAY CALLED COUNTS FOR LEADS CALLED TODAY WITHIN THIS LIST").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT LEFT(called_since_last_reset,1) as cslr,called_count_total,count(*) from vicidial_list LEFT OUTER JOIN vicidial_lead_call_daily_counts on vicidial_list.lead_id=vicidial_lead_call_daily_counts.lead_id where vicidial_list.list_id='$list_id' group by cslr,called_count_total order by called_count_total;"; $rslt=mysql_to_mysqli($stmt, $link); $counts_to_print = mysqli_num_rows($rslt); $o=0; while ($counts_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $rowx=mysqli_fetch_row($rslt); $cslr[$o] = $rowx[0]; $counts[$o] = $rowx[1]; $tallies[$o] = $rowx[2]; if ( ($counts[$o]=='') or ($counts[$o]=='NULL') or (strlen($counts[$o]) < 1) ) {$counts[$o]=0;} echo "\n"; $o++; } echo "\n"; echo "
"._QXZ("TODAY CALLED COUNT").""._QXZ("CALLED").""._QXZ("SUBTOTAL")."
$counts[$o] $cslr[$o]$tallies[$o]
  "._QXZ("TOTAL")." $leads_in_list

\n"; } if ($SScall_limit_24hour > 0) { $temp_zero_called = $leads_in_list; $temp_24hour_output=''; echo "
\n"; echo "
"._QXZ("24-HOUR CALLED COUNTS FOR LEADS WITHIN THIS LIST").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT count(tally) as lead_tally,tally FROM(select count(*) as tally,t.lead_id from vicidial_lead_24hour_calls t where list_id='$list_id' and (call_date >= NOW() - INTERVAL 1 DAY) group by t.lead_id) t group by tally order by tally;"; $rslt=mysql_to_mysqli($stmt, $link); $counts_to_print = mysqli_num_rows($rslt); $o=0; while ($counts_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} $rowx=mysqli_fetch_row($rslt); $counts[$o] = $rowx[1]; $tallies[$o] = $rowx[0]; $temp_zero_called = ($temp_zero_called - $rowx[0]); $temp_24hour_output .= "\n"; $o++; } echo "\n"; echo $temp_24hour_output; echo "\n"; echo "
"._QXZ("24-HOUR CALLED COUNT").""._QXZ("LEADS")."
$counts[$o] $tallies[$o]
0 $temp_zero_called
"._QXZ("TOTAL")." $leads_in_list

\n"; } echo "
\n"; if ($SScustom_fields_enabled > 0) { $stmt="SELECT count(*) from vicidial_lists_fields where list_id='$list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); echo "

"._QXZ("Custom fields defined for this list").": $rowx[0]
\n"; } echo "

"._QXZ("Click here to see all CallBack Holds in this list")."
\n"; echo "

"._QXZ("Click here to download this list")."

\n"; if ($LOGdelete_lists > 0) { echo "

"._QXZ("DELETE THIS LIST")."\n"; } if ( ($LOGuser_level >= 9) and ($LOGdelete_lists > 0) and ($LOGmodify_lists > 0) and ($LOGmodify_leads > 0) ) { echo "

"._QXZ("CLEAR THIS LIST")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this list")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=431 modify drop list, add new drop status to the drop list drop statuses ###################### if ($ADD==431) { if ($LOGmodify_lists!=1) { echo "
"._QXZ("You do not have permission to view this page")."\n"; } else { $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] < 1) or (strlen($dl_id) < 2) ) { echo "
"._QXZ("DROP LIST DROP NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("drop list id must be between 2 and 30 characters in length")."\n"; } else { ### BEGIN drop list add status ### if (strlen($drop_status) > 0) { $drop_status = preg_replace('/\-\-\-\-\-.*/i', '',$drop_status); echo ""; $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' and drop_statuses LIKE \"% $drop_status %\" $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DROP LIST DROP STATUS NOT ADDED - there is already an entry for this drop list with this status")."\n";} else { echo "
"._QXZ("DROP LIST STATUS ADDED").": $dl_id - $drop_status\n"; $stmt="SELECT drop_statuses from vicidial_drop_lists where dl_id='$dl_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (strlen($row[0])<2) {$row[0] = ' -';} $drop_statuses = " $drop_status$row[0]"; $stmt="UPDATE vicidial_drop_lists set drop_statuses='$drop_statuses' where dl_id='$dl_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DROPLISTS', event_type='ADD', record_id='$dl_id', event_code='ADMIN ADD DROP LIST STATUS', event_sql=\"$SQL_log\", event_notes='Status: $statuses';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } ### END drop list add status ### } else { ### BEGIN modify drop list ### echo "
"._QXZ("DROP LIST MODIFIED").": $dl_id - $dl_name\n"; $p=0; $DL_weekdays=''; if (!is_array($dl_weekdays)) {$dl_weekdays=array();} $dl_weekdays_ct = count($dl_weekdays); while ($p <= $dl_weekdays_ct) { $dl_weekdays[$p] = preg_replace('/[^0-9]/','',$dl_weekdays[$p]); $DL_weekdays .= "$dl_weekdays[$p]"; $p++; } $groups_value=''; if (is_array($groups)) {$group_ct = count($groups);} else {$group_ct=0;} $p=0; while ($p < $group_ct) { $groups[$p] = preg_replace('/[^-_0-9\p{L}]/u','',$groups[$p]); $groups_value .= " $groups[$p]"; $p++; } if (strlen($groups_value)>2) {$groups_value .= " -";} $stmt="UPDATE vicidial_drop_lists set dl_name='$dl_name',dl_server='$dl_server',dl_times='$dl_times',dl_weekdays='$DL_weekdays',dl_monthdays='$dl_monthdays',list_id='$list_id',duplicate_check='$duplicate_check',run_now_trigger='$run_now_trigger',active='$active',user_group='$user_group',closer_campaigns='$groups_value',dl_minutes='$dl_minutes' where dl_id='$dl_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DROPLISTS', event_type='MODIFY', record_id='$dl_id', event_code='ADMIN MODIFY DROP LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); ### END modify drop list ### } } } $ADD=331; } ###################### # ADD=333 remove drop list drop status ###################### if ($ADD==333) { if ($LOGmodify_lists==1) { echo ""; $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' and drop_statuses LIKE \"% $status %\" $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("DROP LIST DROP STATUS NOT REMOVED - this drop status is not selected for this drop list")."\n";} else { if ( (strlen($dl_id) < 2) or (strlen($status) < 1) ) { echo "
"._QXZ("DROP LIST DROP STATUS NOT REMOVED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("status must be between 1 and 6 characters in length")."\n"; } else { $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("DROP LIST NOT FOUND").": $dl_id";} else { echo "
"._QXZ("DROP LIST DROP STATUS REMOVED").": $dl_id - $status\n"; $stmt="SELECT drop_statuses from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $drop_statuses = preg_replace("/\s$status\s/i", " ",$row[0]); $stmt="UPDATE vicidial_drop_lists set drop_statuses='$drop_statuses' where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DROPLISTS', event_type='DELETE', record_id='$dl_id', event_code='ADMIN DELETE DROP LIST STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } $ADD=331; # go to drop list modification form below } ###################### # ADD=331 modify drop list info in the system ###################### if ($ADD==331) { if ($LOGmodify_lists==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=331&dl_id=$dl_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT count(*) from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ( ($row[0] < 1) or (strlen($dl_id) < 2) ) { echo "
"._QXZ("DROP LIST DROP NOT MODIFIED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("drop list id must be between 2 and 30 characters in length")."\n"; } else { ##### get server listing for dynamic pulldown $stmt="SELECT server_ip,server_description,external_server_ip from servers order by server_ip"; $rsltx=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rsltx); $servers_list=''; $o=0; while ($servers_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $servers_list .= "\n"; $o++; } $stmt="SELECT dl_id,dl_name,last_run,dl_server,dl_times,dl_weekdays,dl_monthdays,drop_statuses,list_id,duplicate_check,run_now_trigger,active,user_group,closer_campaigns,dl_minutes from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $dl_id = $row[0]; $dl_name = $row[1]; $last_run = $row[2]; $dl_server = $row[3]; $dl_times = $row[4]; $dl_weekdays = $row[5]; $dl_monthdays = $row[6]; $drop_statuses = $row[7]; $list_id = $row[8]; $duplicate_check = $row[9]; $run_now_trigger = $row[10]; $active = $row[11]; $user_group = $row[12]; $closer_campaigns = $row[13]; $dl_minutes = $row[14]; echo ""; echo "
"._QXZ("MODIFY A DROP LIST")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $drop_statuses = preg_replace("/ -$/","",$drop_statuses); $Dstatuses = explode(" ", $drop_statuses); $Ds_to_print = (count($Dstatuses) - 0); $o=0; $p=0; while ($Ds_to_print > $o) { $o++; $Dstatus = $Dstatuses[$o]; if (strlen($Dstatus)>0) { $p++; echo "\n"; } } echo "\n"; $closer_campaignsSQL = 'closer_campaigns'; $groups_list=''; $stmt="SELECT closer_campaigns from vicidial_drop_lists where dl_id='$dl_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $Mcloser_campaigns = $row[0]; $Mcloser_campaigns = preg_replace("/ -$/","",$Mcloser_campaigns); $groups = explode(" ", $Mcloser_campaigns); $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_handling='PHONE' $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_id_values[$o] = $rowx[0]; $group_name_values[$o] = $rowx[1]; if (strlen($group_id_values[$o])>0) { $groups_list .= "$group_id_values[$o] - $group_name_values[$o]
\n"; } $o++; } if (strlen($groups_value)>2) {$groups_value .= " -";} echo "\n"; echo "\n"; echo "
"._QXZ("Drop List ID").": $dl_id
"._QXZ("Drop List Name").": $NWB#drop_lists-dl_name$NWE
"._QXZ("Last Run Time").": $last_run
"._QXZ("Admin User Group").": $NWB#drop_lists-user_group$NWE
"._QXZ("Run Server").": $NWB#drop_lists-dl_server$NWE
"._QXZ("Run Times").": $NWB#drop_lists-dl_times$NWE
"._QXZ("Run Weekdays").":\n"; echo ""._QXZ("Sunday")."   \n"; echo ""._QXZ("Monday")."   \n"; echo ""._QXZ("Tuesday")."   \n"; echo ""._QXZ("Wednesday")."   \n"; echo ""._QXZ("Thursday")."   \n"; echo ""._QXZ("Friday")."   \n"; echo ""._QXZ("Saturday")."   \n"; echo "$NWB#drop_lists-dl_weekdays$NWE
"._QXZ("Run Month Days").": $NWB#drop_lists-dl_monthdays$NWE
"._QXZ("Duplicate Check").": $NWB#drop_lists-duplicate_check$NWE
"._QXZ("List ID").":   ("._QXZ("digits only").") $NWB#drop_lists-list_id$NWE
"._QXZ("Active").": $NWB#drop_lists-active$NWE
"._QXZ("Gather Minutes").":   ("._QXZ("digits only").") $NWB#drop_lists-dl_minutes$NWE
"._QXZ("Run Now Trigger").": $NWB#drop_lists-run_now_trigger$NWE
"._QXZ("Drop Status")." $p: \n"; echo "$Dstatus - $statname_list[$Dstatus]         \n"; echo ""._QXZ("REMOVE")."
"._QXZ("Add A Drop Status").":   \n"; echo "     $NWB#drop_lists-drop_statuses$NWE

"._QXZ("Inbound Groups").":
$NWB#drop_lists-closer_campaigns$NWE
\n"; echo "$groups_list"; echo "
\n"; echo "

\n"; if ($LOGmodify_lists > 0) { echo "

"._QXZ("DELETE THIS DROP LIST")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this drop list")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3111 modify in-group info in the system ###################### if ($ADD==3111) { if ($LOGmodify_ingroups==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3111&group_id=$group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,inbound_survey_question_filename,inbound_survey_callmenu,icbq_expiration_hours,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,icbq_call_time_id,add_lead_timezone,icbq_dial_filter,populate_lead_source,populate_lead_vendor,park_file_name,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,ingroup_script_two,browser_alert_sound,browser_alert_volume,answer_signal,no_agent_delay,agent_search_method,qc_scorecard_id,qc_statuses_id,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,custom_one,custom_two,custom_three,custom_four,custom_five,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,agent_search_list,state_descriptions,stereo_recording,stereo_rec_filename,stereo_parallel_recording,recording_dtmf_muting,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,xfer_talk_minimum,xfer_talk_minimum_sec from vicidial_inbound_groups where group_id='$group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $query_group_id = $row[0]; $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_ingroups = $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]; $ignore_list_script_override = $row[68]; $extension_appended_cidname = $row[69]; $uniqueid_status_display = $row[70]; $uniqueid_status_prefix = $row[71]; $hold_time_option_minimum = $row[72]; $hold_time_option_press_filename = $row[73]; $hold_time_option_callmenu = $row[74]; $onhold_prompt_no_block = $row[75]; $onhold_prompt_seconds = $row[76]; $hold_time_option_no_block = $row[77]; $hold_time_option_prompt_seconds = $row[78]; $hold_time_second_option = $row[79]; $hold_time_third_option = $row[80]; $wait_hold_option_priority = $row[81]; $wait_time_option = $row[82]; $wait_time_second_option = $row[83]; $wait_time_third_option = $row[84]; $wait_time_option_seconds = $row[85]; $wait_time_option_exten = $row[86]; $wait_time_option_voicemail = $row[87]; $wait_time_option_xfer_group = $row[88]; $wait_time_option_callmenu = $row[89]; $wait_time_option_callback_filename = $row[90]; $wait_time_option_callback_list_id = $row[91]; $wait_time_option_press_filename = $row[92]; $wait_time_option_no_block = $row[93]; $wait_time_option_prompt_seconds = $row[94]; $timer_action_destination = $row[95]; $calculate_estimated_hold_seconds = $row[96]; $add_lead_url = $row[97]; $eht_minimum_prompt_filename = $row[98]; $eht_minimum_prompt_no_block = $row[99]; $eht_minimum_prompt_seconds = $row[100]; $on_hook_ring_time = $row[101]; $na_call_url = $row[102]; $on_hook_cid = $row[103]; $group_calldate = $row[104]; $action_xfer_cid = $row[105]; $drop_callmenu = $row[106]; $after_hours_callmenu = $row[107]; $user_group = $row[108]; $max_calls_method = $row[109]; $max_calls_count = $row[110]; $max_calls_action = $row[111]; $dial_ingroup_cid = $row[112]; $group_handling = $row[113]; $web_form_address_three = $row[114]; $populate_lead_ingroup = $row[115]; $drop_lead_reset = $row[116]; $after_hours_lead_reset = $row[117]; $nanq_lead_reset = $row[118]; $wait_time_lead_reset = $row[119]; $hold_time_lead_reset = $row[120]; $status_group_id = $row[121]; $routing_initiated_recordings = $row[122]; $on_hook_cid_number = $row[123]; $customer_chat_screen_colors = $row[124]; $customer_chat_survey_link = $row[125]; $customer_chat_survey_text = $row[126]; $populate_lead_province = $row[127]; $areacode_filter = $row[128]; $areacode_filter_seconds = $row[129]; $areacode_filter_action = $row[130]; $areacode_filter_action_value = $row[131]; $populate_state_areacode = $row[132]; $inbound_survey = $row[133]; $inbound_survey_filename = $row[134]; $inbound_survey_accept_digit = $row[135]; $inbound_survey_question_filename = $row[136]; $inbound_survey_callmenu = $row[137]; $icbq_expiration_hours = $row[138]; $closing_time_action = $row[139]; $closing_time_now_trigger = $row[140]; $closing_time_filename = $row[141]; $closing_time_end_filename = $row[142]; $closing_time_lead_reset = $row[143]; $closing_time_option_exten = $row[144]; $closing_time_option_callmenu = $row[145]; $closing_time_option_voicemail = $row[146]; $closing_time_option_xfer_group = $row[147]; $closing_time_option_callback_list_id = $row[148]; $icbq_call_time_id = $row[149]; $add_lead_timezone = $row[150]; $icbq_dial_filter = $row[151]; $populate_lead_source = $row[152]; $populate_lead_vendor = $row[153]; $park_file_name = $row[154]; $waiting_call_url_on = $row[155]; $waiting_call_url_off = $row[156]; $enter_ingroup_url = $row[157]; $cid_cb_confirm_number = $row[158]; $cid_cb_invalid_filter_phone_group = $row[159]; $cid_cb_valid_length = $row[160]; $cid_cb_valid_filename = $row[161]; $cid_cb_confirmed_filename = $row[162]; $cid_cb_enter_filename = $row[163]; $cid_cb_you_entered_filename = $row[164]; $cid_cb_press_to_confirm_filename = $row[165]; $cid_cb_invalid_filename = $row[166]; $cid_cb_reenter_filename = $row[167]; $cid_cb_error_filename = $row[168]; $place_in_line_caller_number_filename = $row[169]; $place_in_line_you_next_filename = $row[170]; $ingroup_script_two = $row[171]; $browser_alert_sound_ingroups = $row[172]; $browser_alert_volume = $row[173]; $answer_signal_ingroups = $row[174]; $no_agent_delay = $row[175]; $agent_search_method = $row[176]; $qc_scorecard_id = $row[177]; $qc_statuses_id = $row[178]; $populate_lead_comments = $row[179]; $drop_call_seconds_override = $row[180]; $populate_lead_owner = $row[181]; $in_queue_nanque = $row[182]; $in_queue_nanque_exceptions = $row[183]; $custom_one = $row[184]; $custom_two = $row[185]; $custom_three = $row[186]; $custom_four = $row[187]; $custom_five = $row[188]; $second_alert_trigger = $row[189]; $second_alert_trigger_seconds = $row[190]; $second_alert_filename = $row[191]; $second_alert_delay = $row[192]; $second_alert_container = $row[193]; $second_alert_only = $row[194]; $third_alert_trigger = $row[195]; $third_alert_trigger_seconds = $row[196]; $third_alert_filename = $row[197]; $third_alert_delay = $row[198]; $third_alert_container = $row[199]; $third_alert_only = $row[200]; $agent_search_list = $row[201]; $state_descriptions = $row[202]; $stereo_recording = $row[203]; $stereo_rec_filename = $row[204]; $stereo_parallel_recording = $row[205]; $recording_dtmf_muting = $row[206]; $stereo_recording_agent = $row[207]; $parallel_rec_co_filename = $row[208]; $parallel_rec_cm_filename = $row[209]; $parallel_rec_fr_filename = $row[210]; $xfer_talk_minimum = $row[211]; $xfer_talk_minimum_sec = $row[212]; } else { # Necessary due to being referenced below $query_group_id=""; $group_calldate=""; $start_call_url=""; $dispo_call_url=""; $na_call_url=""; $add_lead_url=""; $qc_web_form_address=""; } ##### get callmenu listings for dynamic pulldown $stmt="SELECT menu_id,menu_name from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xmenus_to_print = mysqli_num_rows($rslt); $o=0; $Xmenuslist=''; $Wmenuslist=''; $Cmenuslist=''; $Xmenus_selected=0; $Wmenus_selected=0; $Cmenus_selected=0; while ($Xmenus_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xmenuslist .= "\n"; $Wmenuslist .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Cmenuslist .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Xmenus_selected < 1) {$Xmenuslist .= "\n";} if ($Wmenus_selected < 1) {$Wmenuslist .= "\n";} if ($Cmenus_selected < 1) {$Cmenuslist .= "\n";} ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $Dgroups_menu=''; $Dgroups_selected=0; $Agroups_menu=''; $Agroups_selected=0; $Hgroups_menu=''; $Hgroups_selected=0; $Wgroups_menu=''; $Wgroups_selected=0; $Tgroups_menu=''; $Tgroups_selected=0; $Cgroups_menu=''; $Cgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; if ($group_id!=$rowx[0]) { $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Cgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Wgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; } $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} if ($Agroups_selected < 1) {$Agroups_menu .= "\n";} else {$Agroups_menu .= "\n";} if ($Tgroups_selected < 1) {$Tgroups_menu .= "\n";} else {$Tgroups_menu .= "\n";} if ($Cgroups_selected < 1) {$Cgroups_menu .= "\n";} else {$Cgroups_menu .= "\n";} if ($Wgroups_selected < 1) {$Wgroups_menu .= "\n";} else {$Wgroups_menu .= "\n";} if ($Hgroups_selected < 1) {$Hgroups_menu .= "\n";} else {$Hgroups_menu .= "\n";} $allowed_campaigns_count=0; $allowed_campaigns_warning=''; $SQL_query_group_id = preg_replace("/_/",'\\_',$query_group_id); $stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_query_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $vc_allowed_ct=0; if ($campin_to_print > $vc_allowed_ct) { $rowc=mysqli_fetch_row($rslt); $allowed_campaigns_count = $rowc[0]; $vc_allowed_ct++; } if ($allowed_campaigns_count < 1) {$allowed_campaigns_warning='
  '._QXZ("Not set as allowed in any campaigns").'!
';} echo "
"._QXZ("MODIFY A GROUPS RECORD").": $query_group_id\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT count(*) from vicidial_inbound_callback_queue where group_id='$group_id' and icbq_status='LIVE';"; $rslt=mysql_to_mysqli($stmt, $link); $icbq_to_print = mysqli_num_rows($rslt); if ($icbq_to_print > 0) { $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { echo "\n"; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_webform > 0) { echo "\n"; } if ($SSenable_third_webform > 0) { echo "\n"; } echo "\n"; if ( ($SSagent_search_method == 1) or ($SSagent_search_method == 2) ) { echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; ##### get status group listings for dynamic pulldown menu $stmt="SELECT status_group_id,status_group_notes from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); $status_groups_menu=''; $status_groups_selected=0; $o=0; while ($status_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $status_groups_menu .= "\n"; $o++; } $sglinkB=''; $sglinkE=''; if (strlen($status_group_id)>1) { $sglinkB=""; $sglinkE=''; } echo "\n"; $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SScustom_fields_enabled > 0) {$cfwHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} if ($SSallow_chats > 0) {$achHTML .= "";} echo "\n"; if ($SSbrowser_call_alerts > 0) { echo "\n"; } else { echo "\n"; } if ($SSallow_emails>0 || $SSallow_chats > 0) { echo "\n"; } else {echo "\n";} if ($SSinbound_answer_config > 0) { echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic WEEKDAY_TIMERANGE_SECONDS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='WEEKDAY_TIMERANGE_SECONDS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $drop_call_seconds_override_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $drop_call_seconds_override_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic PAUSE_CODES_LIST container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='PAUSE_CODES_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $in_queue_nanque_exceptions_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $in_queue_nanque_exceptions_menu .= "\n"; $o++; } echo "\n"; $stmt="SELECT count(*) from vicidial_areacode_filters where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vaf_count = $row[0]; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $wav='.wav'; $gsm='.gsm'; $ohpf_message=''; $stmt="SELECT audio_length from audio_store_details where audio_filename IN('$onhold_prompt_filename$wav','$onhold_prompt_filename$gsm') order by audio_length desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $audio_to_print = mysqli_num_rows($rslt); if ($audio_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $audio_length = $rowx[0]; if ($audio_length > 9) {$ohpf_message="\n";} } echo "\n$ohpf_message"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT filter_phone_group_id,filter_phone_group_name from vicidial_filter_phone_groups $whereLOGadmin_viewable_groupsSQL order by filter_phone_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Fgroups_to_print = mysqli_num_rows($rslt); $Fgroups_list=''; $i=0; while ($i < $Fgroups_to_print) { $row=mysqli_fetch_row($rslt); $Fgroups_list .= ""; $i++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic in-group list pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='INGROUP_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $inand_to_print = mysqli_num_rows($rslt); $second_alert_container_menu=''; $inand_selected=0; $o=0; while ($inand_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $second_alert_container_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic in-group list pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='INGROUP_LIST' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $inand_to_print = mysqli_num_rows($rslt); $third_alert_container_menu=''; $inand_selected=0; $o=0; while ($inand_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $third_alert_container_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\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' $LOGadmin_viewable_groupsSQL order by group_alias_id;"; $rslt=mysql_to_mysqli($stmt, $link); $group_alias_to_print = mysqli_num_rows($rslt); $group_alias_menu=''; $group_alias_selected=0; $o=0; while ($group_alias_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $group_alias_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; $DID_edit_link_BEGIN=''; $DID_edit_link_END=''; if (strlen($dial_ingroup_cid) > 0) { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$dial_ingroup_cid' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); if ($dids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $DID_edit_link_BEGIN = ""; $DID_edit_link_END=''; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ( ($SSstereo_recording =='1') or ($SSstereo_recording =='2') or ($SSstereo_recording =='3') or ($SSstereo_recording =='4') or ($SSstereo_recording =='5') ) { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ( ( ($SSstereo_recording =='1') or ($SSstereo_recording =='2') or ($SSstereo_recording =='3') or ($SSstereo_recording =='4') or ($SSstereo_recording =='5') ) and ($SSstereo_parallel_recording == '1') ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting >= 2) ) and ($SSrecording_dtmf_detection == '1') ) { $SYSTEM_DTMF_MUTING_OVERRIDE=''; if ($SSrecording_dtmf_muting >= 2) {$SYSTEM_DTMF_MUTING_OVERRIDE = ""._QXZ("SYSTEM OVERRIDE ENABLED").": $SSrecording_dtmf_muting "._QXZ("SECONDS")."";} echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; if ($start_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='start';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($dispo_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='dispo';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($na_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='noagent';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } # get count of talk seconds urls in this In-Group $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } # check if this In-Group has talk seconds url set to -FORCEDISABLE- $force_disableHTML=''; $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk' and active='N' and url_address LIKE \"%FORCEDISABLE%\";"; $rslt=mysql_to_mysqli($stmt, $link); $fdtsu_to_print = mysqli_num_rows($rslt); if ($fdtsu_to_print > 0) { $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {$force_disableHTML="FORCED DISABLE";} } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic STATE_DESCRIPTIONS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='STATE_DESCRIPTIONS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $sdb_to_print = mysqli_num_rows($rslt); $state_descriptions_menu=''; $sdb_selected=0; $o=0; while ($sdb_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $state_descriptions_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSqc_features_active > 0) { echo "\n"; echo "\n"; /* JCJ - deprecated 2021-03-06 ##### 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,scheduled_callback from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $qc_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); if (!preg_match("/\"$rowx[0]\"/",$qc_statuses_list)) { $qc_statuses_list .= "NONE"; $o=0; while ($containers_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCcontainers_list .= "\n"; $qc_containers_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get scorecards listings for pulldown $stmt="SELECT qc_scorecard_id,scorecard_name from quality_control_scorecards where active='Y' order by qc_scorecard_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scorecards_to_print = mysqli_num_rows($rslt); $QCscorecards_list=""; $o=0; while ($scorecards_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCscorecards_list .= "\n"; $scorecardname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get scripts listings for pulldown $stmt="SELECT script_id,script_name from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); $QCscripts_list=""; $o=0; while ($scripts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCscripts_list .= "\n"; $scriptname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get shifts listings for pulldown $stmt="SELECT shift_id,shift_name from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); $QCshifts_list=""; $o=0; while ($shifts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCshifts_list .= "\n"; $shiftname_list["$rowx[0]"] = "$rowx[1]"; $o++; } # echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; /* JCJ - deprecated 2021-03-06 echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; */ } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group ID").": $query_group_id$NWB#inbound_groups-group_id$NWE $allowed_campaigns_warning
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("Callback Queue Calls").":   $row[0] $NWB#inbound_groups-callback_queue_calls$NWE
"._QXZ("In-Group Calldate").": $group_calldate$NWB#inbound_groups-group_calldate$NWE
\n"; $temp_chart_title = _QXZ("8 Day inbound call count for this in-group"); horizontal_bar_chart($group_id,'8','in-group',$link,'total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Park Music-on-Hold").": "._QXZ("moh chooser")." $NWB#inbound_groups-park_ext$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Web Form Two").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Web Form Three").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Next Agent Call").": $NWB#inbound_groups-next_agent_call$NWE
"._QXZ("Agent Search Method Override").": $NWB#inbound_groups-agent_search_method$NWE
"._QXZ("Queue Priority").": $NWB#inbound_groups-queue_priority$NWE
"._QXZ("On-Hook Ring Time").": $NWB#inbound_groups-on_hook_ring_time$NWE
"._QXZ("On-Hook CID").": $NWB#inbound_groups-on_hook_cid$NWE
"._QXZ("On-Hook CID Number").": $NWB#inbound_groups-on_hook_cid_number$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Script").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Script Two").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Ignore List Script Override").": $NWB#inbound_groups-ignore_list_script_override$NWE
$sglinkB"._QXZ("Status Group Override")."$sglinkE: $NWB#inbound_groups-status_group_id$NWE
"._QXZ("Get Call Launch").": $NWB#inbound_groups-get_call_launch$NWE
"._QXZ("Agent Browser Call Alert Sound").":   \n"; echo " "._QXZ("volume").":   "; echo ""._QXZ("play selected sound")." $NWB#inbound_groups-browser_alert_sound$NWE  
"._QXZ("Group Handling").": $NWB#inbound_groups-group_handling$NWE
"._QXZ("Answer Signal").": $NWB#inbound_groups-answer_signal$NWE
"._QXZ("Transfer-Conf DTMF")." 1: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 1: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf DTMF")." 2: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 2: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 3: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 4: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Transfer-Conf Number")." 5: $NWB#inbound_groups-xferconf_a_dtmf$NWE
"._QXZ("Timer Action").": $NWB#inbound_groups-timer_action$NWE
"._QXZ("Timer Action Message").": $NWB#inbound_groups-timer_action_message$NWE
"._QXZ("Timer Action Seconds").": $NWB#inbound_groups-timer_action_seconds$NWE
"._QXZ("Timer Action Destination").": $NWB#inbound_groups-timer_action_destination$NWE
"._QXZ("Drop Call Seconds").": $NWB#inbound_groups-drop_call_seconds$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("Drop Seconds Override Container")."";} else {echo _QXZ("Drop Seconds Override Container");} echo ": $NWB#inbound_groups-drop_call_seconds_override$NWE
"._QXZ("Drop Action").": $NWB#inbound_groups-drop_action$NWE
"._QXZ("Drop Lead Reset").": $NWB#inbound_groups-drop_lead_reset$NWE
"._QXZ("Drop Exten").": $NWB#inbound_groups-drop_exten$NWE
"._QXZ("Voicemail").": "._QXZ("voicemail chooser")."$NWB#inbound_groups-voicemail_ext$NWE
"._QXZ("Drop Transfer Group").": $NWB#inbound_groups-drop_inbound_group$NWE
"._QXZ("Drop Call Menu").":$NWB#inbound_groups-drop_callmenu$NWE
"._QXZ("Call Time").": $NWB#inbound_groups-call_time_id$NWE
\n"; $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $call_times_to_print = mysqli_num_rows($rslt); if ($call_times_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ct_holidays = $rowx[0]; $holiday_rules = explode('|',$ct_holidays); $ct_hrs = ((count($holiday_rules)) - 2); if ($ct_hrs < 0) {$ct_hrs=0;} echo _QXZ("Holidays defined for this call time").": $ct_hrs\n"; } else {echo ""._QXZ("Call time not found")."!: $call_time_id\n";} echo "
"._QXZ("Action Transfer CID").": $NWB#inbound_groups-action_xfer_cid$NWE
"._QXZ("After Hours Action").": $NWB#inbound_groups-after_hours_action$NWE
"._QXZ("After Hours Lead Reset").": $NWB#inbound_groups-after_hours_lead_reset$NWE
"._QXZ("After Hours Message Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-after_hours_message_filename$NWE
"._QXZ("After Hours Extension").": $NWB#inbound_groups-after_hours_exten$NWE
"._QXZ("After Hours Voicemail").": "._QXZ("voicemail chooser")."$NWB#inbound_groups-after_hours_voicemail$NWE
"._QXZ("After Hours Transfer Group").": $NWB#inbound_groups-afterhours_xfer_group$NWE
"._QXZ("After Hours Call Menu").":$NWB#inbound_groups-after_hours_callmenu$NWE
"._QXZ("No Agents No Queueing").": $NWB#inbound_groups-no_agent_no_queue$NWE
"._QXZ("No Agent No Queue Action").": $NWB#inbound_groups-no_agent_no_queue$NWE\n"; echo "
"._QXZ("No Agent No Queue Delay").": $NWB#inbound_groups-no_agent_delay$NWE
"._QXZ("No Agent No Queue Lead Reset").": $NWB#inbound_groups-nanq_lead_reset$NWE
"; echo "\n"; if ($no_agent_action=='CALLMENU') { echo ""; echo ""._QXZ("Call Menu").":"; echo ""; echo " \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 ""; echo ""._QXZ("In-Group").":"; echo ""; echo " "; echo "   "._QXZ("Handle Method").": \n"; echo "
"._QXZ("Search Method").": \n"; echo "   "._QXZ("List ID").": "; echo "
"._QXZ("Campaign ID").": \n"; echo "   "._QXZ("Phone Code").": "; } if ($no_agent_action=='DID') { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$no_agent_action_value';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; echo ""; echo ""._QXZ("DID").":"; echo ""; echo " \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 _QXZ("Audio File").": "._QXZ("audio chooser")."\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 _QXZ("Extension").":   "._QXZ("Context").": \n"; } if ( ($no_agent_action=='VOICEMAIL') or ($no_agent_action=='VMAIL_NO_INST') ) { echo _QXZ("Voicemail Box").": "._QXZ("voicemail chooser")."\n"; } echo "

 
"._QXZ("In-Queue No Agents Check").": $NWB#inbound_groups-in_queue_nanque$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("In-Queue No Agents Pause Exceptions")."";} else {echo _QXZ("In-Queue No Agents Pause Exceptions");} echo ": $NWB#inbound_groups-in_queue_nanque_exceptions$NWE
"._QXZ("Areacode Filter").": $NWB#inbound_groups-areacode_filter$NWE   "._QXZ("areacode filter list").": $vaf_count
"._QXZ("Areacode Filter Seconds").": $NWB#inbound_groups-areacode_filter_seconds$NWE
"._QXZ("Areacode Filter Action").": $NWB#inbound_groups-areacode_filter_action$NWE
"; echo "\n"; if ($areacode_filter_action=='CALLMENU') { echo ""; echo ""._QXZ("Call Menu").":"; echo ""; echo " \n"; } if ($areacode_filter_action=='INGROUP') { if (strlen($areacode_filter_action_value) < 10) {$areacode_filter_action_value = 'SALESLINE,CID,LB,998,TESTCAMP,1';} $IGareacode_filter_action_value = explode(",",$areacode_filter_action_value); $IGgroup_id = $IGareacode_filter_action_value[0]; $IGhandle_method = $IGareacode_filter_action_value[1]; $IGsearch_method = $IGareacode_filter_action_value[2]; $IGlist_id = $IGareacode_filter_action_value[3]; $IGcampaign_id = $IGareacode_filter_action_value[4]; $IGphone_code = $IGareacode_filter_action_value[5]; echo ""; echo ""._QXZ("In-Group").":"; echo ""; echo " "; echo "   "._QXZ("Handle Method").": \n"; echo "
"._QXZ("Search Method").": \n"; echo "   "._QXZ("List ID").": "; echo "
"._QXZ("Campaign ID").": \n"; echo "   "._QXZ("Phone Code").": "; } if ($areacode_filter_action=='DID') { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$areacode_filter_action_value';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; echo ""; echo ""._QXZ("DID").":"; echo ""; echo " \n"; } if ($areacode_filter_action=='MESSAGE') { if (strlen($areacode_filter_action_value) < 3) {$areacode_filter_action_value = 'nbdy-avail-to-take-call|vm-goodbye';} echo _QXZ("Audio File").": "._QXZ("audio chooser")."\n"; } if ($areacode_filter_action=='EXTENSION') { if (strlen($areacode_filter_action_value) < 3) {$areacode_filter_action_value = '8304,default';} $EXareacode_filter_action_value = explode(",",$areacode_filter_action_value); $EXextension = $EXareacode_filter_action_value[0]; $EXcontext = $EXareacode_filter_action_value[1]; echo _QXZ("Extension").":   "._QXZ("Context").": \n"; } if ( ($areacode_filter_action=='VOICEMAIL') or ($areacode_filter_action=='VMAIL_NO_INST') ) { echo _QXZ("Voicemail Box").": "._QXZ("voicemail chooser")."\n"; } echo "

 
"._QXZ("Max Calls Method").": $NWB#inbound_groups-max_calls_method$NWE
"._QXZ("Max Calls Count").": $NWB#inbound_groups-max_calls_count$NWE
"._QXZ("Max Calls Action").": $NWB#inbound_groups-max_calls_action$NWE
"._QXZ("Welcome Message Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-welcome_message_filename$NWE
"._QXZ("Play Welcome Message").": $NWB#inbound_groups-play_welcome_message$NWE
"._QXZ("Music On Hold Context").": "._QXZ("moh chooser")." $NWB#inbound_groups-moh_context$NWE
"._QXZ("The On Hold Prompt Filename you have selected above is too long, please select one that is 9 seconds or less.")."   ($audio_length "._QXZ("seconds").")
"._QXZ("On Hold Prompt Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-onhold_prompt_filename$NWE
"._QXZ("On Hold Prompt Interval").": $NWB#inbound_groups-prompt_interval$NWE
"._QXZ("On Hold Prompt No Block").": $NWB#inbound_groups-onhold_prompt_no_block$NWE
"._QXZ("On Hold Prompt Seconds").": $NWB#inbound_groups-onhold_prompt_seconds$NWE
"._QXZ("Play Place in Line").": $NWB#inbound_groups-play_place_in_line$NWE
"._QXZ("Place in Line Caller Number").": "._QXZ("audio chooser")." $NWB#inbound_groups-place_in_line_caller_number_filename$NWE
"._QXZ("Place in Line You Are Next Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-place_in_line_you_next_filename$NWE
"._QXZ("Play Estimated Hold Time").": $NWB#inbound_groups-play_estimate_hold_time$NWE
"._QXZ("Calculate Estimated Hold Seconds").": $NWB#inbound_groups-calculate_estimated_hold_seconds$NWE
"._QXZ("Estimated Hold Time Minimum Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-eht_minimum_prompt_filename$NWE
"._QXZ("Estimated Hold Time Minimum Prompt No Block").": $NWB#inbound_groups-eht_minimum_prompt_no_block$NWE
"._QXZ("Estimated Hold Time Minimum Prompt Seconds").": $NWB#inbound_groups-eht_minimum_prompt_seconds$NWE
"._QXZ("Wait Time Option").": $NWB#inbound_groups-wait_time_option$NWE
"._QXZ("Wait Time Second Option").": $NWB#inbound_groups-wait_time_second_option$NWE
"._QXZ("Wait Time Third Option").": $NWB#inbound_groups-wait_time_third_option$NWE
"._QXZ("Wait Time Option Seconds").": $NWB#inbound_groups-wait_time_option_seconds$NWE
"._QXZ("Wait Time Option Lead Reset").": $NWB#inbound_groups-wait_time_lead_reset$NWE
"._QXZ("Wait Time Option Extension").": $NWB#inbound_groups-wait_time_option_exten$NWE
"._QXZ("Wait Time Option Callmenu").": $NWB#inbound_groups-wait_time_option_callmenu$NWE
"._QXZ("Wait Time Option Voicemail").": "._QXZ("voicemail chooser")." $NWB#inbound_groups-wait_time_option_voicemail$NWE
"._QXZ("Wait Time Option Transfer In-Group").": $NWB#inbound_groups-wait_time_option_xfer_group$NWE
"._QXZ("Wait Time Option Press Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-wait_time_option_press_filename$NWE
"._QXZ("Wait Time Option Press No Block").": $NWB#inbound_groups-wait_time_option_no_block$NWE
"._QXZ("Wait Time Option Press Filename Seconds").": $NWB#inbound_groups-wait_time_option_prompt_seconds$NWE
"._QXZ("Wait Time Option After Press Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-wait_time_option_callback_filename$NWE
"._QXZ("Wait Time Option Callback List ID").": $NWB#inbound_groups-wait_time_option_callback_list_id$NWE
"._QXZ("Wait Hold Option Priority").": $NWB#inbound_groups-wait_hold_option_priority$NWE
"._QXZ("Estimated Hold Time Option").": $NWB#inbound_groups-hold_time_option$NWE
"._QXZ("Hold Time Second Option").": $NWB#inbound_groups-hold_time_second_option$NWE
"._QXZ("Hold Time Third Option").": $NWB#inbound_groups-hold_time_third_option$NWE
"._QXZ("Hold Time Option Seconds").": $NWB#inbound_groups-hold_time_option_seconds$NWE
"._QXZ("Hold Time Option Lead Reset").": $NWB#inbound_groups-hold_time_lead_reset$NWE
"._QXZ("Hold Time Option Minimum").": $NWB#inbound_groups-hold_time_option_minimum$NWE
"._QXZ("Hold Time Option Extension").": $NWB#inbound_groups-hold_time_option_exten$NWE
"._QXZ("Hold Time Option Callmenu").": $NWB#inbound_groups-hold_time_option_callmenu$NWE
"._QXZ("Hold Time Option Voicemail").": "._QXZ("voicemail chooser")." $NWB#inbound_groups-hold_time_option_voicemail$NWE
"._QXZ("Hold Time Option Transfer In-Group").": $NWB#inbound_groups-hold_time_option_xfer_group$NWE
"._QXZ("Hold Time Option Press Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-hold_time_option_press_filename$NWE
"._QXZ("Hold Time Option Press No Block").": $NWB#inbound_groups-hold_time_option_no_block$NWE
"._QXZ("Hold Time Option Press Filename Seconds").": $NWB#inbound_groups-hold_time_option_prompt_seconds$NWE
"._QXZ("Hold Time Option After Press Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-hold_time_option_callback_filename$NWE
"._QXZ("Hold Time Option Callback List ID").": $NWB#inbound_groups-hold_time_option_callback_list_id$NWE
"._QXZ("Callback Queue Expire Hours").": $NWB#inbound_groups-icbq_expiration_hours$NWE
"._QXZ("Callback Queue Call Time").": $NWB#inbound_groups-icbq_call_time_id$NWE
\n"; $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$icbq_call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $call_times_to_print = mysqli_num_rows($rslt); if ($call_times_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ct_holidays = $rowx[0]; $holiday_rules = explode('|',$ct_holidays); $ct_hrs = ((count($holiday_rules)) - 2); if ($ct_hrs < 0) {$ct_hrs=0;} echo _QXZ("Holidays defined for this callback queue call time").": $ct_hrs\n"; } else {echo ""._QXZ("Call time not found")."!: $icbq_call_time_id\n";} echo "
"._QXZ("Callback Queue Dial Filter").": $NWB#inbound_groups-icbq_dial_filter$NWE
"._QXZ("CID Callback Number Validation").": $NWB#inbound_groups-cid_cb_confirm_number$NWE
"._QXZ("CID Callback Number Invalid Filter Phone Group").": $NWB#inbound_groups-cid_cb_invalid_filter_phone_group$NWE
"._QXZ("CID Callback Number Length").": $NWB#inbound_groups-cid_cb_valid_length$NWE
"._QXZ("CID Callback Number Valid Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_valid_filename$NWE
"._QXZ("CID Callback Number Confirmed Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_confirmed_filename$NWE
"._QXZ("CID Callback Number Enter Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_enter_filename$NWE
"._QXZ("CID Callback Number You Entered Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_you_entered_filename$NWE
"._QXZ("CID Callback Number Confirm Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_press_to_confirm_filename$NWE
"._QXZ("CID Callback Number Invalid Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_invalid_filename$NWE
"._QXZ("CID Callback Number Reenter Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_reenter_filename$NWE
"._QXZ("CID Callback Number Error Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-cid_cb_error_filename$NWE
"._QXZ("Closing Time Action").": $NWB#inbound_groups-closing_time_action$NWE
"._QXZ("Closing Time Now Trigger").": $NWB#inbound_groups-closing_time_now_trigger$NWE
"._QXZ("Closing Time Press Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-closing_time_filename$NWE
"._QXZ("Closing Time End Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-closing_time_end_filename$NWE
"._QXZ("Closing Time Option Lead Reset").": $NWB#inbound_groups-closing_time_lead_reset$NWE
"._QXZ("Closing Time Option Extension").": $NWB#inbound_groups-closing_time_option_exten$NWE
"._QXZ("Closing Time Option Callmenu").": $NWB#inbound_groups-closing_time_option_callmenu$NWE
"._QXZ("Closing Time Option Voicemail").": "._QXZ("voicemail chooser")." $NWB#inbound_groups-closing_time_option_voicemail$NWE
"._QXZ("Closing Time Option Transfer In-Group").": $NWB#inbound_groups-closing_time_option_xfer_group$NWE
"._QXZ("Closing Time Option Callback List ID").": $NWB#inbound_groups-closing_time_option_callback_list_id$NWE
"._QXZ("Agent Screen Search List Restrict").": $NWB#inbound_groups-agent_search_list$NWE
"._QXZ("Agent Alert Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-agent_alert_exten$NWE
"._QXZ("Agent Alert Delay").": $NWB#inbound_groups-agent_alert_delay$NWE
"._QXZ("Second Agent Alert Trigger").": $NWB#inbound_groups-second_alert_trigger$NWE
"._QXZ("Second Agent Alert Trigger Seconds").": $NWB#inbound_groups-second_alert_trigger_seconds$NWE
"._QXZ("Second Agent Alert Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-second_alert_filename$NWE
"._QXZ("Second Agent Alert Delay").": $NWB#inbound_groups-second_alert_delay$NWE
"; if ($inand_selected > 0) {echo ""._QXZ("Second Agent Alert Container")."";} else {echo _QXZ("Second Agent Alert Container");} echo ": $NWB#ingroups-second_alert_container$NWE
"._QXZ("Second Agent Alert Only").": $NWB#inbound_groups-second_alert_only$NWE
"._QXZ("Third Agent Alert Trigger").": $NWB#inbound_groups-third_alert_trigger$NWE
"._QXZ("Third Agent Alert Trigger Seconds").": $NWB#inbound_groups-third_alert_trigger_seconds$NWE
"._QXZ("Third Agent Alert Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-third_alert_filename$NWE
"._QXZ("Third Agent Alert Delay").": $NWB#inbound_groups-third_alert_delay$NWE
"; if ($inand_selected > 0) {echo ""._QXZ("Third Agent Alert Container")."";} else {echo _QXZ("Third Agent Alert Container");} echo ": $NWB#ingroups-third_alert_container$NWE
"._QXZ("Third Agent Alert Only").": $NWB#inbound_groups-third_alert_only$NWE
"._QXZ("Default Transfer Group").": $NWB#inbound_groups-default_xfer_group$NWE
"._QXZ("Default Group Alias").": $NWB#inbound_groups-default_group_alias$NWE
"._QXZ("Transfer Talk Minimum").": $NWB#inbound_groups-xfer_talk_minimum$NWE
"._QXZ("Transfer Talk Minimum Seconds").": $NWB#inbound_groups-xfer_talk_minimum_sec$NWE
$DID_edit_link_BEGIN"._QXZ("Dial In-Group CID")."$DID_edit_link_END: $NWB#inbound_groups-dial_ingroup_cid$NWE
"._QXZ("Hold Recall Transfer In-Group").": $NWB#inbound_groups-hold_recall_xfer_group$NWE
"._QXZ("No Delay Call Route").": $NWB#inbound_groups-no_delay_call_route$NWE
"._QXZ("In-Group Recording Override").": $NWB#inbound_groups-ingroup_recording_override$NWE
"._QXZ("In-Group Recording Filename").": $NWB#inbound_groups-ingroup_rec_filename$NWE
"._QXZ("Routing Initiated Recording").": $NWB#inbound_groups-routing_initiated_recordings$NWE
"._QXZ("Stereo Call Recordings").": $NWB#inbound_groups-stereo_recording$NWE
"._QXZ("Stereo Recording Agent Control").": $NWB#inbound_groups-stereo_recording_agent$NWE
"._QXZ("Stereo Rec Filename").": $NWB#inbound_groups-stereo_rec_filename$NWE
"._QXZ("Parallel Stereo Recordings").": $NWB#inbound_groups-stereo_parallel_recording$NWE
"._QXZ("Parallel Customer-Only Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Parallel Customer-Muted Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Parallel Full-Recording Rec Filename").": $NWB#inbound_groups-parallel_rec_xx_filename$NWE
"._QXZ("Recording DTMF Muting").": $NWB#inbound_groups-recording_dtmf_muting$NWE $SYSTEM_DTMF_MUTING_OVERRIDE
"._QXZ("Stats Percent of Calls Answered Within X seconds")." 1: $NWB#inbound_groups-answer_sec_pct_rt_stat_one$NWE
"._QXZ("Stats Percent of Calls Answered Within X seconds")." 2: $NWB#inbound_groups-answer_sec_pct_rt_stat_one$NWE
"._QXZ("Enter In-Group URL").": $NWB#inbound_groups-enter_ingroup_url$NWE
"._QXZ("Start Call URL").": $NWB#inbound_groups-start_call_url$NWE "._QXZ("Alternate Start URLs Defined").": $vum_count
"._QXZ("Start Call URL").": $NWB#inbound_groups-start_call_url$NWE
"._QXZ("Dispo Call URL").": $NWB#inbound_groups-dispo_call_url$NWE "._QXZ("Alternate Dispo URLs Defined").": $vum_count
"._QXZ("Dispo Call URL").": $NWB#inbound_groups-dispo_call_url$NWE
"._QXZ("No Agent Call URL").": $NWB#inbound_groups-na_call_url$NWE "._QXZ("Alternate No Agent URLs Defined").": $vum_count
"._QXZ("No Agent Call URL").": $NWB#inbound_groups-na_call_url$NWE
"._QXZ("Talk Seconds URLs").": $NWB#inbound_groups-talk_sec_url$NWE "._QXZ("Talk Seconds URLs Defined").": $vum_count   $force_disableHTML
"._QXZ("Waiting Call URL On").": $NWB#inbound_groups-waiting_call_url_on$NWE
"._QXZ("Waiting Call URL Off").": $NWB#inbound_groups-waiting_call_url_on$NWE
"._QXZ("Add Lead URL").": $NWB#inbound_groups-add_lead_url$NWE
"._QXZ("Add Lead Timezone").": $NWB#inbound_groups-add_lead_timezone$NWE
"._QXZ("Extension Append CID").": $NWB#inbound_groups-extension_appended_cidname$NWE
"._QXZ("Uniqueid Status Display").": $NWB#inbound_groups-uniqueid_status_display$NWE
"._QXZ("Uniqueid Status Prefix").": $NWB#inbound_groups-uniqueid_status_prefix$NWE
"; if ($sdb_selected > 0) {echo ""._QXZ("State Descriptions Banner")."";} else {echo _QXZ("State Descriptions Banner");} echo ": $NWB#inbound_groups-state_descriptions$NWE
"._QXZ("Populate Lead In-Group").": $NWB#inbound_groups-populate_lead_ingroup$NWE
"._QXZ("Populate Lead Province").": $NWB#inbound_groups-populate_lead_province$NWE
"._QXZ("Populate Lead Owner").": $NWB#inbound_groups-populate_lead_owner$NWE
"._QXZ("Populate Lead State Areacode").": $NWB#inbound_groups-populate_state_areacode$NWE
"._QXZ("Populate Lead Source").": $NWB#inbound_groups-populate_lead_source$NWE
"._QXZ("Populate Lead Vendor").": $NWB#inbound_groups-populate_lead_vendor$NWE
"._QXZ("Populate Lead Comments").": $NWB#inbound_groups-populate_lead_comments$NWE
"._QXZ("After Call Survey").": $NWB#inbound_groups-inbound_survey$NWE
"._QXZ("After Call Survey Accept Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-inbound_survey_filename$NWE
"._QXZ("After Call Survey Accept Digit").": $NWB#inbound_groups-inbound_survey_accept_digit$NWE
"._QXZ("After Call Question Filename").": "._QXZ("audio chooser")." $NWB#inbound_groups-inbound_survey_question_filename$NWE
"._QXZ("After Call End Call Menu").":$NWB#inbound_groups-inbound_survey_callmenu$NWE
"._QXZ("Custom 1").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 2").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 3").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 4").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 5").": $NWB#inbound_groups-custom_fields$NWE
 
"._QXZ("Inbound Group QC Settings").":
"._QXZ("QC Enabled").": $NWB#inbound_groups-qc_enabled$NWE
"._QXZ("QC Statuses").":
$NWB#inbound_groups-qc_statuses$NWE
$qc_statuses_list
"._QXZ("QC Statuses").": $NWB#inbound_groups-qc_statuses_id$NWE
"._QXZ("QC Scorecard").": $NWB#inbound_groups-qc_scorecard$NWE
"._QXZ("QC WebForm").": $NWB#inbound_groups-qc_web_form_address$NWE
"._QXZ("QC Script").": $NWB#inbound_groups-qc_script$NWE
"._QXZ("QC Shift").": $NWB#inbound_groups-qc_shift_id$NWE
"._QXZ("QC Get Record Launch").": $NWB#inbound_groups-qc_get_record_launch$NWE
"._QXZ("QC Show Recording").": $NWB#inbound_groups-qc_show_recording$NWE
 
\n"; echo "


\n"; if ($SSbrowser_call_alerts > 0) { $bas=0; $bas_embed_output=''; while ($browser_alert_sounds_listARY_ct > $bas) { $bas_embed_output .= "\n"; $bas++; } echo "$bas_embed_output"; echo "\n"; } ### list of agent rank or skill-level for this inbound group echo "
\n"; echo "
"._QXZ("AGENT RANKS FOR THIS INBOUND GROUP").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT user,full_name,closer_campaigns,user_group from vicidial_users where active='Y' $LOGadmin_viewable_groupsSQL order by user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_name[$o] = $rowx[1]; $ARIG_close[$o] = $rowx[2]; $ARIG_group[$o] = $rowx[3]; $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } $o=0; $ARIG_changenotes=''; $stmtDlog=''; while ($users_to_print > $o) { $o++; $stmt="SELECT group_rank,calls_today,group_grade,daily_limit from vicidial_inbound_group_agents where group_id='$group_id' and user='$ARIG_user[$o]';"; $rsltx=mysql_to_mysqli($stmt, $link); $viga_to_print = mysqli_num_rows($rsltx); if ($viga_to_print > 0) { $rowx=mysqli_fetch_row($rsltx); $ARIG_rank[$o] = $rowx[0]; $ARIG_calls[$o] = $rowx[1]; $ARIG_grade[$o] = $rowx[2]; $ARIG_limit[$o] = $rowx[3]; } else { $stmtD="INSERT INTO vicidial_inbound_group_agents set calls_today='0',group_rank='0',group_weight='0',user='$ARIG_user[$o]',group_id='$group_id',group_grade='1',daily_limit='-1';"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rows_grp = mysqli_affected_rows($link); if ($DB > 0) {echo "$affected_rows_grp|$stmtD|";} $stmtDlog .= "$stmtD|"; $ARIG_changenotes .= "added missing user to viga table $ARIG_user[$o]|"; $ARIG_rank[$o] = '0'; $ARIG_calls[$o] = '0'; $ARIG_grade[$o] = '1'; $ARIG_limit[$o] = '-1'; } } if (strlen($ARIG_changenotes) > 10) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtDlog|"; $SQL_log = preg_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='USER INGROUP VIGA ADD', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { $o=0; while ($users_to_print > $o) { $o++; $ARIG_checked=''; $ARIG_ranked=''; $ARIG_graded=''; $ARIG_limited=''; $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; if (isset($_GET["$checkbox_field"])) {$ARIG_checked=$_GET["$checkbox_field"];} elseif (isset($_POST["$checkbox_field"])) {$ARIG_checked=$_POST["$checkbox_field"];} if (isset($_GET["$rank_field"])) {$ARIG_ranked=$_GET["$rank_field"];} elseif (isset($_POST["$rank_field"])) {$ARIG_ranked=$_POST["$rank_field"];} if (isset($_GET["$grade_field"])) {$ARIG_graded=$_GET["$grade_field"];} elseif (isset($_POST["$grade_field"])) {$ARIG_graded=$_POST["$grade_field"];} if (isset($_GET["$limit_field"])) {$ARIG_limited=$_GET["$limit_field"];} elseif (isset($_POST["$limit_field"])) {$ARIG_limited=$_POST["$limit_field"];} $ARIG_checked = preg_replace('/[^A-Z]/','',$ARIG_checked); $ARIG_ranked = preg_replace('/[^-0-9]/','',$ARIG_ranked); $ARIG_graded = preg_replace('/[^-0-9]/','',$ARIG_graded); $ARIG_limited = preg_replace('/[^-0-9]/','',$ARIG_limited); $stmtA=''; $stmtB=''; $stmtC=''; $stmtD=''; $stmtE=''; $ARIG_updated=0; $ARIG_changenotes=''; if ( ($ARIG_check[$o]=='') and ($ARIG_checked=='YES') ) { if (strlen($ARIG_close[$o]) < 4) {$ARIG_close[$o]=' - ';} $stmtA="UPDATE vicidial_users set closer_campaigns=' $group_id$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtA, $link); if ($DB > 0) {echo "|$stmtA|";} $ARIG_updated++; $ARIG_changenotes .= "added $group_id to selected in-groups|"; } if ( ($ARIG_check[$o]==' CHECKED') and ($ARIG_checked=='') ) { $ARIG_close[$o] = preg_replace("/ $group_id /",' ',$ARIG_close[$o]); $stmtB="UPDATE vicidial_users set closer_campaigns='$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB > 0) {echo "|$stmtB|";} $ARIG_updated++; $ARIG_changenotes .= "removed $group_id from selected in-groups|"; } if ( ($ARIG_ranked < $ARIG_rank[$o]) or ($ARIG_ranked > $ARIG_rank[$o]) ) { $stmtC="UPDATE vicidial_inbound_group_agents set group_rank='$ARIG_ranked',group_weight='$ARIG_ranked' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtC, $link); if ($DB > 0) {echo "|$stmtC|";} $ARIG_updated++; $ARIG_changenotes .= "changed rank from $ARIG_rank[$o] to $ARIG_ranked|"; } if ( ($ARIG_graded < $ARIG_grade[$o]) or ($ARIG_graded > $ARIG_grade[$o]) ) { $stmtD="UPDATE vicidial_inbound_group_agents set group_grade='$ARIG_graded' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtD, $link); if ($DB > 0) {echo "|$stmtD|";} $ARIG_updated++; $ARIG_changenotes .= "changed grade from $ARIG_grade[$o] to $ARIG_graded|"; } if ( ($ARIG_limited < $ARIG_limit[$o]) or ($ARIG_limited > $ARIG_limit[$o]) ) { $stmtE="UPDATE vicidial_inbound_group_agents set daily_limit='$ARIG_limited' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); if ($DB > 0) {echo "|$stmtE|";} $ARIG_updated++; $ARIG_changenotes .= "changed limit from $ARIG_limit[$o] to $ARIG_limited|"; } if ($ARIG_updated > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$ARIG_user[$o]', event_code='USER INGROUP SETTINGS', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name,closer_campaigns,viga.group_grade,viga.daily_limit from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user $LOGadmin_viewable_groupsSQL order by vu.user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_rank[$o] = $rowx[1]; $ARIG_calls[$o] = $rowx[2]; $ARIG_name[$o] = $rowx[3]; $ARIG_close[$o] = $rowx[4]; $ARIG_grade[$o] = $rowx[5]; $ARIG_limit[$o] = $rowx[6]; $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } } $checkbox_count=0; $checkbox_list=""; $users_output=""; $o=0; while ($users_to_print > $o) { $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; $checkbox_list .= "|$checkbox_field"; $checkbox_count++; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; } echo "\n"; echo "$users_output"; echo "\n"; echo "
"._QXZ("USER").""._QXZ("GROUP").""._QXZ("SELECTED")."   "._QXZ("RANK")."     "._QXZ("GRADE")."   "._QXZ("DAILY LIMIT")." "._QXZ("CALLS TODAY")."
$ARIG_user[$o] - $ARIG_name[$o]$ARIG_group[$o]$ARIG_calls[$o]
    "._QXZ("select all")."  

\n"; echo "
"._QXZ("Click here to see a report for this inbound group")."

\n"; echo ""._QXZ("Click here to see agents logged in to this inbound group")."

\n"; echo "
\n"; echo ""._QXZ("DIDS USING THIS IN-GROUP").":
\n"; echo "\n"; $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where group_id='$group_id' and did_route='IN_GROUP' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); $o=0; while ($dids_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[1] $row[2]

\n"; echo ""._QXZ("CALL MENUS USING THIS IN-GROUP").":
\n"; echo "\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' $vmLOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $cms_to_print = mysqli_num_rows($rslt); $o=0; while ($cms_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CAMPAIGNS USING THIS IN-GROUP").":
\n"; echo "\n"; $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where ( (agent_hangup_route='IN_GROUP' and agent_hangup_value='$group_id') or (drop_inbound_group='$group_id') ) $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "|$SQL_group_id|$group_id|$stmt|\n";} $o=0; while ($campin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; echo ""._QXZ("CAMPAIGNS ALLOWING THIS IN-GROUP").":
\n"; echo "\n"; $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "|$SQL_group_id|$group_id|$stmt|\n";} $o=0; while ($campin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; if ($LOGdelete_ingroups > 0) { # echo "

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; echo "

"._QXZ("DELETE THIS IN-GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this In-Group")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3811 modify email in-group info in the system ###################### if ($ADD==3811) { if ( ($LOGmodify_ingroups==1) and ($SSallow_emails>0) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3811&group_id=$group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,status_group_id,routing_initiated_recordings,ingroup_script_two,browser_alert_sound,browser_alert_volume,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_inbound_groups where group_id='$group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $query_group_id = $row[0]; $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]; $drop_call_seconds = $row[14]; $drop_action_ingroups = $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]; $ignore_list_script_override = $row[68]; $extension_appended_cidname = $row[69]; $uniqueid_status_display = $row[70]; $uniqueid_status_prefix = $row[71]; $hold_time_option_minimum = $row[72]; $hold_time_option_press_filename = $row[73]; $hold_time_option_callmenu = $row[74]; $onhold_prompt_no_block = $row[75]; $onhold_prompt_seconds = $row[76]; $hold_time_option_no_block = $row[77]; $hold_time_option_prompt_seconds = $row[78]; $hold_time_second_option = $row[79]; $hold_time_third_option = $row[80]; $wait_hold_option_priority = $row[81]; $wait_time_option = $row[82]; $wait_time_second_option = $row[83]; $wait_time_third_option = $row[84]; $wait_time_option_seconds = $row[85]; $wait_time_option_exten = $row[86]; $wait_time_option_voicemail = $row[87]; $wait_time_option_xfer_group = $row[88]; $wait_time_option_callmenu = $row[89]; $wait_time_option_callback_filename = $row[90]; $wait_time_option_callback_list_id = $row[91]; $wait_time_option_press_filename = $row[92]; $wait_time_option_no_block = $row[93]; $wait_time_option_prompt_seconds = $row[94]; $timer_action_destination = $row[95]; $calculate_estimated_hold_seconds = $row[96]; $add_lead_url = $row[97]; $eht_minimum_prompt_filename = $row[98]; $eht_minimum_prompt_no_block = $row[99]; $eht_minimum_prompt_seconds = $row[100]; $na_call_url = $row[102]; $group_calldate = $row[104]; $action_xfer_cid = $row[105]; $drop_callmenu = $row[106]; $after_hours_callmenu = $row[107]; $user_group = $row[108]; $max_calls_method = $row[109]; $max_calls_count = $row[110]; $max_calls_action = $row[111]; $dial_ingroup_cid = $row[112]; $group_handling = $row[113]; $web_form_address_three = $row[114]; $status_group_id = $row[115]; $routing_initiated_recordings = $row[116]; $ingroup_script_two = $row[117]; $browser_alert_sound_ingroups = $row[118]; $browser_alert_volume = $row[119]; $custom_one = $row[120]; $custom_two = $row[121]; $custom_three = $row[122]; $custom_four = $row[123]; $custom_five = $row[124]; ##### get callmenu listings for dynamic pulldown $stmt="SELECT menu_id,menu_name from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xmenus_to_print = mysqli_num_rows($rslt); $o=0; $Xmenuslist=''; $Xmenus_selected=0; $Wmenuslist=''; $Wmenus_selected=0; while ($Xmenus_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xmenuslist .= "\n"; $Wmenuslist .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Xmenus_selected < 1) {$Xmenuslist .= "\n";} if ($Wmenus_selected < 1) {$Wmenuslist .= "\n";} ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $Dgroups_menu=''; $Dgroups_selected=0; $Agroups_menu=''; $Agroups_selected=0; $Hgroups_menu=''; $Hgroups_selected=0; $Wgroups_menu=''; $Wgroups_selected=0; $Tgroups_menu=''; $Tgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; if ($group_id!=$rowx[0]) { $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Wgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; } $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} if ($Agroups_selected < 1) {$Agroups_menu .= "\n";} else {$Agroups_menu .= "\n";} if ($Tgroups_selected < 1) {$Tgroups_menu .= "\n";} else {$Tgroups_menu .= "\n";} if ($Wgroups_selected < 1) {$Wgroups_menu .= "\n";} else {$Wgroups_menu .= "\n";} if ($Hgroups_selected < 1) {$Hgroups_menu .= "\n";} else {$Hgroups_menu .= "\n";} $allowed_campaigns_count=0; $allowed_campaigns_warning=''; $SQL_group_id = preg_replace("/_/",'\\_',$query_group_id); $stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $vc_allowed_ct=0; if ($campin_to_print > $vc_allowed_ct) { $rowc=mysqli_fetch_row($rslt); $allowed_campaigns_count = $rowc[0]; $vc_allowed_ct++; } if ($allowed_campaigns_count < 1) {$allowed_campaigns_warning='
  '._QXZ("Not set as allowed in any campaigns!").'
';} echo "
"._QXZ("MODIFY AN EMAIL GROUPS RECORD").": $query_group_id
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_webform > 0) { echo "\n"; } if ($SSenable_third_webform > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; $eswHTML=''; $cfwHTML=''; $aemHTML=''; $achHTML=''; if ($SSenable_second_script > 0) {$eswHTML .= "";} if ($SSenable_second_webform > 0) {$eswHTML .= "";} if ($SSenable_third_webform > 0) {$eswHTML .= "";} if ($SSallow_emails > 0) {$aemHTML .= "";} echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_script > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; ##### get status group listings for dynamic pulldown menu $stmt="SELECT status_group_id,status_group_notes from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); $status_groups_menu=''; $status_groups_selected=0; $o=0; while ($status_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $status_groups_menu .= "\n"; $o++; } $sglinkB=''; $sglinkE=''; if (strlen($status_group_id)>1) { $sglinkB=""; $sglinkE=''; } echo "\n"; echo "\n"; echo "\n"; /* Commenting this out because it is handled by the Email Account section and is redundant here echo "\n"; echo "\n"; echo "\n"; echo "\n"; */ if ($start_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='start';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($dispo_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='dispo';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } # get count of talk seconds urls in this In-Group $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } # check if this In-Group has talk seconds url set to -FORCEDISABLE- $force_disableHTML=''; $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk' and active='N' and url_address LIKE \"%FORCEDISABLE%\";"; $rslt=mysql_to_mysqli($stmt, $link); $fdtsu_to_print = mysqli_num_rows($rslt); if ($fdtsu_to_print > 0) { $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {$force_disableHTML="FORCED DISABLE";} } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; /* echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; */ echo "\n"; echo "\n"; if ($SSqc_features_active > 0) { echo "\n"; echo "\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,scheduled_callback from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $qc_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); if (!preg_match("/\"$rowx[0]\"/",$qc_statuses_list)) { $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); $QCscripts_list .= "\n"; $scriptname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get shifts listings for pulldown $stmt="SELECT shift_id,shift_name from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); $QCshifts_list=""; $o=0; while ($shifts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCshifts_list .= "\n"; $shiftname_list["$rowx[0]"] = "$rowx[1]"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("Group ID").": $query_group_id$NWB#inbound_groups-group_id$NWE $allowed_campaigns_warning
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("In-Group Email Date").": $group_calldate$NWB#inbound_groups-group_emaildate$NWE
\n"; $temp_chart_title = _QXZ("8 Day inbound call count for this in-group"); horizontal_bar_chart($group_id,'8','in-group',$link,'total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Web Form Two").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Web Form Three").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Next Agent Email").": $NWB#inbound_groups-next_agent_email$NWE
"._QXZ("Queue Priority").": $NWB#inbound_groups-queue_priority$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Get Call Launch").": $NWB#inbound_groups-get_call_launch$NWE
"._QXZ("Group Handling").": $NWB#inbound_groups-group_handling$NWE
"._QXZ("Script").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Script Two").": $NWB#inbound_groups-ingroup_script$NWE
"._QXZ("Ignore List Script Override").": $NWB#inbound_groups-ignore_list_script_override$NWE
$sglinkB"._QXZ("Status Group Override")."$sglinkE: $NWB#inbound_groups-status_group_id$NWE
"._QXZ("In-Group Recording Override").": $NWB#inbound_groups-ingroup_recording_override$NWE
"._QXZ("In-Group Recording Filename").": $NWB#inbound_groups-ingroup_rec_filename$NWE
In-Group Call Handle Method: $NWB#inbound_dids-call_handle_method$NWE
In-Group Agent Search Method: $NWB#inbound_dids-agent_search_method$NWE
In-Group List ID: $NWB#inbound_dids-list_id$NWE
In-Group Campaign ID: $NWB#inbound_dids-campaign_id$NWE
"._QXZ("Start Email URL").": $NWB#inbound_groups-start_call_url$NWE "._QXZ("Alternate Start URLs Defined").": $vum_count
"._QXZ("Start Email URL").": $NWB#inbound_groups-start_email_url$NWE
"._QXZ("Dispo Email URL").": $NWB#inbound_groups-dispo_call_url$NWE "._QXZ("Alternate Dispo URLs Defined").": $vum_count
"._QXZ("Dispo Email URL").": $NWB#inbound_groups-dispo_email_url$NWE
"._QXZ("Talk Seconds URLs").": $NWB#inbound_groups-talk_sec_url$NWE "._QXZ("Talk Seconds URLs Defined").": $vum_count   $force_disableHTML
"._QXZ("Custom 1").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 2").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 3").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 4").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 5").": $NWB#inbound_groups-custom_fields$NWE
Add Lead URL: $NWB#inbound_groups-add_lead_url$NWE
"._QXZ("No Agent Email URL").": $NWB#inbound_groups-na_email_url$NWE
"._QXZ("Extension Append CID").": $NWB#inbound_groups-extension_appended_cidname$NWE
"._QXZ("Uniqueid Status Display").": $NWB#inbound_groups-uniqueid_status_display$NWE
"._QXZ("Uniqueid Status Prefix").": $NWB#inbound_groups-uniqueid_status_prefix$NWE
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
 
"._QXZ("Inbound Group QC Settings").":
"._QXZ("QC Enabled").": $NWB#inbound_groups-qc_enabled$NWE
"._QXZ("QC Statuses").":
$NWB#inbound_groups-qc_statuses$NWE
$qc_statuses_list
"._QXZ("QC WebForm").": $NWB#inbound_groups-qc_web_form_address$NWE
"._QXZ("QC Script").": $NWB#inbound_groups-qc_script$NWE
"._QXZ("QC Shift").": $NWB#inbound_groups-qc_shift_id$NWE
"._QXZ("QC Get Record Launch").": $NWB#inbound_groups-qc_get_record_launch$NWE
"._QXZ("QC Show Recording").": $NWB#inbound_groups-qc_show_recording$NWE
\n"; echo "


\n"; ### list of agent rank or skill-level for this inbound group echo "
\n"; echo "
"._QXZ("AGENT RANKS FOR THIS INBOUND GROUP").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT user,full_name,closer_campaigns,user_group from vicidial_users where active='Y' $LOGadmin_viewable_groupsSQL order by user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_name[$o] = $rowx[1]; $ARIG_close[$o] = $rowx[2]; $ARIG_group[$o] = (preg_match('/\-\-ALL\-\-/', $rowx[3]) ? _QXZ("$rowx[3]") : $rowx[3]); $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } $o=0; $ARIG_changenotes=''; $stmtDlog=''; while ($users_to_print > $o) { $o++; $stmt="SELECT group_rank,calls_today,group_grade,daily_limit from vicidial_inbound_group_agents where group_id='$group_id' and user='$ARIG_user[$o]';"; $rsltx=mysql_to_mysqli($stmt, $link); $viga_to_print = mysqli_num_rows($rsltx); if ($viga_to_print > 0) { $rowx=mysqli_fetch_row($rsltx); $ARIG_rank[$o] = $rowx[0]; $ARIG_calls[$o] = $rowx[1]; $ARIG_grade[$o] = $rowx[2]; $ARIG_limit[$o] = $rowx[3]; } else { $stmtD="INSERT INTO vicidial_inbound_group_agents set calls_today='0',group_rank='0',group_weight='0',user='$ARIG_user[$o]',group_id='$group_id',group_grade='1',group_type='E';"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rows_grp = mysqli_affected_rows($link); if ($DB > 0) {echo "$affected_rows_grp|$stmtD|";} $stmtDlog .= "$stmtD|"; $ARIG_changenotes .= "added missing user to viga table $ARIG_user[$o]|"; $ARIG_rank[$o] = '0'; $ARIG_calls[$o] = '0'; $ARIG_grade[$o] = '1'; $ARIG_limit[$o] = '-1'; } } if (strlen($ARIG_changenotes) > 10) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtDlog|"; $SQL_log = preg_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='USER INGROUP VIGA ADD', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { $o=0; while ($users_to_print > $o) { $o++; $ARIG_checked=''; $ARIG_ranked=''; $ARIG_graded=''; $ARIG_limited=''; $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; if (isset($_GET["$checkbox_field"])) {$ARIG_checked=$_GET["$checkbox_field"];} elseif (isset($_POST["$checkbox_field"])) {$ARIG_checked=$_POST["$checkbox_field"];} if (isset($_GET["$rank_field"])) {$ARIG_ranked=$_GET["$rank_field"];} elseif (isset($_POST["$rank_field"])) {$ARIG_ranked=$_POST["$rank_field"];} if (isset($_GET["$grade_field"])) {$ARIG_graded=$_GET["$grade_field"];} elseif (isset($_POST["$grade_field"])) {$ARIG_graded=$_POST["$grade_field"];} if (isset($_GET["$limit_field"])) {$ARIG_limited=$_GET["$limit_field"];} elseif (isset($_POST["$limit_field"])) {$ARIG_limited=$_POST["$limit_field"];} $ARIG_checked = preg_replace('/[^A-Z]/','',$ARIG_checked); $ARIG_ranked = preg_replace('/[^-0-9]/','',$ARIG_ranked); $ARIG_graded = preg_replace('/[^-0-9]/','',$ARIG_graded); $ARIG_limited = preg_replace('/[^-0-9]/','',$ARIG_limited); $stmtA=''; $stmtB=''; $stmtC=''; $stmtD=''; $stmtE=''; $ARIG_updated=0; $ARIG_changenotes=''; if ( ($ARIG_check[$o]=='') and ($ARIG_checked=='YES') ) { if (strlen($ARIG_close[$o]) < 4) {$ARIG_close[$o]=' - ';} $stmtA="UPDATE vicidial_users set closer_campaigns=' $group_id$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtA, $link); if ($DB > 0) {echo "|$stmtA|";} $ARIG_updated++; $ARIG_changenotes .= "added $group_id to selected in-groups|"; } if ( ($ARIG_check[$o]==' CHECKED') and ($ARIG_checked=='') ) { $ARIG_close[$o] = preg_replace("/ $group_id /",' ',$ARIG_close[$o]); $stmtB="UPDATE vicidial_users set closer_campaigns='$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB > 0) {echo "|$stmtB|";} $ARIG_updated++; $ARIG_changenotes .= "removed $group_id from selected in-groups|"; } if ( ($ARIG_ranked < $ARIG_rank[$o]) or ($ARIG_ranked > $ARIG_rank[$o]) ) { $stmtC="UPDATE vicidial_inbound_group_agents set group_rank='$ARIG_ranked',group_weight='$ARIG_ranked' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtC, $link); if ($DB > 0) {echo "|$stmtC|";} $ARIG_updated++; $ARIG_changenotes .= "changed rank from $ARIG_rank[$o] to $ARIG_ranked|"; } if ( ($ARIG_graded < $ARIG_grade[$o]) or ($ARIG_graded > $ARIG_grade[$o]) ) { $stmtD="UPDATE vicidial_inbound_group_agents set group_grade='$ARIG_graded' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtD, $link); if ($DB > 0) {echo "|$stmtD|";} $ARIG_updated++; $ARIG_changenotes .= "changed grade from $ARIG_grade[$o] to $ARIG_graded|"; } if ( ($ARIG_limited < $ARIG_limit[$o]) or ($ARIG_limited > $ARIG_limit[$o]) ) { $stmtE="UPDATE vicidial_inbound_group_agents set daily_limit='$ARIG_limited' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); if ($DB > 0) {echo "|$stmtE|";} $ARIG_updated++; $ARIG_changenotes .= "changed limit from $ARIG_limit[$o] to $ARIG_limited|"; } if ($ARIG_updated > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$ARIG_user[$o]', event_code='USER INGROUP SETTINGS', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name,closer_campaigns,viga.group_grade,viga.daily_limit from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user $LOGadmin_viewable_groupsSQL order by vu.user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_rank[$o] = $rowx[1]; $ARIG_calls[$o] = $rowx[2]; $ARIG_name[$o] = $rowx[3]; $ARIG_close[$o] = $rowx[4]; $ARIG_grade[$o] = $rowx[5]; $ARIG_limit[$o] = $rowx[6]; $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } } $checkbox_count=0; $checkbox_list=""; $users_output=""; $o=0; while ($users_to_print > $o) { $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; $checkbox_list .= "|$checkbox_field"; $checkbox_count++; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; } echo "\n"; echo "$users_output"; echo "\n"; echo "
"._QXZ("USER").""._QXZ("GROUP").""._QXZ("SELECTED")."   "._QXZ("RANK")."     "._QXZ("GRADE")."   "._QXZ("DAILY LIMIT")." "._QXZ("CALLS TODAY")."
$ARIG_user[$o] - $ARIG_name[$o]$ARIG_group[$o]$ARIG_calls[$o]
    "._QXZ("select all")."  

\n"; echo "
"._QXZ("Click here to see a report for this inbound group")."

\n"; echo ""._QXZ("Click here to see agents logged in to this inbound group")."

\n"; echo "
\n"; echo ""._QXZ("EMAIL ACCOUNTS USING THIS IN-GROUP").":
\n"; echo "\n"; $stmt="SELECT email_account_id, email_account_name from vicidial_email_accounts where group_id='$group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $emails_to_print = mysqli_num_rows($rslt); $o=0; while ($emails_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CAMPAIGNS ALLOWING THIS IN-GROUP").":
\n"; echo "\n"; $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $o=0; while ($campin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; if ($LOGdelete_ingroups > 0) { # echo "

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; echo "

"._QXZ("DELETE THIS IN-GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this In-Group")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3911 modify chat in-group info in the system ###################### if ($ADD==3911) { if ( ($LOGmodify_ingroups==1) and ($SSallow_chats>0) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=4911&group_id=$group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,status_group_id,customer_chat_screen_colors,customer_chat_survey_link,customer_chat_survey_text,browser_alert_sound,browser_alert_volume,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_inbound_groups where group_id='$group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $query_group_id = $row[0]; $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]; $drop_call_seconds = $row[14]; $drop_action_ingroups = $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]; $ignore_list_script_override = $row[68]; $extension_appended_cidname = $row[69]; $uniqueid_status_display = $row[70]; $uniqueid_status_prefix = $row[71]; $hold_time_option_minimum = $row[72]; $hold_time_option_press_filename = $row[73]; $hold_time_option_callmenu = $row[74]; $onhold_prompt_no_block = $row[75]; $onhold_prompt_seconds = $row[76]; $hold_time_option_no_block = $row[77]; $hold_time_option_prompt_seconds = $row[78]; $hold_time_second_option = $row[79]; $hold_time_third_option = $row[80]; $wait_hold_option_priority = $row[81]; $wait_time_option = $row[82]; $wait_time_second_option = $row[83]; $wait_time_third_option = $row[84]; $wait_time_option_seconds = $row[85]; $wait_time_option_exten = $row[86]; $wait_time_option_voicemail = $row[87]; $wait_time_option_xfer_group = $row[88]; $wait_time_option_callmenu = $row[89]; $wait_time_option_callback_filename = $row[90]; $wait_time_option_callback_list_id = $row[91]; $wait_time_option_press_filename = $row[92]; $wait_time_option_no_block = $row[93]; $wait_time_option_prompt_seconds = $row[94]; $timer_action_destination = $row[95]; $calculate_estimated_hold_seconds = $row[96]; $add_lead_url = $row[97]; $eht_minimum_prompt_filename = $row[98]; $eht_minimum_prompt_no_block = $row[99]; $eht_minimum_prompt_seconds = $row[100]; $na_call_url = $row[102]; $group_calldate = $row[104]; $action_xfer_cid = $row[105]; $drop_callmenu = $row[106]; $after_hours_callmenu = $row[107]; $user_group = $row[108]; $max_calls_method = $row[109]; $max_calls_count = $row[110]; $max_calls_action = $row[111]; $dial_ingroup_cid = $row[112]; $group_handling = $row[113]; $web_form_address_three = $row[114]; $status_group_id = $row[115]; $customer_chat_screen_colors = $row[116]; $customer_chat_survey_link = $row[117]; $customer_chat_survey_text = $row[118]; $browser_alert_sound_ingroups = $row[119]; $browser_alert_volume = $row[120]; $custom_one = $row[121]; $custom_two = $row[122]; $custom_three = $row[123]; $custom_four = $row[124]; $custom_five = $row[125]; /* ##### get callmenu listings for dynamic pulldown $stmt="SELECT menu_id,menu_name from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xmenus_to_print = mysqli_num_rows($rslt); $o=0; $Xmenuslist=''; $Wmenuslist=''; while ($Xmenus_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xmenuslist .= "\n"; $Wmenuslist .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Xmenus_selected < 1) {$Xmenuslist .= "\n";} if ($Wmenus_selected < 1) {$Wmenuslist .= "\n";} */ /* ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $Dgroups_menu=''; $Dgroups_selected=0; $Agroups_menu=''; $Agroups_selected=0; $Hgroups_menu=''; $Hgroups_selected=0; $Wgroups_menu=''; $Wgroups_selected=0; $Tgroups_menu=''; $Tgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; if ($group_id!=$rowx[0]) { $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Wgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; } $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} if ($Agroups_selected < 1) {$Agroups_menu .= "\n";} else {$Agroups_menu .= "\n";} if ($Tgroups_selected < 1) {$Tgroups_menu .= "\n";} else {$Tgroups_menu .= "\n";} if ($Wgroups_selected < 1) {$Wgroups_menu .= "\n";} else {$Wgroups_menu .= "\n";} if ($Hgroups_selected < 1) {$Hgroups_menu .= "\n";} else {$Hgroups_menu .= "\n";} */ $allowed_campaigns_count=0; $allowed_campaigns_warning=''; $SQL_group_id = preg_replace("/_/",'\\_',$query_group_id); $stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $vc_allowed_ct=0; if ($campin_to_print > $vc_allowed_ct) { $rowc=mysqli_fetch_row($rslt); $allowed_campaigns_count = $rowc[0]; $vc_allowed_ct++; } if ($allowed_campaigns_count < 1) {$allowed_campaigns_warning="
  "._QXZ("Not set as allowed in any campaigns")."!
";} echo "
"._QXZ("MODIFY AN CHAT GROUPS RECORD").": $query_group_id
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_second_webform > 0) { echo "\n"; } if ($SSenable_third_webform > 0) { echo "\n"; } # echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get status group listings for dynamic pulldown menu $stmt="SELECT status_group_id,status_group_notes from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); $status_groups_menu=''; $status_groups_selected=0; $o=0; while ($status_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $status_groups_menu .= "\n"; $o++; } $sglinkB=''; $sglinkE=''; if (strlen($status_group_id)>1) { $sglinkB=""; $sglinkE=''; } echo "\n"; echo "\n"; echo "\n"; /* Commenting this out because it is handled by the Email Account section and is redundant here echo "\n"; echo "\n"; echo "\n"; echo "\n"; */ if ($start_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='start';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($dispo_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='dispo';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } if ($na_call_url == 'ALT') { $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='noagent';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } echo "\n"; } else { echo "\n"; } # get count of talk seconds urls in this In-Group $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk';"; $rslt=mysql_to_mysqli($stmt, $link); $vum_to_print = mysqli_num_rows($rslt); if ($vum_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $vum_count = $rowx[0]; } # check if this In-Group has talk seconds url set to -FORCEDISABLE- $force_disableHTML=''; $stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='talk' and active='N' and url_address LIKE \"%FORCEDISABLE%\";"; $rslt=mysql_to_mysqli($stmt, $link); $fdtsu_to_print = mysqli_num_rows($rslt); if ($fdtsu_to_print > 0) { $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) {$force_disableHTML="FORCED DISABLE";} } echo "\n"; /* echo "\n"; */ echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSqc_features_active > 0) { echo "\n"; echo "\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,scheduled_callback from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $qc_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); if (!preg_match("/\"$rowx[0]\"/",$qc_statuses_list)) { $qc_statuses_list .= " $o) { $rowx=mysqli_fetch_row($rslt); $QCscripts_list .= "\n"; $scriptname_list["$rowx[0]"] = "$rowx[1]"; $o++; } ##### get shifts listings for pulldown $stmt="SELECT shift_id,shift_name from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); $QCshifts_list=""; $o=0; while ($shifts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $QCshifts_list .= "\n"; $shiftname_list["$rowx[0]"] = "$rowx[1]"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("Group ID").": $query_group_id$NWB#inbound_groups-group_id$NWE $allowed_campaigns_warning
"._QXZ("Group Name").": $NWB#inbound_groups-group_name$NWE
"._QXZ("Group Color")." ("._QXZ("color chooser")."): $NWB#inbound_groups-group_color$NWE
"._QXZ("Active").": $NWB#inbound_groups-active$NWE
"._QXZ("In-Group Chat Date").": $group_calldate$NWB#inbound_groups-group_chatdate$NWE
"._QXZ("Default List ID").": $NWB#inbound_groups-default_list_id$NWE
\n"; $temp_chart_title = _QXZ("8 Day inbound call count for this in-group"); horizontal_bar_chart($group_id,'8','in-group',$link,'total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Admin User Group").": $NWB#inbound_groups-user_group$NWE
"._QXZ("Web Form").": $NWB#inbound_groups-web_form_address$NWE"; if ($SSenable_first_webform < 1) {echo " "._QXZ("DISABLED")."";} echo "
"._QXZ("Web Form Two").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Web Form Three").": $NWB#inbound_groups-web_form_address$NWE
"._QXZ("Next Agent Chat").": $NWB#inbound_groups-next_agent_chat$NWE "._QXZ("THIS OPTION IS NOT ACTIVE")."
"._QXZ("Queue Priority").": $NWB#inbound_groups-queue_priority$NWE
"._QXZ("Fronter Display").": $NWB#inbound_groups-fronter_display$NWE
"._QXZ("Group Handling").": $NWB#inbound_groups-group_handling$NWE
$sglinkB"._QXZ("Status Group Override")."$sglinkE: $NWB#inbound_groups-status_group_id$NWE
"._QXZ("In-Group Recording Override").": $NWB#inbound_groups-ingroup_recording_override$NWE
"._QXZ("In-Group Recording Filename").": $NWB#inbound_groups-ingroup_rec_filename$NWE
In-Group Call Handle Method: $NWB#inbound_dids-call_handle_method$NWE
In-Group Agent Search Method: $NWB#inbound_dids-agent_search_method$NWE
In-Group List ID: $NWB#inbound_dids-list_id$NWE
In-Group Campaign ID: $NWB#inbound_dids-campaign_id$NWE
"._QXZ("Start Chat URL").": $NWB#inbound_groups-start_call_url$NWE "._QXZ("Alternate Start URLs Defined").": $vum_count
"._QXZ("Start Chat URL").": $NWB#inbound_groups-start_chat_url$NWE
"._QXZ("Dispo Chat URL").": $NWB#inbound_groups-dispo_call_url$NWE "._QXZ("Alternate Dispo URLs Defined").": $vum_count
"._QXZ("Dispo Chat URL").": $NWB#inbound_groups-dispo_chat_url$NWE
"._QXZ("No Agent Chat URL").": $NWB#inbound_groups-na_chat_url$NWE "._QXZ("Alternate No Agent URLs Defined").": $vum_count
"._QXZ("No Agent Chat URL").": $NWB#inbound_groups-na_chat_url$NWE
"._QXZ("Talk Seconds URLs").": $NWB#inbound_groups-talk_sec_url$NWE "._QXZ("Talk Seconds URLs Defined").": $vum_count   $force_disableHTML
Extension Append CID: $NWB#inbound_groups-extension_appended_cidname$NWE
"._QXZ("Uniqueid Status Display").": $NWB#inbound_groups-uniqueid_status_display$NWE
"._QXZ("Uniqueid Status Prefix").": $NWB#inbound_groups-uniqueid_status_prefix$NWE
"._QXZ("Customer Chat Screen Colors").": $NWB#inbound_groups-customer_chat_screen_colors$NWE
"._QXZ("Customer Chat Survey Link").": $NWB#inbound_groups-customer_chat_survey_link$NWE
"._QXZ("Customer Chat Survey Text").": $NWB#inbound_groups-customer_chat_survey_text$NWE
"._QXZ("Customer Chat Link").": "._QXZ("First Link")."   "._QXZ("Second Link")." $NWB#inbound_groups-customer_chat_link$NWE
"._QXZ("Custom 1").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 2").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 3").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 4").": $NWB#inbound_groups-custom_fields$NWE
"._QXZ("Custom 5").": $NWB#inbound_groups-custom_fields$NWE
 
"._QXZ("Inbound Group QC Settings").":
"._QXZ("QC Enabled").": $NWB#inbound_groups-qc_enabled$NWE
"._QXZ("QC Statuses").":
$NWB#inbound_groups-qc_statuses$NWE
$qc_statuses_list
"._QXZ("QC WebForm").": $NWB#inbound_groups-qc_web_form_address$NWE
"._QXZ("QC Script").": $NWB#inbound_groups-qc_script$NWE
"._QXZ("QC Shift").": $NWB#inbound_groups-qc_shift_id$NWE
"._QXZ("QC Get Record Launch").": $NWB#inbound_groups-qc_get_record_launch$NWE
"._QXZ("QC Show Recording").": $NWB#inbound_groups-qc_show_recording$NWE
\n"; echo "


\n"; ### list of agent rank or skill-level for this inbound group echo "
\n"; echo "
"._QXZ("AGENT RANKS FOR THIS INBOUND GROUP").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT user,full_name,closer_campaigns,user_group from vicidial_users where active='Y' $LOGadmin_viewable_groupsSQL order by user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_name[$o] = $rowx[1]; $ARIG_close[$o] = $rowx[2]; $ARIG_group[$o] = (preg_match('/\-\-ALL\-\-/', $rowx[3]) ? _QXZ("$rowx[3]") : $rowx[3]); $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } $o=0; $ARIG_changenotes=''; $stmtDlog=''; while ($users_to_print > $o) { $o++; $stmt="SELECT group_rank,calls_today,group_grade,daily_limit from vicidial_inbound_group_agents where group_id='$group_id' and user='$ARIG_user[$o]';"; $rsltx=mysql_to_mysqli($stmt, $link); $viga_to_print = mysqli_num_rows($rsltx); if ($viga_to_print > 0) { $rowx=mysqli_fetch_row($rsltx); $ARIG_rank[$o] = $rowx[0]; $ARIG_calls[$o] = $rowx[1]; $ARIG_grade[$o] = $rowx[2]; $ARIG_limit[$o] = $rowx[3]; } else { $stmtD="INSERT INTO vicidial_inbound_group_agents set calls_today='0',group_rank='0',group_weight='0',user='$ARIG_user[$o]',group_id='$group_id',group_grade='1',group_type='E';"; $rslt=mysql_to_mysqli($stmtD, $link); $affected_rows_grp = mysqli_affected_rows($link); if ($DB > 0) {echo "$affected_rows_grp|$stmtD|";} $stmtDlog .= "$stmtD|"; $ARIG_changenotes .= "added missing user to viga table $ARIG_user[$o]|"; $ARIG_rank[$o] = '0'; $ARIG_calls[$o] = '0'; $ARIG_grade[$o] = '1'; $ARIG_limit[$o] = '-1'; } } if (strlen($ARIG_changenotes) > 10) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtDlog|"; $SQL_log = preg_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='USER INGROUP VIGA ADD', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { $o=0; while ($users_to_print > $o) { $o++; $ARIG_checked=''; $ARIG_ranked=''; $ARIG_graded=''; $ARIG_limited=''; $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; if (isset($_GET["$checkbox_field"])) {$ARIG_checked=$_GET["$checkbox_field"];} elseif (isset($_POST["$checkbox_field"])) {$ARIG_checked=$_POST["$checkbox_field"];} if (isset($_GET["$rank_field"])) {$ARIG_ranked=$_GET["$rank_field"];} elseif (isset($_POST["$rank_field"])) {$ARIG_ranked=$_POST["$rank_field"];} if (isset($_GET["$grade_field"])) {$ARIG_graded=$_GET["$grade_field"];} elseif (isset($_POST["$grade_field"])) {$ARIG_graded=$_POST["$grade_field"];} if (isset($_GET["$limit_field"])) {$ARIG_limited=$_GET["$limit_field"];} elseif (isset($_POST["$limit_field"])) {$ARIG_limited=$_POST["$limit_field"];} $ARIG_checked = preg_replace('/[^A-Z]/','',$ARIG_checked); $ARIG_ranked = preg_replace('/[^-0-9]/','',$ARIG_ranked); $ARIG_graded = preg_replace('/[^-0-9]/','',$ARIG_graded); $ARIG_limited = preg_replace('/[^-0-9]/','',$ARIG_limited); $stmtA=''; $stmtB=''; $stmtC=''; $stmtD=''; $stmtE=''; $ARIG_updated=0; $ARIG_changenotes=''; if ( ($ARIG_check[$o]=='') and ($ARIG_checked=='YES') ) { if (strlen($ARIG_close[$o]) < 4) {$ARIG_close[$o]=' - ';} $stmtA="UPDATE vicidial_users set closer_campaigns=' $group_id$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtA, $link); if ($DB > 0) {echo "|$stmtA|";} $ARIG_updated++; $ARIG_changenotes .= "added $group_id to selected in-groups|"; } if ( ($ARIG_check[$o]==' CHECKED') and ($ARIG_checked=='') ) { $ARIG_close[$o] = preg_replace("/ $group_id /",' ',$ARIG_close[$o]); $stmtB="UPDATE vicidial_users set closer_campaigns='$ARIG_close[$o]' where user='$ARIG_user[$o]';"; $rslt=mysql_to_mysqli($stmtB, $link); if ($DB > 0) {echo "|$stmtB|";} $ARIG_updated++; $ARIG_changenotes .= "removed $group_id from selected in-groups|"; } if ( ($ARIG_ranked < $ARIG_rank[$o]) or ($ARIG_ranked > $ARIG_rank[$o]) ) { $stmtC="UPDATE vicidial_inbound_group_agents set group_rank='$ARIG_ranked',group_weight='$ARIG_ranked' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtC, $link); if ($DB > 0) {echo "|$stmtC|";} $ARIG_updated++; $ARIG_changenotes .= "changed rank from $ARIG_rank[$o] to $ARIG_ranked|"; } if ( ($ARIG_graded < $ARIG_grade[$o]) or ($ARIG_graded > $ARIG_grade[$o]) ) { $stmtD="UPDATE vicidial_inbound_group_agents set group_grade='$ARIG_graded' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtD, $link); if ($DB > 0) {echo "|$stmtD|";} $ARIG_updated++; $ARIG_changenotes .= "changed grade from $ARIG_grade[$o] to $ARIG_graded|"; } if ( ($ARIG_limited < $ARIG_limit[$o]) or ($ARIG_limited > $ARIG_limit[$o]) ) { $stmtE="UPDATE vicidial_inbound_group_agents set daily_limit='$ARIG_limited' where user='$ARIG_user[$o]' and group_id='$group_id';"; $rslt=mysql_to_mysqli($stmtE, $link); if ($DB > 0) {echo "|$stmtE|";} $ARIG_updated++; $ARIG_changenotes .= "changed limit from $ARIG_limit[$o] to $ARIG_limited|"; } if ($ARIG_updated > 0) { ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmtA|$stmtB|$stmtC|$stmtD|$stmtE|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$ARIG_user[$o]', event_code='USER INGROUP SETTINGS', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name,closer_campaigns,viga.group_grade,viga.daily_limit from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user $LOGadmin_viewable_groupsSQL order by vu.user;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $ARIG_user[$o] = $rowx[0]; $ARIG_rank[$o] = $rowx[1]; $ARIG_calls[$o] = $rowx[2]; $ARIG_name[$o] = $rowx[3]; $ARIG_close[$o] = $rowx[4]; $ARIG_grade[$o] = $rowx[5]; $ARIG_limit[$o] = $rowx[6]; $ARIG_check[$o] = ''; if (preg_match("/ $group_id /",$ARIG_close[$o])) {$ARIG_check[$o] = ' CHECKED';} } } $checkbox_count=0; $checkbox_list=''; $users_output=''; $o=0; while ($users_to_print > $o) { $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; $rank_field="RANK_$ARIG_user[$o]$US$group_id"; $grade_field="GRADE_$ARIG_user[$o]$US$group_id"; $limit_field="LIMIT_$ARIG_user[$o]$US$group_id"; $checkbox_list .= "|$checkbox_field"; $checkbox_count++; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; $users_output .= "\n"; } echo "\n"; echo "$users_output"; echo "\n"; echo "
"._QXZ("USER").""._QXZ("GROUP").""._QXZ("SELECTED")."   "._QXZ("RANK")."     "._QXZ("GRADE")."   "._QXZ("DAILY LIMIT")." "._QXZ("CALLS TODAY")."
$ARIG_user[$o] - $ARIG_name[$o]$ARIG_group[$o]$ARIG_calls[$o]
    "._QXZ("select all")."  

\n"; echo "
"._QXZ("Click here to see a report for this inbound group")."

\n"; echo ""._QXZ("Click here to see agents logged in to this inbound group")."

\n"; echo "
\n"; echo ""._QXZ("CAMPAIGNS ALLOWING THIS CHAT GROUP").":
\n"; echo "\n"; $SQL_group_id = preg_replace("/_/",'\\_',$group_id); $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $o=0; while ($campin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; if ($LOGdelete_ingroups > 0) { # echo "

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; echo "

"._QXZ("DELETE THIS IN-GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this In-Group")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3311 modify did info in the system ###################### if ($ADD==3311) { if ($LOGmodify_dids==1) { ### check for system DID filter, create if does not exist if ($did_id == 'did_system_filter') { $did_pattern = 'did_system_filter'; $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='did_system_filter';"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $row=mysqli_fetch_row($rslt); $did_id = $row[0]; } else { $stmtA="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,user_group,filter_phone_group_id,pre_filter_phone_group_id) values('did_system_filter','DID System Filter','---ALL---','','');"; $rslt=mysql_to_mysqli($stmtA, $link); $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='did_system_filter';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; } } if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3311&did_id=$did_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,custom_one,custom_two,custom_three,custom_four,custom_five,user_group,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,entry_list_id,filter_entry_list_id,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,did_carrier_description,inbound_route_answer,pre_filter_recent_call,pre_filter_recent_extension,alter_cid_name from vicidial_inbound_dids where $didSQL $LOGadmin_viewable_groupsSQL;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (strlen($row[0])>0) {$did_id = $row[0];} if (strlen($row[1])>0) {$did_pattern = $row[1];} $did_description = $row[2]; $did_active = $row[3]; $did_route = $row[4]; $extension_dids = $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_inbound = $row[15]; $list_id = $row[16]; $campaign_id = $row[17]; $phone_code = $row[18]; $menu_id = $row[19]; $record_call = $row[20]; $filter_inbound_number = $row[21]; $filter_phone_group_id = $row[22]; $filter_url = $row[23]; $filter_action = $row[24]; $filter_extension = $row[25]; $filter_exten_context = $row[26]; $filter_voicemail_ext = $row[27]; $filter_phone = $row[28]; $filter_server_ip = $row[29]; $filter_user = $row[30]; $filter_user_unavailable_action = $row[31]; $filter_user_route_settings_ingroup = $row[32]; $filter_group_id = $row[33]; $filter_call_handle_method = $row[34]; $filter_agent_search_method = $row[35]; $filter_list_id = $row[36]; $filter_campaign_id = $row[37]; $filter_phone_code = $row[38]; $filter_menu_id = $row[39]; $filter_clean_cid_number = $row[40]; $custom_one = $row[41]; $custom_two = $row[42]; $custom_three = $row[43]; $custom_four = $row[44]; $custom_five = $row[45]; $user_group = $row[46]; $filter_dnc_campaign = $row[47]; $filter_url_did_redirect = $row[48]; $no_agent_ingroup_redirect = $row[49]; $no_agent_ingroup_id = $row[50]; $no_agent_ingroup_extension = $row[51]; $pre_filter_phone_group_id = $row[52]; $pre_filter_extension = $row[53]; $entry_list_id = $row[54]; $filter_entry_list_id = $row[55]; $max_queue_ingroup_calls = $row[56]; $max_queue_ingroup_id = $row[57]; $max_queue_ingroup_extension = $row[58]; $did_carrier_description = $row[59]; $inbound_route_answer = $row[60]; $pre_filter_recent_call = $row[61]; $pre_filter_recent_extension = $row[62]; $alter_cid_name = $row[63]; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $campaigns_list=''; $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaigns_list .= "\n"; $o++; } ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $Xgroups_selected=0; $FXgroups_menu=''; $FXgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $FXgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Xgroups_selected < 1) {$Xgroups_menu .= "\n";} else {$Xgroups_menu .= "\n";} if ($FXgroups_selected < 1) {$FXgroups_menu .= "\n";} else {$FXgroups_menu .= "\n";} ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Dgroups_to_print = mysqli_num_rows($rslt); $Dgroups_menu=''; $Dgroups_selected=0; $FDgroups_menu=''; $FDgroups_selected=0; $PFDgroups_menu=''; $PFDgroups_selected=0; $MQIgroups_menu=''; $MQIgroups_selected=0; $o=0; while ($Dgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Dgroups_menu .= "\n"; $FDgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $PFDgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $MQIgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; $o++; } if ($Dgroups_selected < 1) {$Dgroups_menu .= "\n";} else {$Dgroups_menu .= "\n";} if ($FDgroups_selected < 1) {$FDgroups_menu .= "\n";} else {$FDgroups_menu .= "\n";} if ($PFDgroups_selected < 1) {$PFDgroups_menu .= "\n";} else {$PFDgroups_menu .= "\n";} if ($MQIgroups_selected < 1) {$MQIgroups_menu .= "\n";} else {$MQIgroups_menu .= "\n";} $stmt="SELECT filter_phone_group_id,filter_phone_group_name from vicidial_filter_phone_groups $whereLOGadmin_viewable_groupsSQL order by filter_phone_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Fgroups_to_print = mysqli_num_rows($rslt); $Fgroups_list=array(); $Fgroups_names=array(); $i=0; while ($i < $Fgroups_to_print) { $row=mysqli_fetch_row($rslt); $Fgroups_list[$i] = $row[0]; $Fgroups_names[$i] = $row[1]; $i++; } $Fgroups_list[$i] = ''; $Fgroups_names[$i] = '---NONE---'; $stmt="SELECT menu_id,menu_name,menu_prompt from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $menus_to_print = mysqli_num_rows($rslt); $menu_list=''; $i=0; while ($i < $menus_to_print) { $row=mysqli_fetch_row($rslt); $menu_list .= ""; $i++; } echo "
"._QXZ("MODIFY A DID RECORD").": $did_pattern
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($did_pattern == 'did_system_filter') { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSinbound_answer_config > 0) { echo "\n"; } else { echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_did_entry_list_id > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic DID_RECENT_CALL container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='DID_RECENT_CALL' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlc_to_print = mysqli_num_rows($rslt); $pre_filter_recent_call_menu=''; $dtlc_selected=0; $o=0; while ($dtlc_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $pre_filter_recent_call_menu .= "\n"; $o++; } echo "\n"; echo "\n"; } echo "\n"; # echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_did_entry_list_id > 0) { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
DID Extension: $NWB#inbound_dids-did_pattern$NWE
"._QXZ("DID Extension").": $did_pattern $NWB#inbound_dids-did_pattern$NWE
"._QXZ("DID Description").": $NWB#inbound_dids-did_description$NWE
"._QXZ("DID Carrier Description").": $NWB#inbound_dids-did_carrier_description$NWE
"._QXZ("Admin User Group").": $NWB#inbound_dids-user_group$NWE
"._QXZ("Active").": Y
"._QXZ("Clean CID Number").": $NWB#inbound_dids-filter_clean_cid_number$NWE
"._QXZ("Alter CID Name").": $NWB#inbound_dids-alter_cid_name$NWE
"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Active").": $NWB#inbound_dids-did_active$NWE
"._QXZ("Admin User Group").": $NWB#inbound_dids-user_group$NWE
"._QXZ("DID Route").": $NWB#inbound_dids-did_route$NWE
"._QXZ("Record Call").": $NWB#inbound_dids-record_call$NWE
"._QXZ("Route Answer").": $NWB#inbound_dids-inbound_route_answer$NWE
"._QXZ("Extension").": $NWB#inbound_dids-extension$NWE
"._QXZ("Extension Context").": $NWB#inbound_dids-exten_context$NWE
"._QXZ("Voicemail Box").": "._QXZ("voicemail chooser")."$NWB#inbound_dids-voicemail_ext$NWE
"._QXZ("Phone Extension").": $NWB#inbound_dids-phone$NWE
"._QXZ("Server IP").": $NWB#inbound_dids-server_ip$NWE
"._QXZ("Call Menu").": $NWB#inbound_dids-menu_id$NWE
"._QXZ("User Agent").": $NWB#inbound_dids-user$NWE
"._QXZ("User Unavailable Action").": $NWB#inbound_dids-user_unavailable_action$NWE
"._QXZ("User Route Settings In-Group").": $NWB#inbound_dids-user_route_settings_ingroup$NWE
"._QXZ("In-Group ID").": $NWB#inbound_dids-group_id$NWE
"._QXZ("In-Group Call Handle Method").": $NWB#inbound_dids-call_handle_method$NWE
"._QXZ("In-Group Agent Search Method").": $NWB#inbound_dids-agent_search_method$NWE
"._QXZ("In-Group List ID").": $NWB#inbound_dids-list_id$NWE
"._QXZ("In-Group Entry List ID").": $NWB#inbound_dids-entry_list_id$NWE
"._QXZ("In-Group Campaign ID").": $NWB#inbound_dids-campaign_id$NWE
"._QXZ("In-Group Phone Code").": $NWB#inbound_dids-phone_code$NWE
"._QXZ("Clean CID Number").": $NWB#inbound_dids-filter_clean_cid_number$NWE
"._QXZ("Alter CID Name").": $NWB#inbound_dids-alter_cid_name$NWE
"._QXZ("No-Agent In-Group Redirect").": $NWB#inbound_dids-no_agent_ingroup_redirect$NWE
"._QXZ("No-Agent In-Group ID").": $NWB#inbound_dids-no_agent_ingroup_id$NWE
"._QXZ("No-Agent In-Group Extension").": $NWB#inbound_dids-no_agent_ingroup_extension$NWE
"._QXZ("Max Queue In-Group Calls").": $NWB#inbound_dids-max_queue_ingroup_calls$NWE
"._QXZ("Max Queue In-Group ID").": $NWB#inbound_dids-max_queue_ingroup_id$NWE
"._QXZ("Max Queue In-Group Extension").": $NWB#inbound_dids-max_queue_ingroup_extension$NWE
"._QXZ("Pre-Filter Phone Group ID").": $NWB#inbound_dids-pre_filter_phone_group_id$NWE
"._QXZ("Pre-Filter Phone Group ID").": $NWB#inbound_dids-pre_filter_phone_group_id$NWE
"._QXZ("Pre-Filter Phone Group DID").": $NWB#inbound_dids-pre_filter_extension$NWE
"; if ($dtlc_selected > 0) {echo ""._QXZ("Pre-Filter Recent Call")."";} else {echo _QXZ("Pre-Filter Recent Call");} echo ": $NWB#inbound_dids-pre_filter_recent_call$NWE
"._QXZ("Pre-Filter Recent Call DID").": $NWB#inbound_dids-pre_filter_recent_extension$NWE
"._QXZ("Filter Inbound Number").": $NWB#inbound_dids-filter_inbound_number$NWE
"._QXZ("Filter Phone Group ID").": $NWB#inbound_dids-filter_phone_group_id$NWE
"._QXZ("Filter Phone Group ID").": $NWB#inbound_dids-filter_phone_group_id$NWE
"._QXZ("Filter URL").": $NWB#inbound_dids-filter_url$NWE
"._QXZ("Filter URL DID Redirect").": $NWB#inbound_dids-filter_url_did_redirect$NWE
"._QXZ("Filter DNC Campaign").": $NWB#inbound_dids-filter_dnc_campaign$NWE
"._QXZ("Filter Action").": $NWB#inbound_dids-filter_action$NWE
"._QXZ("Filter Extension").": $NWB#inbound_dids-extension$NWE
"._QXZ("Filter Extension Context").": $NWB#inbound_dids-exten_context$NWE
"._QXZ("Filter Voicemail Box").": "._QXZ("voicemail chooser")."$NWB#inbound_dids-voicemail_ext$NWE
"._QXZ("Filter Phone Extension").": $NWB#inbound_dids-phone$NWE
"._QXZ("Filter Server IP").": $NWB#inbound_dids-server_ip$NWE
"._QXZ("Filter Call Menu").": $NWB#inbound_dids-menu_id$NWE
"._QXZ("Filter User Agent").": $NWB#inbound_dids-user$NWE
"._QXZ("Filter User Unavailable Action").": $NWB#inbound_dids-user_unavailable_action$NWE
"._QXZ("Filter User Route Settings In-Group").": $NWB#inbound_dids-user_route_settings_ingroup$NWE
"._QXZ("Filter In-Group ID").": $NWB#inbound_dids-group_id$NWE
"._QXZ("Filter In-Group Call Handle Method").": $NWB#inbound_dids-call_handle_method$NWE
"._QXZ("Filter In-Group Agent Search Method").": $NWB#inbound_dids-agent_search_method$NWE
"._QXZ("Filter In-Group List ID").": $NWB#inbound_dids-list_id$NWE
"._QXZ("Filter In-Group Entry List ID").": $NWB#inbound_dids-entry_list_id$NWE
"._QXZ("Filter In-Group Campaign ID").": $NWB#inbound_dids-campaign_id$NWE
"._QXZ("Filter In-Group Phone Code").": $NWB#inbound_dids-phone_code$NWE
"._QXZ("Custom")." 1: $NWB#inbound_dids-custom_one$NWE
"._QXZ("Custom")." 2: $NWB#inbound_dids-custom_one$NWE
"._QXZ("Custom")." 3: $NWB#inbound_dids-custom_one$NWE
"._QXZ("Custom")." 4: $NWB#inbound_dids-custom_one$NWE
"._QXZ("Custom")." 5: $NWB#inbound_dids-custom_one$NWE
\n"; echo "

\n"; echo ""._QXZ("CALL MENUS USING THIS DID").":
\n"; echo "\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='DID' and option_route_value='$did_pattern';"; $rslt=mysql_to_mysqli($stmt, $link); $cms_to_print = mysqli_num_rows($rslt); $o=0; while ($cms_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CAMPAIGNS USING THIS DID").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where campaign_cid='$did_pattern' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CAMPAIGN AC-CIDs USING THIS DID").":
\n"; echo "\n"; $stmt="SELECT camp.campaign_id,campaign_name from vicidial_campaign_cid_areacodes campac,vicidial_campaigns camp where outbound_cid='$did_pattern' and camp.campaign_id=campac.campaign_id $campLOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campacs_to_print = mysqli_num_rows($rslt); $o=0; while ($campacs_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CID GROUPS USING THIS DID").":
\n"; echo "\n"; $stmt="SELECT camp.cid_group_id,cid_group_notes from vicidial_campaign_cid_areacodes campac,vicidial_cid_groups camp where outbound_cid='$did_pattern' and camp.cid_group_id=campac.campaign_id $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $cidgps_to_print = mysqli_num_rows($rslt); $o=0; while ($cidgps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("IN-GROUPS USING THIS DID").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where dial_ingroup_cid='$did_pattern' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ingrps_to_print = mysqli_num_rows($rslt); $o=0; while ($ingrps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("LISTS USING THIS DID").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where campaign_cid_override='$did_pattern' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo "
"._QXZ("Click here to see a traffic report for this DID")."

\n"; $temp_did_pattern = $did_pattern; $temp_did_pattern = preg_replace("/\+/",'%2B',$temp_did_pattern); echo "
"._QXZ("Click here to see a list of recordings and calls for this DID")."
\n"; if ($SSdid_ra_extensions_enabled > 0) { echo "

"._QXZ("SEE DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID")."\n"; } if ($LOGdelete_dids > 0) { if ($did_pattern == 'default') {echo "

"._QXZ("DELETE THIS DID")."\n";} else {echo "

"._QXZ("DELETE THIS DID")."\n";} } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this DID")."\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=1320 display did remote agent extension override summary ###################### if ($ADD==1320) { echo "
\n"; echo ""; echo "
"._QXZ("REMOTE AGENT EXTENSION OVERRIDE LISTINGS").":\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids $whereLOGadmin_viewable_groupsSQL order by did_id;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); $o=0; while ($dids_to_print > $o) { $row=mysqli_fetch_row($rslt); $dids_id_list[$o] = $row[0]; $did_pattern_list[$o] = $row[1]; $did_description_list[$o] = $row[2]; $o++; } $o=0; $k=0; while ($dids_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $k)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3321&did_id=$dids_id_list[$o]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $k++; $o++; } echo "
"._QXZ("DID").""._QXZ("NAME").""._QXZ("RA-EXTENS").""._QXZ("MODIFY")."
$did_pattern_list[$o] $did_description_list[$o] "; $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$dids_id_list[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); $didstatus_to_print = mysqli_num_rows($rslt); $p=0; while ( ($didstatus_to_print > $p) and ($p < 10) ) { $row=mysqli_fetch_row($rslt); echo "$row[0] "; $p++; } echo ""._QXZ("MODIFY RA-EXTENS")."
\n"; } ###################### # ADD=3321 modify did remote agent extension override entries in the system ###################### if ($ADD==3321) { if ( ($LOGmodify_dids==1) and ($SSdid_ra_extensions_enabled > 0) ) { echo ""; ##### BEGIN Add/Delete/Modify DID Remote Agent Extensions section ##### if ($stage == 'ADD') { if ($add_copy_disabled > 0) { echo "
"._QXZ("You do not have permission to add records on this system")." -system_settings-\n"; } else { $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE NOT ADDED - there is already an entry for this DID with this RA EXTENSION")."
\n";} else { if ( (strlen($did_id) < 1) or (strlen($user_start) < 2) or (strlen($extension) < 4) ) { echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE NOT ADDED - Please go back and look at the data you entered")."
\n"; } else { echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE ADDED").": $did_id - $user_start - $extension
\n"; $stmt="INSERT INTO vicidial_did_ra_extensions(did_id,user_start,extension,description,active) values('$did_id','$user_start','$extension','$description','Y');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DID_RA-EXTEN', event_type='ADD', record_id='$did_id', event_code='ADMIN ADD DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } } if ($stage == 'DELETE') { $stmt="SELECT count(*) from vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE NOT DELETED - this entry does not exist")."
\n";} else { if ( (strlen($did_id) < 1) or (strlen($user_start) < 2) or (strlen($extension) < 4) ) { echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE NOT DELETED - Please go back and look at the data you entered")."
\n"; } else { echo "
"._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE DELETED").": $did_id - $user_start - $extension
\n"; $stmt="DELETE FROM vicidial_did_ra_extensions where did_id='$did_id' and user_start='$user_start' and extension='$extension';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DID_RA-EXTEN', event_type='DELETE', record_id='$did_id', event_code='ADMIN DELETE DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } } } if ($stage == 'MODIFY') { $stmt="SELECT user_start,extension,active,description,call_count_today from vicidial_did_ra_extensions where did_id='$did_id' order by user_start,extension;"; $rslt=mysql_to_mysqli($stmt, $link); $raextens_to_print = mysqli_num_rows($rslt); $o=0; while ($raextens_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xuser_start[$o] = $rowx[0]; $Xextension[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xdescription[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $o++; } $o=0; while ($raextens_to_print > $o) { $Factive_value=''; $Fdescription_value=''; $Factive = "active_$Xuser_start[$o]_$Xextension[$o]"; $Fdescription = "description_$Xuser_start[$o]_$Xextension[$o]"; if (isset($_GET[$Factive])) {$Factive_value=$_GET[$Factive];} elseif (isset($_POST[$Factive])) {$Factive_value=$_POST[$Factive];} if (isset($_GET[$Fdescription])) {$Fdescription_value=$_GET[$Fdescription];} elseif (isset($_POST[$Fdescription])) {$Fdescription_value=$_POST[$Fdescription];} if ($non_latin < 1) { $Fdescription_value = preg_replace('/[^- \.\,\_0-9a-zA-Z]/','',$Fdescription_value); } else { $Fdescription_value = preg_replace('/[^- \.\,\_0-9\p{L}]/u','',$Fdescription_value); } $Factive_value = preg_replace('/[^A-Z]/','',$Factive_value); # echo "$did_id - $Xuser_start[$o] - $Xextension[$o] - $Factive($Factive_value|$Xactive[$o]) - $Fdescription($Fdescription_value|$Xdescription[$o])
"; if ( ($Factive_value == $Xactive[$o]) and ($Fdescription_value == $Xdescription[$o]) ) { # echo "
DID REMOTE AGENT EXTENSION OVERRIDE NOT MODIFIED - Please go back and look at the data you entered
\n"; } else { echo ""._QXZ("DID REMOTE AGENT EXTENSION OVERRIDE MODIFIED").": $Xuser_start[$o] - $Xextension[$o]
\n"; $stmt="UPDATE vicidial_did_ra_extensions SET active='$Factive_value',description='$Fdescription_value' WHERE did_id='$did_id' and user_start='$Xuser_start[$o]' and extension='$Xextension[$o]';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='DID_RA-EXTEN', event_type='MODIFY', record_id='$did_id', event_code='ADMIN MODIFY DID RA EXTEN', event_sql=\"$SQL_log\", event_notes='DID: $user_start - $extension';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } $o++; } } ##### END Add/Delete/Modify DID Remote Agent Extensions section ##### if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3321&did_id=$did_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; echo "

"._QXZ("REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID").":   $NWB#did_ra_extensions$NWE
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; $stmt="SELECT user_start,extension,active,description,call_count_today from vicidial_did_ra_extensions where did_id='$did_id' order by user_start,extension;"; $rslt=mysql_to_mysqli($stmt, $link); $raextens_to_print = mysqli_num_rows($rslt); $o=0; while ($raextens_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xuser_start[$o] = $rowx[0]; $Xextension[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xdescription[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $o++; } $o=0; while ($raextens_to_print > $o) { $ct = ($o + 1); if ($ct == '1') { $bgcolor='bgcolor="#'. $SSstd_row1_background .'"'; $bgac = $Xuser_start[$o]; } else { if ($Xuser_start[$o] != $bgac) { $bgct=0; if (preg_match("/1$|3$|5$|7$|9$/i", $bgct)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} $bgct++; $bgac = $Xuser_start[$o]; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
#"._QXZ("USER START").""._QXZ("EXTENSION").""._QXZ("DESCRIPTION").""._QXZ("ACTIVE").""._QXZ("CALLS").""._QXZ("DELETE")."
  $ct   $Xuser_start[$o]   $Xextension[$o]\n"; if ($Xactive[$o] == 'Y') { echo ""; } else { echo ""; } echo "   $Xcall_count_today[$o]   "._QXZ("DELETE")."
\n"; echo "

\n"; echo "
"._QXZ("ADD NEW REMOTE AGENT EXTENSION OVERRIDE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("User Start").": \n"; echo _QXZ("Extension").":
\n"; echo _QXZ("Description").": \n"; echo "
\n"; echo "

\n"; echo "

"._QXZ("MODIFY THIS DID")."\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this DID")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3511 modify call menu info in the system ###################### if ($ADD==3511) { if ($LOGmodify_dids==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3511&menu_id=$menu_id"; $modify_footer_refresh=1; } $temp_section_width = $section_width; if ($temp_section_width < 850) {$temp_section_width = 850;} $temp_main_section_width = ($temp_section_width + 50); echo "
\n"; echo ""; $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,dtmf_log,dtmf_field,user_group,qualify_sql,alt_dtmf_log,question,answer_signal from vicidial_call_menu where menu_id='$menu_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $dtmf_log = $row[11]; $dtmf_field = $row[12]; $user_group = $row[13]; $qualify_sql = $row[14]; $alt_dtmf_log = $row[15]; $question = $row[16]; $answer_signal_callmenus = $row[17]; echo "
"._QXZ("MODIFY A CALL MENU RECORD").": $menu_id
\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSalt_ivr_logging > 0) { echo "\n"; } else {echo "";} if ($SSinbound_answer_config > 0) { echo "\n"; } else { echo ""; } echo "\n"; echo "\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_to_mysqli($stmtA, $link); $menus_to_print = mysqli_num_rows($rslt); while ($menus_to_print > $j) { $row=mysqli_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 * 100) + 550); $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 = ""; if (preg_match("/1$|3$|5$|7$|9$/i", $j)) {$bgcolor='bgcolor="#CCFFFF"';} else {$bgcolor='bgcolor="#99FFCC"';} echo "\n"; $j++; } while ($j <= 20) { $choose_height = (($j * 100) + 550); $dtmf_list = ""; if (preg_match("/1$|3$|5$|7$|9$/i", $j)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; $j++; } if ( ($SSallow_custom_dialplan > 0) and ($LOGmodify_custom_dialplans > 0) ) { echo "\n"; } else { echo "\n"; } if ($SScall_menu_qualify_enabled > 0) { echo "\n"; } else {echo "\n";} echo "\n"; echo "
"._QXZ("Menu ID").": $menu_id $NWB#call_menu-menu_id$NWE
"._QXZ("Menu Name").": $NWB#call_menu-menu_name$NWE
"._QXZ("Admin User Group").": $NWB#call_menu-user_group$NWE
"._QXZ("Menu Prompt").": "._QXZ("audio chooser")." $NWB#call_menu-menu_prompt$NWE
"._QXZ("Menu Timeout").": $NWB#call_menu-menu_timeout$NWE
"._QXZ("Menu Timeout Prompt").": "._QXZ("audio chooser")." $NWB#call_menu-menu_timeout_prompt$NWE
"._QXZ("Menu Invalid Prompt").": "._QXZ("audio chooser")." $NWB#call_menu-menu_invalid_prompt$NWE
"._QXZ("Menu Repeat").": $NWB#call_menu-menu_repeat$NWE
"._QXZ("Menu Time Check").": $NWB#call_menu-menu_time_check$NWE
"._QXZ("Call Time").": $NWB#call_menu-call_time_id$NWE "; $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $call_times_to_print = mysqli_num_rows($rslt); if ($call_times_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ct_holidays = $rowx[0]; $holiday_rules = explode('|',$ct_holidays); $ct_hrs = ((count($holiday_rules)) - 2); if ($ct_hrs < 0) {$ct_hrs=0;} echo "   "._QXZ("Holidays defined for this call time").": $ct_hrs\n"; } else {echo ""._QXZ("Call time not found")."!\n";} echo "
"._QXZ("Track Calls in Real-Time Report").": $NWB#call_menu-track_in_vdac$NWE
"._QXZ("Tracking Group").": $NWB#call_menu-tracking_group$NWE
"._QXZ("Log Key Press").": $NWB#call_menu-dtmf_log$NWE     "._QXZ("Log Field").": \n"; echo "$NWB#call_menu-dtmf_field$NWE
"._QXZ("Alt DTMF Log").": $NWB#call_menu-alt_dtmf_log$NWE     "._QXZ("Question").": \n"; echo "$NWB#call_menu-question$NWE
"._QXZ("Beginning Answer Signal").": $NWB#call_menu-answer_signal$NWE
"._QXZ("Call Menu Options").":
"._QXZ("Option").": $dtmf_list   "._QXZ("Description").": "._QXZ("Route").": $NWB#call_menu-option_value$NWE "; if ($j > 0) {echo "copy ^ ";} else {echo "           ";} echo "
\n"; if ($option_route=='CALLMENU') { echo ""; echo ""._QXZ("Call Menu").":"; echo ""; echo " \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]; $IGvid_enter_filename = $IGoption_route_value_context[5]; $IGvid_id_number_filename = $IGoption_route_value_context[6]; $IGvid_confirm_filename = $IGoption_route_value_context[7]; $IGvid_validate_digits = $IGoption_route_value_context[8]; $IGvid_container = $IGoption_route_value_context[9]; echo ""; echo ""._QXZ("In-Group").":"; echo ""; echo " "; echo " "; echo "   "._QXZ("Handle Method").": $NWB#call_menu-ingroup_settings$NWE\n"; echo "
"._QXZ("Search Method").": \n"; echo "   "._QXZ("List ID").": "; echo "
"._QXZ("Campaign ID").": \n"; echo "   "._QXZ("Phone Code").": "; echo "
  "._QXZ("VID Enter Filename").": "._QXZ("audio chooser").""; echo "
  "._QXZ("VID ID Number Filename").": "._QXZ("audio chooser").""; echo "
  "._QXZ("VID Confirm Filename").": "._QXZ("audio chooser").""; echo "   "._QXZ("VID Digits").": "; echo "
  "._QXZ("VID Container").": $NWB#call_menu-ingroup_vid_container$NWE "._QXZ("container chooser").""; } if ($option_route=='DID') { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$option_route_value' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $did_id = $row[0]; echo ""; echo ""._QXZ("DID").":"; echo ""; echo " \n"; } if ($option_route=='HANGUP') { echo _QXZ("Audio File").": "._QXZ("audio chooser")."\n"; } if ($option_route=='EXTENSION') { echo _QXZ("Extension").":   "._QXZ("Context").": \n"; } if ($option_route=='PHONE') { echo _QXZ("Phone").": \n"; } if ( ($option_route=='VOICEMAIL') or ($option_route=='VMAIL_NO_INST') ) { echo _QXZ("Voicemail Box").": "._QXZ("voicemail chooser")."\n"; } if ($option_route=='AGI') { echo _QXZ("AGI").": \n"; } echo "

 
"._QXZ("Option").": $dtmf_list   "._QXZ("Description").": "._QXZ("Route").": $NWB#call_menu-option_value$NWE "; if ($j > 0) {echo "copy ^ ";} else {echo "           ";} echo "
\n"; echo "
 
"._QXZ("Custom Dialplan Entry").":
$NWB#call_menu-custom_dialplan_entry$NWE
"._QXZ("Custom Dialplan Entry").": "._QXZ("Disabled")." $NWB#call_menu-custom_dialplan_entry$NWE
"._QXZ("Qualify SQL").":
$NWB#call_menu-qualify_sql$NWE
\n"; echo "

\n"; echo ""._QXZ("DIDS USING THIS CALL MENU").":
\n"; echo "\n"; $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where menu_id='$menu_id' and did_route='CALLMENU' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); $o=0; while ($dids_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[1] $row[2]

\n"; echo ""._QXZ("CALL MENUS USING THIS CALL MENU").":
\n"; echo "\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_to_mysqli($stmt, $link); $cms_to_print = mysqli_num_rows($rslt); $o=0; while ($cms_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CAMPAIGNS USING THIS CALL MENU").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where (safe_harbor_menu_id='$menu_id' or survey_menu_id='$menu_id' or amd_callmenu='$menu_id' or ((agent_hangup_route='CALLMENU' and agent_hangup_value='$menu_id') ) ) $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("IN-GROUPS USING THIS CALL MENU").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where (hold_time_option_callmenu='$menu_id' or wait_time_option_callmenu='$menu_id' or drop_callmenu='$menu_id' or after_hours_callmenu='$menu_id') $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ingrps_to_print = mysqli_num_rows($rslt); $o=0; while ($ingrps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; if ($LOGdelete_dids > 0) { echo "

"._QXZ("DELETE THIS CALL MENU")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this CALL MENU")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=31111 modify remote agents info in the system ###################### if ($ADD==31111) { if ( ($LOGmodify_remoteagents==1) and ($x_ra_carrier < 1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31111&remote_agent_id=$remote_agent_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns,extension_group,on_hook_agent,on_hook_ring_time from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $extension_group = $row[8]; $on_hook_agent = $row[9]; $on_hook_ring_time =$row[10]; ##### get user_group of start_user $stmt="SELECT user_group from vicidial_users where user='$user_start' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $vu_to_print = mysqli_num_rows($rsltx); if ($vu_to_print > 0) { $rowx=mysqli_fetch_row($rsltx); $user_group = $rowx[0]; ##### get extension group listing for dynamic pulldown $stmt="SELECT extension_group_id,count(*) from vicidial_extension_groups group by extension_group_id order by extension_group_id;"; $rsltx=mysql_to_mysqli($stmt, $link); $extengrp_to_print = mysqli_num_rows($rsltx); $extengrp_list=''; $o=0; while ($extengrp_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $extengrp_list .= "\n"; $o++; } echo "
"._QXZ("MODIFY A REMOTE AGENTS ENTRY").": $row[0]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("User ID Start").": ("._QXZ("numbers only, incremented, must be an existing vicidial user").")$NWB#remote_agents-user_start$NWE
"._QXZ("Number of Lines").": ("._QXZ("numbers only").")$NWB#remote_agents-number_of_lines$NWE
"._QXZ("Server IP").": $NWB#remote_agents-server_ip$NWE
"._QXZ("External Extension").": ("._QXZ("dial plan number dialed to reach agents").")$NWB#remote_agents-conf_exten$NWE
"._QXZ("Extension Group").": $NWB#remote_agents-extension_group$NWE
"._QXZ("Status").": $NWB#remote_agents-status$NWE
"._QXZ("Campaign").": $NWB#remote_agents-campaign_id$NWE
"._QXZ("On-Hook Agent").": $NWB#remote_agents-on_hook_agent$NWE
"._QXZ("On-Hook Ring Time").": $NWB#remote_agents-on_hook_ring_time$NWE
\n"; $temp_chart_title = _QXZ("8 Day call count for this remote-agent"); horizontal_bar_chart($user_start,'8','remote-agent',$link,'ra_total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Inbound Groups").":
$NWB#remote_agents-closer_campaigns$NWE
\n"; echo "$groups_list"; echo "
\n"; echo _QXZ("NOTE: It can take up to 30 seconds for changes submitted on this screen to go live")."\n"; ##### get count of did ra extens $stmt="SELECT count(*) from vicidial_did_ra_extensions where user_start='$user_start';"; $rsltx=mysql_to_mysqli($stmt, $link); $didraext_to_print = mysqli_num_rows($rsltx); $didraext_count='0'; if ($didraext_to_print > 0) { $rowx=mysqli_fetch_row($rsltx); $didraext_count = $rowx[0]; } if ($SSdid_ra_extensions_enabled > 0) { echo "

"._QXZ("THERE ARE")." $didraext_count "._QXZ("DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS REMOTE AGENT")."\n"; } if ($LOGdelete_remote_agents > 0) { echo "

"._QXZ("DELETE THIS REMOTE AGENT")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this remote agent")."
\n"; } } else { echo ""._QXZ("User Start for this remote agent does not exist as a User").": $user_start
\n"; echo "
"._QXZ("MODIFY AN ORPHAN REMOTE AGENTS ENTRY").": $row[0]\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("User ID Start").": ("._QXZ("numbers only, incremented, must be an existing vicidial user").")$NWB#remote_agents-user_start$NWE
"._QXZ("Number of Lines").": ("._QXZ("numbers only").")$NWB#remote_agents-number_of_lines$NWE
"._QXZ("Server IP").": $NWB#remote_agents-server_ip$NWE
"._QXZ("External Extension").": ("._QXZ("dial plan number dialed to reach agents").")$NWB#remote_agents-conf_exten$NWE
"._QXZ("Extension Group").": $NWB#remote_agents-extension_group$NWE
"._QXZ("Status").": $NWB#remote_agents-status$NWE
"._QXZ("Campaign").": $NWB#remote_agents-campaign_id$NWE
"._QXZ("On-Hook Agent").": $NWB#remote_agents-on_hook_agent$NWE
"._QXZ("On-Hook Ring Time").": $NWB#remote_agents-on_hook_ring_time$NWE
\n"; $temp_chart_title = _QXZ("8 Day call count for this remote-agent"); horizontal_bar_chart($user_start,'8','remote-agent',$link,'ra_total_calls','call count',1,'','',$temp_chart_title); echo "
"._QXZ("Inbound Groups").": \n"; echo "$NWB#remote_agents-closer_campaigns$NWE
\n"; echo _QXZ("NOTE: It can take up to 30 seconds for changes submitted on this screen to go live")."\n"; exit; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3711 modify filter phone group info in the system ###################### if ($ADD==3711) { if ($LOGmodify_dids==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3711&filter_phone_group_id=$filter_phone_group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,user_group from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $filter_phone_group_id = $row[0]; $filter_phone_group_name = $row[1]; $filter_phone_group_description = $row[2]; $user_group = $row[3]; echo "
"._QXZ("Modify Filter Phone Group").": $filter_phone_group_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Filter Phone Group ID").": $filter_phone_group_id $NWB#filter_phone_groups-filter_phone_group_id$NWE
"._QXZ("Filter Phone Group Name").": $NWB#filter_phone_groups-filter_phone_group_name$NWE
"._QXZ("Filter Phone Group Description").": $NWB#filter_phone_groups-filter_phone_group_description$NWE
"._QXZ("Admin User Group").": $NWB#filter_phone_groups-user_group$NWE
\n"; $stmt="SELECT count(*) from vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); echo "

"._QXZ("Numbers in this Filter Phone Group").": $row[0]"; if ($LOGdelete_dids > 0) { echo "

"._QXZ("DELETE THIS FILTER PHONE GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Download List/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to download the numbers in this filter phone group")."
\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this filter phone group")."\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=32111 modify extension group entry in the system ###################### if ($ADD==32111) { if ($LOGmodify_remoteagents==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=32111&extension_id=$extension_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT extension_id,extension_group_id,extension,rank,campaign_groups,call_count_today,last_call_time,last_callerid from vicidial_extension_groups where extension_id='$extension_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $extension_id = $row[0]; $extension_group_id = $row[1]; $extension = $row[2]; $rank = $row[3]; $campaign_groups = $row[4]; $call_count_today = $row[5]; $last_call_time = $row[6]; $last_callerid = $row[7]; echo "
"._QXZ("MODIFY AN EXTENSION GROUP ENTRY").": $row[0]\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Extension Group").": ("._QXZ("no spaces").")$NWB#extension_groups-extension_group_id$NWE
"._QXZ("Extension").": ("._QXZ("numbers only").")$NWB#extension_groups-extension$NWE
"._QXZ("Rank").": $NWB#extension_groups-rank$NWE
"._QXZ("Campaigns Groups").": ("._QXZ("pipe-delimited list").")$NWB#extension_groups-campaign_groups$NWE
"._QXZ("Call Count Today").": $call_count_today
"._QXZ("Last Call Time").": $last_call_time
"._QXZ("Last Call ID").": $last_callerid
\n"; if ($LOGdelete_remote_agents > 0) { echo "

"._QXZ("DELETE THIS EXTENSION GROUP ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this extension group entry")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=311111 modify user group info in the system ###################### if ($ADD==311111) { if ($LOGmodify_usergroups==1) { if ( ($LOGmodify_same_user_level < 1) and ($user_group=="$LOGuser_group") ) { echo _QXZ("You are not allowed to edit your own user group")."\n"; exit; } else { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311111&user_group=$user_group"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,agent_call_log_view,agent_xfer_consultative,agent_xfer_dial_override,agent_xfer_vm_transfer,agent_xfer_blind_transfer,agent_xfer_dial_with_customer,agent_xfer_park_customer_dial,agent_fullscreen,allowed_reports,webphone_url_override,webphone_systemkey_override,webphone_dialpad_override,admin_viewable_groups,admin_viewable_call_times,agent_allowed_chat_groups,agent_xfer_park_3way,admin_ip_list,agent_ip_list,api_ip_list,webphone_layout,reports_header_override,admin_home_url,script_id from vicidial_user_groups where user_group='$user_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $agent_call_log_view = $row[10]; $agent_xfer_consultative = $row[11]; $agent_xfer_dial_override = $row[12]; $agent_xfer_vm_transfer = $row[13]; $agent_xfer_blind_transfer = $row[14]; $agent_xfer_dial_with_customer = $row[15]; $agent_xfer_park_customer_dial = $row[16]; $agent_fullscreen = $row[17]; $allowed_reports = $row[18]; $webphone_url_override = $row[19]; $webphone_systemkey_override = $row[20]; $webphone_dialpad_override = $row[21]; $admin_viewable_groups = $row[22]; $admin_viewable_call_times = $row[23]; $VGROUP_chatgroups = $row[24]; $agent_xfer_park_3way = $row[25]; $admin_ip_list = $row[26]; $agent_ip_list = $row[27]; $api_ip_list = $row[28]; $webphone_layout = $row[29]; $reports_header_override = $row[30]; $admin_home_url = $row[31]; $script_id = $row[32]; echo ""; echo "
"._QXZ("MODIFY A USERS GROUP ENTRY")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get scripts listing for dynamic pulldown $stmt="SELECT script_id,script_name from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); if ($DB) {echo "$scripts_to_print|$stmt|\n";} $UGscripts_list="\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSagent_xfer_park_3way > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; $custom_stmt="show tables like 'vicidial_custom_reports'"; $custom_rslt=mysql_to_mysqli($custom_stmt, $link); if (mysqli_num_rows($custom_rslt)>0) { $custom_rpt_stmt="SELECT custom_report_id, report_name from vicidial_custom_reports order by report_name asc"; $custom_rpt_rslt=mysql_to_mysqli($custom_rpt_stmt, $link); $allowed_rpt_stmt="SELECT allowed_custom_reports from vicidial_user_groups where user_group='$user_group'"; $allowed_rpt_rslt=mysql_to_mysqli($allowed_rpt_stmt, $link); if (mysqli_num_rows($custom_rpt_rslt)>0) { $allowed_rpt_row=mysqli_fetch_row($allowed_rpt_rslt); $allowed_custom_reports=$allowed_rpt_row[0]; $allowed_reports_array=explode("|", $allowed_custom_reports); echo "\n"; } echo "\n"; echo "\n"; echo "\n"; if (strlen($SSwebphone_url) > 5) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo " "; echo " "; echo " "; echo " "; } if ($SSqc_features_active > 0) { echo "\n"; echo "\n"; } if ($SSallow_ip_lists > 0) { ##### get ip lists listing for dynamic pulldowns $stmt="SELECT ip_list_id,ip_list_name from vicidial_ip_lists where active='Y' order by ip_list_id;"; $rsltx=mysql_to_mysqli($stmt, $link); $iplists_to_print = mysqli_num_rows($rsltx); $ip_list=''; $o=0; while ($iplists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $ip_list .= "\n"; $o++; } if (strlen($admin_ip_list) < 1) { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; } else { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; $ip_list_menu .= "\n"; } echo "\n"; if (strlen($agent_ip_list) < 1) { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; } else { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; $ip_list_menu .= "\n"; } echo "\n"; if (strlen($api_ip_list) < 1) { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; } else { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; $ip_list_menu .= "\n"; } echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group").": $user_group $NWB#user_groups-user_group$NWE
"._QXZ("Description").": ("._QXZ("description of group").")$NWB#user_groups-group_name$NWE
"._QXZ("Force Timeclock Login").": $NWB#user_groups-forced_timeclock_login$NWE
"._QXZ("Shift Enforcement").": $NWB#user_groups-shift_enforcement$NWE
"._QXZ("Allowed Campaigns").":
$NWB#user_groups-allowed_campaigns$NWE
\n"; echo "$campaigns_list
 "; echo "
"._QXZ("Group Shifts").":
$NWB#user_groups-group_shifts$NWE
\n"; $stmt="SELECT shift_id,shift_name from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; if ($DB > 0) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); $o=0; while ($shifts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $shift_id_value = $rowx[0]; $shift_name_value = $rowx[1]; echo " $shift_id_value - $shift_name_value
\n"; $o++; } echo "
 
"._QXZ("Agent Status Viewable Groups").":
$NWB#user_groups-agent_status_viewable_groups$NWE
\n"; if ($admin_viewable_groupsALL > 0) { echo ""._QXZ("ALL-GROUPS")." - "._QXZ("All user groups in the system")."
\n"; } echo ""._QXZ("CAMPAIGN-AGENTS")." - "._QXZ("All users logged into the same campaign as the agent")."
\n"; if ($admin_viewable_groupsALL > 0) { echo ""._QXZ("NOT-LOGGED-IN-AGENTS")." - "._QXZ("All users in the system, even not logged-in users")."
\n"; } $stmt="SELECT user_group,group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); $view_groups_to_print = mysqli_num_rows($rslt); $o=0; while ($view_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $vgroups_id_value = $rowx[0]; $vgroups_name_value = $rowx[1]; echo " $vgroups_id_value - $vgroups_name_value
\n"; $o++; } echo "
 
"._QXZ("Agent Status View Time").": $NWB#user_groups-agent_status_view_time$NWE
"._QXZ("Agent Call Log View").": $NWB#user_groups-agent_call_log_view$NWE
"._QXZ("Agent Fullscreen").": $NWB#user_groups-agent_fullscreen$NWE
"._QXZ("Script Override").": $NWB#user_groups-script_id$NWE
"._QXZ("Agent Allow Consultative Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Dial Override Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Voicemail Message Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Blind Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Dial With Customer Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Park Customer Dial Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allow Park Xfer").": $NWB#user_groups-agent_xfer_options$NWE
"._QXZ("Agent Allowed Chat Groups").":
$NWB#user_groups-agent_allowed_chat_groups$NWE
\n"; if ($admin_viewable_groupsALL > 0) { echo ""._QXZ("ALL-GROUPS")." - "._QXZ("All user groups in the system")."
\n"; } echo ""._QXZ("CAMPAIGN-AGENTS")." - "._QXZ("All users logged into the same campaign as the agent")."
\n"; $stmt="SELECT user_group,group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); $view_chatgroups_to_print = mysqli_num_rows($rslt); $o=0; while ($view_chatgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $chatgroups_id_value = $rowx[0]; $chatgroups_name_value = $rowx[1]; echo " $chatgroups_id_value - $chatgroups_name_value
\n"; $o++; } echo "
 
"._QXZ("Allowed Reports").": $NWB#user_groups-allowed_reports$NWE
"._QXZ("Allowed Custom Reports").": $NWB#user_groups-allowed_custom_reports$NWE
"._QXZ("Allowed Queue Groups").":
$NWB#user_groups-allowed_queue_groups$NWE
\n"; echo "$queue_groups_list"; echo "
 
"._QXZ("Reports Header Override").": $NWB#user_groups-reports_header_override$NWE
"._QXZ("Home URL Override").": $NWB#user_groups-admin_home_url$NWE
"._QXZ("Webphone URL Override").": $NWB#user_groups-webphone_url_override$NWE
"._QXZ("Webphone System Key Override").": $NWB#user_groups-webphone_systemkey_override$NWE
"._QXZ("Webphone Dialpad Override").": $NWB#user_groups-webphone_dialpad_override$NWE
"._QXZ("Webphone Layout Override").": $NWB#user_groups-webphone_layout$NWE
"._QXZ("QC Allowed Campaigns").":
$NWB#user_groups-qc_allowed_campaigns$NWE
\n"; echo "$qc_campaigns_list"; echo "
 
"._QXZ("QC Allowed Inbound Groups").":
$NWB#user_groups-qc_allowed_inbound_groups$NWE
\n"; echo "$qc_groups_list"; echo "
 
$ip_list_link_BEGIN"._QXZ("Admin IP Whitelist")."$ip_list_link_END: $NWB#user_groups-admin_ip_list$NWE
$ip_list_link_BEGIN"._QXZ("Agent IP Whitelist")."$ip_list_link_END: $NWB#user_groups-agent_ip_list$NWE
$ip_list_link_BEGIN"._QXZ("API IP Whitelist")."$ip_list_link_END: $NWB#user_groups-api_ip_list$NWE
"._QXZ("Allowed User Groups").":
$NWB#user_groups-admin_viewable_groups$NWE
\n"; if ($admin_viewable_groupsALL > 0) { echo ""._QXZ("ALL-GROUPS")." - "._QXZ("All user groups in the system")."
\n"; } $stmt="SELECT user_group,group_name from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); $view_groups_to_print = mysqli_num_rows($rslt); $o=0; while ($view_groups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $vgroups_id_value = $rowx[0]; $vgroups_name_value = $rowx[1]; echo " $vgroups_id_value - $vgroups_name_value
\n"; $o++; } echo "
 
"._QXZ("Allowed Call Times").":
$NWB#user_groups-admin_viewable_call_times$NWE
\n"; echo ""._QXZ("ALL-CALLTIMES")." - "._QXZ("All call times in the system")."
\n"; $stmt="SELECT call_time_id,call_time_name from vicidial_call_times $whereLOGadmin_viewable_call_timesSQL order by call_time_id;"; $rslt=mysql_to_mysqli($stmt, $link); $view_calltimes_to_print = mysqli_num_rows($rslt); $o=0; while ($view_calltimes_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $vcalltimes_id_value = $rowx[0]; $vcalltimes_name_value = $rowx[1]; echo " $vcalltimes_id_value - $vcalltimes_name_value
\n"; $o++; } echo "
 
\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' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); echo "
\n"; echo "
"._QXZ("USERS WITHIN THIS USER GROUP").": $users_to_print
\n"; echo "\n"; echo "\n"; $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } if ($o < 1) {echo "\n";} echo "
"._QXZ("USER").""._QXZ("FULL NAME").""._QXZ("LEVEL").""._QXZ("ACTIVE")."
$rowx[0]$rowx[1]$rowx[2]"._QXZ("$rowx[3]")."
--"._QXZ("NONE")."--

\n"; ##### BEGIN add/remove in-group as selected for all active users in this group ##### echo "
\n"; echo "
"._QXZ("Add or Remove In-Group Selected For Active Users in This User Group")."
\n"; echo "\n"; echo "\n"; echo "\n"; ### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $Xgroups_to_print = mysqli_num_rows($rslt); $Xgroups_menu=''; $o=0; while ($Xgroups_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xgroups_menu .= "\n"; $o++; } echo "   \n"; echo _QXZ("In-Group").":
\n"; echo "
\n"; ##### END add/remove in-group as selected for all active users in this group ##### ### list of users with this user group set as secondary user group $active_confs = 0; $stmt="SELECT user,full_name,user_level,active,user_group from vicidial_users where user_group_two='$user_group' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rsltx); echo "

\n"; echo "
"._QXZ("USERS WITHIN THIS SECONDARY USER GROUP").": $users_to_print
\n"; echo "\n"; echo "\n"; $o=0; while ($users_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } if ($o < 1) {echo "\n";} echo "
"._QXZ("USER").""._QXZ("FULL NAME").""._QXZ("LEVEL").""._QXZ("ACTIVE").""._QXZ("USER GROUP")."
$rowx[0]$rowx[1]$rowx[2]"._QXZ("$rowx[3]")."$rowx[4]
--"._QXZ("NONE")."--

\n"; echo "

"._QXZ("Click here to see all CallBack Holds in this user group")."

\n"; echo "

"._QXZ("Click here to see the Timeclock Status for this user group")."

\n"; if ($LOGdelete_user_groups > 0) { echo "

"._QXZ("DELETE THIS USER GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this user group")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3111111 modify script info in the system ###################### if ($ADD==3111111) { if ($LOGmodify_scripts==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3111111&script_id=$script_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT script_id,script_name,script_comments,script_text,active,user_group,script_color from vicidial_scripts where script_id='$script_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $script_name = $row[1]; $script_comments = $row[2]; $script_text = stripslashes($row[3]); $active = $row[4]; $user_group = $row[5]; $script_color = $row[6]; echo ""; echo "
"._QXZ("MODIFY A SCRIPT")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Script ID").": $script_id$NWB#scripts-script_name$NWE
"._QXZ("Script Name").": ("._QXZ("title of the script").")$NWB#scripts-script_name$NWE
"._QXZ("Script Comments").": $NWB#scripts-script_comments$NWE
"._QXZ("Admin User Group").": $NWB#scripts-user_group$NWE
"._QXZ("Active").": $NWB#scripts-active$NWE
"._QXZ("Script Color")." ("._QXZ("color chooser")."): $NWB#scripts-script_color$NWE
"._QXZ("Script Text").":

"._QXZ("Preview Script")."
"; # BEGIN Insert Field echo ""; echo "
"; # END Insert Field echo " $NWB#scripts-script_text$NWE
\n"; echo "


\n"; echo " "._QXZ("CAMPAIGNS USING THIS SCRIPT").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where ( (campaign_script='$script_id') or (campaign_script_two='$script_id') ) $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; echo " "._QXZ("IN-GROUPS USING THIS SCRIPT").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where ( (ingroup_script='$script_id') or (ingroup_script_two='$script_id') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; echo " "._QXZ("LIST OVERRIDES USING THIS SCRIPT").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where agent_script_override='$script_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; echo " "._QXZ("USER GROUP OVERRIDES USING THIS SCRIPT").":
\n"; echo "\n"; $stmt="SELECT user_group,group_name from vicidial_user_groups where script_id='$script_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } if ( ($SSagent_soundboards > 0) and (preg_match("/vdc_soundboard_display/",$script_text)) ) { $sb_check = preg_replace('~[\r\n]+~', '', $script_text); $sb_lines = explode("vdc_soundboard_display",$sb_check); $sb_content = explode('"',$sb_lines[1]); $sb_id = explode('soundboard_id=',$sb_content[0]); if ($DB) {echo "|$sb_check|\n|$sb_lines[1]|\n|$sb_content[0]|\n|$sb_id[1]|\n";} echo "
$row[0] $row[1]


\n"; echo " "._QXZ("AGENT SOUNDBOARD USED WITHIN THIS SCRIPT").":
\n"; echo "\n"; $stmt="SELECT avatar_id,avatar_name from vicidial_avatars where avatar_id='$sb_id[1]' $LOGadmin_viewable_groupsSQL;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $sb_to_print = mysqli_num_rows($rslt); $o=0; while ($sb_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } } echo "
$row[0] $row[1]


\n"; if ($LOGdelete_scripts > 0) { echo "

"._QXZ("DELETE THIS SCRIPT")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this script")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=31111111 modify filter info in the system ###################### if ($ADD==31111111) { if ($LOGmodify_filters==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31111111&lead_filter_id=$lead_filter_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_comments,lead_filter_sql,user_group from vicidial_lead_filters where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $lead_filter_name = $row[1]; $lead_filter_comments = $row[2]; $lead_filter_sql = stripslashes($row[3]); $user_group = $row[4]; echo ""; echo "
"._QXZ("MODIFY A FILTER")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Filter ID").": $lead_filter_id$NWB#lead_filters-lead_filter_id$NWE
"._QXZ("Filter Name").": ("._QXZ("short description of the filter").")$NWB#lead_filters-lead_filter_name$NWE
"._QXZ("Filter Comments").": $NWB#lead_filters-lead_filter_comments$NWE
"._QXZ("Admin User Group").": $NWB#lead_filters-user_group$NWE
"._QXZ("Filter SQL").": $NWB#lead_filters-lead_filter_sql$NWE
\n"; ##### get campaigns listing for dynamic pulldown $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); $campaigns_list=''; $o=0; while ($campaigns_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $campaigns_list .= "\n"; $o++; } echo "

"; echo "
"._QXZ("TEST ON CAMPAIGN").":
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

"._QXZ("CAMPAIGNS USING THIS FILTER").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where lead_filter_id='$lead_filter_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $o=0; while ($campin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; echo "
"._QXZ("USERS USING THIS FILTER").":
\n"; echo "\n"; $stmt="SELECT user,full_name from vicidial_users where lead_filter_id='$lead_filter_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $userin_to_print = mysqli_num_rows($rslt); $o=0; while ($userin_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; if ($LOGdelete_filters > 0) { echo "

"._QXZ("DELETE THIS FILTER")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this filter")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=321111111 modify call time definition info in the system, ADD/REMOVE ###################### if ($ADD==321111111) { if ($LOGmodify_call_times==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311111111&call_time_id=$call_time_id"; $modify_footer_refresh=1; } ### add-remove state rule 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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_state_call_times = $row[0]; if (preg_match('/\|$/i',$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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 ADD STATE RULE', event_sql=\"$SQL_log\", event_notes='State Rule Added: $state_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("State Rule Added").": $state_rule
\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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_state_call_times = $row[0]; $ct_state_call_times = preg_replace("/\|$state_rule\|/i", '|',$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_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 REMOVE STATE RULE', event_sql=\"$SQL_log\", event_notes='State Rule Removed: $state_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("State Rule Removed").": $state_rule
\n"; } ### add-remove holiday rule if ( ($stage=="ADD") and (strlen($holiday_rule)>0) ) { $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_holidays = $row[0]; if (preg_match('/\|$/i',$ct_holidays)) {$ct_holidays = "$ct_holidays$holiday_rule\|";} else {$ct_holidays = "$ct_holidays\|$holiday_rule\|";} $stmt="UPDATE vicidial_call_times set ct_holidays='$ct_holidays' where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 ADD HOLIDAY RULE', event_sql=\"$SQL_log\", event_notes='Holiday Rule Added: $holiday_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Holiday Rule Added").": $holiday_rule
\n"; } if ( ($stage=="REMOVE") and (strlen($holiday_rule)>0) ) { $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_holidays = $row[0]; $ct_holidays = preg_replace("/\|$holiday_rule\|/i", '|',$ct_holidays); $stmt="UPDATE vicidial_call_times set ct_holidays='$ct_holidays' where call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 REMOVE HOLIDAY RULE', event_sql=\"$SQL_log\", event_notes='Holiday Rule Removed: $holiday_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Holiday Rule Removed").": $holiday_rule
\n"; } $ADD=311111111; } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=322111111 modify state call time definition info in the system, ADD/REMOVE ###################### if ($ADD==322111111) { if ($LOGmodify_call_times==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3111111111&call_time_id=$call_time_id"; $modify_footer_refresh=1; } ### add-remove holiday rule if ( ($stage=="ADD") and (strlen($holiday_rule)>0) ) { $stmt="SELECT ct_holidays from vicidial_state_call_times where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_holidays = $row[0]; if (preg_match('/\|$/i',$ct_holidays)) {$ct_holidays = "$ct_holidays$holiday_rule\|";} else {$ct_holidays = "$ct_holidays\|$holiday_rule\|";} $stmt="UPDATE vicidial_state_call_times set ct_holidays='$ct_holidays' where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 ADD HOLIDAY RULE', event_sql=\"$SQL_log\", event_notes='Holiday Rule Added: $holiday_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Holiday Rule Added").": $holiday_rule
\n"; } if ( ($stage=="REMOVE") and (strlen($holiday_rule)>0) ) { $stmt="SELECT ct_holidays from vicidial_state_call_times where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ct_holidays = $row[0]; $ct_holidays = preg_replace("/\|$holiday_rule\|/i",'|',$ct_holidays); $stmt="UPDATE vicidial_state_call_times set ct_holidays='$ct_holidays' where state_call_time_id='$call_time_id';"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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 REMOVE HOLIDAY RULE', event_sql=\"$SQL_log\", event_notes='Holiday Rule Removed: $holiday_rule';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Holiday Rule Removed").": $holiday_rule
\n"; } $ADD=3111111111; } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=311111111 modify call time definition info in the system ###################### if ($ADD==311111111) { if ($LOGmodify_call_times==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311111111&call_time_id=$call_time_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,default_afterhours_filename_override,sunday_afterhours_filename_override,monday_afterhours_filename_override,tuesday_afterhours_filename_override,wednesday_afterhours_filename_override,thursday_afterhours_filename_override,friday_afterhours_filename_override,saturday_afterhours_filename_override,user_group,ct_holidays from vicidial_call_times where call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $default_afterhours_filename_override = $row[20]; $sunday_afterhours_filename_override = $row[21]; $monday_afterhours_filename_override = $row[22]; $tuesday_afterhours_filename_override = $row[23]; $wednesday_afterhours_filename_override = $row[24]; $thursday_afterhours_filename_override = $row[25]; $friday_afterhours_filename_override = $row[26]; $saturday_afterhours_filename_override = $row[27]; $user_group = $row[28]; $ct_holidays = $row[29]; } else { $ct_state_call_times=""; $ct_holidays=""; } echo ""; echo "
"._QXZ("MODIFY A CALL TIME")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $ct_srs=1; $b=0; $srs_SQL =''; $srs_state_SQL=''; if (strlen($ct_state_call_times)>2) { $state_rules = explode('|',$ct_state_call_times); $ct_srs = ((count($state_rules)) - 1); } echo "\n"; echo "\n"; while($ct_srs >= $b) { if (isset($state_rules[$b]) && 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_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); echo "\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) $LOGadmin_viewable_groupsSQL"; } else {$srs_SQL="$whereLOGadmin_viewable_groupsSQL";} $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_to_mysqli($stmt, $link); $sct_to_print = mysqli_num_rows($rslt); $sct_list=''; $o=0; while ($sct_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $sct_list .= "\n"; $o++; } echo "\n"; echo "\n"; $ct_hrs=1; $b=0; $hrs_SQL =''; $hrs_holiday_SQL=''; if (strlen($ct_holidays)>2) { $holiday_rules = explode('|',$ct_holidays); $ct_hrs = ((count($holiday_rules)) - 1); } echo "\n"; echo "\n"; while($ct_hrs >= $b) { if (isset($holiday_rules[$b]) && strlen($holiday_rules[$b])>0) { $stmt="SELECT holiday_date,holiday_name from vicidial_call_time_holidays where holiday_id='$holiday_rules[$b]';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); echo "\n"; $hrs_SQL .= "'$holiday_rules[$b]',"; $hrs_holiday_SQL .= "'$row[0]',"; } $b++; } if (strlen($hrs_SQL)>2) { $hrs_SQL = "$hrs_SQL''"; $hrs_holiday_SQL = "$hrs_holiday_SQL''"; # $hrs_SQL = "where holiday_id NOT IN($hrs_SQL) and holiday_date NOT IN($hrs_holiday_SQL) $LOGadmin_viewable_groupsSQL"; $hrs_SQL = "where holiday_id NOT IN($hrs_SQL) $LOGadmin_viewable_groupsSQL"; } else {$hrs_SQL="$whereLOGadmin_viewable_groupsSQL";} $stmt="SELECT holiday_id,holiday_date from vicidial_call_time_holidays $hrs_SQL order by holiday_date;"; $rslt=mysql_to_mysqli($stmt, $link); $hct_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "|$hct_to_print|$stmt|";} $hct_list=''; $o=0; while ($hct_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $hct_list .= "\n"; $o++; } echo "\n"; echo "\n"; echo "
"._QXZ("Call Time ID").": $call_time_id$NWB#call_times-call_time_id$NWE
"._QXZ("Call Time Name").": ("._QXZ("short description of the call time").")$NWB#call_times-call_time_name$NWE
"._QXZ("Call Time Comments").": $NWB#call_times-call_time_comments$NWE
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Default Start").": "._QXZ("Default Stop").": $NWB#call_times-ct_default_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Sunday Start").": "._QXZ("Sunday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Monday Start").": "._QXZ("Monday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Tuesday Start").": "._QXZ("Tuesday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Wednesday Start").": "._QXZ("Wednesday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Thursday Start").": "._QXZ("Thursday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Friday Start").": "._QXZ("Friday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Saturday Start").": "._QXZ("Saturday Stop").": $NWB#call_times-ct_sunday_start$NWE       "._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Active State Call Time Definitions for this Record").":  
$state_rules[$b] - "._QXZ("REMOVE")." $row[0] - $row[1]
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Add state call time rule").":
"._QXZ("Active Holiday Definitions for this Record").":  
$holiday_rules[$b] - "._QXZ("REMOVE")."$row[0] - $row[1]
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Add holiday rule").":


\n"; echo ""._QXZ("CAMPAIGNS USING THIS CALL TIME").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("INBOUND GROUPS USING THIS CALL TIME").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("CALL MENUS USING THIS CALL TIME").":
\n"; echo "\n"; $stmt="SELECT menu_id,menu_name from vicidial_call_menu where call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $menus_to_print = mysqli_num_rows($rslt); $o=0; while ($menus_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("LISTS SET TO THIS CALL TIME").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where local_call_time='$call_time_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; echo "


\n"; if ($LOGdelete_call_times > 0) { echo "

"._QXZ("DELETE THIS CALL TIME DEFINITION")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this call time")."
\n"; } } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=3111111111 modify state call time definition info in the system ###################### if ($ADD==3111111111) { if ($LOGmodify_call_times==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3111111111&call_time_id=$call_time_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,user_group,ct_holidays from vicidial_state_call_times where state_call_time_id='$call_time_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $user_group = $row[20]; $ct_holidays = $row[21]; } else { $ct_holidays=''; } echo ""; echo "
"._QXZ("MODIFY A STATE CALL TIME")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $ct_hrs=1; $b=0; $hrs_SQL =''; $hrs_holiday_SQL=''; if (strlen($ct_holidays)>2) { $holiday_rules = explode('|',$ct_holidays); $ct_hrs = ((count($holiday_rules)) - 1); } echo "\n"; echo "\n"; while($ct_hrs >= $b) { if (isset($holiday_rules[$b]) && strlen($holiday_rules[$b])>0) { $stmt="SELECT holiday_date,holiday_name from vicidial_call_time_holidays where holiday_id='$holiday_rules[$b]';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); echo "\n"; $hrs_SQL .= "'$holiday_rules[$b]',"; $hrs_holiday_SQL .= "'$row[0]',"; } $b++; } if (strlen($hrs_SQL)>2) { $hrs_SQL = "$hrs_SQL''"; $hrs_holiday_SQL = "$hrs_holiday_SQL''"; $hrs_SQL = "where holiday_id NOT IN($hrs_SQL) and holiday_date NOT IN($hrs_holiday_SQL) $LOGadmin_viewable_groupsSQL"; } else {$hrs_SQL="$whereLOGadmin_viewable_groupsSQL";} $stmt="SELECT holiday_id,holiday_date from vicidial_call_time_holidays $hrs_SQL order by holiday_date;"; $rslt=mysql_to_mysqli($stmt, $link); $hct_to_print = mysqli_num_rows($rslt); $hct_list=''; $o=0; while ($hct_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $hct_list .= "\n"; $o++; } echo "\n"; echo "\n"; # echo "\n"; echo "
"._QXZ("Call Time ID").": $call_time_id$NWB#call_times-call_time_id$NWE
"._QXZ("State Call Time State").": $NWB#call_times-state_call_time_state$NWE
"._QXZ("State Call Time Name").": (short description of the call time)$NWB#call_times-call_time_name$NWE
"._QXZ("State Call Time Comments").": $NWB#call_times-call_time_comments$NWE
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Default Start").": "._QXZ("Default Stop").": $NWB#call_times-ct_default_start$NWE
"._QXZ("Sunday Start").": "._QXZ("Sunday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Monday Start").": "._QXZ("Monday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Tuesday Start").": "._QXZ("Tuesday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Wednesday Start").": "._QXZ("Wednesday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Thursday Start").": "._QXZ("Thursday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Friday Start").": "._QXZ("Friday Stop").": $NWB#call_times-ct_sunday_start$NWE
"._QXZ("Saturday Start").": "._QXZ("Saturday Stop").": $NWB#call_times-ct_sunday_start$NWE
 
"._QXZ("Active Outbound Holiday Definitions for this Record").":  
$holiday_rules[$b] - "._QXZ("REMOVE")."$row[0] - $row[1]
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Add outbound holiday rule").":


\n"; echo ""._QXZ("CALL TIMES USING THIS STATE CALL TIME").":
\n"; echo "\n"; $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\" $LOGadmin_viewable_call_timesSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; echo "


\n"; if ($LOGdelete_call_times > 0) { echo "

"._QXZ("DELETE THIS STATE CALL TIME DEFINITION")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this call time")."
\n"; } } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=3211111111 modify holiday definition info in the system ###################### if ($ADD==3211111111) { if ($LOGmodify_call_times==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3211111111&holiday_id=$holiday_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT holiday_id,holiday_date,holiday_name,holiday_comments,holiday_status,ct_default_start,ct_default_stop,user_group,default_afterhours_filename_override,holiday_method from vicidial_call_time_holidays where holiday_id='$holiday_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $holiday_date = $row[1]; $holiday_name = $row[2]; $holiday_comments = $row[3]; $holiday_status = $row[4]; $ct_default_start = $row[5]; $ct_default_stop = $row[6]; $user_group = $row[7]; $default_afterhours_filename_override = $row[8]; $holiday_method = $row[9]; } echo ""; echo "
"._QXZ("MODIFY A HOLIDAY")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Holiday ID").": $holiday_id$NWB#call_times-holiday_id$NWE
"._QXZ("Holiday Name").": (short description of the holiday)$NWB#call_times-holiday_name$NWE
"._QXZ("Holiday Comments").": $NWB#call_times-holiday_comments$NWE
"._QXZ("Admin User Group").": $NWB#call_times-user_group$NWE
"._QXZ("Default Start").": "._QXZ("Default Stop").": $NWB#call_times-ct_default_start$NWE
"._QXZ("AH Override").": "._QXZ("audio chooser")." $NWB#call_times-default_afterhours_filename_override$NWE
"._QXZ("Holiday Date").": \n"; echo " $NWB#call_times-holiday_date$NWE
"._QXZ("Holiday Status").": $NWB#call_times-holiday_status$NWE
"._QXZ("Holiday Inbound Method").": $NWB#call_times-holiday_method$NWE


\n"; echo ""._QXZ("CALL TIMES USING THIS HOLIDAY").":
\n"; echo "\n"; $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_holidays LIKE \"%|$holiday_id|%\" $LOGadmin_viewable_call_timesSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; echo ""._QXZ("STATE CALL TIMES USING THIS HOLIDAY").":
\n"; echo "\n"; $stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name from vicidial_state_call_times where ct_holidays LIKE \"%|$holiday_id|%\";"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1] - $row[2]
\n"; echo "


\n"; if ($LOGdelete_call_times > 0) { echo "

"._QXZ("DELETE THIS HOLIDAY DEFINITION")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this holiday")."
\n"; } } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=331111111 modify shift definition info in the system ###################### if ($ADD==331111111) { if ( ($LOGmodify_call_times==1) or ($LOGmodify_shifts==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=331111111&shift_id=$shift_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays,report_option,user_group,report_rank from vicidial_shifts where shift_id='$shift_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $shift_name = $row[1]; $shift_start_time = $row[2]; $shift_length = $row[3]; $shift_weekdays = $row[4]; $report_option = $row[5]; $user_group = $row[6]; $report_rank = $row[7]; } else { $shift_weekdays=''; } $shift_start_hour = intval(substr($shift_start_time,0,2)); $shift_start_min = intval(substr($shift_start_time,2,2)); $shift_length_hour = intval(substr($shift_length,0,2)); $shift_length_min = intval(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 ""; echo "
"._QXZ("MODIFY A SHIFT")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Shift ID").": $shift_id
"._QXZ("Shift Name").": ("._QXZ("short description of the shift").")$NWB#shifts-shift_name$NWE
"._QXZ("Admin User Group").": $NWB#shifts-user_group$NWE
"._QXZ("Shift Start Time").": \n"; echo "   "._QXZ("Shift End Time").": \n"; echo " $NWB#shifts-shift_start_time$NWE
"._QXZ("Shift Length").": $NWB#shifts-shift_length$NWE
"._QXZ("Shift Weekdays").":
$NWB#shifts-shift_weekdays$NWE
\n"; echo ""._QXZ("Sunday")."
\n"; echo ""._QXZ("Monday")."
\n"; echo ""._QXZ("Tuesday")."
\n"; echo ""._QXZ("Wednesday")."
\n"; echo ""._QXZ("Thursday")."
\n"; echo ""._QXZ("Friday")."
\n"; echo ""._QXZ("Saturday")."
\n"; echo "
"._QXZ("Report Option").": $NWB#shifts-report_option$NWE
"._QXZ("Report Rank").": $NWB#shifts-report_rank$NWE
\n"; echo "


\n"; echo ""._QXZ("USER GROUPS USING THIS SHIFT").":
\n"; echo "\n"; $stmt="SELECT user_group,group_name from vicidial_user_groups where group_shifts LIKE\"% $shift_id %\" $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]
\n"; echo "

\n"; if ($LOGdelete_call_times > 0) { echo "

"._QXZ("DELETE THIS SHIFT DEFINITION")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this shift")."
\n"; } } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=31111111111 modify phone record in the system ###################### if ($ADD==31111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31111111111&extension=$extension&server_ip=$server_ip"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent,webphone_auto_answer,voicemail_timezone,voicemail_options,user_group,voicemail_greeting,voicemail_dump_exten_no_inst,voicemail_instructions,on_login_report,unavail_dialplan_fwd_exten,unavail_dialplan_fwd_context,nva_call_url,nva_search_method,nva_error_filename,nva_new_list_id,nva_new_phone_code,nva_new_status,webphone_dialbox,webphone_mute,webphone_volume,webphone_debug,outbound_alt_cid,conf_qualify,webphone_layout,mohsuggest,webphone_settings from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)==0) {echo "
"._QXZ("Extension $extension does not exist on server $server_ip"); exit;} $row=mysqli_fetch_row($rslt); $tempdp = $row[1]; $reserved_dialplan_warning=''; if (preg_match("/,$tempdp,/",$reserved_extensions)) {$reserved_dialplan_warning="   "._QXZ("WARNING: Reserved Dialplan Number")."!\n";} echo "
"._QXZ("MODIFY A PHONE RECORD").": $row[1]\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic WEBPHONE_SETTINGS container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='WEBPHONE_SETTINGS' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $pws_to_print = mysqli_num_rows($rslt); $webphone_settings_menu=''; $pws_selected=0; $o=0; while ($pws_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $webphone_settings_menu .= "\n"; $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_voicemail_greeting > 0) { echo "\n"; } else { echo ""; echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # unused old DB connection fields echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Phone Extension").": $NWB#phones-extension$NWE
"._QXZ("Dial Plan Number").": ("._QXZ("digits only").")$NWB#phones-dialplan_number$NWE$reserved_dialplan_warning
"._QXZ("Voicemail Box").": ("._QXZ("digits only").")$NWB#phones-voicemail_id$NWE
"._QXZ("Outbound CallerID").": ("._QXZ("digits only").")$NWB#phones-outbound_cid$NWE
"._QXZ("Outbound Alt CallerID").": "._QXZ("optional")." ("._QXZ("digits only").")$NWB#phones-outbound_alt_cid$NWE
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
"._QXZ("Phone IP address").": ("._QXZ("optional").")$NWB#phones-phone_ip$NWE
"._QXZ("Computer IP address").": ("._QXZ("optional").")$NWB#phones-computer_ip$NWE
"._QXZ("Server IP").": $NWB#phones-server_ip$NWE
"._QXZ("Agent Screen Login").": $NWB#phones-login$NWE
"._QXZ("Login Password").": $NWB#phones-pass$NWE
"._QXZ("Registration Password").": $NWB#phones-conf_secret$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Set As Webphone").": $NWB#phones-is_webphone$NWE
"._QXZ("Webphone Dialpad").": $NWB#phones-webphone_dialpad$NWE
"._QXZ("Webphone Auto-Answer").": $NWB#phones-webphone_auto_answer$NWE
"._QXZ("Webphone Dialbox").": $NWB#phones-webphone_dialbox$NWE
"._QXZ("Webphone Mute").": $NWB#phones-webphone_mute$NWE
"._QXZ("Webphone Volume").": $NWB#phones-webphone_volume$NWE
"._QXZ("Webphone Debug").": $NWB#phones-webphone_debug$NWE
"._QXZ("Webphone Layout").": $NWB#phones-webphone_layout$NWE
"; if ($pws_selected > 0) {echo ""._QXZ("Webphone Extra Settings")."";} else {echo _QXZ("Webphone Extra Settings");} echo ": $NWB#phones-webphone_settings$NWE
"._QXZ("Use External Server IP").": $NWB#phones-use_external_server_ip$NWE
"._QXZ("Status").": $NWB#phones-status$NWE
"._QXZ("Active Account").": $NWB#phones-active$NWE
"._QXZ("Phone Type").": $NWB#phones-phone_type$NWE
"._QXZ("Full Name").": $NWB#phones-fullname$NWE
"._QXZ("Email").": $NWB#phones-email$NWE
"._QXZ("Delete Voicemail After Email").": $NWB#phones-delete_vm_after_email$NWE
"._QXZ("Voicemail Zone").": $NWB#phones-voicemail_timezone$NWE
"._QXZ("Voicemail Options").": $NWB#phones-voicemail_options$NWE
"._QXZ("Voicemail Greeting").": "._QXZ("audio chooser")." $NWB#phones-voicemail_greeting$NWE
"._QXZ("Voicemail Instructions").": $NWB#phones-voicemail_instructions$NWE
"._QXZ("Show VM on Summary Screen").": $NWB#phones-show_vm_on_summary$NWE
"._QXZ("Unavailable Dialplan Forward").": "._QXZ("context").": $NWB#phones-unavail_dialplan_fwd_exten$NWE
"._QXZ("Music on Hold Suggest").": "._QXZ("moh chooser")." $NWB#phones-mohsuggest$NWE
"._QXZ("Company").": $NWB#phones-company$NWE
"._QXZ("Picture").": $NWB#phones-picture$NWE
"._QXZ("New Messages").": $row[14]$NWB#phones-messages$NWE
"._QXZ("Old Messages").": $row[15]$NWB#phones-old_messages$NWE
"._QXZ("Client Protocol").": $NWB#phones-protocol$NWE
"._QXZ("Local GMT").": ("._QXZ("Do NOT Adjust for DST").")$NWB#phones-local_gmt$NWE
"._QXZ("Phone Ring Timeout").": $NWB#phones-phone_ring_timeout$NWE
"._QXZ("On-Hook Agent").": $NWB#phones-on_hook_agent$NWE
"._QXZ("Manager Login").": $NWB#phones-ASTmgrUSERNAME$NWE
"._QXZ("Manager Secret").": $NWB#phones-ASTmgrSECRET$NWE
"._QXZ("Agent Default User").": $NWB#phones-login_user$NWE
"._QXZ("Agent Default Pass").": $NWB#phones-login_pass$NWE
"._QXZ("Agent Default Campaign").": $NWB#phones-login_campaign$NWE
"._QXZ("Park Exten").": $NWB#phones-park_on_extension$NWE
"._QXZ("Conf Exten").": $NWB#phones-conf_on_extension$NWE
"._QXZ("Agent Park Exten").": $NWB#phones-agent_park_on_extension$NWE
"._QXZ("Agent Park File").": $NWB#phones-park_on_filename$NWE
"._QXZ("Monitor Prefix").": $NWB#phones-monitor_prefix$NWE
"._QXZ("Recording Exten").": $NWB#phones-recording_exten$NWE
"._QXZ("VMailMain Exten").": $NWB#phones-voicemail_exten$NWE
"._QXZ("VMailDump Exten").": $NWB#phones-voicemail_dump_exten$NWE
"._QXZ("VMailDump Exten NI").": $NWB#phones-voicemail_dump_exten_no_inst$NWE
"._QXZ("Exten Context").": $NWB#phones-ext_context$NWE
"._QXZ("Phone Context").": $NWB#phones-phone_context$NWE
"._QXZ("Allowed Codecs").": $NWB#phones-codecs_list$NWE
"._QXZ("Allowed Codecs With Template").": $NWB#phones-codecs_with_template$NWE
"._QXZ("Conf Qualify").": $NWB#phones-conf_qualify$NWE
"._QXZ("DTMFSend Channel").": $NWB#phones-dtmf_send_extension$NWE
"._QXZ("Outbound Call Group").": $NWB#phones-call_out_number_group$NWE
"._QXZ("CallerID URL").": $NWB#phones-local_web_callerID_URL$NWE
"._QXZ("Agent Default URL").": $NWB#phones-agent_web_URL$NWE
"._QXZ("NVA Call URL").": $NWB#phones-nva_call_url$NWE
"._QXZ("NVA Search Method").": $NWB#phones-nva_search_method$NWE
"._QXZ("NVA Error Filename").": "._QXZ("audio chooser")." $NWB#phones-nva_error_filename$NWE
"._QXZ("NVA New List ID").": $NWB#phones-nva_new_list_id$NWE
"._QXZ("NVA New Phone Code").": $NWB#phones-nva_new_phone_code$NWE
"._QXZ("NVA New Status").": $NWB#phones-nva_new_status$NWE
"._QXZ("Call Logging").": $NWB#phones-AGI_call_logging_enabled$NWE
"._QXZ("User Switching").": $NWB#phones-user_switching_enabled$NWE
"._QXZ("Conferencing").": $NWB#phones-conferencing_enabled$NWE
"._QXZ("Admin Hang Up").": $NWB#phones-admin_hangup_enabled$NWE
"._QXZ("Admin Hijack").": $NWB#phones-admin_hijack_enabled$NWE
"._QXZ("Admin Monitor").": $NWB#phones-admin_monitor_enabled$NWE
"._QXZ("Call Park").": $NWB#phones-call_parking_enabled$NWE
"._QXZ("Updater Check").": $NWB#phones-updater_check_enabled$NWE
"._QXZ("AF Logging").": $NWB#phones-AFLogging_enabled$NWE
"._QXZ("Queue Enabled").": $NWB#phones-QUEUE_ACTION_enabled$NWE
"._QXZ("CallerID Popup").": $NWB#phones-CallerID_popup_enabled$NWE
"._QXZ("VMail Button").": $NWB#phones-voicemail_button_enabled$NWE
"._QXZ("Fast Refresh").": $NWB#phones-enable_fast_refresh$NWE
"._QXZ("Fast Refresh Rate").": ("._QXZ("in ms").")$NWB#phones-fast_refresh_rate$NWE
"._QXZ("Persistant MySQL").": $NWB#phones-enable_persistant_mysql$NWE
"._QXZ("Auto Dial Next Number").": $NWB#phones-auto_dial_next_number$NWE
"._QXZ("Stop Rec after each call").": $NWB#phones-VDstop_rec_after_each_call$NWE
"._QXZ("Enable SIPSAK Messages").": $NWB#phones-enable_sipsak_messages$NWE
"._QXZ("Template ID").": $NWB#phones-template_id$NWE
"._QXZ("Conf Override").": $NWB#phones-conf_override$NWE
\n"; echo "

"._QXZ("Click here for phone stats")."\n"; echo "

"._QXZ("Click here for phone call recordings")."\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS PHONE")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this phone")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=32111111111 modify phone alias record in the system ###################### if ($ADD==32111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=32111111111&alias_id=$alias_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT alias_id,alias_name,logins_list,user_group from phones_alias where alias_id='$alias_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); echo "
"._QXZ("MODIFY A PHONE ALIAS RECORD").": $row[0]\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Alias ID").": $row[0] $NWB#phones-alias_id$NWE
"._QXZ("Alias Name").": $NWB#phones-alias_name$NWE
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
"._QXZ("Phones Logins List").": ("._QXZ("comma separated").")$NWB#phones-logins_list$NWE
\n"; ### list of phones in this phones alias $phone_alias_SQL = preg_replace('/,/', "','",$row[2]); echo "
\n"; echo "
"._QXZ("PHONES WITHIN THIS PHONES ALIAS").":
\n"; echo "\n"; echo "\n"; $stmt="SELECT login,extension,server_ip,protocol,phone_ip from phones where login IN ('$phone_alias_SQL') $LOGadmin_viewable_groupsSQL;"; if ($DB) {echo "|$stmt|";} $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("LOGIN").""._QXZ("EXTENSION").""._QXZ("SERVER").""._QXZ("PROTOCOL").""._QXZ("IP")."
$rowx[0]$rowx[1]$rowx[2]$rowx[3]$rowx[4]

\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS PHONE ALIAS")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this phone alias")."
\n"; } } else { } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=33111111111 modify group alias record in the system ###################### if ($ADD==33111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_phones==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=33111111111&group_alias_id=$group_alias_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active,user_group from groups_alias where group_alias_id='$group_alias_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); echo "
"._QXZ("MODIFY A GROUP ALIAS RECORD").": $row[0]\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Group Alias ID").": $row[0] $NWB#phones-group_alias_id$NWE
"._QXZ("Group Alias Name").": $NWB#phones-group_alias_name$NWE
"._QXZ("Admin User Group").": $NWB#phones-user_group$NWE
"._QXZ("CallerID Number").": $NWB#phones-caller_id_number$NWE
"._QXZ("CallerID Name").": $NWB#phones-caller_id_name$NWE
"._QXZ("Active").":
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS GROUP ALIAS")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this group alias")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=311111111111 modify server record in the system ###################### if ($ADD==311111111111) { if ($LOGmodify_servers==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311111111111&server_id=$server_id&server_ip=$server_ip"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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,external_server_ip,custom_dialplan_entry,active_twin_server_ip,user_group,system_uptime,auto_restart_asterisk,asterisk_temp_no_restart,voicemail_dump_exten_no_inst,gather_asterisk_output,web_socket_url,conf_qualify,routing_prefix,external_web_socket_url,conf_engine,conf_update_interval,ara_url from servers where ( (server_id='$server_id') or (server_ip='$server_ip') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $external_server_ip = $row[39]; $custom_dialplan_entry = $row[40]; $active_twin_server_ip = $row[41]; $user_group = $row[42]; $system_uptime = $row[43]; $auto_restart_asterisk = $row[44]; $asterisk_temp_no_restart = $row[45]; $voicemail_dump_exten_no_inst = $row[46]; $gather_asterisk_output = $row[47]; $web_socket_url = $row[48]; $conf_qualify = $row[49]; $routing_prefix = $row[50]; $external_web_socket_url = $row[51]; $conf_engine = $row[52]; $conf_update_interval = $row[53]; $ara_url = $row[54]; $stmt="SELECT count(*) from vicidial_live_agents where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $live_agents = $row[0]; if ($DB > 0) {echo "|$live_agents|$stmt|\n";} # look for server_live_partitions entries for this server $stmt="SELECT partition_order,use_pct from server_live_partitions where server_ip='$server_ip' and (mb_used + mb_available) >= 1000;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $parts_to_print = mysqli_num_rows($rslt); $pp=0; $temp_disk_usage=''; while ($parts_to_print > $pp) { $row=mysqli_fetch_row($rslt); $part_order = ($row[0] + 1); $temp_disk_usage .= "$part_order $row[1]|"; $pp++; } if (strlen($temp_disk_usage) > 3) {$disk_usage = $temp_disk_usage;} $cpu = (100 - $cpu_idle_percent); $disk_usage = preg_replace("/ /"," - ",$disk_usage); $disk_usage = preg_replace("/\|/","%     ",$disk_usage); echo "
"._QXZ("MODIFY A SERVER RECORD").": $server_id\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($pp > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ( ($SSallow_custom_dialplan > 0) and ($LOGmodify_custom_dialplans > 0) ) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "
"._QXZ("Server ID").": $NWB#servers-server_id$NWE
"._QXZ("Server Description").": $NWB#servers-server_description$NWE
"._QXZ("Server IP Address").": $NWB#servers-server_ip$NWE
"._QXZ("Active").": $NWB#servers-active$NWE
"._QXZ("System Load").": $sysload - $cpu%   $NWB#servers-sysload$NWE
"._QXZ("Live Channels").": $channels_total     "._QXZ("Agents").": $live_agents   $NWB#servers-channels_total$NWE
"._QXZ("Disk Usage").": $disk_usage   $NWB#servers-disk_usage$NWE
"._QXZ("Disk Usage").": $disk_usage   $NWB#servers-disk_usage$NWE
"._QXZ("System Uptime").": $system_uptime   $NWB#servers-system_uptime$NWE
"._QXZ("Admin User Group").": $NWB#servers-user_group$NWE
"._QXZ("Asterisk Version").": $NWB#servers-asterisk_version$NWE
"._QXZ("Max Trunks").": $NWB#servers-max_trunks$NWE
"._QXZ("Max Calls per Second").": $NWB#servers-outbound_calls_per_second$NWE
"._QXZ("Balance Dialing").": $NWB#servers-balance_active$NWE
"._QXZ("Balance Rank").": $NWB#servers-balance_rank$NWE
"._QXZ("Balance Offlimits").": $NWB#servers-balance_trunks_offlimits$NWE
"._QXZ("Telnet Host").": $NWB#servers-telnet_host$NWE
"._QXZ("Telnet Port").": $NWB#servers-telnet_port$NWE
"._QXZ("Manager User").": $NWB#servers-ASTmgrUSERNAME$NWE
"._QXZ("Manager Secret").": $NWB#servers-ASTmgrSECRET$NWE
"._QXZ("Manager Update User").": $NWB#servers-ASTmgrUSERNAMEupdate$NWE
"._QXZ("Manager Listen User").": $NWB#servers-ASTmgrUSERNAMElisten$NWE
"._QXZ("Manager Send User").": $NWB#servers-ASTmgrUSERNAMEsend$NWE
"._QXZ("Conf File Secret").": $NWB#servers-conf_secret$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Local GMT").": ("._QXZ("Do NOT Adjust for DST").")$NWB#servers-local_gmt$NWE
"._QXZ("VMail Dump Exten").": $NWB#servers-voicemail_dump_exten$NWE
"._QXZ("VMail Dump Exten NI").": $NWB#servers-voicemail_dump_exten_no_inst$NWE
"._QXZ("auto dial extension").": $NWB#servers-answer_transfer_agent$NWE"; $major_version = explode('.',$asterisk_version); if ($major_version[0] >= 12) { echo "     "._QXZ("prefix").": $NWB#servers-routing_prefix$NWE"; } else {echo "";} echo "
"._QXZ("Default Context").": $NWB#servers-ext_context$NWE
"._QXZ("System Performance").": $NWB#servers-sys_perf_log$NWE
"._QXZ("Server Logs").": $NWB#servers-vd_server_logs$NWE
"._QXZ("AGI Output").": $NWB#servers-agi_output$NWE
"._QXZ("Carrier Logging Active").": $NWB#servers-carrier_logging_active$NWE
"._QXZ("Gather Asterisk Output").": $NWB#servers-gather_asterisk_output$NWE
"._QXZ("Conf Qualify").": $NWB#servers-conf_qualify$NWE
"._QXZ("Recording Web Link").": $NWB#servers-recording_web_link$NWE
"._QXZ("Alternate Recording Server IP").": $NWB#servers-alt_server_ip$NWE
"._QXZ("External Server IP").": $NWB#servers-external_server_ip$NWE
"._QXZ("Web Socket URL").": $NWB#servers-web_socket_url$NWE
"._QXZ("External Web Socket URL").": $NWB#servers-external_web_socket_url$NWE
"._QXZ("Active Twin Server IP").": $NWB#servers-active_twin_server_ip$NWE
"._QXZ("Conferencing Engine").": $NWB#servers-conf_engine$NWE
"._QXZ("Conf Update Interval").": $NWB#servers-conf_update_interval$NWE
"._QXZ("Active Asterisk Server").": $NWB#servers-active_asterisk_server$NWE
"._QXZ("Auto-Restart Asterisk").":     $NWB#servers-auto_restart_asterisk$NWE
"._QXZ("Temp No-Restart Asterisk").":     $NWB#servers-asterisk_temp_no_restart$NWE
"._QXZ("Asterisk Restart URL").":     $NWB#servers-ara_url$NWE
"._QXZ("Active Agent Server").": $NWB#servers-active_agent_login_server$NWE
"._QXZ("Generate conf files").": $NWB#servers-generate_conf$NWE
"._QXZ("Rebuild conf files").": $NWB#servers-rebuild_conf_files$NWE
"._QXZ("Rebuild Music On Hold").": $NWB#servers-rebuild_music_on_hold$NWE
"._QXZ("Sounds Update").": $NWB#servers-sounds_update$NWE
"._QXZ("Recording Limit").": $NWB#servers-recording_limit$NWE
"._QXZ("Custom Dialplan Entry").": $NWB#servers-custom_dialplan_entry$NWE
"._QXZ("Custom Dialplan Entry").": Disabled $NWB#servers-custom_dialplan_entry$NWE
\n"; ### vicidial server trunk records for this server echo "

"._QXZ("TRUNKS FOR THIS SERVER").":   $NWB#server_trunks$NWE
\n"; echo "\n"; echo "\n"; $stmt="SELECT server_ip,campaign_id,dedicated_trunks,trunk_restriction from vicidial_server_trunks where server_ip='$server_ip' $LOGallowed_campaignsSQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $recycle_to_print = mysqli_num_rows($rslt); $o=0; while ($recycle_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("CAMPAIGN")." "._QXZ("TRUNKS")." "._QXZ("RESTRICTION")." "._QXZ("DELETE")."
$rowx[1]
\n"; echo "\n"; echo "\n"; echo "
"._QXZ("DELETE")."
\n"; echo "
"._QXZ("ADD NEW SERVER TRUNK RECORD")."
\n"; echo "\n"; echo "\n"; echo _QXZ("TRUNKS").":
\n"; echo _QXZ("CAMPAIGN").":
\n"; echo _QXZ("RESTRICTION").":
\n"; echo "
\n"; echo "

\n"; ### list of carriers on this server echo "
\n"; echo "
"._QXZ("CARRIERS WITHIN THIS SERVER").":
\n"; echo "\n"; echo "\n"; $active_carriers = 0; $inactive_carriers = 0; $stmt="SELECT carrier_id,carrier_name,registration_string,active from vicidial_server_carriers where server_ip IN('$server_ip','0.0.0.0') $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $carriers_to_print = mysqli_num_rows($rsltx); if ($DB > 0) {echo "|$carriers_to_print|$stmt|\n";} $camp_lists=''; $o=0; while ($carriers_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/Y/', $rowx[3])) {$active_carriers++;} if (preg_match('/N/', $rowx[3])) {$inactive_carriers++;} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("CARRIER ID").""._QXZ("NAME").""._QXZ("REGISTRATION").""._QXZ("ACTIVE")."
$rowx[0]$rowx[1]$rowx[2]"._QXZ("$rowx[3]")."

\n"; ### list of phones on this server echo "
\n"; echo "
"._QXZ("PHONES WITHIN THIS SERVER").":
\n"; echo "\n"; echo "\n"; $active_phones = 0; $inactive_phones = 0; $stmt="SELECT extension,active,fullname from phones where server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); if ($DB > 0) {echo "|$lists_to_print|$stmt|\n";} $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/Y/', $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} if (preg_match('/N/', $rowx[1])) {$inactive_phones++;} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("EXTENSION").""._QXZ("NAME").""._QXZ("ACTIVE")."
$rowx[0]$rowx[2]"._QXZ("$rowx[1]")."

\n"; ### list of conferences on this server echo "
\n"; echo "
"._QXZ("CONFERENCES WITHIN THIS SERVER").":
\n"; echo "\n"; echo "\n"; $active_confs = 0; $stmt="SELECT conf_exten,extension from conferences where server_ip='$server_ip'"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); if ($DB > 0) {echo "|$lists_to_print|$stmt|\n";} $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $active_confs++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("CONFERENCE").""._QXZ("EXTENSION")."
$rowx[0]$rowx[1]

\n"; ### list of vicidial conferences on this server echo "
\n"; echo "
"._QXZ("AGENT CONFERENCES WITHIN THIS SERVER").":
\n"; echo "\n"; echo "\n"; $active_vdconfs = 0; $stmt="SELECT conf_exten,extension from vicidial_conferences where server_ip='$server_ip'"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); if ($DB > 0) {echo "|$lists_to_print|$stmt|\n";} $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $active_vdconfs++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("VD CONFERENCE").""._QXZ("EXTENSION")."
$rowx[0]$rowx[1]

\n"; ### list of vicidial confbridges on this server echo "
\n"; echo "
"._QXZ("AGENT CONFBRIDGES WITHIN THIS SERVER").":
\n"; echo "\n"; echo "\n"; $active_vdconfs = 0; $stmt="SELECT conf_exten,extension from vicidial_confbridges where server_ip='$server_ip'"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); if ($DB > 0) {echo "|$lists_to_print|$stmt|\n";} $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; $active_vdconfs++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("VD CONFBRIDGE").""._QXZ("EXTENSION")."
$rowx[0]$rowx[1]

\n"; echo "
\n"; $camp_lists = preg_replace('/.$/i','',$camp_lists); echo _QXZ("This server has %1s active carriers and %2s inactive carriers",0,'',$active_carriers,$inactive_carriers)."

\n"; echo _QXZ("This server has %1s active phones and %2s inactive phones",0,'',$active_phones,$inactive_phones)."

\n"; echo _QXZ("This server has %1s active conferences",0,'',$active_confs)."

\n"; echo _QXZ("This server has %1s active vicidial conferences",0,'',$active_vdconfs)."

\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("CLEAR ALL AGENT CONFERENCES")."\n"; } if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS SERVER")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this server")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=331111111111 modify conf template record in the system ###################### if ($ADD==331111111111) { if ($LOGast_admin_access==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=331111111111&template_id=$template_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT template_id,template_name,template_contents,user_group from vicidial_conf_templates where template_id='$template_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $template_id = $row[0]; $template_name = $row[1]; $template_contents = $row[2]; $user_group = $row[3]; echo "
"._QXZ("MODIFY A CONF TEMPLATE RECORD").": $row[0]
\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Template ID").": $template_id
"._QXZ("Template Name").": $NWB#conf_templates-template_name$NWE
"._QXZ("Admin User Group").": $NWB#conf_templates-user_group$NWE
"._QXZ("Template Contents").": $NWB#conf_templates-template_contents$NWE
\n"; echo "
\n"; ### list of phones using this conf template echo "
\n"; echo "
"._QXZ("PHONES USING THIS CONF TEMPLATE").":
\n"; echo "\n"; echo "\n"; $active_phones = 0; $inactive_phones = 0; $stmt="SELECT extension,active,fullname,server_ip from phones where template_id='$template_id' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/Y/', $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} if (preg_match('/N/', $rowx[1])) {$inactive_phones++;} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("EXTENSION").""._QXZ("NAME").""._QXZ("SERVER").""._QXZ("ACTIVE")."
$rowx[0]$rowx[2]$rowx[3]$rowx[1]

\n"; ### list of carriers using this conf template echo "
\n"; echo "
"._QXZ("CARRIERS USING THIS CONF TEMPLATE").":
\n"; echo "\n"; echo "\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' $LOGadmin_viewable_groupsSQL;"; $rsltx=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rsltx); $camp_lists=''; $o=0; while ($lists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $o++; if (preg_match('/Y/', $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} if (preg_match('/N/', $rowx[1])) {$inactive_phones++;} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; } echo "
"._QXZ("CARRIER").""._QXZ("NAME").""._QXZ("SERVER").""._QXZ("ACTIVE")."
$rowx[0]$rowx[2]$rowx[3]$rowx[1]

\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS CONF TEMPLATE")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this conf template")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=341111111111 modify carrier record in the system ###################### if ($ADD==341111111111) { if ( ( ($LOGast_admin_access==1) or ($LOGmodify_carriers==1) ) and ($x_ra_carrier < 1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=341111111111&carrier_id=$carrier_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,server_ip,active,carrier_description,user_group from vicidial_server_carriers where carrier_id='$carrier_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $user_group = $row[11]; echo "
"._QXZ("MODIFY A CARRIER RECORD").": $row[0]\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Carrier ID").": $carrier_id
"._QXZ("Carrier Name").": $NWB#server_carriers-carrier_name$NWE
"._QXZ("Carrier Description").": $NWB#server_carriers-carrier_description$NWE
"._QXZ("Admin User Group").": $NWB#server_carriers-user_group$NWE
"._QXZ("Registration String").": $NWB#server_carriers-registration_string$NWE
"._QXZ("Template ID").": $NWB#server_carriers-template_id$NWE
"._QXZ("Account Entry").": $NWB#server_carriers-account_entry$NWE
"._QXZ("Protocol").": $NWB#server_carriers-protocol$NWE
"._QXZ("Globals String").": $NWB#server_carriers-globals_string$NWE
"._QXZ("Dialplan Entry").": $NWB#server_carriers-dialplan_entry$NWE
"._QXZ("Server IP").": (0.0.0.0 "._QXZ("is all servers").")$NWB#server_carriers-server_ip$NWE
"._QXZ("Active").": $NWB#server_carriers-active$NWE
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS CARRIER")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this carrier")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=351111111111 modify tts record in the system ###################### if ($ADD==351111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_tts==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=351111111111&tts_id=$tts_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT tts_id,tts_name,active,tts_text,tts_voice,user_group from vicidial_tts_prompts where tts_id='$tts_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $tts_id = $row[0]; $tts_name = $row[1]; $active = $row[2]; $tts_text = $row[3]; $tts_voice = $row[4]; $user_group = $row[5]; echo "
"._QXZ("MODIFY A TTS RECORD").": $tts_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("TTS ID").": $tts_id
"._QXZ("TTS Name").": $NWB#tts_prompts-tts_name$NWE
"._QXZ("Active").": $NWB#tts_prompts-active$NWE
"._QXZ("Admin User Group").": $NWB#tts_prompts-user_group$NWE
"._QXZ("TTS Voice").": $NWB#tts_prompts-tts_voice$NWE
"._QXZ("TTS Text").": $NWB#tts_prompts-tts_text$NWE
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS TTS ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this TTS entry")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=361111111111 modify music on hold record in the system ###################### if ($ADD==361111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_moh==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=361111111111&moh_id=$moh_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT moh_id,moh_name,active,random,user_group from vicidial_music_on_hold where moh_id='$moh_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $moh_id = $row[0]; $moh_name = $row[1]; $active = $row[2]; $random = $row[3]; $user_group = (preg_match('/\-\-ALL\-\-/', $row[4]) ? _QXZ("$row[4]") : $row[4]); echo "
"._QXZ("MODIFY A MUSIC ON HOLD RECORD").": $moh_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Music On Hold ID").": $moh_id
"._QXZ("Music On Hold Name").": $NWB#music_on_hold-moh_name$NWE
"._QXZ("Admin User Group").": $NWB#music_on_hold-user_group$NWE
"._QXZ("Active").": $NWB#music_on_hold-active$NWE
"._QXZ("Random Order").": $NWB#music_on_hold-random$NWE
"._QXZ("Audio Files").": \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_to_mysqli($stmt, $link); $mohfiles_to_print = mysqli_num_rows($rsltx); $ranks = ($mohfiles_to_print + 2); $o=0; while ($mohfiles_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); echo ""._QXZ("Rank").": \n"; echo "   $rowx[0] - "._QXZ("DELETE")."
\n"; $o++; } echo "
"._QXZ("Add An Audio File").": "._QXZ("audio chooser")." $NWB#music_on_hold-filename$NWE
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE MUSIC ON HOLD ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this Music On Hold entry")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=397111111111 modify VM Message Group record in the system ###################### if ($ADD==397111111111) { if ($LOGmodify_statuses==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=397111111111&leave_vm_message_group_id=$leave_vm_message_group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT leave_vm_message_group_id,leave_vm_message_group_notes,active,user_group from leave_vm_message_groups where leave_vm_message_group_id='$leave_vm_message_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $leave_vm_message_group_id = $row[0]; $leave_vm_message_group_notes = $row[1]; $active = $row[2]; $user_group = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); echo "
"._QXZ("MODIFY A VM MESSAGE GROUP RECORD").": $leave_vm_message_group_id\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("VM Message Group ID").": $leave_vm_message_group_id
"._QXZ("VM Message Group Notes").": $NWB#vm_message_groups$NWE
"._QXZ("Admin User Group").": $NWB#vm_message_groups$NWE
"._QXZ("Active").": $NWB#vm_message_groups$NWE
"._QXZ("Audio Files").": \n"; echo ""; ##### get files listing for rank/delete options $stmt="SELECT audio_filename,audio_name,rank,time_start,time_end from leave_vm_message_groups_entries where leave_vm_message_group_id='$leave_vm_message_group_id' order by rank;"; $rsltx=mysql_to_mysqli($stmt, $link); $vmmgfiles_to_print = mysqli_num_rows($rsltx); $ranks = ($vmmgfiles_to_print + 2); $o=0; if ($vmmgfiles_to_print > 0) {echo "\n";} while ($vmmgfiles_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); echo ""; } if ($o < 1) {echo "\n";} echo "
"._QXZ("Rank")."   "._QXZ("Time Range").""._QXZ("Display")."   "._QXZ("File name")."
"; echo "   \n"; echo " - "; echo "   "; echo ""; echo ""; echo ""; echo "   $rowx[0] - "._QXZ("DELETE").""; $o++; echo "
"._QXZ("No Audio Files Set")."
"._QXZ("Add An Audio File").": "._QXZ("audio chooser")." $NWB#vm_message_groups$NWE
\n"; echo ""._QXZ("Display Name").":   "._QXZ("Time Range").": "._QXZ("to")." \n"; echo "
\n"; echo "
\n"; echo "

"._QXZ("CAMPAIGNS USING THIS VM MESSAGE GROUP").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where leave_vm_message_group_id='$leave_vm_message_group_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE VM MESSAGE GROUP ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this VM Mesage Group entry")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=398111111111 modify Queue Group record in the system ###################### if ($ADD==398111111111) { if ($LOGmodify_statuses==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=398111111111&queue_group_name=$queue_group_name"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups where queue_group='$queue_group' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $queue_group = $row[0]; $queue_group_name = $row[1]; $active = $row[2]; $user_group = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); $included_campaigns = $row[4]; $included_inbound_groups = $row[5]; echo "
"._QXZ("MODIFY A QUEUE GROUP RECORD").": $queue_group\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Queue Group ID").": $queue_group
"._QXZ("Queue Group Name").": $NWB#queue_groups$NWE
"._QXZ("Admin User Group").": $NWB#queue_groups$NWE
"._QXZ("Active").": $NWB#queue_groups$NWE
"._QXZ("Included Campaigns").":
$NWB#queue_groups$NWE
\n"; echo "$qg_campaigns_list"; echo "
 
"._QXZ("Included Inbound Groups").":
$NWB#queue_groups$NWE
\n"; echo "$qg_groups_list"; echo "
 
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE QUEUE GROUP ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this Queue Group entry")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=371111111111 modify voicemail box in the system ###################### if ($ADD==371111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_voicemail==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=371111111111&voicemail_id=$voicemail_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT voicemail_id,pass,fullname,active,email,messages,old_messages,delete_vm_after_email,voicemail_timezone,voicemail_options,user_group,voicemail_greeting,on_login_report from vicidial_voicemail where voicemail_id='$voicemail_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_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]; $voicemail_timezone = $row[8]; $voicemail_options = $row[9]; $user_group = $row[10]; $voicemail_greeting = $row[11]; $show_vm_on_summary = $row[12]; echo "
"._QXZ("MODIFY A VOICEMAIL BOX").": $voicemail_id\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSallow_voicemail_greeting > 0) { echo "\n"; } else { echo ""; echo ""; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Voicemail ID").": $voicemail_id
"._QXZ("Password").": $NWB#voicemail-pass$NWE
"._QXZ("Name").": $NWB#voicemail-fullname$NWE
"._QXZ("Email").": $NWB#voicemail-email$NWE
"._QXZ("Active").": $NWB#voicemail-active$NWE
"._QXZ("Admin User Group").": $NWB#voicemail-user_group$NWE
"._QXZ("Delete Voicemail After Email").": $NWB#voicemail-delete_vm_after_email$NWE
"._QXZ("Show VM on Summary Screen").": $NWB#voicemail-show_vm_on_summary$NWE
"._QXZ("Voicemail Greeting").": "._QXZ("audio chooser")." $NWB#voicemail-voicemail_greeting$NWE
"._QXZ("Voicemail Zone").": $NWB#voicemail-voicemail_timezone$NWE
"._QXZ("Voicemail Options").": $NWB#voicemail-voicemail_options$NWE
"._QXZ("New Messages").": $messages
"._QXZ("Old Messages").": $old_messages
\n"; echo "
\n"; if (file_exists('options.php')) {require('options.php');} if (isset($vm_view_messages_link) && strlen($vm_view_messages_link) > 5) { $temp_vm_view_messages_link = preg_replace("/voicemail_id/",$voicemail_id,$vm_view_messages_link); echo "

"._QXZ("View Messages"); } if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS VOICEMAIL BOX")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this voicemail box")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=381111111111 modify screen label in the system ###################### if ($ADD==381111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_labels==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=381111111111&label_id=$label_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT label_id,label_name,active,label_hide_field_logs,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,user_group,label_lead_id,label_list_id,label_entry_date,label_gmt_offset_now,label_source_id,label_called_since_last_reset,label_status,label_user,label_date_of_birth,label_country_code,label_last_local_call_time,label_called_count,label_rank,label_owner,label_entry_list_id from vicidial_screen_labels where label_id='$label_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $label_id = $row[0]; $label_name = $row[1]; $active = $row[2]; $label_hide_field_logs = $row[3]; $label_title = $row[4]; $label_first_name = $row[5]; $label_middle_initial = $row[6]; $label_last_name = $row[7]; $label_address1 = $row[8]; $label_address2 = $row[9]; $label_address3 = $row[10]; $label_city = $row[11]; $label_state = $row[12]; $label_province = $row[13]; $label_postal_code = $row[14]; $label_vendor_lead_code = $row[15]; $label_gender = $row[16]; $label_phone_number = $row[17]; $label_phone_code = $row[18]; $label_alt_phone = $row[19]; $label_security_phrase = $row[20]; $label_email = $row[21]; $label_comments = $row[22]; $user_group = $row[23]; $label_lead_id = $row[24]; $label_list_id = $row[25]; $label_entry_date = $row[26]; $label_gmt_offset_now = $row[27]; $label_source_id = $row[28]; $label_called_since_last_reset = $row[29]; $label_status = $row[30]; $label_user = $row[31]; $label_date_of_birth = $row[32]; $label_country_code = $row[33]; $label_last_local_call_time = $row[34]; $label_called_count = $row[35]; $label_rank = $row[36]; $label_owner = $row[37]; $label_entry_list_id = $row[38]; echo "
"._QXZ("MODIFY SCREEN LABEL").": $label_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Label ID").": $label_id
"._QXZ("Label Name").": $NWB#screen_labels-label_name$NWE
"._QXZ("Active").": $NWB#screen_labels-active$NWE
"._QXZ("Admin User Group").": $NWB#screen_labels-user_group$NWE
"._QXZ("Hide Label in Call Logs").": $NWB#screen_labels-label_hide_field_logs$NWE
"._QXZ("Label Title").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label First Name").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Middle Initial").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Last Name").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Address1").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Address2").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Address3").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label City").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label State").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Province").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Postal Code").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Vendor Lead Code").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Gender").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Phone Number").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Phone Code").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Alt Phone").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Security Phrase").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Email").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Comments").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Lead ID").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label List ID").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Entry Date").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Timezone").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Source ID").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Reset Code").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Status").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label User").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Date of Birth").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Country Code").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Last Call").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Called Count").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Rank").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Owner").": $NWB#screen_labels-default_field_labels$NWE
"._QXZ("Label Entry List ID").": $NWB#screen_labels-default_field_labels$NWE
\n"; echo "
\n"; echo "


\n"; echo " "._QXZ("CAMPAIGNS USING THIS SCREEN LABEL").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where screen_labels='$label_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS SCREEN LABEL")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this screen label")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=382111111111 modify screen colors in the system ###################### if ($ADD==382111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_colors==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=382111111111&colors_id=$colors_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT colors_id,colors_name,active,menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,user_group,web_logo,button_color from vicidial_screen_colors where colors_id='$colors_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $colors_id = $row[0]; $colors_name = $row[1]; $active = $row[2]; $menu_background = $row[3]; $frame_background = $row[4]; $std_row1_background = $row[5]; $std_row2_background = $row[6]; $std_row3_background = $row[7]; $std_row4_background = $row[8]; $std_row5_background = $row[9]; $alt_row1_background = $row[10]; $alt_row2_background = $row[11]; $alt_row3_background = $row[12]; $user_group = $row[13]; $web_logo = $row[14]; $button_color = $row[15]; echo "
"._QXZ("MODIFY SCREEN COLORS").": $colors_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Colors ID").": $colors_id
"._QXZ("Colors Name").": $NWB#screen_colors-colors_name$NWE
"._QXZ("Active").": $NWB#screen_colors-active$NWE
"._QXZ("Admin User Group").": $NWB#screen_colors-user_group$NWE
"._QXZ("Menu Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-menu_background$NWE
"._QXZ("Frame Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-frame_background$NWE
"._QXZ("Standard Row 1 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-std_row_background$NWE
"._QXZ("Standard Row 2 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-std_row_background$NWE
"._QXZ("Standard Row 3 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-std_row_background$NWE
"._QXZ("Standard Row 4 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-std_row_background$NWE
"._QXZ("Standard Row 5 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-std_row_background$NWE
"._QXZ("Alternate Row 1 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-alt_row_background$NWE
"._QXZ("Alternate Row 2 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-alt_row_background$NWE
"._QXZ("Alternate Row 3 Background")." ("._QXZ("color chooser")."): $NWB#screen_colors-alt_row_background$NWE
"._QXZ("Web Logo").": $NWB#screen_colors-web_logo$NWE    
"._QXZ("Button Color")." ("._QXZ("color chooser")."): $NWB#screen_colors-alt_row_background$NWE
\n"; echo "
\n"; echo "


\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS SCREEN COLORS ENTRY")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this screen colors entry")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=391111111111 modify contact in the system ###################### if ($ADD==391111111111) { if ( ($LOGast_admin_access==1) or ($LOGmodify_contacts==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=391111111111&contact_id=$contact_id"; $modify_footer_refresh=1; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo ""; if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) { $linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname"); if (!$linkALT) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } } else {$linkALT = $link;} $stmt="SELECT first_name,last_name,office_num,cell_num,other_num1,other_num2,bu_name,department,group_name,job_title,location from contact_information where contact_id='$contact_id';"; $rslt=mysql_to_mysqli($stmt, $linkALT); $row=mysqli_fetch_row($rslt); $first_name = $row[0]; $last_name = $row[1]; $office_num = $row[2]; $cell_num = $row[3]; $other_num1 = $row[4]; $other_num2 = $row[5]; $bu_name = $row[6]; $department = $row[7]; $group_name = $row[8]; $job_title = $row[9]; $location = $row[10]; echo "
"._QXZ("MODIFY CONTACT").": $tts_id\n"; echo "\n"; echo "\n"; echo "
"._QXZ("First Name").": $NWB#contact_information$NWE
"._QXZ("Last Name").": $NWB#contact_information$NWE
"._QXZ("Office Number").": $NWB#contact_information$NWE
"._QXZ("Cell Number").": $NWB#contact_information$NWE
"._QXZ("Other Number")." 1: $NWB#contact_information$NWE
"._QXZ("Other Number")." 2: $NWB#contact_information$NWE
"._QXZ("BU Name").": $NWB#contact_information$NWE
"._QXZ("Department").": $NWB#contact_information$NWE
"._QXZ("Group").": $NWB#contact_information$NWE
"._QXZ("Job Title").": $NWB#contact_information$NWE
"._QXZ("Location").": $NWB#contact_information$NWE
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS CONTACT")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this contact")."\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=392111111111 modify settings container in the system ###################### if ($ADD==392111111111) { if ( ( ($LOGast_admin_access==1) and ($LOGmodify_servers==1) ) or ($LOGmodify_settings_containers==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=392111111111&container_id=$container_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT container_notes,container_type,user_group,container_entry from vicidial_settings_containers where container_id='$container_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $container_notes = $row[0]; $container_type = $row[1]; $user_group = $row[2]; $container_entry = $row[3]; echo "
"._QXZ("MODIFY SETTINGS CONTAINER").": $container_id\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($container_type == 'READ_ONLY') { echo "\n"; } else { echo "\n"; } echo "\n"; echo "
"._QXZ("Container ID").": $container_id
"._QXZ("Container Notes").": $NWB#settings_containers-container_notes$NWE
"._QXZ("Container Type").": $NWB#settings_containers-container_type$NWE
"._QXZ("Admin User Group").": $NWB#settings_containers-user_group$NWE
"._QXZ("Container Entry").":
$container_entry
$NWB#settings_containers-container_entry$NWE
"._QXZ("Container Entry").": $NWB#settings_containers-container_entry$NWE
\n"; echo "
\n"; echo "


\n"; if (preg_match("/WEEKDAY_TIMERANGE_SECONDS|CALL_QUOTA|CALL_LIMITS_OVERRIDE|SIP_EVENT_ACTIONS|CALLS_IN_QUEUE_COUNT|TIMEZONE_LIST|PHONE_NUMBERS|DIAL_TIMEOUTS|INGROUP_LIST|PAUSE_CODES_LIST|DEMOGRAPHIC_QUOTAS|STATE_DESCRIPTIONS/",$container_type)) { echo ""._QXZ("CAMPAIGNS USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where ( (in_man_dial_next_ready_seconds_override='$container_id') or (pause_max_exceptions='$container_id') or (call_quota_lead_ranking='$container_id') or (call_limit_24hour_override='$container_id') or (inbound_no_agents_no_dial_container='$container_id') or (dial_timeout_lead_container='$container_id') or (three_way_record_stop_exception='$container_id') or (leave_3way_start_recording_exception='$container_id') or (scheduled_callbacks_timezones_container='$container_id') or (in_man_dial_next_ready_seconds_override='$container_id') or (sip_event_logging='$container_id') or (calls_inqueue_count_one='$container_id') or (calls_inqueue_count_two='$container_id') or (demographic_quotas_container='$container_id') or (state_descriptions='$container_id') ) $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ig_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$ig_to_print|$stmt
\n";} $o=0; while ($ig_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("IN-GROUPS USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where ( (drop_call_seconds_override='$container_id') or (in_queue_nanque_exceptions='$container_id') or (second_alert_container='$container_id') or (third_alert_container='$container_id') or (state_descriptions='$container_id') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ig_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$ig_to_print|$stmt
\n";} $o=0; while ($ig_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("INBOUND DIDS USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT did_pattern,did_description,did_id from vicidial_inbound_dids where ( (pre_filter_recent_call='$container_id') or (pre_filter_recent_call='$container_id') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $did_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$did_to_print|$stmt
\n";} $o=0; while ($did_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; } if (preg_match("/WEBPHONE_SETTINGS/",$container_type)) { echo ""._QXZ("PHONES USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT extension,server_ip from phones where (webphone_settings='$container_id') $LOGadmin_viewable_groupsSQL order by server_ip,extension;"; $rslt=mysql_to_mysqli($stmt, $link); $p_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$p_to_print|$stmt
\n";} $o=0; while ($p_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] - $row[1] $row[1]

\n"; } if (preg_match("/LIST_WEEKDAY_RESETS/",$container_type)) { echo ""._QXZ("LISTS USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name,campaign_id from vicidial_lists where (weekday_resets_container='$container_id') $LOGallowed_campaignsSQL order by list_id;"; $rslt=mysql_to_mysqli($stmt, $link); $p_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$p_to_print|$stmt
\n";} $o=0; while ($p_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] - $row[1] $row[0] - $row[1] - $row[2]

\n"; } if (preg_match("/CM_VIDPROMPT_SPECIAL/",$container_type)) { echo ""._QXZ("CALL MENUS USING THIS SETTINGS CONTAINER").":
\n"; echo "\n"; $stmt="SELECT distinct op.menu_id,menu_name from vicidial_call_menu_options op,vicidial_call_menu cm where option_route_value_context LIKE \"%,$container_id\" and op.menu_id=cm.menu_id $LOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $p_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$p_to_print|$stmt
\n";} $o=0; while ($p_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] - $row[1] $row[0] - $row[1] - $row[2]

\n"; } if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS SETTINGS CONTAINER")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this settings container")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=393111111111 modify status group in the system ###################### if ($ADD==393111111111) { if ( ($LOGast_admin_access==1) and ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=393111111111&status_group_id=$status_group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT status_group_notes,user_group from vicidial_status_groups where status_group_id='$status_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $status_group_notes = $row[0]; $user_group = $row[1]; echo "
"._QXZ("MODIFY STATUS GROUP").": $status_group_id\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Status Group ID").": $status_group_id
"._QXZ("Status Group Notes").": $NWB#status_groups$NWE
"._QXZ("Admin User Group").": $NWB#status_groups$NWE
\n"; echo "
\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_to_mysqli($stmt, $link); $cats_to_print = mysqli_num_rows($rslt); $cats_list=""; $o=0; while ($cats_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cats_list .= "\n"; $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_campaign_statuses where campaign_id='$status_group_id' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $AScategory = $rowx[4]; $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("STATUS").""._QXZ("DESCRIPTION").""._QXZ("CATEGORY").""._QXZ("AGENT SELECTABLE").""._QXZ("HUMAN ANSWER").""._QXZ("SALE").""._QXZ("DNC").""._QXZ("CUSTOMER CONTACT").""._QXZ("NOT INTERESTED").""._QXZ("UNWORKABLE").""._QXZ("SCHEDULED CALLBACK").""._QXZ("COMPLETED").""._QXZ("ANSWERING MACHINE").""._QXZ("MIN SEC").""._QXZ("MAX SEC").""._QXZ("MODIFY/DELETE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$rowx[0]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "         \n"; echo "   \n"; if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) { echo ""._QXZ("DELETE")."\n"; } else { echo ""._QXZ("DELETE")."\n"; } echo "
\n"; echo "
"._QXZ("ADD NEW CUSTOM CAMPAIGN STATUS")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo _QXZ("Description").":   \n"; echo _QXZ("Selectable").":   \n"; echo _QXZ("Human Answer").":  
\n"; echo _QXZ("Sale").":   \n"; echo _QXZ("DNC").":   \n"; echo _QXZ("Customer Contact").":   \n"; echo _QXZ("Not Interested").":  
\n"; echo _QXZ("Unworkable").":   \n"; echo _QXZ("Callback").":   \n"; echo _QXZ("Completed").":   \n"; echo _QXZ("Answering Machine").":   \n"; echo _QXZ("Category").": \n"; echo "  
\n"; echo "
\n"; echo "

\n"; echo "


\n"; echo ""; echo ""._QXZ("IN-GROUPS USING THIS STATUS GROUP").":
\n"; echo "\n"; $stmt="SELECT group_id,group_name from vicidial_inbound_groups where status_group_id='$status_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ig_to_print = mysqli_num_rows($rslt); $o=0; while ($ig_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo ""._QXZ("LISTS USING THIS STATUS GROUP").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where status_group_id='$status_group_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $list_to_print = mysqli_num_rows($rslt); $o=0; while ($list_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; echo "
\n"; echo ""; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS STATUS GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this status group")."
\n"; } echo "\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=394111111111 modify automated report info in the system ###################### if ($ADD==394111111111) { if ($LOGmodify_auto_reports==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=394111111111&report_id=$report_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; ##### get server listing for dynamic pulldown $stmt="SELECT server_ip,server_description,external_server_ip from servers order by server_ip"; $rsltx=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rsltx); $servers_list=''; $o=0; while ($servers_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $servers_list .= "\n"; $o++; } $stmt="SELECT report_id,report_name,report_last_run,report_last_length,report_server,report_times,report_weekdays,report_monthdays,report_destination,email_from,email_to,email_subject,ftp_server,ftp_user,ftp_pass,ftp_directory,report_url,run_now_trigger,active,user_group,filename_override from vicidial_automated_reports where report_id='$report_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $report_id = $row[0]; $report_name = $row[1]; $report_last_run = $row[2]; $report_last_length = $row[3]; $report_server = $row[4]; $report_times = $row[5]; $report_weekdays = $row[6]; $report_monthdays = $row[7]; $report_destination = $row[8]; $email_from = $row[9]; $email_to = $row[10]; $email_subject = $row[11]; $ftp_server = $row[12]; $ftp_user = $row[13]; $ftp_pass = $row[14]; $ftp_directory = $row[15]; $report_url = $row[16]; $run_now_trigger = $row[17]; $active = $row[18]; $user_group = $row[19]; $filename_override = $row[20]; echo ""; echo "
"._QXZ("MODIFY AN AUTOMATED REPORT")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Report ID").": $report_id
"._QXZ("Last Run Time").": $report_last_run   ($report_last_length "._QXZ("seconds").")
"._QXZ("Report Name").": $NWB#auto_reports-report_name$NWE
"._QXZ("Admin User Group").": $NWB#auto_reports-user_group$NWE
"._QXZ("Run Server").": $NWB#auto_reports-report_server$NWE
"._QXZ("Report Times").": $NWB#auto_reports-report_times$NWE
"._QXZ("Report Weekdays").":\n"; echo ""._QXZ("Sunday")."   \n"; echo ""._QXZ("Monday")."   \n"; echo ""._QXZ("Tuesday")."   \n"; echo ""._QXZ("Wednesday")."   \n"; echo ""._QXZ("Thursday")."   \n"; echo ""._QXZ("Friday")."   \n"; echo ""._QXZ("Saturday")."   \n"; echo "$NWB#auto_reports-report_weekdays$NWE
"._QXZ("Report Month Days").": $NWB#auto_reports-report_monthdays$NWE
"._QXZ("Report Destination").": $NWB#auto_reports-report_destination$NWE
"._QXZ("Email From").": $NWB#auto_reports-email_from$NWE
"._QXZ("Email To").": $NWB#auto_reports-email_to$NWE
"._QXZ("Email Subject").": $NWB#auto_reports-email_subject$NWE
"; if (preg_match("/^SFTPCNTR|^FTPSCNTR/",$ftp_server)) { $temp_container_id = preg_replace("/^SFTPCNTR|^FTPSCNTR/",'',$ftp_server); echo ""._QXZ("FTP Server").""; } else {echo ""._QXZ("FTP Server")."";} echo "$NWB#auto_reports-ftp_server$NWE
"._QXZ("FTP User").": $NWB#auto_reports-ftp_user$NWE
"._QXZ("FTP Pass").": $NWB#auto_reports-ftp_pass$NWE
"._QXZ("FTP Directory").": $NWB#auto_reports-ftp_directory$NWE
"._QXZ("Filename Override").": $NWB#auto_reports-filename_override$NWE
"._QXZ("Active").": $NWB#auto_reports-active$NWE
"._QXZ("Run Now Trigger").": $NWB#auto_reports-run_now_trigger$NWE
"._QXZ("Report URL").": $NWB#auto_reports-report_url$NWE
\n"; echo "

\n"; if ($LOGmodify_auto_reports > 0) { echo "

"._QXZ("DELETE THIS AUTOMATED REPORT")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this automated report")."
\n"; } } else { echo _QXZ("You are not authorized to view this page. Please go back."); } } ###################### # ADD=395111111111 modify IP Lists screen ###################### if ($ADD==395111111111) { echo "
\n"; echo ""; if ($LOGmodify_ip_lists==1) { $stmt = "SELECT count(*) FROM vicidial_ip_lists where ip_list_id='$ip_list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vig_exists = $row[0]; if ($vig_exists > 0) { ### read in all ip_addresses in this IP List $stmt = "SELECT ip_address FROM vicidial_ip_list_entries where ip_list_id='$ip_list_id' order by ip_address;"; $rslt=mysql_to_mysqli($stmt, $link); $vaf_ct = mysqli_num_rows($rslt); $vaf=0; while ($vaf_ct > $vaf) { $row=mysqli_fetch_row($rslt); $vaf_list[$vaf] = $row[0]; $vaf_count[$vaf] = 0; $vaf++; } $stmt_log=''; $log_notes=''; if (strlen($ip_address) > 2) { $PN = explode("\n",$ip_address); $PNct = count($PN); $p=0; $ip_added=0; $ip_removed=0; while ($p < $PNct) { $PN[$p] = preg_replace('/[^\,\:\+\*\#\.\_0-9\p{L}]/u','',$PN[$p]); if (strlen($PN[$p]) > 0) { $PN[$p] = preg_replace("/\r|\n|\t/",'',$PN[$p]); $ac_found=0; $vaf=0; while ($vaf_ct > $vaf) { if ($PN[$p] == $vaf_list[$vaf]) { $vaf_count[$vaf]++; $ac_found++; } $vaf++; } if ($ac_found < 1) { $stmt="SELECT count(*) from vicidial_ip_list_entries where ip_address='$PN[$p]' and ip_list_id='$ip_list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] < 1) { $stmt="INSERT INTO vicidial_ip_list_entries (ip_address,ip_list_id) values('$PN[$p]','$ip_list_id');"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_log .= "$stmt|"; $ip_added++; if ($DB > 0) {echo "Added ip_address $PN[$p]
\n";} } else {if ($DB > 0) {echo "Skipped add, already exists: $PN[$p]
\n";}} } } $p++; } $vaf=0; while ($vaf_ct > $vaf) { if ($vaf_count[$vaf] < 1) { $stmt="SELECT count(*) from vicidial_ip_list_entries where ip_address='$vaf_list[$vaf]' and ip_list_id='$ip_list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) { $stmt="DELETE FROM vicidial_ip_list_entries where ip_address='$vaf_list[$vaf]' and ip_list_id='$ip_list_id';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_log .= "$stmt|"; $ip_removed++; if ($DB > 0) {echo "Removed ip_address $vaf_list[$vaf]
\n";} } else {if ($DB > 0) {echo "Skipped delete, already removed: $vaf_list[$vaf]
\n";}} } $vaf++; } $log_notes .= "$ip_added IPs Added|$ip_removed IPs Removed|"; } if ( (strlen($ip_list_name) > 2) and (strlen($active) > 0) ) { $stmt="UPDATE vicidial_ip_lists set ip_list_name='$ip_list_name',active='$active',user_group='$user_group' where ip_list_id='$ip_list_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $stmt_log .= "$stmt|"; $ILaffected_rows = mysqli_affected_rows($link); if ($ILaffected_rows > 0) {$log_notes .= "main entry edited|";} } else { $stmt="SELECT ip_list_id,ip_list_name,active,user_group from vicidial_ip_lists where ip_list_id='$ip_list_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $ip_list_id = $row[0]; $ip_list_name = $row[1]; $active = $row[2]; $user_group = $row[3]; } if (strlen($stmt_log) > 10) { echo "
"._QXZ("IP LIST MODIFIED").": $ip_list_id\n"; ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt_log|"; $SQL_log = preg_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='IPLISTS', event_type='MODIFY', record_id='$ip_list_id', event_code='ADMIN MODIFY IP LIST', event_sql=\"$SQL_log\", event_notes='$log_notes';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } ### read in all ip_addresses in this IP List $stmt = "SELECT ip_address FROM vicidial_ip_list_entries where ip_list_id='$ip_list_id' order by ip_address;"; $rslt=mysql_to_mysqli($stmt, $link); $vaf_ct = mysqli_num_rows($rslt); $vaf=0; $vaf_textarea=''; while ($vaf_ct > $vaf) { $row=mysqli_fetch_row($rslt); $vaf_textarea .= "$row[0]\n"; $vaf++; } echo "
"._QXZ("MODIFY IP LIST")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("IP List").": $ip_list_id
"._QXZ("IP List Name").": $NWB#ip_lists-ip_list_name$NWE
"._QXZ("Active").": $NWB#ip_lists-active$NWE
"._QXZ("Admin User Group").": $NWB#ip_lists-user_group$NWE
"._QXZ("IP Addresses").":

("._QXZ("one ip address per line only").")
$NWB#ip_lists-ip_address$NWE

\n"; echo ""._QXZ("USER GROUPS USING THIS IP LIST").":
\n"; echo "\n"; $stmt="SELECT distinct user_group,group_name from vicidial_user_groups where ( (admin_ip_list='$ip_list_id') or (agent_ip_list='$ip_list_id') or (api_ip_list='$ip_list_id') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $ugs_to_print = mysqli_num_rows($rslt); $o=0; while ($ugs_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; } else { echo _QXZ("You must use a valid IP List")."\n"; exit; } if ($LOGmodify_ip_lists > 0) { echo "

"._QXZ("DELETE THIS IP LIST")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this IP List")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=396111111111 modify CID group in the system ###################### if ($ADD==396111111111) { if ( ($LOGast_admin_access==1) and ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=396111111111&cid_group_id=$cid_group_id"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $not_allowed_campaigns_ct=0; $stmt="SELECT count(*) from vicidial_campaigns where ( (cid_group_id='$cid_group_id') or (cid_group_id_two='$cid_group_id') ) $notLOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $accidsX_to_print = mysqli_num_rows($rslt); if ($accidsX_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $not_allowed_campaigns_ct = $rowx[0]; } if ($not_allowed_campaigns_ct > 0) { echo "
"._QXZ("CID GROUP NOT AVAILABLE - this CID Group is assigned to a campaign you are not allowed to view")."
\n"; exit; } $stmt="SELECT cid_group_notes,cid_group_type,user_group,cid_auto_rotate_minutes,cid_auto_rotate_minimum,cid_auto_rotate_calls,cid_last_auto_rotate,cid_auto_rotate_cid from vicidial_cid_groups where cid_group_id='$cid_group_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $cid_group_notes = $row[0]; $cid_group_type = $row[1]; $user_group = $row[2]; $cid_auto_rotate_minutes = $row[3]; $cid_auto_rotate_minimum = $row[4]; $cid_auto_rotate_calls = $row[5]; $cid_last_auto_rotate = $row[6]; $cid_auto_rotate_cid = $row[7]; echo "
"._QXZ("MODIFY CID GROUP").": $cid_group_id
\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($cid_group_type == 'NONE') { echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } echo "\n"; echo "
"._QXZ("CID Group ID").": $cid_group_id
"._QXZ("CID Group Notes").": $NWB#cid_groups$NWE
"._QXZ("CID Group Type").": "._QXZ("$cid_group_type")."$NWB#cid_groups$NWE
"._QXZ("Admin User Group").": $NWB#cid_groups$NWE
"._QXZ("CID Auto Rotate Minutes").": $NWB#cid_groups-cid_auto_rotate_minutes$NWE
"._QXZ("CID Auto Rotate Minimum").": $NWB#cid_groups-cid_auto_rotate_minimum$NWE
"._QXZ("CID Auto Rotate Calls, CID and Time").": $cid_auto_rotate_calls - $cid_auto_rotate_cid - $cid_last_auto_rotate $NWB#cid_groups-cid_auto_rotate_calls$NWE\n"; if (strlen($cid_auto_rotate_cid) > 5) { echo "
  "._QXZ("Skip and NOROTATE current CID")."
\n"; } echo "
\n"; echo "
\n"; echo "
\n"; $checkbox_list=''; $checkbox_count=0; echo "

"._QXZ("CIDS FOR THIS CID GROUP").":   $NWB#cid_groups$NWE
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; $stmt="SELECT areacode,outbound_cid,active,cid_description,call_count_today from vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id' order by areacode,outbound_cid;"; $rslt=mysql_to_mysqli($stmt, $link); $accids_to_print = mysqli_num_rows($rslt); $o=0; while ($accids_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $Xareacode[$o] = $rowx[0]; $Xoutbound_cid[$o] = $rowx[1]; $Xactive[$o] = $rowx[2]; $Xcid_description[$o] = $rowx[3]; $Xcall_count_today[$o] = $rowx[4]; $checkbox_list .= "|active_$Xareacode[$o]_$Xoutbound_cid[$o]"; $o++; $checkbox_count++; } echo "\n"; $o=0; while ($accids_to_print > $o) { $ct = ($o + 1); if ($ct == '1') { $bgcolor='bgcolor="#'. $SSstd_row1_background .'"'; $bgac = $Xareacode[$o]; } else { if ($Xareacode[$o] != $bgac) { $bgct=0; if (preg_match("/1$|3$|5$|7$|9$/i", $bgct)) {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} $bgct++; $bgac = $Xareacode[$o]; } } $DID_edit_link_BEGIN=''; $DID_edit_link_END=''; if (strlen($Xoutbound_cid[$o]) > 0) { $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$Xoutbound_cid[$o]' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); if ($dids_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $DID_edit_link_BEGIN = ""; $DID_edit_link_END=''; } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
#"._QXZ("$cid_group_type").""._QXZ("CID NUMBER").""._QXZ("DESCRIPTION").""._QXZ("ACTIVE")."
"._QXZ("select all")."
"._QXZ("CALLS").""._QXZ("DELETE")."
  $ct   $Xareacode[$o]   $DID_edit_link_BEGIN$Xoutbound_cid[$o]$DID_edit_link_END\n"; if ($Xactive[$o] == 'Y') { echo ""; } else { echo ""; } echo "   $Xcall_count_today[$o]   "._QXZ("DELETE")."
\n"; echo "

\n"; echo "
"._QXZ("ADD NEW $cid_group_type CID")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($cid_group_type == 'NONE') {echo "\n";} else {echo _QXZ("$cid_group_type").": \n";} echo _QXZ("Outbound CID").":
\n"; echo _QXZ("Description").": \n"; echo "
\n"; echo "

\n"; echo ""._QXZ("CAMPAIGNS USING THIS CID GROUP").":
\n"; echo "\n"; $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where ( (cid_group_id='$cid_group_id') or (cid_group_id_two='$cid_group_id') ) $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rslt); $o=0; while ($camps_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]


\n"; echo ""._QXZ("LISTS USING THIS CID GROUP").":
\n"; echo "\n"; $stmt="SELECT list_id,list_name from vicidial_lists where cid_group_id='$cid_group_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); echo "\n"; $o++; } echo "
$row[0] $row[1]

\n"; if (($LOGast_admin_access==1) and ($LOGmodify_statuses==1)) { echo "

"._QXZ("DELETE THIS CID GROUP")."\n"; } if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to this CID GROUP")."\n"; echo "

"._QXZ("Click here to download this CID GROUP")."
\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=3111111111111 modify conference record in the system ###################### if ($ADD==3111111111111) { if ($LOGast_admin_access==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=3111111111111&conf_exten=$conf_exten&server_ip=$server_ip"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT conf_exten,server_ip,extension from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $conf_exten = $row[0]; $server_ip = $row[1]; $extension = $row[2]; } echo "
"._QXZ("MODIFY A CONFERENCE RECORD").": $conf_exten
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Conference").": $NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
"._QXZ("Current Extension").":
\n"; echo "
\n"; if ($LOGast_delete_phones > 0 && mysqli_num_rows($rslt)>0) { echo "

"._QXZ("DELETE THIS CONFERENCE")."\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=31111111111111 modify vicidial conference record in the system ###################### if ($ADD==31111111111111) { if ($LOGast_admin_access==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=31111111111111&conf_exten=$conf_exten&server_ip=$server_ip"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $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_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $conf_exten = $row[0]; $server_ip = $row[1]; echo "
"._QXZ("MODIFY AN AGENT CONFERENCE RECORD").": $row[0]\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Conference").": $NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
"._QXZ("Current Extension").":
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS AGENT CONFERENCE")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=32111111111111 modify vicidial ConfBridge record in the system ###################### if ($ADD==32111111111111) { if ($LOGast_admin_access==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=32111111111111&conf_exten=$conf_exten&server_ip=$server_ip"; $modify_footer_refresh=1; } echo "
\n"; echo ""; $stmt="SELECT conf_exten,server_ip,extension,leave_3way,leave_3way_datetime from vicidial_confbridges where conf_exten='$conf_exten' and server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { $row=mysqli_fetch_row($rslt); $conf_exten = $row[0]; $server_ip = $row[1]; echo "
"._QXZ("MODIFY AN AGENT CONFBRIDGE RECORD").": $row[0]\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("ConfBridge").": $NWB#conferences-conf_exten$NWE
"._QXZ("Server IP").": $NWB#conferences-server_ip$NWE
"._QXZ("Current Extension").":
\n"; echo "
\n"; if ($LOGast_delete_phones > 0) { echo "

"._QXZ("DELETE THIS AGENT CONFBRIDGE")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=311111111111111 modify vicidial system settings ###################### if ($ADD==311111111111111) { if ($LOGmodify_servers==1) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=311111111111111"; $modify_footer_refresh=1; } echo "
\n"; echo " "; $stmt="SELECT count(*) from vicidial_phone_codes;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vicidial_phone_codes_count = $row[0]; $stmt="SELECT count(*) from vicidial_postal_codes;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vicidial_postal_codes_count = $row[0]; $stmt="SELECT count(*) from vicidial_postal_codes_cities;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vicidial_postal_codes_cities_count = $row[0]; $stmt="SELECT count(*) from vicidial_nanpa_prefix_codes;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $vicidial_nanpa_prefix_codes_count = $row[0]; $stmt="SELECT count(*) from nanpa_prefix_exchanges_master;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $nanpa_prefix_exchanges_master_count = $row[0]; $stmt="SELECT count(*) from nanpa_prefix_exchanges_fast;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $nanpa_prefix_exchanges_fast_count = $row[0]; $stmt="SELECT count(*) from nanpa_wired_to_wireless;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $nanpa_wired_to_wireless_count = $row[0]; $stmt="SELECT count(*) from nanpa_wireless_to_wired;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $nanpa_wireless_to_wired_count = $row[0]; $stmt="SELECT sum(total_calls) from vicidial_daily_max_stats where stats_flag='OPEN' and stats_type!='TOTAL';"; $rslt=mysql_to_mysqli($stmt, $link); $stats_to_print = mysqli_num_rows($rslt); if ($stats_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ALLtotal_calls = $rowx[0]; } $stmt="SELECT max(max_inbound) from vicidial_daily_max_stats where stats_flag='OPEN' and stats_type='INGROUP';"; $rslt=mysql_to_mysqli($stmt, $link); $stats_to_print = mysqli_num_rows($rslt); if ($stats_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ALLmax_inbound = $rowx[0]; } $stmt="SELECT max(max_outbound) from vicidial_daily_max_stats where stats_flag='OPEN' and stats_type='CAMPAIGN';"; $rslt=mysql_to_mysqli($stmt, $link); $stats_to_print = mysqli_num_rows($rslt); if ($stats_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ALLmax_outbound = $rowx[0]; } $stmt="SELECT max_channels,max_calls,max_agents from vicidial_daily_max_stats where stats_flag='OPEN' and stats_type='TOTAL';"; $rslt=mysql_to_mysqli($stmt, $link); $stats_to_print = mysqli_num_rows($rslt); if ($stats_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ALLchannels_count = $rowx[0]; $ALLcalls_count = $rowx[1]; $ALLagent_count = $rowx[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,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format,alt_ivr_logging,default_phone_code,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,rec_prompt_count,agent_soundboards,web_loader_phone_length,agent_script,agent_chat_screen_colors,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,agent_push_events,agent_push_url,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,anyone_callback_inactive_lists,enable_gdpr_download_deletion,source_id_display,agent_logout_link,manual_dial_validation,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,queuemetrics_pausereason,inbound_answer_config,enable_international_dncs,web_loader_phone_strip,manual_dial_phone_strip,daily_call_count_limit,allow_shared_dial,agent_search_method,phone_defaults_container,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,agent_hidden_sound,agent_hidden_sound_volume,agent_hidden_sound_seconds,agent_screen_timer,label_lead_id,label_list_id,label_entry_date,label_gmt_offset_now,label_source_id,label_called_since_last_reset,label_status,label_user,label_date_of_birth,label_country_code,label_last_local_call_time,label_called_count,label_rank,label_owner,label_entry_list_id,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin,login_kickall,abandon_check_queue,agent_notifications,demographic_quotas,log_latency_gaps,inbound_credits,weekday_resets,two_factor_auth_agent_hours,highest_lead_id,hopper_hold_inserts,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port,enhanced_agent_monitoring,agent_hide_dial_fail,agent_man_dial_filter,agent_3way_dial_filter,stereo_recording,recording_dtmf_detection,recording_dtmf_muting,stereo_parallel_recording,db_crashed_tables_check,xfer_min_container,max_inbound_auto_reenable,amd_status_map from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_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]; $default_webphone = $row[45]; $default_external_server_ip = $row[46]; $webphone_url = $row[47]; $enable_agc_dispo_log = $row[48]; $custom_dialplan_entry = $row[49]; $queuemetrics_loginout = $row[50]; $callcard_enabled = $row[51]; $queuemetrics_callstatus = $row[52]; $default_codecs = $row[53]; $admin_web_directory = $row[54]; $label_title = $row[55]; $label_first_name = $row[56]; $label_middle_initial = $row[57]; $label_last_name = $row[58]; $label_address1 = $row[59]; $label_address2 = $row[60]; $label_address3 = $row[61]; $label_city = $row[62]; $label_state = $row[63]; $label_province = $row[64]; $label_postal_code = $row[65]; $label_vendor_lead_code = $row[66]; $label_gender = $row[67]; $label_phone_number = $row[68]; $label_phone_code = $row[69]; $label_alt_phone = $row[70]; $label_security_phrase = $row[71]; $label_email = $row[72]; $label_comments = $row[73]; $custom_fields_enabled = $row[74]; $slave_db_server = $row[75]; $reports_use_slave_db = $row[76]; $webphone_systemkey = $row[77]; $first_login_trigger = $row[78]; $default_phone_registration_password = $row[79]; $default_phone_login_password = $row[80]; $default_server_password = $row[81]; $admin_modify_refresh = $row[82]; $nocache_admin = $row[83]; $generate_cross_server_exten = $row[84]; $queuemetrics_addmember_enabled = $row[85]; $queuemetrics_dispo_pause = $row[86]; $label_hide_field_logs = $row[87]; $queuemetrics_pe_phone_append = $row[88]; $test_campaign_calls = $row[89]; $agents_calls_reset = $row[90]; $default_voicemail_timezone = $row[91]; $default_local_gmt = $row[92]; $noanswer_log = $row[93]; $alt_log_server_ip = $row[94]; $alt_log_dbname = $row[95]; $alt_log_login = $row[96]; $alt_log_pass = $row[97]; $tables_use_alt_log_db = $row[98]; $did_agent_log = $row[99]; $campaign_cid_areacodes_enabled = $row[100]; $pllb_grouping_limit = $row[101]; $did_ra_extensions_enabled = $row[102]; $expanded_list_stats = $row[103]; $contacts_enabled = $row[104]; $call_menu_qualify_enabled = $row[105]; $admin_list_counts = $row[106]; $allow_voicemail_greeting = $row[107]; $svn_revision = $row[108]; $queuemetrics_socket = $row[109]; $queuemetrics_socket_url = $row[110]; $enhanced_disconnect_logging = $row[111]; $allow_emails = $row[112]; $level_8_disable_add = $row[113]; $pass_hash_enabled = $row[114]; $pass_key = $row[115]; $pass_cost = $row[116]; $disable_auto_dial = $row[117]; $queuemetrics_record_hold = $row[118]; $country_code_list_stats = $row[119]; $reload_timestamp = $row[120]; $queuemetrics_pause_type = $row[121]; $frozen_server_call_clear = $row[122]; $callback_time_24hour = $row[123]; $allow_chats = $row[124]; $chat_url = $row[125]; $chat_timeout = $row[126]; $enable_languages = $row[127]; $language_method = $row[128]; $meetme_enter_login_filename = $row[129]; $meetme_enter_leave3way_filename = $row[130]; $enable_did_entry_list_id = $row[131]; $enable_third_webform = $row[132]; $agent_debug_logging = $row[133]; $default_language = $row[134]; $agent_whisper_enabled = $row[135]; $user_hide_realtime_enabled = $row[136]; $usacan_phone_dialcode_fix = $row[137]; $cache_carrier_stats_realtime = $row[138]; $oldest_logs_date = $row[139]; $log_recording_access = $row[140]; $report_default_format = $row[141]; $alt_ivr_logging = $row[142]; $default_phone_code = $row[143]; $admin_row_click = $row[144]; $admin_screen_colors = $row[145]; $ofcom_uk_drop_calc = $row[146]; $agent_screen_colors = $row[147]; $script_remove_js = $row[148]; $manual_auto_next = $row[149]; $user_new_lead_limit = $row[150]; $agent_xfer_park_3way = $row[151]; $rec_prompt_count = $row[152]; $agent_soundboards = $row[153]; $web_loader_phone_length = $row[154]; $agent_script = $row[155]; $agent_chat_screen_colors = $row[156]; $enable_auto_reports = $row[157]; $enable_pause_code_limits = $row[158]; $enable_drop_lists = $row[159]; $allow_ip_lists = $row[160]; $system_ip_blacklist = $row[161]; $agent_push_events = $row[162]; $agent_push_url = $row[163]; $hide_inactive_lists = $row[164]; $allow_manage_active_lists = $row[165]; $expired_lists_inactive = $row[166]; $did_system_filter = $row[167]; $anyone_callback_inactive_lists = $row[168]; $enable_gdpr_download_deletion = $row[169]; $source_id_display = $row[170]; $agent_logout_link = $row[171]; $manual_dial_validation = $row[172]; $mute_recordings_system = $row[173]; $user_admin_redirect = $row[174]; $list_status_modification_confirmation = $row[175]; $sip_event_logging_system = $row[176]; $call_quota_lead_ranking_system = $row[177]; $enable_second_script = $row[178]; $enable_first_webform = $row[179]; $recording_buttons = $row[180]; $opensips_cid_name_system = $row[181]; $require_password_length = $row[182]; $user_account_emails = $row[183]; $outbound_cid_any = $row[184]; $entries_per_page = $row[185]; $browser_call_alerts = $row[186]; $queuemetrics_pausereason = $row[187]; $inbound_answer_config = $row[188]; $enable_international_dncs = $row[189]; $web_loader_phone_strip = $row[190]; $manual_dial_phone_strip = $row[191]; $daily_call_count_limit = $row[192]; $allow_shared_dial = $row[193]; $agent_search_method_system = $row[194]; $phone_defaults_container = $row[195]; $qc_claim_limit = $row[196]; $qc_expire_days = $row[197]; $two_factor_auth_hours = $row[198]; $two_factor_container = $row[199]; $agent_hidden_sound = $row[200]; $agent_hidden_sound_volume = $row[201]; $agent_hidden_sound_seconds = $row[202]; $agent_screen_timer = $row[203]; $label_lead_id = $row[204]; $label_list_id = $row[205]; $label_entry_date = $row[206]; $label_gmt_offset_now = $row[207]; $label_source_id = $row[208]; $label_called_since_last_reset = $row[209]; $label_status = $row[210]; $label_user = $row[211]; $label_date_of_birth = $row[212]; $label_country_code = $row[213]; $label_last_local_call_time = $row[214]; $label_called_count = $row[215]; $label_rank = $row[216]; $label_owner = $row[217]; $label_entry_list_id = $row[218]; $call_limit_24hour = $row[219]; $allowed_sip_stacks = $row[220]; $agent_hide_hangup = $row[221]; $allow_web_debug = $row[222]; $max_logged_in_agents = $row[223]; $user_codes_admin = $row[224]; $login_kickall = $row[225]; $abandon_check_queue = $row[226]; $agent_notifications = $row[227]; $demographic_quotas_system = $row[228]; $log_latency_gaps = $row[229]; $inbound_credits = $row[230]; $weekday_resets = $row[231]; $two_factor_auth_agent_hours = $row[232]; $highest_lead_id = $row[233]; $hopper_hold_inserts = $row[234]; $coldstorage_server_ip = $row[235]; $coldstorage_dbname = $row[236]; $coldstorage_login = $row[237]; $coldstorage_pass = $row[238]; $coldstorage_port = $row[239]; $enhanced_agent_monitoring = $row[240]; $agent_hide_dial_fail = $row[241]; $agent_man_dial_filter = $row[242]; $agent_3way_dial_filter = $row[243]; $stereo_recording = $row[244]; $recording_dtmf_detection = $row[245]; $recording_dtmf_muting = $row[246]; $stereo_parallel_recording = $row[247]; $db_crashed_tables_check = $row[248]; $xfer_min_container = $row[249]; $max_inbound_auto_reenable = $row[250]; $amd_status_map = $row[251]; if ($pass_hash_enabled > 0) {$pass_hash_enabled = 'ENABLED';} else {$pass_hash_enabled = 'DISABLED';} if (strlen($pass_key) > 12) {$pass_key = 'S1';} else {$pass_key = 'S0';} if ($pass_cost > 0) {$pass_cost = 'C1';} else {$pass_cost = 'C0';} echo "
"._QXZ("MODIFY SYSTEM SETTINGS")."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $pcblinkB=''; $pcblinkE=''; if ($vicidial_phone_codes_count < 1000) {$pcblinkB=''; $pcblinkE='';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_languages > 0) { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $admin_web_dir=''; if (preg_match("/\//",$admin_web_directory)) {$admin_web_dir = dirname("$admin_web_directory"); $admin_web_dir .= "/";} if (!preg_match("/^http:|^https:/i",$sounds_web_server)) {$sounds_web_server = "http://".$sounds_web_server;} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="SELECT server_id,active,active_asterisk_server from servers where server_ip='$active_voicemail_server' $LOGadmin_viewable_groupsSQL limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rslt); $avmMESSAGE=''; $AVMactive=0; $AVMlinkA=''; $AVMlinkB=''; if ($servers_to_print > 0) { $rowx=mysqli_fetch_row($rslt); if ( ($rowx[1] == 'Y') and ($rowx[2] == 'Y') ) {$AVMactive++;} $AVMlinkA = "\n"; $AVMlinkB = ""; } if ($AVMactive < 1) { $avmMESSAGE .= "
"._QXZ("WARNING! The defined Active Voicemail Server is not an active server!")."\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $apinewlead_url=''; $stmt="SELECT url_address from vicidial_url_multi where campaign_id='-SYSTEM-API-NEWLEAD-' and entry_type='system' and url_type='apinewlead';"; $rslt=mysql_to_mysqli($stmt, $link); $urls_to_print = mysqli_num_rows($rslt); if ($urls_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $apinewlead_url = $rowx[0]; } else { $stmt="INSERT INTO vicidial_url_multi SET campaign_id='-SYSTEM-API-NEWLEAD-', entry_type='system', url_type='apinewlead', active='Y', url_address='';"; $rslt=mysql_to_mysqli($stmt, $link); } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container listings for dynamic XFER_TALK_MIN_MESSAGE container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='XFER_TALK_MIN_MESSAGE' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $pws_to_print = mysqli_num_rows($rslt); $xfer_min_message_menu=''; $pws_selected=0; $o=0; while ($pws_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $xfer_min_message_menu .= "\n"; $xfer_min_message_menu .= "\n"; $o++; } echo "\n"; ##### get container listings for dynamic AMD_STATUS_MAP container pulldown menu $stmt="SELECT container_id,container_notes from vicidial_settings_containers where container_type='AMD_STATUS_MAP' $LOGadmin_viewable_groupsSQL order by container_id;"; $rslt=mysql_to_mysqli($stmt, $link); $asm_to_print = mysqli_num_rows($rslt); $amd_status_map_menu=''; $pws_selected=0; $o=0; while ($asm_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (mb_strlen($rowx[1],'utf-8')>40) {$rowx[1] = mb_substr($rowx[1],0,40,'utf-8') . '...';} $amd_status_map_menu .= "\n"; $o++; } $amd_status_map_menu .= "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get container entry for USER_LOCATIONS_SYSTEM for pulldown menu $user_locations_ct=0; $raw_location_data=";location|description\n|default\n"; $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_LOCATIONS_SYSTEM';"; $rslt=mysql_to_mysqli($stmt, $link); $loc_to_print = mysqli_num_rows($rslt); if ($loc_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $raw_location_data = $rowx[0]; } $location_ARY = explode("\n",$raw_location_data); $location_ct = count($location_ARY); $o=0; while ($location_ct > $o) { if ( (!preg_match("/^;/",$location_ARY[$o])) and (strlen($location_ARY[$o]) > 2) and (preg_match("/\|/",$location_ARY[$o])) ) { $user_locations_ct++; } $o++; } echo "\n"; ##### get container entry for USER_CODES_SYSTEM for pulldown menu $user_codes_ct=0; $raw_user_codes_admin_data="|empty\n"; if ($SSuser_codes_admin == '2') { if (file_exists('user_codes_admin.txt')) { $user_codes_admin_ARY = file('user_codes_admin.txt'); } } else { $stmt="SELECT container_entry from vicidial_settings_containers where container_id='USER_CODES_SYSTEM';"; $rslt=mysql_to_mysqli($stmt, $link); $uc_to_print = mysqli_num_rows($rslt); if ($uc_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $raw_user_codes_admin_data = $rowx[0]; } $user_codes_admin_ARY = explode("\n",$raw_user_codes_admin_data); } $user_codes_admin_ct = count($user_codes_admin_ARY); $o=0; while ($user_codes_admin_ct > $o) { if ( (!preg_match("/^;/",$user_codes_admin_ARY[$o])) and (strlen($user_codes_admin_ARY[$o]) > 0) ) { $user_codes_ct++; } $o++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # check if any servers are using CONFBRIDGE, if not, don't allow Enable Enhanced Agent Monitoring to be enabled $CB_ct=0; $stmt="SELECT count(*) from servers where active='Y' and conf_engine='CONFBRIDGE';"; $rslt=mysql_to_mysqli($stmt, $link); $cbs_to_print = mysqli_num_rows($rslt); if ($cbs_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $CB_ct = $rowx[0]; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; ##### get ip lists listing for dynamic pulldown $stmt="SELECT ip_list_id,ip_list_name from vicidial_ip_lists where active='Y' order by ip_list_id;"; $rsltx=mysql_to_mysqli($stmt, $link); $iplists_to_print = mysqli_num_rows($rsltx); $ip_list=''; $o=0; while ($iplists_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $ip_list .= "\n"; $o++; } if (strlen($system_ip_blacklist) < 1) { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; } else { $ip_list_link_BEGIN = ""; $ip_list_link_END = ""; $ip_list_menu = "\n"; $ip_list_menu .= "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if ($stereo_dev_mode > 0) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; $two_factor_container_stmt="SELECT container_id from vicidial_settings_containers where container_type='2FA_SETTINGS' order by container_id asc"; $two_factor_container_rslt=mysql_to_mysqli($two_factor_container_stmt, $link); $two_factor_container_list="\n"; while ($pcr_row=mysqli_fetch_row($two_factor_container_rslt)) { $two_factor_container_list.="\n"; } echo "\n"; echo "\n"; $phone_container_stmt="select container_id from vicidial_settings_containers where container_type='PHONE_DEFAULTS' order by container_id asc"; $phone_container_rslt=mysql_to_mysqli($phone_container_stmt, $link); $phone_defaults_container_list="\n"; while ($pcr_row=mysqli_fetch_row($phone_container_rslt)) { $phone_defaults_container_list.="\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $custom_stmt="show tables like 'vicidial_custom_reports'"; $custom_rslt=mysql_to_mysqli($custom_stmt, $link); if (mysqli_num_rows($custom_rslt)>0) { echo ""; } if ( ($SSallow_custom_dialplan > 0) and ($LOGmodify_custom_dialplans > 0) ) { echo "\n"; echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Version").": $version
"._QXZ("SVN Version").": $svn_revision
"._QXZ("DB Schema Version").": $db_schema_version"; if ($db_schema_version != "$ExpectedDBSchema") { echo "   "._QXZ("WARNING: Code expects different schema").": $ExpectedDBSchema\n"; } echo "
"._QXZ("DB Schema Update Date").": $db_schema_update_date
"._QXZ("Password Encryption").": "._QXZ("$pass_hash_enabled")." - $pass_key - $pass_cost
"._QXZ("Auto User-add Value").": $auto_user_add_value
"._QXZ("Recording Prompt Count").": $rec_prompt_count
"._QXZ("Highest Lead ID").": $highest_lead_id
"._QXZ("Install Date").": $install_date
"._QXZ("Phone Codes").": $pcblinkB$vicidial_phone_codes_count - $vicidial_postal_codes_count - $vicidial_postal_codes_cities_count - $vicidial_nanpa_prefix_codes_count$pcblinkE - $nanpa_prefix_exchanges_master_count - $nanpa_prefix_exchanges_fast_count - $nanpa_wired_to_wireless_count - $nanpa_wireless_to_wired_count
"._QXZ("Today System Stats").": $ALLtotal_calls - $ALLmax_inbound - $ALLmax_outbound - $ALLchannels_count - $ALLcalls_count - $ALLagent_count
"._QXZ("Use Non-Latin")."(UTF-8): $NWB#settings-use_non_latin$NWE
"._QXZ("Enable Languages").": $NWB#settings-enable_languages$NWE
"._QXZ("Language Method").": $NWB#settings-language_method$NWE
"._QXZ("Default Language").": $NWB#settings-default_language$NWE
"._QXZ("Webroot Writable").": $NWB#settings-webroot_writable$NWE
"._QXZ("Agent Disable Display").": $NWB#settings-agent_disable$NWE
"._QXZ("Clear Frozen Calls").": $NWB#settings-frozen_server_call_clear$NWE
"._QXZ("Auto Check DB Crashed Tables").": $NWB#settings-db_crashed_tables_check$NWE
"._QXZ("Allowed SIP Stacks").": $NWB#settings-allowed_sip_stacks$NWE
"._QXZ("Allow SIPSAK Messages").": $NWB#settings-allow_sipsak_messages$NWE
"._QXZ("Admin Modify Auto-Refresh").": $NWB#settings-admin_modify_refresh$NWE
"._QXZ("Admin No-Cache").": $NWB#settings-nocache_admin$NWE
"._QXZ("Admin Row Click").": $NWB#settings-admin_row_click$NWE
"._QXZ("Admin Records Per Page").": $NWB#settings-entries_per_page$NWE
"._QXZ("Admin User Redirect").": $NWB#settings-user_admin_redirect$NWE
"._QXZ("Enable Agent Transfer Logfile").": $NWB#settings-enable_agc_xfer_log$NWE
"._QXZ("Enable Agent Disposition Logfile").": $NWB#settings-enable_agc_dispo_log$NWE
"._QXZ("Timeclock End Of Day").": $NWB#settings-timeclock_end_of_day$NWE
"._QXZ("Default Local GMT").": ("._QXZ("Do NOT Adjust for DST").")$NWB#settings-default_local_gmt$NWE
"._QXZ("Default Voicemail Zone").": $NWB#settings-default_voicemail_timezone$NWE
"._QXZ("Agents Calls Reset").": $NWB#settings-agents_calls_reset$NWE
"._QXZ("Timeclock Last Auto Logout").": $timeclock_last_reset_date
"._QXZ("Oldest Logs Date").": $oldest_logs_date
"._QXZ("Agent Screen Header Date Format").": $NWB#settings-vdc_header_date_format$NWE
"._QXZ("Agent Screen Customer Date Format").": $NWB#settings-vdc_customer_date_format$NWE
"._QXZ("Agent Screen Customer Phone Format").": $NWB#settings-vdc_header_phone_format$NWE
"._QXZ("Agent API Active").": $NWB#settings-vdc_agent_api_active$NWE
"._QXZ("Allow Agent API Notifications").": $NWB#settings-agent_notifications$NWE
"._QXZ("Allow Hide Customer Hangup Button").": $NWB#settings-agent_hide_hangup$NWE
"._QXZ("Agent Screen Park Xfer Button").": $NWB#settings-agent_xfer_park_3way$NWE
"._QXZ("Agent Screen Logout Link Credentials").": $NWB#settings-agent_logout_link$NWE
"._QXZ("Agent Soundboards").": $NWB#settings-agent_soundboards$NWE
"._QXZ("Agent Browser Call Alerts").": $NWB#settings-browser_call_alerts$NWE
"._QXZ("Hide Agent Failed Dial Codes").": $NWB#settings-agent_hide_dial_fail$NWE
"._QXZ("Agent Login Kick-all").": $NWB#settings-login_kickall$NWE
"._QXZ("Agent Hidden Browser Sound").":   \n"; echo " "._QXZ("volume").":   "; echo ""._QXZ("play selected sound")." $NWB#settings-agent_hidden_sound$NWE  
"._QXZ("Agent Hidden Browser Sound Seconds").": $NWB#settings-agent_hidden_sound_seconds$NWE  
"._QXZ("Enable Pause Code Time Limits").": $NWB#settings-enable_pause_code_limits$NWE
"._QXZ("Agent Only Callback Campaign Lock").": $NWB#settings-agentonly_callback_campaign_lock$NWE
"._QXZ("Callback Time 24 Hours").": $NWB#settings-callback_time_24hour$NWE
"._QXZ("Anyone Callback Inactive Lists").": $NWB#settings-anyone_callback_inactive_lists$NWE
"._QXZ("Central Sound Control Active").": $NWB#settings-sounds_central_control_active$NWE
"._QXZ("Sounds Web Server").": $NWB#settings-sounds_web_server$NWE
"._QXZ("Sounds Web Directory").": $sounds_web_directory $NWB#settings-sounds_web_directory$NWE
"._QXZ("Custom Agent Login Sound").": "._QXZ("audio chooser")." $NWB#settings-meetme_enter_login_filename$NWE
"._QXZ("Custom Agent Leave 3way Sound").": "._QXZ("audio chooser")." $NWB#settings-meetme_enter_leave3way_filename$NWE
"._QXZ("Admin Home URL").": $NWB#settings-admin_home_url$NWE
"._QXZ("Admin Web Directory").": $NWB#settings-admin_web_directory$NWE
"._QXZ("Agent Screen Script").": $NWB#settings-agent_script$NWE
$AVMlinkA"._QXZ("Active Voicemail Server")."$AVMlinkB: $NWB#settings-active_voicemail_server$NWE$avmMESSAGE
"._QXZ("Allow Voicemail Greeting Chooser").": $NWB#settings-allow_voicemail_greeting$NWE
"._QXZ("Auto Dial Limit").": $NWB#settings-auto_dial_limit$NWE
"._QXZ("Allow Campaign Agent Limits").": $NWB#settings-max_logged_in_agents$NWE
"._QXZ("Outbound Auto-Dial Active").": $NWB#settings-outbound_autodial_active$NWE
"._QXZ("Lead Hopper Hold Inserts Allowed").": $NWB#settings-hopper_hold_inserts$NWE
"._QXZ("API New Lead URL").": $NWB#settings-apinewlead_url$NWE
"._QXZ("Shared Agent Campaign Dialing").": $NWB#settings-allow_shared_dial$NWE
"._QXZ("Agent Search Method Override").": $NWB#settings-agent_search_method$NWE
"._QXZ("UK OFCOM Drop Calculation").": $NWB#settings-ofcom_uk_drop_calc$NWE
"._QXZ("Disable Auto-Dial").": $disable_auto_dial   $NWB#settings-disable_auto_dial$NWE
"._QXZ("Max FILL Calls per Second").": $NWB#settings-outbound_calls_per_second$NWE
"._QXZ("Web Lead Loader Phone Length").": $NWB#settings-web_loader_phone_length$NWE
"._QXZ("Web Lead Loader Phone Prefix Strip").": $NWB#settings-web_loader_phone_strip$NWE
"._QXZ("Manual Dial Phone Prefix Strip").": $NWB#settings-manual_dial_phone_strip$NWE
"._QXZ("Agent Manual Dialstring Filter").": $NWB#settings-agent_man_dial_filter$NWE
"._QXZ("Agent 3-Way Dialstring Filter").": $NWB#settings-agent_3way_dial_filter$NWE
"; if ($pws_selected > 0) {echo ""._QXZ("Transfer Talk Minimum Container")."";} else {echo _QXZ("Transfer Talk Minimum Container");} echo ": $NWB#settings-xfer_min_container$NWE
"; if ($pws_selected > 0) {echo ""._QXZ("AMD Status Map")."";} else {echo _QXZ("AMD Status Map");} echo ": $NWB#settings-amd_status_map$NWE
"._QXZ("Allow Custom Dialplan Entries").": $NWB#settings-allow_custom_dialplan$NWE
"._QXZ("PLLB Grouping Limit").": $NWB#settings-pllb_grouping_limit$NWE
"._QXZ("Generate Cross-Server Phone Extensions").": $NWB#settings-generate_cross_server_exten$NWE
"._QXZ("USA-Canada Phone Number Dialcode Fix").": $NWB#settings-usacan_phone_dialcode_fix$NWE
"._QXZ("Default Phone Code").": $NWB#settings-default_phone_code$NWE
"._QXZ("User Territories Active").": $NWB#settings-user_territories_active$NWE
"._QXZ("User Locations").": $user_locations_ct   $NWB#users-user_location$NWE
"; if ( ($SSuser_codes_admin == '2') and (file_exists('user_codes_admin.txt')) ) {echo ""._QXZ("User Codes Admin Pulldown")."";} else {echo ""._QXZ("User Codes Admin Pulldown")."";} echo ":   count: $user_codes_ct   $NWB#settings-user_codes_admin$NWE
"._QXZ("List Status Modification Confirmation").": $NWB#settings-list_status_modification_confirmation$NWE
"._QXZ("Enable First Webform").": $NWB#settings-enable_first_webform$NWE
"._QXZ("Enable Second Webform").": $NWB#settings-enable_second_webform$NWE
"._QXZ("Enable Third Webform").": $NWB#settings-enable_third_webform$NWE
"._QXZ("Enable Second Script Tab").": $NWB#settings-enable_second_script$NWE
"._QXZ("Enable TTS Integration").": $NWB#settings-enable_tts_integration$NWE
"._QXZ("Enable CallCard").": $NWB#settings-callcard_enabled$NWE
"._QXZ("Enable Campaign Test Calls").": $NWB#settings-test_campaign_calls$NWE
"._QXZ("Enable International DNCs").": $NWB#settings-enable_international_dncs$NWE
"._QXZ("DID System Filter").": $NWB#settings-did_system_filter$NWE
"._QXZ("Inbound Answer Configuration").": $NWB#settings-inbound_answer_config$NWE
"._QXZ("Inbound Calls Credits").": $NWB#settings-inbound_credits$NWE
"._QXZ("Inbound Max Calls Auto Re-Enable").": $NWB#settings-max_inbound_auto_reenable$NWE
"._QXZ("Enable Abandon Check Queue").": $NWB#settings-abandon_check_queue$NWE
"._QXZ("New Leads Per List Limit").": $NWB#settings-user_new_lead_limit$NWE
"._QXZ("Enable Daily Called Count Limits").": $NWB#settings-daily_call_count_limit$NWE
"._QXZ("Enable 24-Hour Called Count Limits").": $NWB#settings-call_limit_24hour$NWE
"._QXZ("Call Quota Lead Ranking").": $NWB#settings-call_quota_lead_ranking$NWE
"._QXZ("Demographic Quotas").": $NWB#settings-demographic_quotas$NWE
"._QXZ("Enable Custom List Fields").": $NWB#settings-custom_fields_enabled$NWE
"._QXZ("Enable Expanded List Stats").": $NWB#settings-expanded_list_stats$NWE
"._QXZ("Hide Inactive Lists").": $NWB#settings-hide_inactive_lists$NWE
"._QXZ("Country Code List Stats").": $NWB#settings-country_code_list_stats$NWE
"._QXZ("Enable DID Entry List ID").": $NWB#settings-enable_did_entry_list_id$NWE
"._QXZ("Enable List Weekday Resets").": $NWB#settings-weekday_resets$NWE
"._QXZ("Lead Manager Active Lists").": $NWB#settings-allow_manage_active_lists$NWE
"._QXZ("Enable GDPR-compliant Data Download Deletion").": $NWB#settings-enable_gdpr_download_deletion$NWE
"._QXZ("Expired Lists Auto Inactive").": $NWB#settings-expired_lists_inactive$NWE
"._QXZ("Enable Drop Lists").": $NWB#settings-enable_drop_lists$NWE
"._QXZ("Admin Lead Source ID Display").": $NWB#settings-source_id_display$NWE
"._QXZ("Allow Web DB Debug").": $NWB#settings-allow_web_debug$NWE
"._QXZ("Agent Screen Debug Logging").": $NWB#settings-agent_debug_logging$NWE
"._QXZ("Agent Latency Gaps Logging").": $NWB#settings-log_latency_gaps$NWE
"._QXZ("Agent Screen Timer").": $NWB#settings-agent_screen_timer$NWE
"._QXZ("Enhanced Disconnect Logging").": $NWB#settings-enhanced_disconnect_logging$NWE
"._QXZ("SIP Event Logging").": $NWB#settings-sip_event_logging$NWE
"._QXZ("Cached Realtime Carrier Stats").": $NWB#settings-cache_carrier_stats_realtime$NWE
"._QXZ("Enable CID Groups and Campaign Areacode CID").": $NWB#settings-campaign_cid_areacodes_enabled$NWE
"._QXZ("Outbound Call Any CID").": $NWB#settings-outbound_cid_any$NWE
"._QXZ("OpenSIPs CID Name Support").": $NWB#settings-opensips_cid_name$NWE
"._QXZ("Enable Remote Agent Extension Overrides").": $NWB#settings-did_ra_extensions_enabled$NWE
"._QXZ("Enable Enhanced Agent Monitoring").": $NWB#settings-enhanced_agent_monitoring$NWE
"._QXZ("Enable Agent Whisper Monitoring").": $NWB#settings-agent_whisper_enabled$NWE
"._QXZ("Enable User Hide RealTime").": $NWB#settings-user_hide_realtime_enabled$NWE
"._QXZ("Enable Manual Dial Auto Next").": $NWB#settings-manual_auto_next$NWE
"._QXZ("Enable Manual Dial Validation").": $NWB#settings-manual_dial_validation$NWE
"._QXZ("Enable Contacts").": $NWB#settings-contacts_enabled$NWE
"._QXZ("Call Menu Qualify Enabled").": $NWB#settings-call_menu_qualify_enabled$NWE
"._QXZ("Call Menu Alt DTMF Logging").": $NWB#settings-alt_ivr_logging$NWE
"._QXZ("Allow IP Lists").": $NWB#settings-allow_ip_lists$NWE
$ip_list_link_BEGIN"._QXZ("System IP Blacklist")."$ip_list_link_END: $NWB#settings-system_ip_blacklist$NWE
"._QXZ("Level 8 Disable Add").": $NWB#settings-level_8_disable_add$NWE
"._QXZ("Script Text Remove JS").": $NWB#settings-script_remove_js$NWE
"._QXZ("Admin List Counts Link").": $NWB#settings-admin_list_counts$NWE
"._QXZ("Allow Emails").": $NWB#settings-allow_emails$NWE
"._QXZ("Allow Chats").": $NWB#settings-allow_chats$NWE
"._QXZ("Chat Timeout in seconds").": $NWB#settings-chat_timeout$NWE
"._QXZ("Chat URL").": $NWB#settings-chat_url$NWE
"._QXZ("Agent Push Events").": $NWB#settings-agent_push_events$NWE
"._QXZ("Agent Push URL").": $NWB#settings-agent_push_url$NWE
"._QXZ("Log Recording Access").": $NWB#settings-log_recording_access$NWE
"._QXZ("Recording Buttons Type").": $NWB#settings-recording_buttons$NWE
"._QXZ("Allow Mute Recordings").": $NWB#settings-mute_recordings$NWE
"._QXZ("Allow Stereo Recordings").": $NWB#settings-stereo_recording$NWE
"._QXZ("Enable Stereo Parallel Recordings").": $NWB#settings-stereo_parallel_recording$NWE
"._QXZ("Allow Recording DTMF Detection").": $NWB#settings-recording_dtmf_detection$NWE
"._QXZ("Allow Recording DTMF Muting").": $NWB#settings-recording_dtmf_muting$NWE
\n"; echo ""; echo ""; echo ""; echo ""; echo "
"._QXZ("First Login Trigger").": "._QXZ("$first_login_trigger")."   $NWB#settings-first_login_trigger$NWE
"._QXZ("User Password Minimum Length").": $NWB#settings-require_password_length$NWE
\"Two-Factor-Authentication "._QXZ("Two-Factor Admin Auth Hours").": $NWB#settings-two_factor_auth_hours$NWE
\"Two-Factor-Authentication "._QXZ("Two-Factor Agent Auth Hours").": $NWB#settings-two_factor_auth_agent_hours$NWE
\"Two-Factor-Authentication\" "; if ( (strlen($two_factor_container) > 0) and ($two_factor_container != '---DISABLED---') ) {echo ""._QXZ("Two-Factor Auth Config Container")."";} else {echo _QXZ("Two-Factor Auth Config Container");} echo ": $NWB#settings-two_factor_container$NWE
"._QXZ("User Login Link Emails Allowed").": $NWB#settings-user_account_emails$NWE
"; if ( (strlen($phone_defaults_container) > 0) and ($phone_defaults_container != '---DISABLED---') ) {echo ""._QXZ("Default Phone Settings Container")."";} else {echo _QXZ("Default Phone Settings Container");} echo ": $NWB#settings-phone_defaults_container$NWE
"._QXZ("Default Phone Registration Password").": $NWB#settings-default_phone_registration_password$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Default Phone Login Password").": $NWB#settings-default_phone_login_password$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Default Server Password").": $NWB#settings-default_server_password$NWE     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Enable Automated Reports").": $NWB#settings-enable_auto_reports$NWE
"._QXZ("Report Default Format").": $NWB#settings-report_default_format$NWE
"._QXZ("Secondary Database Server").": $NWB#settings-slave_db_server$NWE
"._QXZ("Reports to use Secondary DB").": $NWB#settings-reports_use_slave_db$NWE
"._QXZ("Custom Reports to use Secondary DB").": $NWB#settings-custom_reports_use_slave_db$NWE"; echo "
"._QXZ("Custom Dialplan Entry").": $NWB#settings-custom_dialplan_entry$NWE
"._QXZ("Reload Dialplan On Servers").": $NWB#settings-reload_dialplan_on_servers$NWE     "._QXZ("Last").": $reload_timestamp
"._QXZ("Custom Dialplan Entry").": Disabled $NWB#settings-custom_dialplan_entry$NWE
"._QXZ("Hide Label in Call Logs").": $NWB#settings-label_hide_field_logs$NWE
"._QXZ("Label Title").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label First Name").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Middle Initial").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Last Name").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Address")."1: $NWB#settings-default_field_labels$NWE
"._QXZ("Label Address")."2: $NWB#settings-default_field_labels$NWE
"._QXZ("Label Address")."3: $NWB#settings-default_field_labels$NWE
"._QXZ("Label City").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label State").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Province").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Postal Code").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Vendor Lead Code").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Gender").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Phone Number").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Phone Code").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Alt Phone").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Security Phrase").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Email").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Comments").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Lead ID").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label List ID").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Entry Date").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Timezone").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Source ID").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Reset Code").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Status").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label User").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Date of Birth").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Country Code").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Last Call").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Called Count").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Rank").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Owner").": $NWB#settings-default_field_labels$NWE
"._QXZ("Label Entry List ID").": $NWB#settings-default_field_labels$NWE
"._QXZ("Admin Screen Colors").": $NWB#settings-admin_screen_colors$NWE
"._QXZ("Agent Screen Colors").": $NWB#settings-agent_screen_colors$NWE
"._QXZ("Agent Chat Screen Colors").": $NWB#settings-agent_chat_screen_colors$NWE
"._QXZ("QC Features Active").": $NWB#settings-qc_features_active$NWE
"._QXZ("QC Claim Limit").": $NWB#settings-qc_claim_limit$NWE
"._QXZ("QC Expire Days").": $NWB#settings-qc_expire_days$NWE
"._QXZ("QC Last Pull Time").": $qc_last_pull_time
"._QXZ("Default Codecs").": $NWB#settings-default_codecs$NWE
"._QXZ("Default Webphone").": $NWB#settings-default_webphone$NWE
"._QXZ("Default External Server IP").": $NWB#settings-default_external_server_ip$NWE
"._QXZ("Webphone URL").": $NWB#settings-webphone_url$NWE
"._QXZ("Webphone System Key").": $NWB#settings-webphone_systemkey$NWE
"._QXZ("No-Answer Log").": $NWB#settings-noanswer_log$NWE
"._QXZ("DID Agent Log").": $NWB#settings-did_agent_log$NWE
"._QXZ("Alt-Log DB Server").": $NWB#settings-alt_log_server_ip$NWE
"._QXZ("Alt-Log DB Name").": $NWB#settings-alt_log_dbname$NWE
"._QXZ("Alt-Log DB Login").": $NWB#settings-alt_log_login$NWE
"._QXZ("Alt-Log DB Password").": $NWB#settings-alt_log_pass$NWE
"._QXZ("Alt-Log Tables").": $NWB#settings-tables_use_alt_log_db$NWE
"._QXZ("Cold-Storage DB Server").": $NWB#settings-coldstorage_server_ip$NWE
"._QXZ("Cold-Storage DB Name").": $NWB#settings-coldstorage_dbname$NWE
"._QXZ("Cold-Storage DB Login").": $NWB#settings-coldstorage_login$NWE
"._QXZ("Cold-Storage DB Password").": $NWB#settings-coldstorage_pass$NWE
"._QXZ("Cold-Storage DB Port").": $NWB#settings-coldstorage_port$NWE
"._QXZ("Enable QueueMetrics Logging").": $NWB#settings-enable_queuemetrics_logging$NWE
"._QXZ("QueueMetrics Server IP").": $NWB#settings-queuemetrics_server_ip$NWE
"._QXZ("QueueMetrics DB Name").": $NWB#settings-queuemetrics_dbname$NWE
"._QXZ("QueueMetrics DB Login").": $NWB#settings-queuemetrics_login$NWE
"._QXZ("QueueMetrics DB Password").": $NWB#settings-queuemetrics_pass$NWE
"._QXZ("QueueMetrics URL").": $NWB#settings-queuemetrics_url$NWE
"._QXZ("QueueMetrics Log ID").": $NWB#settings-queuemetrics_log_id$NWE
"._QXZ("QueueMetrics EnterQueue Prepend").": $NWB#settings-queuemetrics_eq_prepend$NWE
"._QXZ("QueueMetrics Login-Out").": $NWB#settings-queuemetrics_loginout$NWE
"._QXZ("QueueMetrics CallStatus").": $NWB#settings-queuemetrics_callstatus$NWE
"._QXZ("QueueMetrics Addmember Enabled").": $NWB#settings-queuemetrics_addmember_enabled$NWE
"._QXZ("QueueMetrics Dispo Pause Code").": $NWB#settings-queuemetrics_dispo_pause$NWE
"._QXZ("QueueMetrics Pause Type Logging").": $NWB#settings-queuemetrics_pause_type$NWE
"._QXZ("QueueMetrics PAUSEREASON Logging").": $NWB#settings-queuemetrics_pausereason$NWE
"._QXZ("QueueMetrics Phone Environment Phone Append").": $NWB#settings-queuemetrics_pe_phone_append$NWE
"._QXZ("QueueMetrics Hold Call Log").": $NWB#settings-queuemetrics_record_hold$NWE
"._QXZ("QueueMetrics Socket Send").": $NWB#settings-queuemetrics_socket$NWE
"._QXZ("QueueMetrics Socket Send URL").": $NWB#settings-queuemetrics_socket_url$NWE
"._QXZ("Enable Vtiger Integration").": $NWB#settings-enable_vtiger_integration$NWE\n"; echo "   "._QXZ("Click here to Synchronize users with Vtiger")."\n"; echo "
"._QXZ("Vtiger DB Server IP").": $NWB#settings-vtiger_server_ip$NWE
"._QXZ("Vtiger DB Name").": $NWB#settings-vtiger_dbname$NWE
"._QXZ("Vtiger DB Login").": $NWB#settings-vtiger_login$NWE
"._QXZ("Vtiger DB Password").": $NWB#settings-vtiger_pass$NWE
"._QXZ("Vtiger URL").": $NWB#settings-vtiger_url$NWE
\n"; echo "\n"; $bas=0; $bas_embed_output=''; while ($browser_alert_sounds_listARY_ct > $bas) { $bas_embed_output .= "\n"; $bas++; } echo "$bas_embed_output"; echo "\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

"._QXZ("Click here to see Admin changes to the system settings")."
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=321111111111111 modify vicidial system statuses ###################### if ($ADD==321111111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=321111111111111"; $modify_footer_refresh=1; } echo "
\n"; echo " "; echo "
\n"; echo ""._QXZ("STATUSES WITHIN THIS SYSTEM").":   $NWB#system_statuses$NWE
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $cats_to_print = mysqli_num_rows($rslt); $cats_list=""; $o=0; while ($cats_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $cats_list .= "\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,scheduled_callback,completed,min_sec,max_sec,answering_machine from vicidial_statuses order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $AScategory = $rowx[4]; $o++; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("STATUS").""._QXZ("DESCRIPTION").""._QXZ("CATEGORY").""._QXZ("AGENT SELECTABLE").""._QXZ("HUMAN ANSWER").""._QXZ("SALE").""._QXZ("DNC").""._QXZ("CUSTOMER CONTACT").""._QXZ("NOT INTERESTED").""._QXZ("UNWORKABLE").""._QXZ("SCHEDULED CALLBACK").""._QXZ("COMPLETED").""._QXZ("ANSWERING MACHINE").""._QXZ("MIN SEC").""._QXZ("MAX SEC").""._QXZ("MODIFY/DELETE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "$rowx[0]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "         \n"; echo "   \n"; if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) { echo ""._QXZ("DELETE")."\n"; } else { echo ""._QXZ("DELETE")."\n"; } echo "
\n"; echo "
"._QXZ("ADD NEW SYSTEM STATUS")."
\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo _QXZ("Description").":   \n"; echo _QXZ("Selectable").":   \n"; echo _QXZ("Human Answer").":
\n"; echo _QXZ("Sale").":   \n"; echo _QXZ("DNC").":   \n"; echo _QXZ("Customer Contact").":   \n"; echo _QXZ("Not Interested").":  
\n"; echo _QXZ("Unworkable").":   \n"; echo _QXZ("Callback").":   \n"; echo _QXZ("Completed").":   \n"; echo _QXZ("Answering Machine").":   \n"; echo _QXZ("Category").": \n"; echo "  
\n"; echo "
\n"; echo "

\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=331111111111111 modify vicidial status categories ###################### if ($ADD==331111111111111) { if ( ($LOGmodify_servers==1) or ($LOGmodify_statuses==1) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=331111111111111"; $modify_footer_refresh=1; } echo "
\n"; echo " "; echo "
\n"; echo ""._QXZ("STATUS CATEGORIES").":   $NWB#status_categories$NWE
\n"; echo "\n"; echo "\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_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_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 (preg_match("/1$|3$|5$|7$|9$/i", $p)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $CATstatuses=''; $stmt="SELECT status from vicidial_statuses where category='$Avsc_id[$p]' order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $q=0; while ($statuses_to_print > $q) { $rowx=mysqli_fetch_row($rslt); $CATstatuses.=" $rowx[0]"; $q++; } $stmt="SELECT status from vicidial_campaign_statuses where category='$Avsc_id[$p]' $LOGallowed_campaignsSQL order by status;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $q=0; while ($statuses_to_print > $q) { $rowx=mysqli_fetch_row($rslt); $CATstatuses.=" $rowx[0]"; $q++; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $p++; } echo "
"._QXZ("CATEGORY").""._QXZ("NAME").""._QXZ("STATUSES IN THIS CATEGORY")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "$Avsc_id[$p]
\n"; echo "$CATstatuses"; echo "
"._QXZ("To Realtime Display").":     "._QXZ("Sale Category").":     "._QXZ("Dead Lead Category").":  
"._QXZ("Description").":
        \n"; echo "   "._QXZ("DELETE")."
 
\n"; echo "
"._QXZ("ADD NEW STATUS CATEGORY")."
\n"; echo "\n"; echo _QXZ("Category ID").":   \n"; echo _QXZ("Name").":  
\n"; echo _QXZ("TimeOnVDAD Display").":   \n"; echo _QXZ("Sale Category").":   \n"; echo _QXZ("Dead Lead Category").":  
\n"; echo _QXZ("Description").":   \n"; echo "
\n"; echo "

\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=241111111111111 adds the new qc status code to the system ###################### if ($ADD==241111111111111) { echo ""; $stmt="SELECT count(*) from vicidial_qc_codes where code='$code';"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo "
"._QXZ("QC STATUS CODE NOT ADDED - there is already a qc status code in the system with this name").": $row[0]\n";} else { if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) { echo "
"._QXZ("QC STATUS CODE NOT ADDED - Please go back and look at the data you entered")."\n"; echo "
"._QXZ("code must be between 1 and 8 characters in length")."\n"; echo "
"._QXZ("code name must be between 2 and 30 characters in length")."\n"; } else { echo "
"._QXZ("QC STATUS CODE ADDED").": $code_name - $code\n"; if (isset($_POST["qc_category"])) {$qc_category=$_POST["qc_category"];} $qc_category = preg_replace('/[^-_0-9\p{L}]/u','',$qc_category); $stmt="INSERT INTO vicidial_qc_codes (code,code_name,qc_result_type) values('$code','$code_name','$qc_category');"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='QCSTATUSES', 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_to_mysqli($stmt, $link); } } $ADD=341111111111111; } ###################### # ADD=341111111111111 modify vicidial QC status code ###################### if ($ADD==341111111111111) { if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) ) { if ( ($SSadmin_modify_refresh > 1) and ($modify_refresh_set < 1) ) { $modify_url = "$PHP_SELF?ADD=341111111111111"; $modify_footer_refresh=1; } echo "
\n"; echo " "; echo "
\n"; echo ""._QXZ("QC STATUS CODES WITHIN THIS SYSTEM").":   $NWB#vicidial_qc_status_codes$NWE
\n"; echo "\n"; echo "\n"; ##### go through each QC status code $stmt="SELECT count(*) from vicidial_qc_codes;"; $rslt=mysql_to_mysqli($stmt, $link); $rowx=mysqli_fetch_row($rslt); if ($rowx[0] > 0) { $stmt="SELECT code,code_name,qc_result_type from vicidial_qc_codes order by code;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $o=0; while ($statuses_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $o++; if (preg_match("/1$|3$|5$|7$|9$/i", $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } echo "
"._QXZ("STATUS CODE").""._QXZ("DESCRIPTION").""._QXZ("QC CATEGORY").""._QXZ("MODIFY/DELETE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "$rowx[0]
"._QXZ("$rowx[2]")."         \n"; echo "   \n"; if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) { echo ""._QXZ("DELETE")."\n"; } else { echo ""._QXZ("DELETE")."\n"; } echo "
\n"; echo "
"._QXZ("ADD NEW QC STATUS CODE")."
\n"; echo "\n"; echo _QXZ("Status").":   \n"; echo _QXZ("Description").": \n"; echo _QXZ("QC Category").":
\n"; echo "

\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=550 user search form ###################### if ($ADD==550) { echo "
\n"; echo ""; echo "
"._QXZ("SEARCH FOR A USER")."
\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("User Number").":
"._QXZ("Full Name").":
"._QXZ("User Level").":
"._QXZ("User Group").":
\n"; } ###################### # ADD=660 user search results ###################### if ($ADD==660) { echo "
\n"; echo ""; $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 = preg_replace('/\sand$/i', '', $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,export_gdpr_leads from vicidial_users where user_level <= $LOGuser_level $LOGadmin_viewable_groupsSQL $SQL order by full_name desc;"; # echo "\n|$stmt|\n"; $rslt=mysql_to_mysqli($stmt, $link); $people_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("SEARCH RESULTS").":\n"; echo "
\n"; $o=0; while ($people_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo ""; echo "\n"; $o++; } echo "
$row[1]$row[3]$row[4]$row[5]"._QXZ("MODIFY")." | "._QXZ("STATS")." | "._QXZ("STATUS")." | "._QXZ("TIME")."
\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_to_mysqli($stmt, $link); echo "
"._QXZ("User")."($user) "._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("User")."($user) "._QXZ("callback listings LIVE for more than one week have been made INACTIVE")."\n"; } } $CBinactiveLINK = "
"._QXZ("Remove LIVE Callbacks older than one month for this user")."
"._QXZ("Remove LIVE Callbacks older than one week for this user")."
"; echo ""; $CBquerySQLwhere = "and user='$user'"; echo "
"._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("campaign")."($campaign_id) "._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("campaign")."($campaign_id) "._QXZ("callback listings LIVE for more than one week have been made INACTIVE")."\n"; } } $CBinactiveLINK = "
"._QXZ("Remove LIVE Callbacks older than one month for this campaign")."
"._QXZ("Remove LIVE Callbacks older than one week for this campaign")."
"; echo ""; $CBquerySQLwhere = "and campaign_id='$campaign_id'"; echo "
"._QXZ("CAMPAIGN 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_to_mysqli($stmt, $link); echo "
"._QXZ("list")."($list_id) "._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("list")."($list_id) "._QXZ("callback listings LIVE for more than one week have been made INACTIVE")."\n"; } } $CBinactiveLINK = "
"._QXZ("Remove LIVE Callbacks older than one month for this list")."
"._QXZ("Remove LIVE Callbacks older than one week for this list")."
"; echo ""; $CBquerySQLwhere = "and list_id='$list_id'"; echo "
"._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("user group")."($user_group) "._QXZ("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_to_mysqli($stmt, $link); echo "
"._QXZ("user group")."($user_group) "._QXZ("callback listings LIVE for more than one week have been made INACTIVE")."\n"; } } $CBinactiveLINK = "
"._QXZ("Remove LIVE Callbacks older than one month for this user group")."
"._QXZ("Remove LIVE Callbacks older than one week for this user group")."
"; echo ""; $CBquerySQLwhere = "and user_group='$user_group'"; echo "
"._QXZ("USER GROUP 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 (preg_match("/USERIDDOWN/i",$stage)) {$SQLorder='order by user desc,'; $USERlink='stage=USERIDUP';} if (preg_match("/GROUPDOWN/i",$stage)) {$SQLorder='order by user_group desc,'; $NAMElink='stage=NAMEUP';} if (preg_match("/ENDATEDOWN/i",$stage)) {$SQLorder='order by entry_time desc,'; $LEVELlink='stage=LEVELUP';} $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_to_mysqli($stmt, $link); $cb_to_print = mysqli_num_rows($rslt); echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o=0; while ($cb_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("LEAD").""._QXZ("LIST")." "._QXZ("CAMPAIGN").""._QXZ("ENTRY DATE").""._QXZ("CALLBACK DATE").""._QXZ("USER").""._QXZ("RECIPIENT").""._QXZ("STATUS").""._QXZ("GROUP")."
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]"._QXZ("$row[9]").""._QXZ("$row[4]")."$row[11]
\n"; echo "$CBinactiveLINK"; } ###################################################################################################### ###################################################################################################### ####### 0 series, displays and searches ###################################################################################################### ###################################################################################################### ###################### # ADD=0A display all active users ###################### if ($ADD=="0A") { echo "
\n"; echo ""; echo "\"Users\" "._QXZ("USER LISTINGS").": "; if (preg_match('/display_all/',$status)) { $SQLstatus = ''; echo "   "._QXZ("show only active users")."\n"; } else { $SQLstatus = "and active='Y'"; echo "   "._QXZ("show all users")."\n"; } $USERlink='stage=USERIDDOWN'; $USERNUMlink='stage=USERIDNUMDOWN'; $NAMElink='stage=NAMEDOWN'; $LEVELlink='stage=LEVELDOWN'; $GROUPlink='stage=GROUPDOWN'; $SQLorder='order by full_name'; if (preg_match("/USERIDUP/i",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} if (preg_match("/USERIDDOWN/i",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} if (preg_match("/USERIDNUMUP/i",$stage)) {$SQLorder='order by CAST(user as SIGNED INTEGER) desc'; $USERNUMlink='stage=USERIDNUMDOWN';} if (preg_match("/USERIDNUMDOWN/i",$stage)) {$SQLorder='order by CAST(user as SIGNED INTEGER) asc'; $USERNUMlink='stage=USERIDNUMUP';} if (preg_match("/NAMEUP/i",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} if (preg_match("/NAMEDOWN/i",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} if (preg_match("/LEVELUP/i",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} if (preg_match("/LEVELDOWN/i",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} if (preg_match("/GROUPUP/i",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} if (preg_match("/GROUPDOWN/i",$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 $LOGadmin_viewable_groupsSQL $SQLstatus $SQLorder"; $rslt=mysql_to_mysqli($stmt, $link); $people_to_print = mysqli_num_rows($rslt); echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($people_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">$row[0]"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">$row[1]"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">$row[2]"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">$row[3]"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">"._QXZ("$row[4]").""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("USER ID")."   "; echo "- # -"._QXZ("FULL NAME").""._QXZ("LEVEL").""._QXZ("GROUP").""._QXZ("ACTIVE").""._QXZ("MODIFY").""._QXZ("STATS").""._QXZ("STATUS").""._QXZ("TIME")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3&user=$row[0]'\"";} echo ">"._QXZ("MODIFY")." 0) {echo " onclick=\"window.document.location='./user_stats.php?user=$row[0]'\"";} echo ">"._QXZ("STATS")." 0) {echo " onclick=\"window.document.location='./user_status.php?user=$row[0]'\"";} echo ">"._QXZ("STATUS")." 0) {echo " onclick=\"window.document.location='./AST_agent_time_sheet.php?agent=$row[0]'\"";} echo ">"._QXZ("TIME")."
\n"; } ###################### # ADD=10 display all campaigns ###################### if ($ADD==10) { echo "
\n"; echo ""; $active_only_default_campaigns=0; if (file_exists('options.php')) {require('options.php');} echo "\"Campaigns\" "._QXZ("CAMPAIGN LISTINGS").":\n"; if ( (preg_match('/display_active/',$status)) or ( (!preg_match('/display_all/',$status)) and ($active_only_default_campaigns > 0) ) ) { $SQLstatus = 'Y'; echo "   "._QXZ("show all campaigns")."\n"; } else { $SQLstatus = ''; echo "   "._QXZ("show only active campaigns")."\n"; } $camp_group_SQL = $LOGadmin_viewable_groupsSQL; if (strlen($whereLOGallowed_campaignsSQL) < 6) {$camp_group_SQL = $whereLOGadmin_viewable_groupsSQL;} $stmt="SELECT campaign_id,campaign_name,active,dial_method,auto_dial_level,lead_order,dial_statuses,user_group,dial_prefix,three_way_dial_prefix,manual_dial_prefix from vicidial_campaigns $whereLOGallowed_campaignsSQL $camp_group_SQL order by campaign_id;"; $rslt=mysql_to_mysqli($stmt, $link); $campaigns_to_print = mysqli_num_rows($rslt); echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; if ($SSoutbound_autodial_active > 0) { echo ""; echo ""; echo ""; echo ""; echo ""; } echo "\n"; $o=0; $p=0; while ($campaigns_to_print > $o) { $row=mysqli_fetch_row($rslt); if ( ($SQLstatus!='') and ($row[2]=='N') ) {$skip_display=1;} else { if (preg_match('/1$|3$|5$|7$|9$/i', $p)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=34&campaign_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; if ($SSoutbound_autodial_active > 0) { $dial_prefix = $row[8]; $three_way_dial_prefix = $row[9]; $manual_dial_prefix = $row[10]; $adtl_prefix=0; $dial_prefix_display = "$dial_prefix"; if ( (strlen($manual_dial_prefix) > 0) and (!preg_match("/^$dial_prefix$/",$manual_dial_prefix)) ) {$dial_prefix_display .= " - $manual_dial_prefix"; $adtl_prefix++;} if ( (strlen($three_way_dial_prefix) > 0) and (!preg_match("/^$dial_prefix$/",$three_way_dial_prefix)) ) {$dial_prefix_display .= " - $three_way_dial_prefix"; $adtl_prefix++;} if ($adtl_prefix > 0) {$dial_prefix_display .= "  ";} echo ""; echo ""; echo ""; echo ""; echo ""; } echo "\n"; $p++; } $o++; } echo "
"._QXZ("CAMPAIGN ID")."
"._QXZ("NAME")."
"._QXZ("ACTIVE")."   "._QXZ("GROUP")."   "._QXZ("DIAL METHOD")."   "._QXZ("LEVEL")."   "._QXZ("LEAD ORDER")."   "._QXZ("DIAL STATUSES")."   "._QXZ("DP")."   "._QXZ("MODIFY")."
$row[0]   $row[1]   "._QXZ("$row[2]")."   ".(preg_match('/\-\-ALL\-\-/', $row[7]) ? _QXZ("$row[7]") : $row[7])."   "._QXZ("$row[3]")."   $row[4]   "._QXZ("$row[5]")."   $row[6] $dial_prefix_display "._QXZ("MODIFY")."
\n"; } ###################### # ADD=100 display all lists ###################### if ($ADD==100) { echo "
\n"; echo ""; ##### get list of campaign IDs for validation of list campaign $stmt="SELECT campaign_id from vicidial_campaigns;"; $rsltx=mysql_to_mysqli($stmt, $link); $camps_to_print = mysqli_num_rows($rsltx); $camp_list='|'; $o=0; while ($camps_to_print > $o) { $rowx=mysqli_fetch_row($rsltx); $camp_list .= "$rowx[0]|"; $o++; } $LISTlink='stage=LISTIDDOWN'; $NAMElink='stage=LISTNAMEDOWN'; $CALLTIMElink='stage=CALLTIMEDOWN'; $TALLYlink='stage=TALLYDOWN'; $ACTIVElink='stage=ACTIVEDOWN'; $CAMPAIGNlink='stage=CAMPAIGNDOWN'; $CALLDATElink='stage=CALLDATEDOWN'; $SQLorder='order by list_id'; if (preg_match('/LISTIDUP/i', $stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} if (preg_match('/LISTIDDOWN/i', $stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} if (preg_match('/LISTNAMEUP/i', $stage)) {$SQLorder='order by list_name asc'; $NAMElink='stage=LISTNAMEDOWN';} if (preg_match('/LISTNAMEDOWN/i', $stage)) {$SQLorder='order by list_name desc'; $NAMElink='stage=LISTNAMEUP';} if (preg_match('/CALLTIMEUP/i', $stage)) {$SQLorder='order by local_call_time asc'; $CALLTIMElink='stage=CALLTIMEDOWN';} if (preg_match('/CALLTIMEDOWN/i', $stage)) {$SQLorder='order by local_call_time desc'; $CALLTIMElink='stage=CALLTIMEUP';} if (preg_match('/TALLYUP/i', $stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} if (preg_match('/TALLYDOWN/i', $stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} if (preg_match('/ACTIVEUP/i', $stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} if (preg_match('/ACTIVEDOWN/i', $stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} if (preg_match('/CAMPAIGNUP/i',$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} if (preg_match('/CAMPAIGNUP/i', $stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} if (preg_match('/CALLDATEUP/i', $stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} if (preg_match('/CALLDATEDOWN/i', $stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';} $list_hideSQL=''; if ( ($SShide_inactive_lists > 0) and ($status != 'display_all') ) {$list_hideSQL = "and active='Y'";} $stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id,reset_time,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id $LOGallowed_campaignsSQL $list_hideSQL group by list_id $SQLorder"; if ( ($SSadmin_list_counts < 1) or ($rank != '999') ) {$stmt="SELECT list_id,list_name,list_description,'X' as tally,active,list_lastcalldate,campaign_id,reset_time,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists where active IN('Y','N') $list_hideSQL $LOGallowed_campaignsSQL $SQLorder";} $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); echo "\"Lists\" "._QXZ("LIST LISTINGS").": \n"; $rankLINK=""; if ($SSadmin_list_counts > 0) { if ($rank == '999') { $rankLINK = "&rank=999"; echo "   "._QXZ("hide list leads counts")."\n"; } else { $rankLINK = ""; echo "   "._QXZ("show list leads counts")."\n"; } } if ($SShide_inactive_lists > 0) { if ($status == 'display_all') { echo "     "._QXZ("hide inactive lists")."\n"; $rankLINK .= "&status=display_all"; } else { echo "     "._QXZ("show all lists")."\n"; } } echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; $lists_printed = ''; $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=311&list_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; if ($row[9] == 'campaign') {echo "";} else {echo "";} echo ""; echo ""; if (!preg_match("/\|$row[6]\|/",$camp_list)) {echo "";} else {echo "";} echo "\n"; $lists_printed .= "'$row[0]',"; $o++; } $stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id,reset_time,DATE_FORMAT(expiration_date,'%Y%m%d'),local_call_time from vicidial_lists where list_id NOT IN($lists_printed'') $list_hideSQL $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $p=0; while ($lists_to_print > $p) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo ""; echo ""; echo ""; echo ""; echo ""; if ($row[9] == 'campaign') {echo "";} else {echo "";} echo ""; echo ""; if (!preg_match("/\|$row[6]\|/",$camp_list)) {echo "";} else {echo "";} echo "\n"; $p++; $o++; } echo "
"._QXZ("LIST ID").""._QXZ("LIST NAME").""._QXZ("DESCRIPTION").""._QXZ("RTIME").""._QXZ("LEADS COUNT").""._QXZ("CALL TIME").""._QXZ("ACTIVE").""._QXZ("LAST CALL DATE").""._QXZ("CAMPAIGN").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[7] $row[3] $row[9] $row[9] "._QXZ("$row[4]"); if ($row[8] < $EXPtestdate) {echo " "._QXZ("EXP")."";} echo " $row[5] $row[6] $row[6]"._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[7] $row[3] $row[9] $row[9] $row[4]"; if ($row[8] < $EXPtestdate) {echo " "._QXZ("EXP")."";} echo " $row[5] $row[6] $row[6]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=130 display all drop lists ###################### if ($ADD==130) { echo "
\n"; echo ""; $stmt="SELECT dl_id,dl_name,last_run,active,list_id,user_group,closer_campaigns from vicidial_drop_lists $whereLOGadmin_viewable_groupsSQL order by dl_id;"; $rslt=mysql_to_mysqli($stmt, $link); $droplists_to_print = mysqli_num_rows($rslt); echo _QXZ("DROP LISTS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $dl_id_ary = $MT; $dl_name_ary = $MT; $last_run_ary = $MT; $dl_active_ary = $MT; $list_id_ary = $MT; $group_group_ary = $MT; $closer_campaigns_ary = $MT; $o=0; while ($droplists_to_print > $o) { $row=mysqli_fetch_row($rslt); $dl_id_ary[$o] = $row[0]; $dl_name_ary[$o] = $row[1]; $last_run_ary[$o] = $row[2]; $dl_active_ary[$o] = $row[3]; $list_id_ary[$o] = $row[4]; $group_group_ary[$o] = $row[5]; $closer_campaigns_ary[$o] = $row[6]; $o++; } $o=0; while ($droplists_to_print > $o) { $closer_campaigns_ary[$o] = preg_replace("/^ |^ | -$/",'',$closer_campaigns_ary[$o]); $ingroups_ary = explode(" ",$closer_campaigns_ary[$o]); $ingroups_ary_ct = count($ingroups_ary); $s=0; $ingroups_ct=0; while($s < $ingroups_ary_ct) { if (strlen($ingroups_ary[$s])>1) {$ingroups_ct++;} $s++; } if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=331&dl_id=$dl_id_ary[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("ID").""._QXZ("DROP LIST NAME").""._QXZ("LAST RUN").""._QXZ("ACTIVE").""._QXZ("LIST ID").""._QXZ("INGROUPS").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$dl_id_ary[$o] $dl_name_ary[$o] $last_run_ary[$o] "._QXZ("$dl_active_ary[$o]")." $list_id_ary[$o] $ingroups_ct".(preg_match('/\-\-ALL\-\-/', $group_group_ary[$o]) ? _QXZ("$group_group_ary[$o]") : $group_group_ary[$o]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=1001 display all inbound sections ###################### if ($ADD==1001) { $subhead_font = "style=\"font-family:HELVETICA;font-size:14;color:BLACK;font-weight:bold;\""; ?> Inbound
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
 \n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; echo "\n"; } else {echo "";} echo "\n"; if ($SSemail_enabled>0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1800';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; echo "\n"; } else {echo "";} echo "\n"; } if ($SSchat_enabled>0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1900';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; echo "\n"; } else {echo "";} echo "\n"; } echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1300';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; echo "\n"; } else {echo "";} if ($SSdid_ra_extensions_enabled > 0) { echo "\n"; } echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1500';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; echo "\n"; } else {echo "";} echo "\n"; if ($LOGdelete_from_dnc > 0) {$FPGlink = _QXZ("Add-Delete FPG Number");} else {$FPGlink = _QXZ("Add FPG Number");} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1700';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($add_copy_disabled < 1) { echo "\n"; } else {echo "";} echo "\n"; echo "\n"; echo "
"._QXZ("Inbound Groups")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1000';\"";} echo "> "._QXZ("Show In-Groups")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1111';\"";} echo ">\" "._QXZ("Add A New In-Group")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1211';\"";} echo ">\" "._QXZ("Copy In-Group")."
"._QXZ("Email Groups")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1800';\"";} echo ">\"Email "._QXZ("Show Email Groups")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1811';\"";} echo ">\" "._QXZ("Add A New Email Group")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1911';\"";} echo ">\" "._QXZ("Copy Email Group")."
"._QXZ("Chat Groups")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1900';\"";} echo ">\" "._QXZ("Show Chat Groups")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=18111';\"";} echo ">\" "._QXZ("Add A New Chat Group")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=19111';\"";} echo ">\" "._QXZ("Copy Chat Group")."
"._QXZ("Inbound DIDs")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1300';\"";} echo ">\" "._QXZ("Show DIDs")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1311';\"";} echo ">\" "._QXZ("Add A New DID")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1411';\"";} echo ">\" "._QXZ("Copy DID")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1320';\"";} echo ">\" "._QXZ("RA Extensions")."
"._QXZ("Call Menus")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1500';\"";} echo ">\" "._QXZ("Show Call Menus")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1511';\"";} echo ">\" "._QXZ("Add A New Call Menu")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1611';\"";} echo ">\" "._QXZ("Copy Call Menu")."
"._QXZ("Filter Phone Groups")." 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1700';\"";} echo ">\" "._QXZ("Filter Phone Groups")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1711';\"";} echo ">\" "._QXZ("Add Filter Phone Group")."
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=171';\"";} echo ">\" $FPGlink
\n"; echo "
\n"; echo "\n"; echo "
 
\n"; echo "
\n"; echo "\n"; echo "
 
\n"; echo "
\n"; echo "\n"; echo "
 
\n"; echo "
  \n"; } ###################### # ADD=1000 display all inbound groups ###################### if ($ADD==1000) { echo "
\n"; echo ""; $stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color,user_group from vicidial_inbound_groups where group_handling='PHONE' $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $ingroups_to_print = mysqli_num_rows($rslt); echo "\"Inbound "._QXZ("INBOUND GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; $group_id_ary = $MT; $group_name_ary = $MT; $group_priority_ary = $MT; $group_active_ary = $MT; $group_time_ary = $MT; $group_color_ary = $MT; $group_group_ary = $MT; $o=0; while ($ingroups_to_print > $o) { $row=mysqli_fetch_row($rslt); $group_id_ary[$o] = $row[0]; $group_name_ary[$o] = $row[1]; $group_priority_ary[$o] = $row[2]; $group_active_ary[$o] = $row[3]; $group_time_ary[$o] = $row[4]; $group_color_ary[$o] = $row[5]; $group_group_ary[$o] = $row[6]; $o++; } $o=0; while ($ingroups_to_print > $o) { $allowed_campaigns_count=0; $allowed_campaigns_warning=''; $SQL_group_id = preg_replace("/_/",'\\_',$group_id_ary[$o]); $stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $campin_to_print = mysqli_num_rows($rslt); $vc_allowed_ct=0; if ($campin_to_print > $vc_allowed_ct) { $row=mysqli_fetch_row($rslt); $allowed_campaigns_count = $row[0]; $vc_allowed_ct++; } if ($allowed_campaigns_count < 1) {$allowed_campaigns_warning='   NA';} $icbq_LIVE_count=''; $stmt="SELECT count(*) from vicidial_inbound_callback_queue where group_id='$group_id_ary[$o]' and icbq_status='LIVE';"; $rslt=mysql_to_mysqli($stmt, $link); $icbq_to_print = mysqli_num_rows($rslt); if ($icbq_to_print > 0) { $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {$icbq_LIVE_count = " $row[0]";} } if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3111&group_id=$group_id_ary[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("IN-GROUP").""._QXZ("NAME").""._QXZ("PRIORITY").""._QXZ("ACTIVE").""._QXZ("ADMIN GROUP").""._QXZ("TIME").""._QXZ("COLOR").""._QXZ("MODIFY")."
$group_id_ary[$o] $group_name_ary[$o] $group_priority_ary[$o] $icbq_LIVE_count "._QXZ("$group_active_ary[$o]")." $allowed_campaigns_warning ".(preg_match('/\-\-ALL\-\-/', $group_group_ary[$o]) ? _QXZ("$group_group_ary[$o]") : $group_group_ary[$o])." $group_time_ary[$o]  "._QXZ("MODIFY")."
\n"; } ###################### # ADD=1800 display all email groups ###################### if ( ($ADD==1800) and ($SSallow_emails>0) ) { echo "
\n"; echo ""; $stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color,user_group from vicidial_inbound_groups where group_handling='EMAIL' $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $ingroups_to_print = mysqli_num_rows($rslt); echo "\"Email "._QXZ("EMAIL GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; $o=0; while ($ingroups_to_print > $o) { $row=mysqli_fetch_row($rslt); ## Get unhandled count $ct_stmt="SELECT count(*) From vicidial_email_list where status='NEW' and group_id='$row[0]'"; $ct_rslt=mysql_to_mysqli($ct_stmt, $link); $ct_row=mysqli_fetch_row($ct_rslt); $unhandled_emails=$ct_row[0]; $allowed_campaigns_warning=''; ## Get campaign allowed count $SQL_group_id = preg_replace("/_/",'\\_',$row[0]); $ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $ct_rslt=mysql_to_mysqli($ct_stmt, $link); $ct_row=mysqli_fetch_row($ct_rslt); $email_allowed_campaigns_count=$ct_row[0]; if ($email_allowed_campaigns_count < 1) {$allowed_campaigns_warning='   NA';} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3811&group_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("IN-GROUP").""._QXZ("NAME").""._QXZ("PRIORITY").""._QXZ("ACTIVE").""._QXZ("UNREAD EMAILS").""._QXZ("ADMIN GROUP").""._QXZ("TIME").""._QXZ("COLOR").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] "._QXZ("$row[3]")." $allowed_campaigns_warning $unhandled_emails ".(preg_match('/\-\-ALL\-\-/', $row[6]) ? _QXZ("$row[6]") : $row[6])." $row[4]  "._QXZ("MODIFY")."
\n"; } ###################### # ADD=1900 display all chat groups ###################### if ( ($ADD==1900) and ($SSallow_chats>0) ) { echo "
\n"; echo ""; $stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color,user_group from vicidial_inbound_groups where group_handling='CHAT' $LOGadmin_viewable_groupsSQL order by group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $ingroups_to_print = mysqli_num_rows($rslt); echo "\"Chat "._QXZ("CHAT GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; $o=0; while ($ingroups_to_print > $o) { $row=mysqli_fetch_row($rslt); $allowed_campaigns_warning=''; ## Get campaign allowed count $SQL_group_id = preg_replace("/_/",'\\_',$row[0]); $ct_stmt="SELECT count(*) from vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" $LOGallowed_campaignsSQL;"; $ct_rslt=mysql_to_mysqli($ct_stmt, $link); $ct_row=mysqli_fetch_row($ct_rslt); $chat_allowed_campaigns_count=$ct_row[0]; if ($chat_allowed_campaigns_count < 1) {$allowed_campaigns_warning='   NA';} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3911&group_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("IN-GROUP").""._QXZ("NAME").""._QXZ("PRIORITY").""._QXZ("ACTIVE").""._QXZ("ADMIN GROUP").""._QXZ("TIME").""._QXZ("COLOR").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] "._QXZ("$row[3]")." $allowed_campaigns_warning ".(preg_match('/\-\-ALL\-\-/', $row[6]) ? _QXZ("$row[6]") : $row[6])." $row[4]  "._QXZ("MODIFY")."
\n"; } ###################### # ADD=1300 display all inbound dids ###################### if ($ADD==1300) { echo "
\n"; echo ""; $DIDlink="stage=DIDDOWN&status=$status"; $DESClink="stage=DESCDOWN&status=$status"; $CARRIERlink="stage=CARRIERDOWN&status=$status"; $ACTIVElink="stage=ACTIVEDOWN&status=$status"; $GROUPlink="stage=GROUPDOWN&status=$status"; $ROUTElink="stage=ROUTEDOWN&status=$status"; $REClink="stage=RECDOWN&status=$status"; $SQLorder='order by did_pattern'; if ($did_pattern_filter) { $dpf_clause="and did_pattern like '%".$did_pattern_filter."%'"; $DPFlink="&did_pattern_filter=".$did_pattern_filter; } else { $dpf_clause=""; $DPFlink=""; } if (preg_match("/DIDUP/i",$stage)) {$SQLorder='order by did_pattern asc'; $DIDlink="stage=DIDDOWN&status=$status";} if (preg_match("/DIDDOWN/i",$stage)) {$SQLorder='order by did_pattern desc'; $DIDlink="stage=DIDUP&status=$status";} if (preg_match("/DESCUP/i",$stage)) {$SQLorder='order by did_description asc'; $DESClink="stage=DESCDOWN&status=$status";} if (preg_match("/DESCDOWN/i",$stage)) {$SQLorder='order by did_description desc'; $DESClink="stage=DESCUP&status=$status";} if (preg_match("/CARRIERUP/i",$stage)) {$SQLorder='order by did_carrier_description asc'; $CARRIERlink="stage=CARRIERDOWN&status=$status";} if (preg_match("/CARRIERDOWN/i",$stage)) {$SQLorder='order by did_carrier_description desc'; $CARRIERlink="stage=CARRIERUP&status=$status";} if (preg_match("/ACTIVEUP/i",$stage)) {$SQLorder='order by did_active asc'; $ACTIVElink="stage=ACTIVEDOWN&status=$status";} if (preg_match("/ACTIVEDOWN/i",$stage)) {$SQLorder='order by did_active desc'; $ACTIVElink="stage=ACTIVEUP&status=$status";} if (preg_match("/GROUPUP/i",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink="stage=GROUPDOWN&status=$status";} if (preg_match("/GROUPDOWN/i",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink="stage=GROUPUP&status=$status";} if (preg_match("/ROUTEUP/i",$stage)) {$SQLorder='order by did_route asc'; $ROUTElink="stage=ROUTEDOWN&status=$status";} if (preg_match("/ROUTEDOWN/i",$stage)) {$SQLorder='order by did_route desc'; $ROUTElink="stage=ROUTEUP&status=$status";} if (preg_match("/RECUP/i",$stage)) {$SQLorder='order by record_call asc'; $REClink="stage=RECDOWN&status=$status";} if (preg_match("/RECDOWN/i",$stage)) {$SQLorder='order by record_call desc'; $REClink="stage=RECUP&status=$status";} $limitSQL=''; $next_prev_HTML=''; $dids_count=0; if ($SSentries_per_page > 0) { $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern!='did_system_filter' $dpf_clause $LOGadmin_viewable_groupsSQL"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $dids_count = $row[0]; if ( ($dids_count > $SSentries_per_page) and ($status != 'display_all') ) { if (strlen($start_count) < 1) {$start_count=0;} $next_count = ($start_count + $SSentries_per_page); $nextnext_count = ($next_count + $SSentries_per_page); if ($next_count > $dids_count) {$next_count = $dids_count;} else { if ($nextnext_count > $dids_count) { $next_temp = ($dids_count - $next_count); $nextHTML = ""._QXZ("NEXT")." $next_temp   "; } else { $nextHTML = ""._QXZ("NEXT")." $SSentries_per_page   "; } } $next_prev_HTML .= _QXZ("RECORDS")." $start_count - $next_count   "; $limitSQL="limit $SSentries_per_page"; if ($start_count > 0) { $prev_count = ($start_count - $SSentries_per_page); $limitSQL="limit $start_count,$SSentries_per_page"; $next_prev_HTML .= ""._QXZ("PREVIOUS")." $SSentries_per_page   "; } $next_prev_HTML .= $nextHTML; $next_prev_HTML .= "           "._QXZ("show all DIDs")."   "; } else if ($status == 'display_all') { $next_prev_HTML .= ""._QXZ("Show paginated DIDs")."   "; } } $stmt="SELECT did_id,did_pattern,did_description,did_carrier_description,did_active,did_route,record_call,user_group from vicidial_inbound_dids where did_pattern!='did_system_filter' $dpf_clause $LOGadmin_viewable_groupsSQL $SQLorder $limitSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $dids_to_print = mysqli_num_rows($rslt); echo "\"Inbound "._QXZ("INBOUND DID LISTINGS").":\n"; if (strlen($next_prev_HTML) > 10) {echo "
  $next_prev_HTML
";} echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; while ($dids_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} # truncate description and carrier if they are more than 60 characters if (mb_strlen($row[2],'utf-8')>60) { while (mb_strlen($row[2],'utf-8')>60) {$row[2] = mb_substr("$row[2]", 0, -1,'utf-8');} $row[2] .= '...'; } if (mb_strlen($row[3],'utf-8')>40) { while (mb_strlen($row[3],'utf-8')>40) {$row[3] = mb_substr("$row[3]", 0, -1,'utf-8');} $row[3] .= '...'; } echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3311&did_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
Filter/search DIDs:$NWB#inbound_dids-filter_search$NWE"; if ($did_pattern_filter) { # echo "    "; # echo "    "; if ($dids_count > $SSentries_per_page) { #if ($status == 'display_all') # {echo "      Show paginated filtered DIDs";} #else # {echo "      Show all filtered DIDs";} } echo "      Clear filter"; } echo "
#"._QXZ("DID").""._QXZ("DESCRIPTION").""._QXZ("CARRIER").""._QXZ("ACTIVE").""._QXZ("ADMIN GROUP").""._QXZ("ROUTE").""._QXZ("REC").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] "._QXZ("$row[4]")." ".(preg_match('/\-\-ALL\-\-/', $row[7]) ? _QXZ("$row[7]") : $row[7])." "._QXZ("$row[5]")." "._QXZ("$row[6]").""._QXZ("MODIFY")."
\n"; echo "\n"; echo "
\n"; echo "
\n"; } ###################### # ADD=1500 display all call menus ###################### if ($ADD==1500) { echo "
\n"; echo ""; $stmt="SELECT menu_id,menu_name,menu_prompt,menu_timeout,user_group from vicidial_call_menu $whereLOGadmin_viewable_groupsSQL order by menu_id;"; $rslt=mysql_to_mysqli($stmt, $link); $menus_to_print = mysqli_num_rows($rslt); echo "\"Call "._QXZ("CALL MENU LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $menu_id = $MT; $menu_name = $MT; $menu_prompt = $MT; $menu_timeout = $MT; $menu_group = $MT; while ($menus_to_print > $o) { $row=mysqli_fetch_row($rslt); $menu_id[$o] = $row[0]; $menu_name[$o] = $row[1]; $menu_prompt[$o] = $row[2]; $menu_timeout[$o] = $row[3]; $menu_group[$o] = $row[4]; $o++; } $o=0; while ($menus_to_print > $o) { $stmt="SELECT count(*) from vicidial_call_menu_options where menu_id=\"$menu_id[$o]\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3511&menu_id=$menu_id[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("MENU ID").""._QXZ("NAME").""._QXZ("GROUP").""._QXZ("PROMPT").""._QXZ("TIMEOUT").""._QXZ("OPTIONS").""._QXZ("MODIFY")."
$menu_id[$o] $menu_name[$o] $menu_group[$o] $menu_prompt[$o] $menu_timeout[$o] $row[0]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=1700 display all filter phone groups ###################### if ($ADD==1700) { echo "
\n"; echo ""; $stmt="SELECT vfpg.filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,count(*) as tally,user_group from vicidial_filter_phone_groups vfpg,vicidial_filter_phone_numbers vfpn where vfpg.filter_phone_group_id=vfpn.filter_phone_group_id $LOGadmin_viewable_groupsSQL group by filter_phone_group_id order by filter_phone_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); echo "\"Filter "._QXZ("FILTER PHONE GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $lists_printed = ''; $groups_printed = ''; $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $groups_printed .= "'$row[0]',"; $o++; } $stmt="SELECT filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,0,user_group from vicidial_filter_phone_groups where filter_phone_group_id NOT IN($groups_printed'') $LOGadmin_viewable_groupsSQL order by filter_phone_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $lists_to_print = mysqli_num_rows($rslt); $o=0; while ($lists_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("FPG ID").""._QXZ("FPG NAME").""._QXZ("DESCRIPTION").""._QXZ("ADMIN GROUP").""._QXZ("PHONES COUNT").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] ".(preg_match('/\-\-ALL\-\-/', $row[4]) ? _QXZ("$row[4]") : $row[4])." $row[3]"._QXZ("MODIFY")."
$row[0] $row[1] $row[2] ".(preg_match('/\-\-ALL\-\-/', $row[4]) ? _QXZ("$row[4]") : $row[4])." $row[3]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=10000 display all remote agents ###################### if ($ADD==10000) { echo "
\n"; echo ""; # gather list of allowed users $stmt="SELECT user from vicidial_users $whereLOGadmin_viewable_groupsSQL order by user;"; $rslt=mysql_to_mysqli($stmt, $link); $users_to_print = mysqli_num_rows($rslt); $o=0; $user_start_SQL=''; while ($users_to_print > $o) { $row=mysqli_fetch_row($rslt); $user_start_SQL .= "'$row[0]',"; $o++; } $user_start_SQL = preg_replace("/,$/","",$user_start_SQL); $OTHERuser_start_SQL=''; if (strlen($whereLOGadmin_viewable_groupsSQL) < 1) {$OTHERuser_start_SQL="where user_start NOT IN($user_start_SQL)";} if (strlen($user_start_SQL) > 2) {$user_start_SQL = "user_start IN($user_start_SQL)";} $ra_user_SQL = "and $user_start_SQL"; if (strlen($whereLOGallowed_campaignsSQL) < 6) {$ra_user_SQL = "where $user_start_SQL";} $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,extension_group,status,campaign_id from vicidial_remote_agents $whereLOGallowed_campaignsSQL $ra_user_SQL order by server_ip,campaign_id,user_start;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $remoteagents_to_print = mysqli_num_rows($rslt); echo "\"Remote "._QXZ("REMOTE AGENTS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($remoteagents_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31111&remote_agent_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } ### For users with no User Group restrictions, show all Remote Agents with no user attached if (strlen($OTHERuser_start_SQL) > 0) { $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,extension_group,status,campaign_id from vicidial_remote_agents $whereLOGallowed_campaignsSQL $OTHERuser_start_SQL order by server_ip,campaign_id,user_start;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $OTHERremoteagents_to_print = mysqli_num_rows($rslt); $o=0; while ($OTHERremoteagents_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31111&remote_agent_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } } echo "
"._QXZ("USER").""._QXZ("LINES").""._QXZ("SERVER")."   "._QXZ("CONF-EXTEN")."   "._QXZ("GROUP")."   "._QXZ("STATUS")."   "._QXZ("CAMPAIGN")."   "._QXZ("MODIFY")."
$row[1] $row[2] $row[3] $row[4] ".(preg_match('/^NONE$/', $row[5]) ? _QXZ("$row[5]") : $row[5])." "._QXZ("$row[6]")." $row[7]"._QXZ("MODIFY")."
($row[1]) $row[2] $row[3] $row[4] ".(preg_match('/^NONE$/', $row[5]) ? _QXZ("$row[5]") : $row[5])." "._QXZ("$row[6]")." $row[7]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=12000 display all extension group entries ###################### if ($ADD==12000) { echo "
\n"; echo ""; $stmt="SELECT extension_id,extension_group_id,extension,rank,campaign_groups,call_count_today,last_call_time,last_callerid from vicidial_extension_groups $whereLOGadmin_viewable_groupsSQL order by extension_group_id,rank,extension;"; $rslt=mysql_to_mysqli($stmt, $link); $extensiongroups_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("EXTENSION GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($extensiongroups_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=32111&extension_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("GROUP").""._QXZ("EXTENSION").""._QXZ("RANK")."   "._QXZ("RESTRICT")."   "._QXZ("COUNT")."   "._QXZ("LAST CALL")."   "._QXZ("LAST ID")."   "._QXZ("MODIFY")."
$row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[7]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=100000 display all user groups ###################### if ($ADD==100000) { echo "
\n"; echo ""; $stmt="SELECT user_group,group_name,forced_timeclock_login from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;"; $rslt=mysql_to_mysqli($stmt, $link); $usergroups_to_print = mysqli_num_rows($rslt); echo "\"User "._QXZ("USER GROUPS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; $Uuser_group = $MT; $Ugroup_name = $MT; $Uforced_timeclock_login = $MT; while ($usergroups_to_print > $o) { $row=mysqli_fetch_row($rslt); $Uuser_group[$o] = $row[0]; $Ugroup_name[$o] = $row[1]; $Uforced_timeclock_login[$o] = $row[2]; $o++; } $o=0; while ($usergroups_to_print > $o) { $stmt="SELECT count(*) from vicidial_users where user_group='$Uuser_group[$o]' $LOGadmin_viewable_groupsSQL"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $users_count = $row[0]; $stmt="SELECT count(*) from vicidial_users where user_group='$Uuser_group[$o]' and active='Y' $LOGadmin_viewable_groupsSQL"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $active_count = $row[0]; $stmt="SELECT count(*) from vicidial_users where user_group_two='$Uuser_group[$o]' $LOGadmin_viewable_groupsSQL"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $second_count = $row[0]; if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=311111&user_group=$Uuser_group[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("USER GROUP").""._QXZ("GROUP NAME").""._QXZ("USERS").""._QXZ("ACTIVE").""._QXZ("2ND").""._QXZ("FORCE TIMECLOCK")."   "._QXZ("MODIFY")."
$Uuser_group[$o] $Ugroup_name[$o] $users_count $active_count $second_count "._QXZ("$Uforced_timeclock_login[$o]").""._QXZ("MODIFY")."
\n"; } ###################### # ADD=1000000 display all scripts ###################### if ($ADD==1000000) { echo "
\n"; echo ""; $stmt="SELECT script_id,script_name,active,user_group,script_color from vicidial_scripts $whereLOGadmin_viewable_groupsSQL order by script_id;"; $rslt=mysql_to_mysqli($stmt, $link); $scripts_to_print = mysqli_num_rows($rslt); echo "\"Scripts\" "._QXZ("SCRIPTS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($scripts_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3111111&script_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("SCRIPT ID").""._QXZ("SCRIPT NAME").""._QXZ("ACTIVE")."   "._QXZ("ADMIN GROUP")."   "._QXZ("COLOR")."   "._QXZ("MODIFY")."
$row[0] $row[1] "._QXZ("$row[2]")." ".(preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3])."  "._QXZ("MODIFY")."
\n"; } ###################### # ADD=10000000 display all filters ###################### if ($ADD==10000000) { echo "
\n"; echo ""; $stmt="SELECT lead_filter_id,lead_filter_name,user_group from vicidial_lead_filters $whereLOGadmin_viewable_groupsSQL order by lead_filter_id;"; $rslt=mysql_to_mysqli($stmt, $link); $filters_to_print = mysqli_num_rows($rslt); echo "\"Filters\" "._QXZ("LEAD FILTER LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($filters_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31111111&lead_filter_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("FILTER ID").""._QXZ("FILTER NAME").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0] $row[1] ".(preg_match('/\-\-ALL\-\-/', $row[2]) ? _QXZ("$row[2]") : $row[2]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=100000000 display all call times ###################### if ($ADD==100000000) { echo "
\n"; echo " "; if (strlen($whereLOGadmin_viewable_groupsSQL) > 0) {$tempLOGadmin_viewable_call_timesSQL = $LOGadmin_viewable_call_timesSQL;} else {$tempLOGadmin_viewable_call_timesSQL = $whereLOGadmin_viewable_call_timesSQL;} $stmt="SELECT call_time_id,call_time_name,ct_default_start,ct_default_stop,user_group from vicidial_call_times $whereLOGadmin_viewable_groupsSQL $tempLOGadmin_viewable_call_timesSQL order by call_time_id;"; $rslt=mysql_to_mysqli($stmt, $link); $calltimes_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("CALL TIME LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($calltimes_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=311111111&call_time_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CALLTIME ID").""._QXZ("CALLTIME NAME").""._QXZ("DEFAULT START").""._QXZ("DEFAULT STOP").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] $row[4] "._QXZ("MODIFY")."
\n"; } ###################### # ADD=1000000000 display all state call times ###################### if ($ADD==1000000000) { echo "
\n"; echo " "; $stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,sct_default_start,sct_default_stop,user_group from vicidial_state_call_times $whereLOGadmin_viewable_groupsSQL order by state_call_time_id;"; $rslt=mysql_to_mysqli($stmt, $link); $statecalltimes_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("STATE CALL TIME LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($statecalltimes_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3111111111&call_time_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CALLTIME ID").""._QXZ("CALLTIME STATE").""._QXZ("CALLTIME NAME").""._QXZ("DEFAULT START").""._QXZ("DEFAULT STOP").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] "._QXZ("MODIFY")."
\n"; } ###################### # ADD=1200000000 display all holidays ###################### if ($ADD==1200000000) { echo "
\n"; echo " "; $stmt="SELECT holiday_id,holiday_date,holiday_name,holiday_status,ct_default_start,ct_default_stop,user_group from vicidial_call_time_holidays $whereLOGadmin_viewable_groupsSQL order by holiday_date,holiday_id;"; $rslt=mysql_to_mysqli($stmt, $link); $holidays_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("HOLIDAY LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($holidays_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3211111111&holiday_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("HOLIDAY ID").""._QXZ("DATE").""._QXZ("NAME").""._QXZ("STATUS").""._QXZ("START").""._QXZ("STOP").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6] "._QXZ("MODIFY")."
\n"; } ###################### # ADD=130000000 display all shifts ###################### if ($ADD==130000000) { echo "
\n"; echo " "; $stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays,user_group from vicidial_shifts $whereLOGadmin_viewable_groupsSQL order by shift_id;"; $rslt=mysql_to_mysqli($stmt, $link); $shifts_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("SHIFT LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($shifts_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=331111111&shift_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("SHIFT ID").""._QXZ("SHIFT NAME").""._QXZ("SHIFT START").""._QXZ("SHIFT LENGTH").""._QXZ("WEEKDAYS").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] "._QXZ("MODIFY")."
\n"; } ###################### # ADD=10000000000 display all phones ###################### if ($ADD==10000000000) { echo "
\n"; echo " "; $EXTENlink="stage=EXTENDOWN&status=$status"; $EXTENNUMlink="stage=EXTENNUMDOWN&status=$status"; $PROTOlink="stage=PROTODOWN&status=$status"; $SERVERlink="stage=SERVERDOWN&status=$status"; $STATUSlink="stage=STATUSDOWN&status=$status"; $SQLorder='order by extension,server_ip'; if (preg_match("/EXTENUP/i",$stage)) {$SQLorder='order by extension asc'; $EXTENlink="stage=EXTENDOWN&status=$status";} if (preg_match("/EXTENDOWN/i",$stage)) {$SQLorder='order by extension desc'; $EXTENlink="stage=EXTENUP&status=$status";} if (preg_match("/EXTENNUMUP/i",$stage)) {$SQLorder='order by CAST(extension as SIGNED INTEGER) desc'; $EXTENNUMlink="stage=EXTENNUMDOWN&status=$status";} if (preg_match("/EXTENNUMDOWN/i",$stage)) {$SQLorder='order by CAST(extension as SIGNED INTEGER) asc'; $EXTENNUMlink="stage=EXTENNUMUP&status=$status";} if (preg_match("/PROTOUP/i",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink="stage=PROTODOWN&status=$status";} if (preg_match("/PROTODOWN/i",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink="stage=PROTOUP&status=$status";} if (preg_match("/SERVERUP/i",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink="stage=SERVERDOWN&status=$status";} if (preg_match("/SERVERDOWN/i",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink="stage=SERVERUP&status=$status";} if (preg_match("/STATUSUP/i",$stage)) {$SQLorder='order by status asc'; $STATUSlink="stage=STATUSDOWN&status=$status";} if (preg_match("/STATUSDOWN/i",$stage)) {$SQLorder='order by status desc'; $STATUSlink="stage=STATUSUP&status=$status";} $limitSQL=''; $next_prev_HTML=''; if ($SSentries_per_page > 0) { $stmt="SELECT count(*) from phones $whereLOGadmin_viewable_groupsSQL"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $phones_count = $row[0]; if ( ($phones_count > $SSentries_per_page) and ($status != 'display_all') ) { if (strlen($start_count) < 1) {$start_count=0;} $next_count = ($start_count + $SSentries_per_page); $nextnext_count = ($next_count + $SSentries_per_page); if ($next_count > $phones_count) {$next_count = $phones_count;} else { if ($nextnext_count > $phones_count) { $next_temp = ($phones_count - $next_count); $nextHTML = ""._QXZ("NEXT")." $next_temp   "; } else { $nextHTML = ""._QXZ("NEXT")." $SSentries_per_page   "; } } $next_prev_HTML .= _QXZ("RECORDS")." $start_count - $next_count   "; $limitSQL="limit $SSentries_per_page"; if ($start_count > 0) { $prev_count = ($start_count - $SSentries_per_page); $limitSQL="limit $start_count,$SSentries_per_page"; $next_prev_HTML .= ""._QXZ("PREVIOUS")." $SSentries_per_page   "; } $next_prev_HTML .= $nextHTML; $next_prev_HTML .= "           "._QXZ("show all phones")."   "; } } $stmt="SELECT extension,protocol,server_ip,dialplan_number,voicemail_id,status,fullname,messages,old_messages,user_group,is_webphone from phones $whereLOGadmin_viewable_groupsSQL $SQLorder $limitSQL"; $rslt=mysql_to_mysqli($stmt, $link); $phones_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("PHONE LISTINGS").":\n"; if (strlen($next_prev_HTML) > 10) {echo "

  $next_prev_HTML
";} echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($phones_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} $TEMPprotocol = $row[1]; if ( ($row[10] == 'Y') or ($row[10] == 'Y_API_LAUNCH') ) {$TEMPprotocol = "$row[1](w)";} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31111111111&extension=$row[0]&server_ip=$row[2]'\"";} echo ">"; echo "\n"; $o++; } echo "
"._QXZ("EXTEN")."   "; echo "- # -"._QXZ("PROTO").""._QXZ("SERVER").""._QXZ("DIAL PLAN").""._QXZ("STATUS").""._QXZ("NAME").""._QXZ("VMAIL").""._QXZ("GROUP").""._QXZ("LINKS")."
$row[0] $TEMPprotocol "._QXZ("$row[2]")." $row[3] $row[4] "._QXZ("$row[5]")." $row[6] $row[7] $row[8] "._QXZ("$row[9]").""._QXZ("MODIFY")." | "._QXZ("STATS")."
\n"; } ###################### # ADD=12000000000 display all phones alias ###################### if ($ADD==12000000000) { echo "
\n"; echo " "; $stmt="SELECT alias_id,alias_name,logins_list,user_group from phones_alias $whereLOGadmin_viewable_groupsSQL order by alias_id;"; $rslt=mysql_to_mysqli($stmt, $link); $phonealias_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("PHONE ALIAS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($phonealias_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=32111111111&alias_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("ALIAS ID").""._QXZ("ALIAS NAME").""._QXZ("PHONE LOGINS LIST").""._QXZ("GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]$row[2]"._QXZ("$row[3]").""._QXZ("MODIFY")."
\n"; } ###################### # ADD=13000000000 display all group alias ###################### if ($ADD==13000000000) { echo "
\n"; echo " "; $stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active,user_group from groups_alias $whereLOGadmin_viewable_groupsSQL order by group_alias_id;"; $rslt=mysql_to_mysqli($stmt, $link); $phonealias_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("GROUP ALIAS LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($phonealias_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=33111111111&group_alias_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("GROUP ALIAS ID").""._QXZ("GROUP ALIAS NAME").""._QXZ("CID NUMBER").""._QXZ("CID NAME").""._QXZ("ACTIVE").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]$row[2]$row[3]"._QXZ("$row[4]").""._QXZ("$row[5]").""._QXZ("MODIFY")."
\n"; } ###################### # ADD=100000000000 display all servers ###################### if ($ADD==100000000000) { echo "
\n"; echo " "; $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,local_gmt,active_agent_login_server from servers $whereLOGadmin_viewable_groupsSQL order by server_id"; $rslt=mysql_to_mysqli($stmt, $link); $servers_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("SERVER LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($servers_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=311111111111&server_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("SERVER ID").""._QXZ("NAME").""._QXZ("SERVER IP").""._QXZ("ACTIVE").""._QXZ("AGENT").""._QXZ("ASTERISK").""._QXZ("TRUNKS").""._QXZ("GMT").""._QXZ("MODIFY")."
$row[0]$row[1]$row[2]"._QXZ("$row[3]").""._QXZ("$row[7]")."$row[4]$row[5]$row[6]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=130000000000 display all conf templates ###################### if ($ADD==130000000000) { echo "
\n"; echo " "; $stmt="SELECT template_id,template_name,user_group from vicidial_conf_templates $whereLOGadmin_viewable_groupsSQL order by template_id"; $rslt=mysql_to_mysqli($stmt, $link); $templates_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("CONF TEMPLATE LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($templates_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=331111111111&template_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("Template ID").""._QXZ("Template Name").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]").""._QXZ("MODIFY")."
\n"; } ###################### # ADD=140000000000 display all carriers ###################### if ($ADD==140000000000) { echo "
\n"; echo " "; $stmt="SELECT carrier_id,carrier_name,server_ip,protocol,registration_string,active,user_group from vicidial_server_carriers $whereLOGadmin_viewable_groupsSQL order by carrier_id"; $rslt=mysql_to_mysqli($stmt, $link); $carriers_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("CARRIER LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($carriers_to_print > $o) { $row=mysqli_fetch_row($rslt); if (mb_strlen($row[4],'utf-8')>14) { while (mb_strlen($row[4],'utf-8')>14) {$row[4] = mb_substr("$row[4]", 0, -1,'utf-8');} $row[4] .= '...'; } if ($row[2] == '0.0.0.0') {$row[2]='ALL SERVERS';} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=341111111111&carrier_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("Carrier ID").""._QXZ("Carrier Name").""._QXZ("Server IP").""._QXZ("Protocol").""._QXZ("Registration").""._QXZ("Active").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]".(preg_match('/[A-Z]/', $row[2]) ? _QXZ("$row[2]") : $row[2])."".(!preg_match('/^SIP|^PJSIP|IAX2/', $row[3]) ? _QXZ("$row[3]") : $row[3])."$row[4]"._QXZ("$row[5]").""._QXZ("$row[6]").""._QXZ("MODIFY")."
\n"; } ###################### # ADD=150000000000 display all tts entries ###################### if ($ADD==150000000000) { echo "
\n"; echo " "; $stmt="SELECT tts_id,tts_name,active,tts_text,tts_voice,user_group from vicidial_tts_prompts $whereLOGadmin_viewable_groupsSQL order by tts_id"; $rslt=mysql_to_mysqli($stmt, $link); $tts_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("TEXT-TO-SPEECH(TTS) LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($tts_to_print > $o) { $row=mysqli_fetch_row($rslt); $row[3]=preg_replace('/;|<|>/', '', $row[3]); while(mb_strlen($row[3],'utf-8') > 50) {$row[3] = mb_substr("$row[3]", 0, -1,'utf-8');} if(mb_strlen($row[3],'utf-8') > 47) {$row[3] = "$row[3]...";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=351111111111&tts_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("TTS ID").""._QXZ("TTS Name").""._QXZ("Active").""._QXZ("TTS Voice").""._QXZ("TTS Text").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]")."$row[4]$row[3]".(preg_match('/\-\-ALL\-\-/', $row[5]) ? _QXZ("$row[5]") : $row[5]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=160000000000 display all music on hold entries ###################### if ($ADD==160000000000) { echo "
\n"; echo " "; $stmt="SELECT moh_id,moh_name,active,random,user_group from vicidial_music_on_hold where remove='N' $LOGadmin_viewable_groupsSQL order by moh_id"; $rslt=mysql_to_mysqli($stmt, $link); $moh_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("MUSIC-ON-HOLD(MOH) LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($moh_to_print > $o) { $row=mysqli_fetch_row($rslt); $row[3]=preg_replace('/;|<|>/', '', $row[3]); while(mb_strlen($row[3],'utf-8') > 50) {$row[3] = mb_substr("$row[3]", 0, -1,'utf-8');} if(mb_strlen($row[3],'utf-8') > 47) {$row[3] = "$row[3]...";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=361111111111&moh_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("MOH ID").""._QXZ("MOH Name").""._QXZ("Active").""._QXZ("Random Order").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]").""._QXZ("$row[3]")."".(preg_match('/\-\-ALL\-\-/', $row[4]) ? _QXZ("$row[4]") : $row[4]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=170000000000 display all voicemail entries ###################### if ($ADD==170000000000) { echo "
\n"; echo " "; $stmt="SELECT voicemail_id,fullname,active,messages,old_messages,delete_vm_after_email,user_group from vicidial_voicemail $whereLOGadmin_viewable_groupsSQL order by voicemail_id"; $rslt=mysql_to_mysqli($stmt, $link); $vm_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("VOICEMAIL BOXES").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($vm_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=371111111111&voicemail_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("VOICEMAIL ID").""._QXZ("Name").""._QXZ("Active").""._QXZ("New Messages").""._QXZ("Old Messages").""._QXZ("Delete").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]")."$row[3]$row[4]"._QXZ("$row[5]")."".(preg_match('/\-\-ALL\-\-/', $row[6]) ? _QXZ("$row[6]") : $row[6]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=180000000000 display all screen label entries ###################### if ($ADD==180000000000) { echo "
\n"; echo " "; $stmt="SELECT label_id,label_name,active,user_group from vicidial_screen_labels $whereLOGadmin_viewable_groupsSQL order by label_id"; $rslt=mysql_to_mysqli($stmt, $link); $lb_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("Agent Screen Labels").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($lb_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=381111111111&label_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("LABEL ID").""._QXZ("Name").""._QXZ("Active").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]")."".(preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=182000000000 display all screen colors entries ###################### if ($ADD==182000000000) { echo "
\n"; echo " "; $stmt="SELECT colors_id,colors_name,active,user_group,menu_background,frame_background,std_row1_background,web_logo from vicidial_screen_colors $whereLOGadmin_viewable_groupsSQL order by colors_id"; $rslt=mysql_to_mysqli($stmt, $link); $lb_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("Screen Colors").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($lb_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=382111111111&colors_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; $logo_new=0; $logo_old=0; $logo_small_old=0; if (file_exists('./images/vicidial_admin_web_logo.png')) {$logo_new++;} if (file_exists('vicidial_admin_web_logo_small.gif')) {$logo_small_old++;} if (file_exists('vicidial_admin_web_logo.gif')) {$logo_old++;} if ($row[7]=='default_new') { $selected_logo = "./images/vicidial_admin_web_logo.png"; } if ( ($row[7]=='default_old') and ($logo_old > 0) ) { $selected_logo = "./vicidial_admin_web_logo.gif"; } if ( ($row[7]!='default_new') and ($row[7]!='default_old') ) { if (file_exists("./images/vicidial_admin_web_logo$row[7]")) { $selected_logo = "./images/vicidial_admin_web_logo$row[7]"; } } echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("COLORS ID").""._QXZ("Name").""._QXZ("Active").""._QXZ("Menu Colors").""._QXZ("Logo").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]")."       ".(preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=190000000000 display all contacts entries ###################### if ($ADD==190000000000) { echo "
\n"; echo " "; if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) { $linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname"); if (!$linkALT) { die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error()); } } else {$linkALT = $link;} $stmt="SELECT contact_id,first_name,last_name,office_num,bu_name,department,group_name,job_title,location from contact_information order by first_name,last_name,office_num limit 20000;"; $rslt=mysql_to_mysqli($stmt, $linkALT); $lb_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("Contacts").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($lb_to_print > $o) { $row=mysqli_fetch_row($rslt); while (mb_strlen($row[4],'utf-8')>20) {$row[4] = mb_substr("$row[4]", 0, -1,'utf-8');} while (mb_strlen($row[5],'utf-8')>20) {$row[5] = mb_substr("$row[5]", 0, -1,'utf-8');} while (mb_strlen($row[6],'utf-8')>20) {$row[6] = mb_substr("$row[6]", 0, -1,'utf-8');} while (mb_strlen($row[7],'utf-8')>20) {$row[7] = mb_substr("$row[7]", 0, -1,'utf-8');} while (mb_strlen($row[8],'utf-8')>20) {$row[8] = mb_substr("$row[8]", 0, -1,'utf-8');} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=391111111111&contact_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("NAME").""._QXZ("Office Number").""._QXZ("BU Name").""._QXZ("Department").""._QXZ("Group").""._QXZ("Job Title").""._QXZ("Location").""._QXZ("MODIFY")."
$row[1] $row[2]$row[3]$row[4]$row[5]$row[6]$row[7]$row[8]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=192000000000 display all settings containers entries ###################### if ($ADD==192000000000) { echo "
\n"; echo " "; $stmt="SELECT container_id,container_notes,container_type,user_group,container_entry from vicidial_settings_containers $whereLOGadmin_viewable_groupsSQL order by container_type,container_id"; $rslt=mysql_to_mysqli($stmt, $link); $sc_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("Settings Containers").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($sc_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=392111111111&container_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("Container ID").""._QXZ("Notes").""._QXZ("Type").""._QXZ("Length").""._QXZ("ADMIN GROUP").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]")."".strlen($row[4])."".(preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=193000000000 display all status group entries ###################### if ($ADD==193000000000) { echo "
\n"; echo " "; $stmt="SELECT status_group_id,status_group_notes,user_group from vicidial_status_groups $whereLOGadmin_viewable_groupsSQL order by status_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $status_groups_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("STATUS GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $status_group_id = $MT; $status_group_notes = $MT; $admin_group = $MT; while ($status_groups_to_print > $o) { $row=mysqli_fetch_row($rslt); $status_group_id[$o] = $row[0]; $status_group_notes[$o] = $row[1]; $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[2]) ? _QXZ("$row[2]") : $row[2]); $o++; } $o=0; while ($status_groups_to_print > $o) { $stmt="SELECT count(*) from vicidial_campaign_statuses where campaign_id=\"$status_group_id[$o]\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=393111111111&status_group_id=$status_group_id[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("STATUS GROUP ID").""._QXZ("NOTES").""._QXZ("GROUP").""._QXZ("STATUSES").""._QXZ("MODIFY")."
$status_group_id[$o] $status_group_notes[$o] $admin_group[$o] $row[0]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=194000000000 display all automated report entries ###################### if ($ADD==194000000000) { echo "
\n"; echo " "; $stmt="SELECT report_id,report_name,report_destination,active,user_group,report_last_run,report_last_length,report_server from vicidial_automated_reports $whereLOGadmin_viewable_groupsSQL order by report_destination,report_id"; $rslt=mysql_to_mysqli($stmt, $link); $sc_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("Automated Reports").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($sc_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=394111111111&report_id=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("Auto Report ID").""._QXZ("Name").""._QXZ("Type").""._QXZ("Active").""._QXZ("ADMIN GROUP").""._QXZ("Last Run").""._QXZ("Length").""._QXZ("Server").""._QXZ("MODIFY")."
$row[0]$row[1]"._QXZ("$row[2]").""._QXZ("$row[3]")."".(preg_match('/\-\-ALL\-\-/', $row[4]) ? _QXZ("$row[4]") : $row[4])."$row[5]$row[6]$row[7]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=195000000000 display all IP List entries ###################### if ($ADD==195000000000) { echo "
\n"; echo " "; $stmt="SELECT ip_list_id,ip_list_name,active,user_group from vicidial_ip_lists $whereLOGadmin_viewable_groupsSQL order by ip_list_id;"; $rslt=mysql_to_mysqli($stmt, $link); $ip_lists_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("IP LIST LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $Xip_list_id = $MT; $ip_list_name = $MT; $active = $MT; $admin_group = $MT; $o=0; while ($ip_lists_to_print > $o) { $row=mysqli_fetch_row($rslt); $Xip_list_id[$o] = $row[0]; $ip_list_name[$o] = $row[1]; $active[$o] = _QXZ("$row[2]"); $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); $o++; } $o=0; while ($ip_lists_to_print > $o) { $stmt="SELECT count(*) from vicidial_ip_list_entries where ip_list_id=\"$Xip_list_id[$o]\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=395111111111&ip_list_id=$Xip_list_id[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("IP LIST ID").""._QXZ("NAME").""._QXZ("ACTIVE").""._QXZ("GROUP").""._QXZ("IPS").""._QXZ("MODIFY")."
$Xip_list_id[$o] $ip_list_name[$o] $active[$o] $admin_group[$o] $row[0]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=196000000000 display all CID group entries ###################### if ($ADD==196000000000) { echo "
\n"; echo " "; $stmt="SELECT cid_group_id,cid_group_notes,cid_group_type,user_group,cid_auto_rotate_minutes from vicidial_cid_groups $whereLOGadmin_viewable_groupsSQL order by cid_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $cid_groups_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("CID GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $cid_group_id = $MT; $cid_group_notes = $MT; $cid_group_type = $MT; $admin_group = $MT; $cid_auto_rotate_minutes = $MT; while ($cid_groups_to_print > $o) { $row=mysqli_fetch_row($rslt); $cid_group_id[$o] = $row[0]; $cid_group_notes[$o] = $row[1]; $cid_group_type[$o] = _QXZ("$row[2]"); $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); $cid_auto_rotate_minutes[$o] = ''; if ($row[4] > 0) {$cid_auto_rotate_minutes[$o] = '   AR   ';} $o++; } $o=0; while ($cid_groups_to_print > $o) { $stmt="SELECT count(*) from vicidial_campaign_cid_areacodes where campaign_id=\"$cid_group_id[$o]\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=396111111111&cid_group_id=$cid_group_id[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CID GROUP ID").""._QXZ("NOTES").""._QXZ("TYPE")."   "._QXZ("GROUP").""._QXZ("CIDS").""._QXZ("MODIFY")."
$cid_group_id[$o] $cid_group_notes[$o] $cid_group_type[$o] $cid_auto_rotate_minutes[$o] $admin_group[$o]$row[0]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=197000000000 display all VM Message group entries ###################### if ($ADD==197000000000) { echo "
\n"; echo " "; $stmt="SELECT leave_vm_message_group_id,leave_vm_message_group_notes,active,user_group from leave_vm_message_groups $whereLOGadmin_viewable_groupsSQL order by leave_vm_message_group_id;"; $rslt=mysql_to_mysqli($stmt, $link); $vmm_groups_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("VM MESSAGE GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $leave_vm_message_group_id = $MT; $leave_vm_message_group_notes = $MT; $VMMGactive = $MT; $admin_group = $MT; while ($vmm_groups_to_print > $o) { $row=mysqli_fetch_row($rslt); $leave_vm_message_group_id[$o] = $row[0]; $leave_vm_message_group_notes[$o] = $row[1]; $VMMGactive[$o] = _QXZ("$row[2]"); $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); $o++; } $o=0; while ($vmm_groups_to_print > $o) { $stmt="SELECT count(*) from leave_vm_message_groups_entries where leave_vm_message_group_id=\"$leave_vm_message_group_id[$o]\";"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=397111111111&leave_vm_message_group_id=$leave_vm_message_group_id[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("VMM GROUP ID").""._QXZ("NOTES").""._QXZ("ACTIVE").""._QXZ("GROUP").""._QXZ("MSGS").""._QXZ("MODIFY")."
$leave_vm_message_group_id[$o] $leave_vm_message_group_notes[$o] "._QXZ("$VMMGactive[$o]")." $admin_group[$o] $row[0]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=198000000000 display all Queue Group entries ###################### if ($ADD==198000000000) { echo "
\n"; echo " "; $stmt="SELECT queue_group,queue_group_name,active,user_group,included_campaigns,included_inbound_groups from vicidial_queue_groups $whereLOGadmin_viewable_groupsSQL order by queue_group;"; $rslt=mysql_to_mysqli($stmt, $link); $queue_groups_to_print = mysqli_num_rows($rslt); if ($DB) {echo "|$queue_groups_to_print|$stmt|\n";} echo "
"._QXZ("QUEUE GROUP LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; $o=0; $queue_group_ids = $MT; $queue_group_names = $MT; $QGactive = $MT; $QGentries = $MT; $admin_group = $MT; while ($queue_groups_to_print > $o) { $row=mysqli_fetch_row($rslt); $queue_group_ids[$o] = $row[0]; $queue_group_names[$o] = $row[1]; $QGactive[$o] = _QXZ("$row[2]"); $admin_group[$o] = (preg_match('/\-\-ALL\-\-/', $row[3]) ? _QXZ("$row[3]") : $row[3]); $temp_included_campaigns = $row[4]; $temp_included_campaigns = preg_replace("/ -$/",'',$temp_included_campaigns); $temp_included_inbound_groups = $row[5]; $temp_included_inbound_groups = preg_replace("/ -$/",'',$temp_included_inbound_groups); $QGentries[$o] = "$temp_included_campaigns$temp_included_inbound_groups"; if ($DB) {echo "
$o|$queue_group_ids[$o]|$queue_group_names[$o]|$QGentries[$o]|\n";} $o++; } $o=0; while ($queue_groups_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} $temp_entries_ct=0; if (preg_match("/ /",$QGentries[$o])) { $temp_entries_ARY = explode(' ',$QGentries[$o]); $temp_entries_ct = count($temp_entries_ARY); while(strlen($QGentries[$o]) > 40) {$QGentries[$o] = preg_replace("/.$/",'',$QGentries[$o]);} if (strlen($QGentries[$o]) >= 40) {$QGentries[$o] .= "...";} } echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=398111111111&queue_group=$queue_group_ids[$o]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("QUEUE GROUP ID").""._QXZ("NOTES").""._QXZ("ACTIVE").""._QXZ("GROUP").""._QXZ("#").""._QXZ("ENTRIES").""._QXZ("MODIFY")."
$queue_group_ids[$o] $queue_group_names[$o] "._QXZ("$QGactive[$o]")." $admin_group[$o] $temp_entries_ct $QGentries[$o]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=1000000000000 display all conferences ###################### if ($ADD==1000000000000) { echo "
\n"; echo " "; $stmt="SELECT conf_exten,server_ip,extension from conferences order by conf_exten"; $rslt=mysql_to_mysqli($stmt, $link); $conferences_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("CONFERENCE LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($conferences_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=3111111111111&conf_exten=$row[0]&server_ip=$row[1]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CONFERENCE").""._QXZ("SERVER IP").""._QXZ("EXTENSION").""._QXZ("MODIFY")."
$row[0]$row[1]$row[2]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=10000000000000 display all vicidial conferences ###################### if ($ADD==10000000000000) { echo "
\n"; echo " "; $stmt="SELECT conf_exten,server_ip,extension from vicidial_conferences order by conf_exten"; $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("AGENT CONFERENCE LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($vicidialconf_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=31111111111111&conf_exten=$row[0]&server_ip=$row[1]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CONFERENCE").""._QXZ("SERVER IP").""._QXZ("EXTENSION").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=12000000000000 display all vicidial confbridges ###################### if ($ADD==12000000000000) { echo "
\n"; echo " "; $stmt="SELECT conf_exten,server_ip,extension from vicidial_confbridges order by conf_exten"; $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("AGENT CONFBRIDGE LISTINGS").":\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; $o=0; while ($vicidialconf_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=32111111111111&conf_exten=$row[0]&server_ip=$row[1]'\"";} echo ">"; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("CONFBRIDGE").""._QXZ("SERVER IP").""._QXZ("EXTENSION").""._QXZ("MODIFY")."
$row[0] $row[1] $row[2]"._QXZ("MODIFY")."
\n"; } ###################### # ADD=100000000000000 display all qc campaigns ###################### if (($ADD==100000000000000) && ($qc_auth=='1')) { echo "
\n"; echo ""; echo "\"Quality "._QXZ("Quality Control Listings").":\n"; if (!$qc_display_group_type) {$qc_display_group_type="CAMPAIGN";} if ($qc_display_group_type=="CAMPAIGN") { $stmt="SELECT campaign_id,campaign_name,qc_statuses_id from vicidial_campaigns where active = 'Y' and qc_statuses_id!='' and qc_scorecard_id!='' $LOGqc_allowed_campaignsSQL order by campaign_name"; $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); echo "

"._QXZ("Campaigns").":
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $count_column="campaign_id"; $ADD_value="31"; } else if ($qc_display_group_type=="INGROUP") { $stmt="SELECT group_id,group_name,qc_statuses_id from vicidial_inbound_groups where active = 'Y' and qc_statuses_id!='' and qc_scorecard_id!='' $LOGqc_allowed_inbound_groupsSQL order by group_id"; $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); echo "

"._QXZ("Ingroups").":
"._QXZ("CAMPAIGN ID").""._QXZ("CAMPAIGN NAME").""._QXZ("QC STATUSES").""._QXZ("QUALIFYING CALLS").""._QXZ("MODIFY")."
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $count_column="group_id"; $ADD_value="3111"; } else if ($qc_display_group_type=="LIST") { $stmt="SELECT list_id,list_name,qc_statuses_id from vicidial_lists where active = 'Y' and qc_statuses_id!='' and qc_scorecard_id!='' $LOGqc_allowed_campaignsSQL order by list_id"; $rslt=mysql_to_mysqli($stmt, $link); # echo $stmt; $vicidialconf_to_print = mysqli_num_rows($rslt); echo "

"._QXZ("Lists").":
"._QXZ("GROUP ID").""._QXZ("GROUP NAME").""._QXZ("QC STATUSES").""._QXZ("QUALIFYING CALLS").""._QXZ("MODIFY")."
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $count_column="list_id"; $ADD_value="311"; } if ($vicidialconf_to_print==0) { echo ""; } # $DB=1; if ($DB) {echo "$qc_display_group_type|$stmt
";} $o=0; while ($vicidialconf_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match("/1$|3$|5$|7$|9$/i", $o)) { $bgcolor='class="records_list_x"'; } else { $bgcolor='class="records_list_y"'; } #$qc_statuses=explode(' ',$qc_status_list); $qc_status_list=array(); $qc_status_container_stmt="select container_entry from vicidial_settings_containers where container_id='$row[2]'"; $qc_status_container_rslt=mysql_to_mysqli($qc_status_container_stmt, $link); while ($qcsc_row=mysqli_fetch_row($qc_status_container_rslt)) { $container_text=preg_split('/\r|\n/', $qcsc_row[0]); for ($q=0; $q0) { $qc_status_list=preg_split('/,/', $line); break; } } } # $qc_ct_stmt="select count(*) from vicidial_list inner join vicidial_lists on vicidial_list.list_id=vicidial_lists.list_id and status in ('".implode("','", $qc_statuses)."') where campaign_id='$row[0]'"; $total_qc_count=0; # Campaign if ($qc_display_group_type=="CAMPAIGN") { $qc_ct_stmt="select count(*) From vicidial_agent_log where campaign_id='$row[0]' and status in ('".implode("','", $qc_status_list)."') and event_time+INTERVAL (pause_sec+wait_sec) SECOND>=now()-INTERVAL $SSqc_expire_days DAY"; if ($DB) {echo "|$qc_ct_stmt|
\n";} $qc_ct_rslt=mysql_to_mysqli($qc_ct_stmt, $link); $qc_ct_row=mysqli_fetch_row($qc_ct_rslt); $total_qc_count=$qc_ct_row[0]; } # List if ($qc_display_group_type=="LIST") { $agent_log_stmt="select lead_id From vicidial_agent_log where status in ('".implode("','", $qc_status_list)."') and event_time+INTERVAL (pause_sec+wait_sec) SECOND>=now()-INTERVAL $SSqc_expire_days DAY"; if ($DB) {echo "|$agent_log_stmt|
\n";} $agent_log_rslt=mysql_to_mysqli($agent_log_stmt, $link); while ($agent_log_row=mysqli_fetch_array($agent_log_rslt)) { $lead_id=$agent_log_row["lead_id"]; $list_id_stmt="select count(*) from vicidial_list where list_id='$row[0]' and lead_id='$lead_id'"; # if ($DB) {echo "|$list_id_stmt|
\n";} $list_id_rslt=mysql_to_mysqli($list_id_stmt, $link); $lid_row=mysqli_fetch_row($list_id_rslt); $total_qc_count+=$lid_row[0]; } } # Ingroup if ($qc_display_group_type=="INGROUP") { $qc_ct_stmt="select count(*) From vicidial_closer_log where campaign_id='$row[0]' and status in ('".implode("','", $qc_status_list)."') and call_date>=now()-INTERVAL $SSqc_expire_days DAY"; if ($DB) {echo "|$qc_ct_stmt|
\n";} $qc_ct_rslt=mysql_to_mysqli($qc_ct_stmt, $link); $qc_ct_row=mysqli_fetch_row($qc_ct_rslt); $total_qc_count=$qc_ct_row[0]; } $qc_grabbed_stmt="select count(*) From quality_control_queue where $count_column='$row[0]' and status in ('".implode("','", $qc_status_list)."') and call_date>=now()-INTERVAL $SSqc_expire_days DAY"; if ($DB) {echo "|$qc_grabbed_stmt|
\n";} $qc_grabbed_rslt=mysql_to_mysqli($qc_grabbed_stmt, $link); $qc_grabbed_row=mysqli_fetch_row($qc_grabbed_rslt); $total_grabbed_count=$qc_grabbed_row[0]; echo "
0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=881&qc_display_group_type=$qc_display_group_type&$count_column=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("LIST ID").""._QXZ("LIST NAME").""._QXZ("QC STATUSES").""._QXZ("QUALIFYING CALLS").""._QXZ("MODIFY")."
*** "._QXZ("NO ".$qc_display_group_type."S CONFIGURED FOR QC")." ***
$row[0] $row[1] ".implode(", ", $qc_status_list)." ".($total_qc_count-$total_grabbed_count+0).""._QXZ("MODIFY")."
\n"; } ###################### # ADD=881 VIEW one qc campaign ###################### if (($ADD==881) && ($qc_auth=='1')) { if (!$qc_display_group_type) {$qc_display_group_type=="CAMPAIGN";} $referring_URL_string="&referring_section=$qc_display_group_type"; switch($qc_display_group_type) { case "CAMPAIGN": $referring_URL_string.="&referring_element=$campaign_id"; break; case "LIST": $referring_URL_string.="&referring_element=$list_id"; break; case "INGROUP": $referring_URL_string.="&referring_element=$group_id"; break; } $qc_claim_stmt="select count(*) from quality_control_queue where qc_agent='$PHP_AUTH_USER' and qc_status='CLAIMED'"; # $LOGqc_allowed_campaignsSQL if ($DB) {echo $qc_claim_stmt."
\n";} $qc_claim_rslt=mysql_to_mysqli($qc_claim_stmt, $link); $queue_ct_row=mysqli_fetch_row($qc_claim_rslt); echo ""; # echo "\n"; echo "
\n"; if ($queue_ct_row[0]>0) { echo ""; # #".$SSmenu_background." echo ""; echo ""; echo ""; # #".$SSmenu_background." echo ""; echo ""; echo ""; echo ""; echo "\n"; $queue_stmt="select * from quality_control_queue where qc_agent='$PHP_AUTH_USER' and qc_status='CLAIMED' order by date_claimed"; if ($DB) {echo $queue_stmt."
\n";} $queue_rslt=mysql_to_mysqli($queue_stmt, $link); $q=0; while ($queue_row=mysqli_fetch_array($queue_rslt)) { $qc_id=$queue_row["qc_log_id"]; $lead_id=$queue_row["lead_id"]; $date_claimed=$queue_row["date_claimed"]; $date_modified=$queue_row["date_modified"]; $name_stmt="select concat(first_name, ' ', last_name) from vicidial_list where lead_id='$lead_id'"; $name_rslt=mysql_to_mysqli($name_stmt, $link); $full_name=""; if (mysqli_num_rows($name_rslt)>0) { $name_row=mysqli_fetch_row($name_rslt); $full_name=trim($name_row[0]); } if (preg_match("/1$|3$|5$|7$|9$/i", $q)) { $bgcolor='class="records_list_x"'; } else { $bgcolor='class="records_list_y"'; } echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $q++; } echo ""; # #".$SSmenu_background." echo ""; echo ""; } if ($queue_ct_row[0]<$SSqc_claim_limit) { if ($qc_display_group_type=="CAMPAIGN") { $stmt="SELECT campaign_id,campaign_name, qc_statuses_id, 'CALL' as qc_display_method, qc_scorecard_id from vicidial_campaigns where active='Y' and qc_statuses_id!='' and qc_scorecard_id!='' and campaign_id='$campaign_id'"; $campaign_clause=" and campaign_id='$campaign_id'"; # Used further down $display_clause=" and campaign_id='$campaign_id'"; # Used further down } else if ($qc_display_group_type=="LIST") { $stmt="SELECT list_id,list_name, qc_statuses_id, 'CALL' as qc_display_method, qc_scorecard_id from vicidial_lists where active='Y' and qc_statuses_id!='' and qc_scorecard_id!='' and list_id='$list_id'"; $campaign_clause=""; $display_clause=" and list_id='$list_id'"; # Used further down } else if ($qc_display_group_type=="INGROUP") { $stmt="SELECT group_id,group_name, qc_statuses_id, 'CALL' as qc_display_method, qc_scorecard_id from vicidial_inbound_groups where active='Y' and qc_statuses_id!='' and qc_scorecard_id!='' and group_id='$group_id'"; $campaign_clause=" and comments in ('CHAT', 'EMAIL', 'INBOUND')"; $display_clause=" and comments in ('CHAT', 'EMAIL', 'INBOUND')"; # Used further down } # $DB=1; # $stmt="SELECT campaign_id,campaign_name, qc_statuses, 'LEAD' as qc_display_method, qc_scorecard_id from vicidial_campaigns where active = 'Y' and qc_enabled='Y' and campaign_id='$campaign_id' $LOGqc_allowed_campaignsSQL limit 1"; if ($DB) {echo $stmt."
\n";} $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); if ($vicidialconf_to_print > 0) { $row=mysqli_fetch_row($rslt); # $qc_status_list=substr($row[2],0,strlen($row[2])-2); $qc_display_method=$row[3]; $qc_scorecard_id=$row[4]; $qc_status_list=array(); $qc_status_container_stmt="select container_entry from vicidial_settings_containers where container_id='$row[2]'"; $qc_status_container_rslt=mysql_to_mysqli($qc_status_container_stmt, $link); while ($qcsc_row=mysqli_fetch_row($qc_status_container_rslt)) { $container_text=preg_split('/\r|\n/', $qcsc_row[0]); for ($q=0; $q0) { $qc_status_list=preg_split('/,/', $line); break; } } } echo "
"._QXZ("$qc_display_group_type")." $row[0] - "._QXZ("Quality Control Queue")."
"._QXZ("QC statuses").": ".implode(", ", $qc_status_list)."


\n"; if (!isset($qc_sort_method)) {$qc_sort_method="CALL_DATE_DESC";} switch ($qc_sort_method) { case "STATUS": $sort_clause_call="order by status, call_date"; $sort_clause_lead="order by status, modify_date, last_local_call_time"; break; case "CALL_DATE": $sort_clause_call="order by call_date, status"; $sort_clause_lead="order by last_local_call_time, status, modify_date"; break; case "STATUS_DESC": $sort_clause_call="order by status desc, call_date"; $sort_clause_lead="order by status desc, modify_date, last_local_call_time"; break; case "CALL_DATE_DESC": $sort_clause_call="order by call_date desc, status"; $sort_clause_lead="order by last_local_call_time desc, status, modify_date desc"; break; } sort($qc_status_list); foreach ( $qc_status_list as $qc_status ) { #if ($qc_display_method=="CALL") # { $stmt="select lead_id, agent_log_id, event_time+INTERVAL (wait_sec+pause_sec) SECOND as call_date, user, status, uniqueid from vicidial_agent_log where lead_id is not null and status='$qc_status' and event_time+INTERVAL (wait_sec+pause_sec) SECOND>=now()-INTERVAL $SSqc_expire_days DAY $campaign_clause $sort_clause_call"; if ($DB) {echo $stmt."
\n";} # } #else # { # $stmt="SELECT lead_id,first_name,last_name,modify_date,user from vicidial_list inner join vicidial_lists on vicidial_list.list_id=vicidial_lists.list_id where campaign_id='$campaign_id' and status='$qc_status' order by status, modify_date $sort_clause_lead"; # } $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); $o=0; $q=0; $prev_status=""; while ($vicidialconf_to_print > $o) { $row=mysqli_fetch_array($rslt); $current_status=$row["status"]; $lead_id=$row["lead_id"]; $agent_log_id=$row["agent_log_id"]; $uniqueid=$row["uniqueid"]; # $comments=$row["comments"]; # if ($qc_display_method=="CALL") {$display_clause="agent_log_id='$agent_log_id'";} else {$display_clause="lead_id='$lead_id'";} if ($qc_display_group_type=="LIST") { # Check if call belongs to selected list, otherwise skip $followup_stmt="select count(*) From vicidial_list where lead_id='$lead_id' and list_id='$list_id'"; $followup_rslt=mysql_to_mysqli($followup_stmt, $link); $followup_row=mysqli_fetch_row($followup_rslt); $matched_qc_record=$followup_row[0]; if ($DB) {echo $followup_stmt."
\n";} } else if ($qc_display_group_type=="INGROUP") { # Check if call came in on selected ingroup, otherwise skip $followup_stmt="select count(*) From vicidial_closer_log where uniqueid='$uniqueid' and lead_id='$lead_id' and campaign_id='$group_id'"; $followup_rslt=mysql_to_mysqli($followup_stmt, $link); $followup_row=mysqli_fetch_row($followup_rslt); $matched_qc_record=$followup_row[0]; if ($DB) {echo $followup_stmt."
\n";} } else { # Matching campaign was already established so no skip $matched_qc_record=1; } if(($prev_status!=$current_status && $qc_sort_method=="STATUS") || $o==0) { echo "
"; echo ""; echo ""; echo ""; echo ""; echo "\n"; } if ($matched_qc_record) { # Only display records that are NOT in queue/claimed already. $qc_check_stmt="select count(*) from quality_control_queue where agent_log_id='$agent_log_id'"; # echo $qc_check_stmt; $qc_check_rslt=mysql_to_mysqli($qc_check_stmt, $link); $qc_check_row=mysqli_fetch_row($qc_check_rslt); if($qc_check_row[0]==0) { $name_stmt="select concat(first_name, ' ', last_name) from vicidial_list where lead_id='$row[lead_id]'"; $name_rslt=mysql_to_mysqli($name_stmt, $link); $lead_name=""; if (mysqli_num_rows($name_rslt)>0) { $name_row=mysqli_fetch_row($name_rslt); $lead_name=trim($name_row[0]); $lead_nameENC=urlencode($lead_name); } if (preg_match("/1$|3$|5$|7$|9$/i", $q)) { $bgcolor='class="records_list_x"'; } else { $bgcolor='class="records_list_y"'; } echo ""; echo ""; $lead_nameENC=urlencode($lead_name); if (strlen($lead_name)<1) $lead_name='No Name'; echo ""; echo ""; echo "\n"; $q++; } $prev_status=$row["status"]; } $o++; } if ($DB) {echo $followup_stmt."
\n";} } } else { echo ""._QXZ("ERROR: No QC")." "._QXZ(strtolower($qc_display_group_type))." "._QXZ("available").": $campaign_id$list_id$group_id

\n"; } echo "
"._QXZ("YOUR CURRENT UNFINISHED QC CALLS")." ($queue_ct_row[0] "._QXZ("records").")
"._QXZ("QC ID").""._QXZ("LEAD ID").""._QXZ("NAME").""._QXZ("Date Claimed").""._QXZ("Date Modified")."
$qc_id $lead_id $full_name $date_claimed $date_modified
 
$qc_status"._QXZ("LEAD ID").""._QXZ("NAME").""._QXZ("CALL DATE").""._QXZ("UserID")."
  $row[lead_id]$lead_name $row[call_date]$row[user]
\n"; } else { echo "
\n"; echo "
*** "._QXZ("You have too many QC calls to finish to claim any more")." ***\n"; # ($queue_ct_row[0] < $SSqc_claim_limit) } } ###################### # ADD=700000000000000 view all activity in the admin log ###################### if ($ADD==700000000000000) { echo "
\n"; echo ""; if ($stage > 4999) { $next_limit = ($stage + 5000); $limitSQL = "5000 offset $stage"; } else { $next_limit = "5000"; $limitSQL = "5000"; } $stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code,user_group from vicidial_admin_log $whereLOGadmin_viewable_groupsSQL order by event_date desc limit $limitSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("ADMIN CHANGE LOG").": ("._QXZ("Last 5000 records").")\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $logs_printed = ''; $o=0; while ($logs_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/USER|AGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3&user=$row[6]";} if (preg_match('/CAMPAIGN/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31&campaign_id=$row[6]";} if (preg_match('/LIST/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311&list_id=$row[6]";} if (preg_match('/CUSTOM_FIELDS/i', $row[4])) {$record_link = "./$admin_lists_custom?action=MODIFY_CUSTOM_FIELDS&list_id=$row[6]";} if (preg_match('/SCRIPT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111111&script_id=$row[6]";} if (preg_match('/FILTER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111111&lead_filter_id=$row[6]";} if (preg_match('/INGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111&group_id=$row[6]";} if (preg_match('/DID/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3311&did_id=$row[6]";} if (preg_match('/USERGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111&user_group=$row[6]";} if (preg_match('/REMOTEAGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111&remote_agent_id=$row[6]";} if (preg_match('/PHONE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=10000000000";} if (preg_match('/CALLTIME/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111&call_time_id=$row[6]";} if (preg_match('/SHIFT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111&shift_id=$row[6]";} if (preg_match('/CONFTEMPLATE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111&template_id=$row[6]";} if (preg_match('/CARRIER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=341111111111&carrier_id=$row[6]";} if (preg_match('/SERVER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111&server_id=$row[6]";} if (preg_match('/CONFERENCE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=1000000000000";} if (preg_match('/SYSTEM/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111111";} if (preg_match('/CATEGOR/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111111";} if (preg_match('/GROUPALIAS/i', $row[4])) {$record_link = "$PHP_SELF?ADD=33111111111&group_alias_id=$row[6]";} if (preg_match('/LEADS/i',$row[4])) {$record_link = "admin_modify_lead.php?lead_id=$row[6]\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$row[6]', '_blank');return false;";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=730000000000000&stage=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $logs_printed .= "'$row[0]',"; $o++; } echo "
"._QXZ("ID").""._QXZ("DATE TIME").""._QXZ("USER").""._QXZ("IP").""._QXZ("SECTION").""._QXZ("TYPE").""._QXZ("RECORD ID").""._QXZ("GROUP").""._QXZ("DESCRIPTION").""._QXZ("GOTO")."
$row[0] $row[1] $row[2] $row[3] "._QXZ("$row[4]")." "._QXZ("$row[5]")." $row[6] $row[8] "._QXZ("$row[7]")." "._QXZ("GOTO")."


\n"; echo ""._QXZ("NEXT")."\n"; echo "
\n"; } ###################### # ADD=710000000000000 view all activity in the admin log made by one user ###################### if ($ADD==710000000000000) { echo "
\n"; echo ""; $user_name=''; $stmt="SELECT full_name from vicidial_users where user='$stage' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $names_to_print = mysqli_num_rows($rslt); if ($names_to_print > 0) { $row=mysqli_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,user_group from vicidial_admin_log where user='$stage' $LOGadmin_viewable_groupsSQL order by event_date desc limit 5000;"; $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("ADMIN CHANGE LOG: Changes made by")." $stage - $user_name\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $logs_printed = ''; $o=0; while ($logs_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/USER|AGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3&user=$row[6]";} if (preg_match('/CAMPAIGN/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31&campaign_id=$row[6]";} if (preg_match('/LIST/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311&list_id=$row[6]";} if (preg_match('/CUSTOM_FIELDS/i', $row[4])) {$record_link = "./$admin_lists_custom?action=MODIFY_CUSTOM_FIELDS&list_id=$row[6]";} if (preg_match('/SCRIPT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111111&script_id=$row[6]";} if (preg_match('/FILTER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111111&lead_filter_id=$row[6]";} if (preg_match('/INGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111&group_id=$row[6]";} if (preg_match('/DID/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3311&did_id=$row[6]";} if (preg_match('/USERGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111&user_group=$row[6]";} if (preg_match('/REMOTEAGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111&remote_agent_id=$row[6]";} if (preg_match('/PHONE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=10000000000";} if (preg_match('/CALLTIME/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111&call_time_id=$row[6]";} if (preg_match('/SHIFT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111&shift_id=$row[6]";} if (preg_match('/CONFTEMPLATE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111&template_id=$row[6]";} if (preg_match('/CARRIER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=341111111111&carrier_id=$row[6]";} if (preg_match('/SERVER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111&server_id=$row[6]";} if (preg_match('/CONFERENCE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=1000000000000";} if (preg_match('/SYSTEM/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111111";} if (preg_match('/CATEGOR/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111111";} if (preg_match('/GROUPALIAS/i', $row[4])) {$record_link = "$PHP_SELF?ADD=33111111111&group_alias_id=$row[6]";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=730000000000000&stage=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $logs_printed .= "'$row[0]',"; $o++; } echo "
"._QXZ("ID").""._QXZ("DATE TIME").""._QXZ("USER").""._QXZ("IP").""._QXZ("SECTION").""._QXZ("TYPE").""._QXZ("RECORD ID").""._QXZ("GROUP").""._QXZ("DESCRIPTION").""._QXZ("GOTO")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[8] $row[7] "._QXZ("GOTO")."


\n"; echo "\n"; echo "
\n"; } ###################### # ADD=720000000000000 view all activity in the admin log made to one section/value ###################### if ($ADD==720000000000000) { if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
\n"; echo ""; $sectionSQL = "event_section='$category'"; if (preg_match("/CAMPAIGNS/",$category)) {$sectionSQL = "event_section IN('CAMPAIGNS','CAMPAIGN_SURVEY','CAMPAIGN_LISTMIX','CAMPAIGN_PRESET','CAMPAIGN_QC','CAMPAIGN_PAUSECODE','CAMPAIGN_RECYCLE','CAMPAIGN_HOTKEY','CAMPAIGN_STATUS','CAMPAIGN_DIALSTATUSES','CAMPAIGN_DIALSTATUS','CAMPAIGN_AC-CID')";} if (preg_match("/DIDS/",$category)) {$sectionSQL = "event_section IN('DIDS','DID_RA-EXTEN')";} $stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code,user_group from vicidial_admin_log where $sectionSQL and record_id='$stage' $LOGadmin_viewable_groupsSQL order by event_date desc limit 5000;"; $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("ADMIN CHANGE LOG: Section Records")." - $category - $stage\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $logs_printed = ''; $o=0; while ($logs_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/USER|AGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3&user=$row[6]";} if (preg_match('/CAMPAIGN/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31&campaign_id=$row[6]";} if (preg_match('/LIST/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311&list_id=$row[6]";} if (preg_match('/CUSTOM_FIELDS/i', $row[4])) {$record_link = "./$admin_lists_custom?action=MODIFY_CUSTOM_FIELDS&list_id=$row[6]";} if (preg_match('/SCRIPT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111111&script_id=$row[6]";} if (preg_match('/FILTER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111111&lead_filter_id=$row[6]";} if (preg_match('/INGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3111&group_id=$row[6]";} if (preg_match('/DID/i', $row[4])) {$record_link = "$PHP_SELF?ADD=3311&did_id=$row[6]";} if (preg_match('/USERGROUP/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111&user_group=$row[6]";} if (preg_match('/REMOTEAGENT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=31111&remote_agent_id=$row[6]";} if (preg_match('/PHONE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=10000000000";} if (preg_match('/CALLTIME/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111&call_time_id=$row[6]";} if (preg_match('/CALLTIMES_STATE/i',$row[4])) {$record_link = "$PHP_SELF?ADD=3111111111&call_time_id=$row[6]";} if (preg_match('/HOLIDAY/i',$row[4])) {$record_link = "$PHP_SELF?ADD=3211111111&holiday_id=$row[6]";} if (preg_match('/SHIFT/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111&shift_id=$row[6]";} if (preg_match('/CONFTEMPLATE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111&template_id=$row[6]";} if (preg_match('/CARRIER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=341111111111&carrier_id=$row[6]";} if (preg_match('/SERVER/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111&server_id=$row[6]";} if (preg_match('/CONFERENCE/i', $row[4])) {$record_link = "$PHP_SELF?ADD=1000000000000";} if (preg_match('/SYSTEM/i', $row[4])) {$record_link = "$PHP_SELF?ADD=311111111111111";} if (preg_match('/CATEGOR/i', $row[4])) {$record_link = "$PHP_SELF?ADD=331111111111111";} if (preg_match('/GROUPALIAS/i', $row[4])) {$record_link = "$PHP_SELF?ADD=33111111111&group_alias_id=$row[6]";} if (preg_match('/LEADS/i',$row[4])) {$record_link = "admin_modify_lead.php?lead_id=$row[6]\" onclick=\"javascript:window.open('admin_modify_lead.php?lead_id=$row[6]', '_blank');return false;";} if (preg_match('/VOICEMAIL/i', $row[4])) {$record_link="$PHP_SELF?ADD=371111111111&voicemail_id=$row[6]";} if (preg_match('/^EMAIL$/i',$row[4])) {$record_link = "./admin_email_accounts.php?eact=UPDATE&email_account_id=$row[6]";} if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=730000000000000&stage=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $logs_printed .= "'$row[0]',"; $o++; } echo "
"._QXZ("ID").""._QXZ("DATE TIME").""._QXZ("USER").""._QXZ("IP").""._QXZ("SECTION").""._QXZ("TYPE").""._QXZ("RECORD ID").""._QXZ("GROUP").""._QXZ("DESCRIPTION").""._QXZ("GOTO")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[8] $row[7] ".(isset($record_link) ? ""._QXZ("GOTO")."" : "")."


\n"; echo "\n"; echo "
\n"; } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=730000000000000 detail view of one admin log entry ###################### if ($ADD==730000000000000) { if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
\n"; echo ""; $stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code,event_notes,event_sql,user_group from vicidial_admin_log where admin_log_id='$stage' $LOGadmin_viewable_groupsSQL;"; if ($DB > 0) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); if ($logs_to_print > 0) { $row=mysqli_fetch_row($rslt); $log_id = $row[0]; $log_date_time = $row[1]; $log_user = $row[2]; $log_ip = $row[3]; $log_section = $row[4]; $log_type = $row[5]; $log_record_id = $row[6]; $log_description = $row[7]; $log_notes = $row[8]; $log_sql = $row[9]; $new_sql = $row[9]; $log_user_group = $row[10]; $stmt="SELECT full_name from vicidial_users where user='$log_user';"; if ($DB > 0) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $user_to_print = mysqli_num_rows($rslt); if ($user_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $log_full_name = $rowx[0]; } echo "
"._QXZ("ADMIN CHANGE LOG: Record Detail")." - $stage

\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; $log_sql = preg_replace('/\',/i', '\' ,',$log_sql); $log_sql = preg_replace("/\|/","
",$log_sql); echo ""; echo ""; $stmt="SELECT admin_log_id,event_date,user,ip_address,event_section,event_type,record_id,event_code,event_notes,event_sql,user_group from vicidial_admin_log where event_section='$log_section' and event_type='$log_type' and record_id='$log_record_id' and event_code='$log_description' and admin_log_id < $log_id $LOGadmin_viewable_groupsSQL order by admin_log_id desc;"; if ($DB > 0) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $last_to_print = mysqli_num_rows($rslt); if ($last_to_print > 0) { $rowx=mysqli_fetch_row($rslt); echo "\n"; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo "
"._QXZ("ID").": $log_id
"._QXZ("DATE TIME").": $log_date_time
"._QXZ("USER").": $log_user - $log_full_name
"._QXZ("IP").": $log_ip
"._QXZ("SECTION").": $log_section
"._QXZ("TYPE").": $log_type
"._QXZ("RECORD ID").": $log_record_id
"._QXZ("DESCRIPTION").": $log_description
"._QXZ("ADMIN GROUP").": $log_user_group
"._QXZ("NOTES").": $log_notes
"._QXZ("SQL").":

$log_sql


"._QXZ("DIFF TO LAST CHANGE")."
"._QXZ("ID").": $rowx[0]          "._QXZ("DATE TIME").": $rowx[1]          "._QXZ("USER").": $rowx[2]
"; // include the Diff class require_once './class.Diff.php'; // output the result of comparing two files as HTML if ( ($log_description == 'ADMIN MODIFY LEAD') and (strlen($log_notes) > 50) ) { $log_notes_ARY = explode("---ORIG---NEW---",$log_notes); $log_notes_ARY[0] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[0]); $log_notes_ARY[0] = preg_replace('/\|/', "\n",$log_notes_ARY[0]); $log_notes_ARY[1] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[1]); $log_notes_ARY[1] = preg_replace('/\|/', "\n",$log_notes_ARY[1]); echo Diff::toTable(Diff::compare($log_notes_ARY[0], $log_notes_ARY[1])); } else { $new_sql = preg_replace('/\',/i', '\' ,',$new_sql); $new_sql = preg_replace('/ ,/', "\n",$new_sql); $rowx[9] = preg_replace('/\',/i', '\' ,',$rowx[9]); $rowx[9] = preg_replace('/ ,/', "\n",$rowx[9]); echo Diff::toTable(Diff::compare($rowx[9], $new_sql)); } } else { if ( ($log_description == 'ADMIN MODIFY LEAD') and (strlen($log_notes) > 50) ) { echo "

"._QXZ("DIFF FROM PREVIOUS VALUES")."
"; // include the Diff class require_once './class.Diff.php'; $log_notes_ARY = explode("---ORIG---NEW---",$log_notes); $log_notes_ARY[0] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[0]); $log_notes_ARY[0] = preg_replace('/\|/', "\n",$log_notes_ARY[0]); $log_notes_ARY[1] = preg_replace('/\',/i', '\' ,',$log_notes_ARY[1]); $log_notes_ARY[1] = preg_replace('/\|/', "\n",$log_notes_ARY[1]); echo Diff::toTable(Diff::compare($log_notes_ARY[0], $log_notes_ARY[1])); } } echo "


\n"; echo "\n"; echo "
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=800000000000000 view all activity in the admin report log ###################### if ($ADD==800000000000000) { echo "
\n"; echo ""; if ($stage > 4999) { $next_limit = ($stage + 5000); $limitSQL = "5000 offset $stage"; } else { $next_limit = "5000"; $limitSQL = "5000"; } $stmt="SELECT report_log_id,event_date,user,ip_address,report_name,browser,referer,notes,url,run_time from vicidial_report_log order by event_date desc limit $limitSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("ADMIN REPORT LOG: (Last 5000 records)")."\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $logs_printed = ''; $o=0; while ($logs_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} $run_color='color=blue'; if ($row[9] > 5) {$run_color='color=black';} if ($row[9] > 10) {$run_color='color=purple';} if ($row[9] > 30) {$run_color='color=red';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=830000000000000&stage=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $logs_printed .= "'$row[0]',"; $o++; } echo "
"._QXZ("ID").""._QXZ("DATE TIME").""._QXZ("USER").""._QXZ("IP").""._QXZ("REPORT").""._QXZ("RUN TIME").""._QXZ("GOTO")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[9] "._QXZ("GOTO")."


\n"; echo ""._QXZ("NEXT")."\n"; echo "
\n"; } ###################### # ADD=810000000000000 view all activity in the report log made by one user ###################### if ($ADD==810000000000000) { echo "
\n"; echo ""; $user_name=''; $stmt="SELECT full_name from vicidial_users where user='$stage' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $names_to_print = mysqli_num_rows($rslt); if ($names_to_print > 0) { $row=mysqli_fetch_row($rslt); $user_name = $row[0]; } $stmt="SELECT report_log_id,event_date,user,ip_address,report_name,browser,referer,notes,url,run_time from vicidial_report_log where user='$stage' order by event_date desc limit 5000;"; $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("ADMIN REPORT LOG: Changes made by")." $stage - $user_name\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $logs_printed = ''; $o=0; while ($logs_to_print > $o) { $row=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $o)) {$bgcolor='class="records_list_x"';} else {$bgcolor='class="records_list_y"';} $run_color='color=blue'; if ($row[9] > 5) {$run_color='color=black';} if ($row[9] > 10) {$run_color='color=purple';} if ($row[9] > 30) {$run_color='color=red';} echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=830000000000000&stage=$row[0]'\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; $logs_printed .= "'$row[0]',"; $o++; } echo "
"._QXZ("ID").""._QXZ("DATE TIME").""._QXZ("USER").""._QXZ("IP").""._QXZ("REPORT").""._QXZ("RUN TIME").""._QXZ("GOTO")."
$row[0] $row[1] $row[2] $row[3] $row[4] $row[9] "._QXZ("GOTO")."


\n"; echo "\n"; echo "
\n"; } ###################### # ADD=830000000000000 detail view of one report log entry ###################### if ($ADD==830000000000000) { if ($LOGuser_level >= 9) { echo "
\n"; echo ""; $stmt="SELECT report_log_id,event_date,vrl.user,ip_address,report_name,browser,referer,notes,url,full_name,val.user_group,run_time from vicidial_report_log vrl, vicidial_users val where report_log_id='$stage' and val.user=vrl.user $valLOGadmin_viewable_groupsSQL;"; if ($DB > 0) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $logs_to_print = mysqli_num_rows($rslt); if ($logs_to_print > 0) { $row=mysqli_fetch_row($rslt); $run_color='color=blue'; if ($row[11] > 5) {$run_color='color=black';} if ($row[11] > 10) {$run_color='color=purple';} if ($row[11] > 30) {$run_color='color=red';} $row[5] = preg_replace("/\'|\"|\\\\|<|>/","",$row[5]); $row[6] = preg_replace("/\'|\"|\\\\|<|>/","",$row[6]); $row[8] = preg_replace("/\'|\"|\\\\|<|>/","",$row[8]); echo "
"._QXZ("ADMIN REPORT LOG: Record Detail")." - $stage

\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo "
"._QXZ("ID").": $row[0]
"._QXZ("DATE TIME").": $row[1]
"._QXZ("RUN TIME").": $row[11] "._QXZ("seconds")."
"._QXZ("USER").": $row[2] - $row[9]
"._QXZ("IP").": $row[3]
"._QXZ("REPORT").": $row[4]
"._QXZ("BROWSER").": $row[5]
"._QXZ("NOTES").": $row[7]
"._QXZ("REFERER").":

$row[6]

"._QXZ("URL").":

$row[8]



\n"; echo "\n"; echo "
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ###################### # ADD=999999 display reports section ###################### if ($ADD==999999) { if ($LOGview_reports==1) { $server_id=$MT; $server_description=$MT; $server_ip=$MT; $active=$MT; $sysload=$MT; $channels_total=$MT; $cpu_idle_percent=$MT; $disk_usage=$MT; $active_agent_login_server=$MT; $active_asterisk_server=$MT; echo "
\n"; echo ""; $server_id=$MT; $server_description=$MT; $server_ip=$MT; $active=$MT; $sysload=$MT; $channels_total=$MT; $cpu_idle_percent=$MT; $disk_usage=$MT; $active_agent_login_server=$MT; $active_asterisk_server=$MT; $stmt="SELECT server_id,server_description,server_ip,active,sysload,channels_total,cpu_idle_percent,disk_usage,active_agent_login_server,active_asterisk_server from servers order by server_id;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $servers_to_print = mysqli_num_rows($rslt); $i=0; while ($i < $servers_to_print) { $row=mysqli_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]; $active_agent_login_server[$i] = $row[8]; $active_asterisk_server[$i] = $row[9]; # look for server_live_partitions entries for this server $pstmt="SELECT partition_order,use_pct from server_live_partitions where server_ip='$server_ip[$i]' and (mb_used + mb_available) >= 1000;"; $prslt=mysql_to_mysqli($pstmt, $link); if ($DB) {echo "$pstmt\n";} $parts_to_print = mysqli_num_rows($prslt); $pp=0; $temp_disk_usage=''; while ($parts_to_print > $pp) { $prow=mysqli_fetch_row($prslt); $part_order = ($prow[0] + 1); $temp_disk_usage .= "$part_order $prow[1]|"; $pp++; } if (strlen($temp_disk_usage) > 3) {$disk_usage[$i] = $temp_disk_usage;} $i++; } $stmt="SELECT queuemetrics_url,vtiger_url from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $queuemetrics_url_LU = $row[0]; $vtiger_url_LU = $row[1]; $stmt="SELECT count(*) from vicidial_list_update_log;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $list_update_count = $row[0]; $stmt="SELECT count(*) from dialable_inventory_snapshots;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $inventory_report_count = $row[0]; ?> Reports
            ()

      "._QXZ("Real-Time Reports")."
\n"; echo "
\n"; echo ""._QXZ("Inbound and Outbound Calling Reports")."
\n"; echo "
    \n"; if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("VERM - Enhanced Reporting Module")."\n";} if ( (preg_match("/Inbound Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Report")." - "._QXZ("v2")."\n";} if ( (preg_match("/Inbound Report by DID/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Report by DID")."\n";} if ( (preg_match("/Inbound Service Level Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Service Level Report")."\n";} if ( (preg_match("/Inbound Summary Hourly Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Summary Hourly Report")."\n";} if ( (preg_match("/Inbound Daily Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Daily Report")."\n";} if ( (preg_match("/Inbound DID Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound DID Report")."\n";} if ( (preg_match("/Inbound DID Summary Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("DID Summary")."\n";} if ( (preg_match("/Agent DID Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Agent DID")."\n";} if ( (preg_match("/Inbound IVR Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound IVR Report")."\n";} if ( (preg_match("/Inbound Forecasting Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { echo "
  • "._QXZ("Inbound Forecasting Report").""; if ( (preg_match("/Advanced Forecasting Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Advanced")."";} echo "\n"; } if ( (preg_match("/Outbound Calling Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Outbound Calling Report")."\n";} if ( (preg_match("/Outbound Summary Interval Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Outbound Summary Interval Report")."\n";} if ( (preg_match("/Outbound IVR Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { echo "
  • "._QXZ("Outbound IVR Report").""; if ($LOGexport_reports >= 1) { if ( (preg_match("/Export Calls Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Export")."";} } echo "\n"; if ( (preg_match("/Callmenu Survey Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Callmenu Agent")."\n";} } if ( (preg_match("/Outbound Lead Source Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Outbound Lead Source Report")."\n";} if ( (preg_match("/Fronter - Closer Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Fronter - Closer Report")."\n";} if ( (preg_match("/Fronter - Closer Detail Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Detail")."\n";} if ( (preg_match("/Lists Pass Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Lists Pass Report")."\n";} if ( (preg_match("/Lists Campaign Statuses Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Lists Campaign Statuses Report")."\n";} if ( (preg_match("/Called Counts List IDs Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Called Counts List IDs Report")."\n";} if ( (preg_match("/Campaign Status List Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Campaign Status List Report")."\n";} # echo "
  • "._QXZ("AGENT SPREADSHEET PERFORMANCE")."\n"; if ( ( (preg_match("/Dialer Inventory Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) and ($inventory_report_count > 0) ) {echo "
  • "._QXZ("Dialer Inventory Report")."\n";} if ($SSemail_enabled > 0) { if ( ( (preg_match("/Inbound Report/",$LOGallowed_reports)) and (preg_match("/Inbound Email Report/",$LOGallowed_reports)) ) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Email Report")."\n";} if ( (preg_match("/Email Log Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Email Log Report")."\n";} } if ($SSallow_chats > 0) { if ( ( (preg_match("/Inbound Report/",$LOGallowed_reports)) and (preg_match("/Inbound Chat Report/",$LOGallowed_reports)) ) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Chat Report")."\n";} } if ($LOGexport_reports >= 1) { if ( (preg_match("/Export Calls Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Export Calls Report")."\n";} if ( (preg_match("/Export Leads Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Export Leads Report")."\n";} } echo "
\n"; echo "
\n"; echo "      \n"; echo "\n"; echo ""._QXZ("Agent Reports")."
\n"; echo "
    \n"; if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("VERM - Enhanced Reporting Module")."\n";} if ( (preg_match("/Agent Time Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Agent Time Detail")."\n";} if ( (preg_match("/Agent Status Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Agent Status Detail")."\n";} if ( (preg_match("/Agent Inbound Status Summary/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Inbound Summary")."\n";} if ( (preg_match("/Agent Performance Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Agent Performance Detail")."\n";} if ( (preg_match("/Team Performance Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Team Performance Detail")."\n";} if ( (preg_match("/Performance Comparison Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Performance Comparison Report")."\n";} if ( (preg_match("/Single Agent Daily$/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Single Agent Daily")."\n";} if ( (preg_match("/Single Agent Daily Time/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo " - "._QXZ("Time")."\n";} if ( (preg_match("/User Group Login Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("User Group Login Report")."\n";} if ( (preg_match("/User Group Hourly Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("User Group Hourly Report")." - "._QXZ("v2")."\n";} if ( (preg_match("/User Stats/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("User Stats")."\n";} if ( (preg_match("/User Time Sheet/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("User Time Sheet")."\n";} echo "

\n"; echo ""._QXZ("Time Clock Reports")."
\n"; echo "
\n"; echo ""._QXZ("Other Reports and Links")."
\n"; echo "
    \n"; if ( (preg_match("/Server Performance Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Server Performance Report")."\n";} if ( (preg_match("/Maximum System Stats/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Maximum System Stats")."\n";} if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
  • "._QXZ("Administration Change Log")."\n"; } if ($SSenable_queuemetrics_logging > 0) { echo "
  • "._QXZ("QueueMetrics Reports")."\n"; } if ($SSenable_vtiger_integration > 0) { echo "
  • "._QXZ("VtigerCRM Home")."\n"; } if ( ($list_update_count > 0) and ( (preg_match("/List Update Stats/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
  • "._QXZ("List Update Stats")."\n"; } if ($SScallcard_enabled > 0) { if ( (preg_match("/CallCard Search/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("CallCard Search")."\n";} } if ($SSqc_features_active > 0) { if ( (preg_match("/Quality Control Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Quality Control Report")."\n";} } echo "
\n"; $custom_stmt="show tables like 'vicidial_custom_reports'"; $custom_rslt=mysql_to_mysqli($custom_stmt, $link); if (mysqli_num_rows($custom_rslt)>0) { $allowed_rpt_stmt="SELECT allowed_custom_reports from vicidial_user_groups where user_group='$LOGuser_group' and allowed_custom_reports!=''"; $allowed_rpt_rslt=mysql_to_mysqli($allowed_rpt_stmt, $link); if (mysqli_num_rows($allowed_rpt_rslt)>0) { $allowed_rpt_row=mysqli_fetch_row($allowed_rpt_rslt); $allowed_custom_reports=$allowed_rpt_row[0]; $allowed_reports_array=explode("|", $allowed_custom_reports); if (count($allowed_reports_array)>0) { echo "
\n"; echo ""._QXZ("Custom Reports")."
\n"; echo "
    \n"; $report_links_stmt="SELECT report_name, domain, path_name, custom_variables from vicidial_custom_reports where report_name in ('".implode("','", $allowed_reports_array)."')"; $report_links_rslt=mysql_to_mysqli($report_links_stmt, $link); while ($report_links_row=mysqli_fetch_array($report_links_rslt)) { $domain=$report_links_row["domain"]; $path_name=$report_links_row["path_name"]; $custom_variables=ConvertPresets($report_links_row["custom_variables"]); # $custom_variables=$report_links_row["custom_variables"]; $report_name=$report_links_row["report_name"]; echo "
  • "._QXZ("$report_name")."\n"; } echo "
\n"; } } } echo "
\n"; if ( (file_exists('custom_report_links.html')) and ( (preg_match("/Custom Reports Links/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { readfile('custom_report_links.html'); } if ( ($reports_only_user < 1) and ( (preg_match("/Report Page Servers Summary/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "
\n";

			if ($stage == 'TIME')
				{
				echo "";
				echo "\n";
				}
			else
				{
				echo "";
				echo "\n";
				}

			$o=0;
			$web_u_time = date('U');
			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%";
				$s_time=' ';
				$s_ver=' ';
				$u_time=$web_u_time;
				$reset_time=$web_u_time;
				$Sdb_time=$web_u_time;
				$stmt="SELECT last_update,UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip[$o]';";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$servertime_to_print = mysqli_num_rows($rslt);
				if ($servertime_to_print)
					{
					$row=mysqli_fetch_row($rslt);
					$s_time =		$row[0];
					$u_time =		($row[1] + 10);
					$reset_time =	($row[1] + 90);
					$Sdb_time =		($row[2] + 10);
					}
				$agnt=0;
				$stmt="SELECT count(*) from vicidial_live_agents where server_ip='$server_ip[$o]';";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$agnt_to_print = mysqli_num_rows($rslt);
				if ($agnt_to_print)
					{
					$row=mysqli_fetch_row($rslt);
					$agnt =		$row[0];
					}
				$server_bgcolor=' bgcolor="#B1E4BB"';
				$FROZEN_output='';
				if ($web_u_time > $u_time)
					{$server_bgcolor=' bgcolor=red';}
				if ( ($web_u_time > $reset_time) and ($web_u_time > $Sdb_time) and ($SSfrozen_server_call_clear > 0) )
					{
					#### if server is more than 90 seconds out of sync and no longer updating, check for live calls and agents and delete them
					$servercalls_count=0;
					$stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip[$o]';";
					$rslt=mysql_to_mysqli($stmt, $link);
					if ($DB) {echo "$stmt\n";}
					$servercalls_to_print = mysqli_num_rows($rslt);
					if ($servercalls_to_print)
						{
						$row=mysqli_fetch_row($rslt);
						$servercalls_count =	$row[0];
						}
					if ($servercalls_count > 0)
						{
						$stmt="DELETE FROM vicidial_auto_calls where server_ip='$server_ip[$o]';";
						$rslt=mysql_to_mysqli($stmt, $link);
						$FCaffected_rows = mysqli_affected_rows($link);

						### LOG INSERTION Admin Log Table ###
						$SQL_log = "$stmt|";
						$SQL_log = preg_replace('/;/', '', $SQL_log);
						$SQL_log = addslashes($SQL_log);
						$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$server_ip[$o]', event_section='SERVERS', event_type='CLEAR', record_id='$server_id[$o]', event_code='FROZEN SERVER CALL CLEAR ADMIN', event_sql=\"$SQL_log\", event_notes='$servercalls_count|$FCaffected_rows|$s_time($web_u_time|$Sdb_time)';";
						if ($DB) {echo "|$stmt|\n";}
						$rslt=mysql_to_mysqli($stmt, $link);

						$FROZEN_output = "\n";
						}
					}
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				if ($stage == 'TIME')
					{
					$stmt="SELECT svn_revision from servers where server_ip='$server_ip[$o]';";
					$rslt=mysql_to_mysqli($stmt, $link);
					if ($DB) {echo "$stmt\n";}
					$serverver_to_print = mysqli_num_rows($rslt);
					if ($serverver_to_print)
						{
						$row=mysqli_fetch_row($rslt);
						$s_ver = $row[0];
						}
					echo "";
					}
				else
					{
					if ( (preg_match("/Real-Time Main Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
						{
						echo "\n";
						echo "\n";
						}
					else
						{
						echo "\n";
						echo "\n";
						}
					}
				echo "\n";
				echo "$FROZEN_output";
				$o++;
				}

			if ($stage == 'TIME')
				{
				echo "";

				$stmt="SELECT NOW();";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$dbtime_to_print = mysqli_num_rows($rslt);
				if ($dbtime_to_print)
					{
					$row=mysqli_fetch_row($rslt);
					echo "";
					}
				}
			echo "
"._QXZ("SERVER")." -"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("AGNT").""._QXZ("DISK").""._QXZ("TIME").""._QXZ("VER")."
"._QXZ("SERVER")." +"._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("AGNT").""._QXZ("DISK").""._QXZ("OUTBOUND").""._QXZ("INBOUND")."
  "._QXZ("FROZEN CALLS CLEARED").": $servercalls_count|$FCaffected_rows
$server_id[$o]$server_description[$o]$server_ip[$o]"._QXZ("$active[$o]")." / "._QXZ("$active_asterisk_server[$o]")." / "._QXZ("$active_agent_login_server[$o]")."$sysload[$o] - $cpu%$channels_total[$o]$agnt$disk$s_time$s_ver"._QXZ("LINK").""._QXZ("LINK")."    
  "._QXZ("PHP Time")."   " . date("Y-m-d H:i:s") . "  
  "._QXZ("DB Time")."   $row[0]  
\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Admin Utilities Page/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "

  "._QXZ("Admin Utilities")."\n"; } } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ##### END report links ##### ###################### # ADD=999998 display admin links page ###################### if ($ADD==999998) { $subhead_font = "style=\"font-family:HELVETICA;font-size:14;color:BLACK;font-weight:bold;\""; ?> Admin
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
 \n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=100000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=130000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=10000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=130000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=140000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=100000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Call Times")."
"._QXZ("Shifts")."
"._QXZ("Phones")."
"._QXZ("Templates")."
"._QXZ("Carriers")."
"._QXZ("Servers")."
\n"; echo "
\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=1000000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=311111111111111';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=180000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=182000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=321111111111111';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=193000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($SScampaign_cid_areacodes_enabled == '1') { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=196000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
"._QXZ("Conferences")."
"._QXZ("System Settings")."
"._QXZ("Agent Screen Labels")."
"._QXZ("Screen Colors")."
"._QXZ("System Statuses")."
"._QXZ("Status Groups")."
"._QXZ("CID Groups")."
\n"; echo "
\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=170000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSemail_enabled > 0) { echo " 0) {echo " onclick=\"window.document.location='admin_email_accounts.php';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ( ($sounds_central_control_active > 0) or ($SSsounds_central_control_active > 0) ) { echo " 0) {echo " onclick=\"window.document.location='audio_store.php';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=160000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ($SSenable_languages > 0) { echo " 0) {echo " onclick=\"window.document.location='admin_languages.php?ADD=163000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ( (preg_match("/soundboard/",$SSactive_modules) ) or ($SSagent_soundboards > 0) ) { echo " 0) {echo " onclick=\"window.document.location='admin_soundboard.php?ADD=162000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } echo " 0) {echo " onclick=\"window.document.location='admin.php?ADD=197000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Voicemail")."
"._QXZ("Email Accounts")."
"._QXZ("Audio Store")."
"._QXZ("Music On Hold")."
"._QXZ("Languages")."
"._QXZ("Audio Soundboards")."
"._QXZ("VM Message Groups")."
\n"; echo "
\n"; echo "\n"; if ($SSenable_tts_integration > 0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=150000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ($SScallcard_enabled > 0) { echo " 0) {echo " onclick=\"window.document.location='callcard_admin.php';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ($SScontacts_enabled > 0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=190000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=192000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; if ($SSenable_auto_reports > 0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=194000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } if ($SSallow_ip_lists > 0) { echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=195000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; } echo " 0) {echo " onclick=\"window.document.location='$PHP_SELF?ADD=198000000000';\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Text To Speech")."
"._QXZ("CallCard Admin")."
"._QXZ("Contacts")."
"._QXZ("Settings Containers")."
"._QXZ("Automated Reports")."
"._QXZ("IP Lists")."
"._QXZ("Queue Groups")."
\n"; echo "
  \n"; } ##### END admin links ##### ###################### # ADD=999997 - user force change password page ###################### if ($ADD==999997) { $show_form=1; if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { if ( (mb_strlen($pass,'utf-8') > 100) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) ) { echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass); if ( (mb_strlen($pass,'utf-8') > 100) or (strlen($pass) < 2) ) { echo "
"._QXZ("Your password must be between 2 and 100 characters in length")."\n"; } if ($pass==$PHP_AUTH_PW) { echo "
"._QXZ("You cannot use the same password as your last password")."\n"; } if ($SSrequire_password_length > 0) { echo "
"._QXZ("Password must be at least $SSrequire_password_length characters long")."\n"; } } else { $pass_hash=''; $pass_checkSQL="pass='$pass'"; if ( ($SSpass_hash_enabled > 0) and (strlen($pass) > 1) ) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass_checkSQL="pass_hash='$pass_hash'"; $pass=''; } $stmt="SELECT count(*) from vicidial_users where user='$user' and active='Y' and user_level > 1;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $userpass_to_print = mysqli_num_rows($rslt); if ($userpass_to_print < 1) {echo _QXZ("Password has not been changed, please try again")." |2|$userpass_to_print";} else { $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo _QXZ("Password has not been changed, please try again")." |3|$row[0]";} else { $stmt="SELECT count(*) from vicidial_users where user='$user' and $pass_checkSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $userpass_to_print = mysqli_num_rows($rslt); if ($userpass_to_print < 1) {echo _QXZ("Password has not been changed, please try again")." |4|$userpass_to_print";} else { $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo _QXZ("You cannot use the same password as your last password, please try again")." |5|$row[0]";} else { $show_form=0; $stmt="UPDATE vicidial_users SET pass='$pass',pass_hash='$pass_hash',force_change_password='N',failed_login_count=0 where user='$user' and force_change_password='Y' and active='Y' and user_level > 6;"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$user', event_code='USER FORCE CHANGE PASSWORD', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Password has been updated, you may now continue")."\n"; } } } } } } if ($show_form > 0) { echo "
\n"; echo ""; echo "
"._QXZ("CHANGE PASSWORD")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("New Password").":     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("You are required to change your password before you can continue on to Administration. The longer the password is, the stronger it will be. Your password must be from 2 to 100 characters in length and cannot contain any characters that are not letters or numbers. Be sure that this password is something that you can remember, because as soon as you make this change you will be prompted to enter your new password to log back in to Administration")."
\n"; } } ##### END user force change password page ##### ###################### # ADD=99999701 - User 2FA(Two-Factor-Authentication) Page ###################### if ($ADD==99999701) { $subhead_font = "style=\"font-family:HELVETICA;font-size:14;color:BLACK;font-weight:bold;\""; echo "\"Two-Factor-Authentication\" "._QXZ("Two-Factor-Authentication")."
\n"; if ( ($SStwo_factor_auth_hours < 1) or ($SStwo_factor_container == '') or ($SStwo_factor_container == '---DISABLED---') ) { echo _QXZ("Two-Factor-Authentication is disabled on your system. Please contact your system administrator")." $SStwo_factor_auth_hours|$SStwo_factor_container\n"; exit; } $OBSCUREemail = $LOGemail; $OBSCUREmobile_number = $LOGmobile_number; # first character and last 6 characters $temp_emailARY = explode('@',$OBSCUREemail); $field_temp_val = $temp_emailARY[0]; if (is_null($field_temp_val)) {$field_temp_val='';} if (strlen($field_temp_val) > 1) {$OBSCUREemail = substr($field_temp_val,0,2) . str_repeat(".", (strlen($field_temp_val) - 2)) . '@' . $temp_emailARY[1];} else {$OBSCUREemail = '<'._QXZ("none").'>';} # first 3 digits and last 2 digits $field_temp_val = $OBSCUREmobile_number; if (is_null($field_temp_val)) {$field_temp_val='';} if (strlen($field_temp_val) > 1) {$OBSCUREmobile_number = substr($field_temp_val,0,3) . str_repeat("x", (strlen($field_temp_val) - 5)) . substr($field_temp_val,-2,2);} else {$OBSCUREmobile_number = '<'._QXZ("none").'>';} ### BEGIN Gather 2FA settings container details ### $valid_2FA_config=0; $active_2FA_methods=0; $auth_code_expire_minutes='30'; $auth_code_attempts='10'; $auth_code_length='6'; $email_auth=''; $email_from=''; $email_subject=''; $email_message=''; $phone_auth=''; $phone_prefix=''; $phone_server_ip=''; $phone_cid_number=''; $phone_message_override=''; $sms_auth=''; $sms_cid_number=''; $sms_url=''; $stmt = "SELECT container_entry FROM vicidial_settings_containers where container_id='$SStwo_factor_container';"; $rslt=mysql_to_mysqli($stmt, $link); $SCinfo_ct = mysqli_num_rows($rslt); if ($DB) {echo "$SCinfo_ct|$stmt\n";} if ($SCinfo_ct > 0) { $row=mysqli_fetch_row($rslt); $TFAcontainer_entry = $row[0]; $TFAcontainer_entry = preg_replace("/\r|\t|\'|\"/",'',$TFAcontainer_entry); $TFAcontainer_entry = preg_replace("/ => | =>|=> /",'=>',$TFAcontainer_entry); $two_factor_settings = explode("\n",$TFAcontainer_entry); $two_factor_settings_ct = count($two_factor_settings); $tfal=0; while ($two_factor_settings_ct > $tfal) { if (preg_match("/^auth_code_expire_minutes=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/auth_code_expire_minutes=>/",'',$two_factor_settings[$tfal]); $auth_code_expire_minutes = $two_factor_settings[$tfal]; } if (preg_match("/^auth_code_attempts=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/auth_code_attempts=>/",'',$two_factor_settings[$tfal]); $auth_code_attempts = $two_factor_settings[$tfal]; } if (preg_match("/^auth_code_length=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/auth_code_length=>/",'',$two_factor_settings[$tfal]); $auth_code_length = $two_factor_settings[$tfal]; } if (preg_match("/^email_auth=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/email_auth=>/",'',$two_factor_settings[$tfal]); $email_auth = $two_factor_settings[$tfal]; $active_2FA_methods++; } if (preg_match("/^email_from=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/email_from=>/",'',$two_factor_settings[$tfal]); $email_from = $two_factor_settings[$tfal]; $valid_2FA_config++; } if (preg_match("/^email_subject=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/email_subject=>/",'',$two_factor_settings[$tfal]); $email_subject = $two_factor_settings[$tfal]; } if (preg_match("/^email_message=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/email_message=>/",'',$two_factor_settings[$tfal]); $email_message = $two_factor_settings[$tfal]; } if (preg_match("/^phone_auth=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/phone_auth=>/",'',$two_factor_settings[$tfal]); $phone_auth = $two_factor_settings[$tfal]; $active_2FA_methods++; } if (preg_match("/^phone_prefix=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/phone_prefix=>/",'',$two_factor_settings[$tfal]); $phone_prefix = $two_factor_settings[$tfal]; } if (preg_match("/^phone_server_ip=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/phone_server_ip=>/",'',$two_factor_settings[$tfal]); $phone_server_ip = $two_factor_settings[$tfal]; $valid_2FA_config++; } if (preg_match("/^phone_cid_number=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/phone_cid_number=>/",'',$two_factor_settings[$tfal]); $phone_cid_number = $two_factor_settings[$tfal]; } if (preg_match("/^phone_message_override=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/phone_message_override=>/",'',$two_factor_settings[$tfal]); $phone_message_override = $two_factor_settings[$tfal]; } if (preg_match("/^sms_auth=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/sms_auth=>/",'',$two_factor_settings[$tfal]); $sms_auth = $two_factor_settings[$tfal]; $active_2FA_methods++; } if (preg_match("/^sms_cid_number=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/sms_cid_number=>/",'',$two_factor_settings[$tfal]); $sms_cid_number = $two_factor_settings[$tfal]; } if (preg_match("/^sms_url=>/",$two_factor_settings[$tfal])) { $two_factor_settings[$tfal] = preg_replace("/sms_url=>/",'',$two_factor_settings[$tfal]); $sms_url = $two_factor_settings[$tfal]; $valid_2FA_config++; } $tfal++; } } ### END Gather 2FA settings container details ### if ( ($valid_2FA_config < 1) or ($active_2FA_methods < 1) ) { echo "
"._QXZ("Two-Factor-Authentication is not properly configured on your system. Please contact your system administrator")."

$valid_2FA_config|$SStwo_factor_auth_hours|$SStwo_factor_container

\n"; exit; } if (is_null($LOGemail)) {$LOGemail='';} if (is_null($LOGmobile_number)) {$LOGmobile_number='';} if ( (strlen($LOGemail) < 4) and (strlen($LOGmobile_number) < 2) ) { echo _QXZ("Your User account is not configured for Two-Factor-Authentication. Please contact your system administrator. (no email or mobile number)").".\n"; exit; } $show_form=1; if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { $auth_fail=0; echo "
"; if (is_null($rank)) {$rank='';} if (strlen($rank) < 2) { echo _QXZ("Please go back and enter a valid authorization code")." |1|" . strlen($rank) . "|"; $auth_fail++; } else { $stmt="SELECT count(*) from vicidial_two_factor_auth where user='$user' and auth_code='$rank' and auth_stage='0' and auth_code_exp_date > NOW() and (auth_attempts < $auth_code_attempts);"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $auth_check_to_print = mysqli_num_rows($rslt); if ($auth_check_to_print < 1) {echo _QXZ("Please go back and enter a valid authorization code")." |2|$auth_check_to_print"; $auth_fail++;} else { $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo _QXZ("Please go back and enter a valid authorization code")." |3|$row[0]"; $auth_fail++;} else { $stmt="UPDATE vicidial_two_factor_auth SET auth_stage='1', auth_attempts=(auth_attempts + 1) where user='$user' and auth_stage='0' and auth_code='$rank';"; $rslt=mysql_to_mysqli($stmt, $link); $stmt = "INSERT INTO vicidial_agent_function_log set agent_log_id='0',user='$user',function='2FA_good',event_time=NOW(),campaign_id='-ADMIN-',user_group='$LOGuser_group',lead_id='0',uniqueid='SUCCESS',caller_code='$ip',stage='',comments='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Authorization code accepted, your login is complete, you may now continue")."\n"; } } } if ($auth_fail > 0) { $stmt="UPDATE vicidial_two_factor_auth SET auth_attempts=(auth_attempts + 1) where user='$user' and auth_stage='0';"; $rslt=mysql_to_mysqli($stmt, $link); $auth_failed_attempts=1; $stmt="SELECT auth_attempts from vicidial_two_factor_auth where user='$user' and auth_stage='0' order by auth_code_exp_date desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $auth_attempt_to_print = mysqli_num_rows($rslt); if ($auth_attempt_to_print > 0) { $row=mysqli_fetch_row($rslt); $auth_failed_attempts = $row[0]; } if ($auth_failed_attempts >= $auth_code_attempts) { $stmt="UPDATE vicidial_users set failed_login_count='$auth_failed_attempts',last_ip='$ip' where user='$user';"; $rslt=mysql_to_mysqli($stmt, $link); } } echo "
\n"; exit; } ##### BEGIN send out AUTH CODE and show auth-code entry page ##### if ($auth_entry > 0) { $ACbegin = '1'; $ACend = '9'; $i=1; while($i < $auth_code_length) { $ACbegin .= '0'; $ACend .= '9'; $i++; } $NEWauth_code = rand($ACbegin, $ACend); $auth_exp_date = date("Y-m-d H:i:s", mktime(date("H")+$SStwo_factor_auth_hours,date("i"),date("s"),date("m"),date("d"),date("Y"))); $auth_code_exp_date = date("Y-m-d H:i:s", mktime(date("H"),date("i")+$auth_code_expire_minutes,date("s"),date("m"),date("d"),date("Y"))); ### insert auth_code into vicidial_two_factor_auth table $stmt="INSERT INTO vicidial_two_factor_auth SET auth_date=NOW(),auth_exp_date='$auth_exp_date',user='$user',auth_stage='0',auth_code='$NEWauth_code',auth_code_exp_date='$auth_code_exp_date',auth_method='$stage',auth_attempts='0';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); if ($DB) {echo "$affected_rows|$stmt\n";} # invalidate all older auth_code entries if ($affected_rows > 0) { $stmt="UPDATE vicidial_two_factor_auth SET auth_stage='6' where user='$user' and auth_stage!='6' and auth_code!='$NEWauth_code';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); if ($DB) {echo "$affected_rows|$stmt\n";} } ### Send auth code by EMAIL if ($stage == 'EMAIL') { $email_message = preg_replace('/--A--auth_code--B--/i',"$NEWauth_code",$email_message); // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Create email headers $headers .= 'From: ' . $email_from . "\r\n" . 'Reply-To: ' . $email_from . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $body = "" . $email_message . ""; $success = mail($LOGemail, $email_subject, $body, $headers ); if ($success) { $stmt = "INSERT INTO vicidial_agent_function_log set agent_log_id='0',user='$user',function='2FA_send',event_time=NOW(),campaign_id='-ADMIN-',user_group='$LOGuser_group',lead_id='0',uniqueid='SUCCESS',caller_code='$ip',stage='$stage',comments='EMAIL: $LOGemail';"; echo "
"._QXZ("Your authorization code has been sent by %1s to",0,'',$stage).": $OBSCUREemail
\n"; } else { $stmt = "INSERT INTO vicidial_agent_function_log set agent_log_id='0',user='$user',function='2FA_send',event_time=NOW(),campaign_id='-ADMIN-',user_group='$LOGuser_group',lead_id='0',uniqueid='ERROR',caller_code='$ip',stage='$stage',comments='EMAIL: $LOGemail';"; $error_msg = error_get_last()['message']; echo "$error_msg"; } ### LOG INSERTION Admin Log Table ### if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } ### Send auth code by PHONE if ($stage == 'PHONE') { if (is_null($ext_context)) {$ext_context='';} if (is_null($phone_message_override)) {$phone_message_override='';} $context_2FA = '2FA_say_auth_code'; if (strlen($phone_message_override) > 0) {$context_2FA = $phone_message_override;} if (strlen($ext_context) < 1) {$ext_context='default';} $local_DEF = 'Local/'; $local_AMP = '@'; $Local_dial_timeout = '60000'; $Ndialstring = "$phone_prefix$LOGmobile_number"; $VMvariable = "Variable: access_code=$NEWauth_code"; ### insert a NEW record to the vicidial_manager table to be processed $stmtB = "INSERT INTO vicidial_manager(uniqueid,entry_date,status,response,server_ip,channel,action,callerid,cmd_line_b,cmd_line_c,cmd_line_d,cmd_line_e,cmd_line_f,cmd_line_g,cmd_line_h,cmd_line_i,cmd_line_j,cmd_line_k) values('',NOW(),'NEW','N','$phone_server_ip','','Originate','$VqueryCID','Exten: s','Context: $context_2FA','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $phone_cid_number','Timeout: $Local_dial_timeout','$VMvariable','','','')"; $rslt=mysql_to_mysqli($stmtB, $link); $stmt = "INSERT INTO vicidial_agent_function_log set agent_log_id='0',user='$user',function='2FA_send',event_time=NOW(),campaign_id='-ADMIN-',user_group='$LOGuser_group',lead_id='0',uniqueid='SUCCESS',caller_code='$ip',stage='$stage',comments='PHONE: $LOGmobile_number';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("Your authorization code has been sent by %1s to",0,'',$stage).": $OBSCUREmobile_number
\n"; } ### Send auth code by SMS if ($stage == 'SMS') { $sms_url = preg_replace('/--A--auth_code--B--/i',"$NEWauth_code",$sms_url); $sms_url = preg_replace('/--A--mobile_number--B--/i',"$LOGmobile_number",$sms_url); ### insert a new url log entry $SQL_log = "$sms_url"; $SQL_log = preg_replace('/;/','',$SQL_log); $SQL_log = addslashes($SQL_log); $stmt = "INSERT INTO vicidial_url_log SET uniqueid='2FA',url_date=NOW(),url_type='2FA_SMS',url='$SQL_log',url_response='';"; # if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $url_id = mysqli_insert_id($link); $URLstart_sec = date("U"); ### grab the call_start_url ### # if ($DB > 0) {echo "$sms_url
\n";} $SCUfile = file("$sms_url"); if ( !($SCUfile) ) { $error_array = error_get_last(); $error_type = $error_array["type"]; $error_message = $error_array["message"]; $error_line = $error_array["line"]; $error_file = $error_array["file"]; } if ($DB > 0) {echo "$SCUfile[0]
\n";} ### update url log entry $URLend_sec = date("U"); $URLdiff_sec = ($URLend_sec - $URLstart_sec); if ($SCUfile) { $SCUfile_contents = implode("", $SCUfile); $SCUfile_contents = preg_replace('/;/','',$SCUfile_contents); $SCUfile_contents = addslashes($SCUfile_contents); } else { $SCUfile_contents = "PHP ERROR: Type=$error_type - Message=$error_message - Line=$error_line - File=$error_file"; } $stmt = "UPDATE vicidial_url_log SET response_sec='$URLdiff_sec',url_response='$SCUfile_contents' where url_log_id='$url_id';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); $stmt = "INSERT INTO vicidial_agent_function_log set agent_log_id='0',user='$user',function='2FA_send',event_time=NOW(),campaign_id='-ADMIN-',user_group='$LOGuser_group',lead_id='0',uniqueid='SUCCESS',caller_code='$ip',stage='$stage',comments='SMS: $LOGmobile_number';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
"._QXZ("Your authorization code has been sent by %1s to",0,'',$stage).": $OBSCUREmobile_number
\n"; } echo "\n"; echo "
\n"; echo ""; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Please enter the Auth Code that you have received by %1s into the field below, and click the SUBMIT button",0,'',$stage).". "._QXZ("To resend your auth code, click here to go back").".
 
"._QXZ("Authorization Code").":
\n"; } ##### END send out AUTH CODE and show auth-code entry page ##### ##### BEGIN choose how to send out AUTH CODE page ##### else { if ($show_form > 0) { echo "\n"; echo "
\n"; echo ""; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; #echo "\n"; echo "
"._QXZ("Your account has Two-Factor-Authorization enabled on it. In order to log in, you will need to verify your identity by submitting a temporary authorization code. Click on the icon below for the delivery method you would like to use to receive your authorization code").":

\n"; echo "\n"; $displayed_2FA=0; if ( (preg_match("/YES/i",$email_auth)) and (strlen($LOGemail) > 3) ) { echo " 0) {echo " onclick=\"send_2FA('EMAIL');\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; $displayed_2FA++; } if ( (preg_match("/YES/i",$phone_auth)) and (strlen($LOGmobile_number) > 1) ) { echo " 0) {echo " onclick=\"send_2FA('PHONE');\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; $displayed_2FA++; } if ( (preg_match("/YES/i",$sms_auth)) and (strlen($LOGmobile_number) > 1) ) { echo " 0) {echo " onclick=\"send_2FA('SMS');\"";} echo ">\n"; echo "\n"; echo "\n"; echo "\n"; $displayed_2FA++; } if ($displayed_2FA < 1) { echo _QXZ("Your User account is not configured for Two-Factor-Authentication. Please contact your system administrator").".\n"; exit; } echo "
"._QXZ("Email you an auth code")."
"._QXZ("Send an email to").":
$OBSCUREemail
"._QXZ("Call you and play an auth code")."
"._QXZ("Place a phone call to").":
$OBSCUREmobile_number
"._QXZ("Text-Message you an auth code")."
"._QXZ("Send a message to").":
$OBSCUREmobile_number

 \n"; echo "
\n"; } } ##### END choose how to send out AUTH CODE page ##### } ##### END User 2FA(Two-Factor-Authentication) Page ##### ###################### # ADD=999996 - initial install welcome page ###################### if ($ADD==999996) { if ($SSfirst_login_trigger=='Y') { $show_form=1; if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { if ( (mb_strlen($pass,'utf-8') > 100) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) or ( ($SSrequire_password_length > 0) and ( ($SSrequire_password_length > strlen($default_phone_registration_password)) or ( ($SSrequire_password_length > strlen($default_phone_login_password)) or ( ($SSrequire_password_length > strlen($default_server_password)) ) ) or ($SSrequire_password_length > strlen($pass)) ) ) ) { echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass); if ($SSrequire_password_length > 0) { echo "
"._QXZ("All passwords must be at least $SSrequire_password_length characters long")."\n"; } } else { $pass_hash=''; $pass_checkSQL="pass='$pass'"; if ( ($SSpass_hash_enabled > 0) and (strlen($pass) > 1) ) { $pass = preg_replace("/\'|\"|\\\\|;|<|>| /","",$pass); $pass_hash = exec("../agc/bp.pl --pass=$pass"); $pass_hash = preg_replace("/PHASH: |\n|\r|\t| /",'',$pass_hash); $pass_checkSQL="pass_hash='$pass_hash'"; $pass=''; } $stmt="SELECT count(*) from vicidial_users where user='$user' and active='Y' and user_level > 6;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $userpass_to_print = mysqli_num_rows($rslt); if ($userpass_to_print < 1) {echo _QXZ("Password has not been changed, please try again")." |2|$userpass_to_print";} else { $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo _QXZ("Password has not been changed, please try again")." |3|$row[0]";} else { $stmt="SELECT count(*) from vicidial_users where user='$user' and $pass_checkSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $userpass_to_print = mysqli_num_rows($rslt); if ($userpass_to_print < 1) {echo _QXZ("Password has not been changed, please try again")." |4|$userpass_to_print";} else { $row=mysqli_fetch_row($rslt); if ($row[0] > 0) {echo _QXZ("You cannot use the same password as your last password, please try again")." |5|$row[0]";} else { $show_form=0; if (strlen($default_phone_registration_password) < 2) {$default_phone_registration_password = $SSdefault_phone_registration_password;} if (strlen($default_phone_login_password) < 2) {$default_phone_login_password = $SSdefault_phone_login_password;} if (strlen($default_server_password) < 2) {$default_server_password = $SSdefault_server_password;} if (strlen($default_local_gmt) < 2) {$default_local_gmt = $SSdefault_local_gmt;} if (strlen($default_voicemail_timezone) < 2) {$default_voicemail_timezone = $SSdefault_voicemail_timezone;} $stmt="UPDATE vicidial_users SET pass='$pass',pass_hash='$pass_hash',force_change_password='N',failed_login_count=0 where user='$user' and active='Y' and user_level > 6;"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="UPDATE system_settings SET first_login_trigger='N',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',default_local_gmt='$default_local_gmt',default_voicemail_timezone='$default_voicemail_timezone';"; $rslt=mysql_to_mysqli($stmtA, $link); $stmtB="UPDATE phones SET conf_secret='$default_phone_registration_password',pass='$default_phone_login_password',local_gmt='$default_local_gmt',voicemail_timezone='$default_voicemail_timezone';"; $rslt=mysql_to_mysqli($stmtB, $link); $stmtC="UPDATE servers SET conf_secret='$default_server_password',rebuild_conf_files='Y';"; $rslt=mysql_to_mysqli($stmtC, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|$stmtA|$stmtB|$stmtC|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$user', event_code='INITIAL SETTINGS UPDATE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Passwords have been updated, you may now continue on into Administration").".

"._QXZ("You may want to start by reading the ViciDial Manager Manual available at")." vicidial.org ("._QXZ("there is a free version available").")\n"; } } } } } } if ($show_form > 0) { echo "
\n"; echo ""; echo "
"._QXZ("Welcome to ViciDial, initial setup screen")."

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("You are required to change your password before you can continue on to Administration. The longer the password is, the stronger it will be. Your password must be from 2 to 100 characters in length and cannot contain any characters that are not letters or numbers. Be sure that this password is something that you can remember, because as soon as you complete this initial setup screen you will be prompted to enter your new password in again to log back in to Administration")."
"._QXZ("New Password").":     "._QXZ("Strength").":   "._QXZ("Length").": 0
 
"._QXZ("The next three default passwords are defined in the System Settings section, and you can change them after you define them here. It is a good idea to make these passwords strong so that no one can hack into your phone accounts and place phone calls without you knowing. The default registration password used when new phones are added to the system as the SIP or IAX VOIP phone password. The default phone web login password used when new phones are added to the system, as the phone password that an agent would use in the ViciDial Agent Interface. The default server password used when new servers are added to the system for servers to communicate with each other.")."
"._QXZ("Default Phone Registration Password").":     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Default Phone Login Password").":     "._QXZ("Strength").":   "._QXZ("Length").": 0
"._QXZ("Default Server Password").":     "._QXZ("Strength").":   "._QXZ("Length").": 0
 
"._QXZ("The next two settings are also defined in the System Settings section, and you can change them after you define them here. You should set the Default Local GMT to the timezone that your agents want to be in. The Voicemail zone is the listing of voicemail timezones that voicemail messages will be time logged with when new messages are left.")."
"._QXZ("Default Local GMT").": ("._QXZ("Do NOT Adjust for DST").")$NWB#settings-default_local_gmt$NWE
"._QXZ("Default Voicemail Zone").": $NWB#settings-default_voicemail_timezone$NWE
 
\n"; } } } ##### END initial install welcome page ##### ###################### # ADD=999995 - copyright trademark license page ###################### if ($ADD==999995) { echo "
\n"; echo ""; echo "
"._QXZ("Welcome to ViciDial: copyright, trademark and license page")."

\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Copyright").":   "._QXZ("The ViciDial Contact Center Suite is maintained by the")." ViciDial Group, © 2026
"._QXZ("Trademark").":   \"VICIDIAL\" "._QXZ("is a registered trademark of the")." ViciDial Group. Here is our "._QXZ("trademark use policy")."
"._QXZ("License").":   "._QXZ("The ViciDial Contact Center Suite is released under the")." AGPLv2 "._QXZ("open source license").".
"._QXZ("Source Code").":   "._QXZ("The ViciDial Call Center Suite software is available for download, and for use, free of cost. You can download the easy to install")." "._QXZ("ViciBox CD ISO version").", "._QXZ("or only the")." "._QXZ("source code")."
\n"; if ($first_login_link > 0) { echo "

"; echo "
"._QXZ("Continue on to the Initial Setup")."



  \n"; } echo "

"._QXZ("Other integrated software disclaimers").":

\n"; echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "
"._QXZ("Matex").": "._QXZ("Copyright").":   "._QXZ("Matex PHP Mathematical expression parser and evaluator library was written by Dorin Marcoci").", © 2023
"._QXZ("License").":   "._QXZ("Matex is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Matex original source code is available at")." "._QXZ("this link").".
 
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Pure-knob").": "._QXZ("Copyright").":   "._QXZ("The pure-knob javascript library was written by Andre Plötze").", © 2018
"._QXZ("License").":   "._QXZ("Pure-knob is licensed under the")." Apache 2.0 "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Pure-knob original source code is available at")." "._QXZ("this link").".
 
"._QXZ("Chart.js").": "._QXZ("Copyright").":   "._QXZ("The Chart.js javascript library was written by Chart.js Contributors").", © 2018
"._QXZ("License").":   "._QXZ("Chart.js is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Chart.js original source code is available at")." "._QXZ("this link").".
 
"._QXZ("classAudioFile").": "._QXZ("Copyright").":   "._QXZ("The classAudioFile PHP library was written by Michael Kamleitner").", © 2003
"._QXZ("License").":   "._QXZ("classAudioFile is licensed under the")." GPL "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("classAudioFile original source code is available at")." "._QXZ("this link").".
 
"._QXZ("Dygraphs").": "._QXZ("Copyright").":   "._QXZ("The Dygraphs javascript library was written by Dygraphs Contributors").", © 2023
"._QXZ("License").":   "._QXZ("Dygraphs is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Dygraphs original source code is available at")." "._QXZ("this link").".
 
"._QXZ("Jquery").": "._QXZ("Copyright").":   "._QXZ("The Jquery javascript library was written by OpenJS Foundation contributors").", © 2023
"._QXZ("License").":   "._QXZ("Jquery is licensed under the")." MIT "._QXZ("open source license")."
"._QXZ("Source Code").":   "._QXZ("Jquery original source code is available at")." "._QXZ("this link").".
\n"; } ##### END copyright trademark license page ##### ###################### # ADD=999994 - admin hidden utilities page ###################### if ($ADD==999994) { echo "
\n"; echo ""; echo "
"._QXZ("Administration: hidden utilities page - If you do not know what these utilities do, you probably should not use them")."

\n"; echo "
\n"; if ( ($LOGuser_level >= 9) and ( (preg_match("/Admin Utilities Page/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { echo "\n
 \n"; } echo "
\n"; } ##### END admin hidden utilities page ##### ###################### # ADD=999993 - max stats detail report ###################### if ($ADD==999993) { echo "
\n"; echo ""; if ( (preg_match("/Maximum Stats Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { $day_count=30; if (strlen($SUB) > 0) {$day_count = $SUB;} if ($stage == 'in-group') { $in_out = 'in-group'; $max_type = 'max_inbound'; $modify_link = ""; $stmt="SELECT group_name from vicidial_inbound_groups where group_id='$campaign_id' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $campaign_name = $rowx[0]; } else {echo _QXZ("Not found"); exit;} } elseif ($stage == 'remote-agent') { $remote_agent_id=''; $stmt="SELECT remote_agent_id from vicidial_remote_agents where user_start='$campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $remote_agent_id = $rowx[0]; } else {echo _QXZ("Not found"); exit;} $modify_link = ""; $campaign_name=$campaign_id; } else { $in_out = 'campaign'; $max_type = 'max_outbound'; $modify_link = ""; $stmt="SELECT campaign_name from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $campaign_name = $rowx[0]; } else {echo _QXZ("Not found"); exit;} } echo "
"._QXZ("Administration: Maximum Stats Detail for")." $stage $modify_link$campaign_id
- $campaign_name   $NWB#max_stats$NWE
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "Days:    \n"; echo "
\n"; echo "
\n"; if ($stage == 'remote-agent') { echo "\n"; echo "\n"; } else { echo "\n"; echo "\n"; echo "\n"; } } else {echo "You do not have permission to view this page";} echo "
\n"; $temp_chart_title = "$day_count " . _QXZ("Day call count for this remote-agent"); horizontal_bar_chart($campaign_id,$day_count,$stage,$link,'ra_total_calls','call count',0,'','',$temp_chart_title); echo "
\n"; $temp_chart_title = "$day_count " . _QXZ("Day most concurrent calls for this remote-agent"); horizontal_bar_chart($campaign_id,$day_count,$stage,$link,'ra_concurrent_calls','most concurrent calls',0,'','',$temp_chart_title); echo "
\n"; $temp_chart_title = "$day_count " . _QXZ("Day inbound call count for this in-group"); if ($in_out=='campaign') {$temp_chart_title = "$day_count " . _QXZ("Day outbound call count for this campaign");} horizontal_bar_chart($campaign_id,$day_count,$in_out,$link,'total_calls','call count',0,'','',$temp_chart_title); echo "
\n"; $temp_chart_title = "$day_count " . _QXZ("Day inbound most concurrent calls for this in-group"); if ($in_out=='campaign') {$temp_chart_title = "$day_count " . _QXZ("Day outbound most concurrent calls for this campaign");} horizontal_bar_chart($campaign_id,$day_count,$in_out,$link,$max_type,'most concurrent calls',0,'','',$temp_chart_title); echo "
\n"; $temp_chart_title = "$day_count " . _QXZ("Day inbound most concurrent agents for this in-group"); if ($in_out=='campaign') {$temp_chart_title = "$day_count " . _QXZ("Day outbound most concurrent agents for this campaign");} horizontal_bar_chart($campaign_id,$day_count,$in_out,$link,'max_agents','most concurrent agents',0,'','',$temp_chart_title); echo "
\n"; } ##### END max stats detail report ##### ###################### # ADD=999992 - max system stats report ###################### if ($ADD==999992) { if (!$query_date) {$query_date=date("Y-m-d", time()-(29*86400));} if (!$end_date) { $end_date=date("Y-m-d", time()); } else if (strtotime($end_date)>strtotime(date("Y-m-d"))) { $end_date=date("Y-m-d"); } if ($query_date>$end_date) {$query_date=$end_date;} $num_graph_days = ceil(abs(strtotime($end_date) - strtotime($query_date)) / 86400)+1; echo "
\n"; echo ""; echo "
"._QXZ("Administration: Maximum System Stats")."   $NWB#max_stats$NWE

\n"; echo "
"; echo "\n"; echo " "._QXZ("to")." "; echo "    

\n"; echo "
["._QXZ("DOWNLOAD ALL")."]\n"; if ( (preg_match("/Maximum System Stats/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { $stmt="SELECT sum(total_calls) from vicidial_daily_max_stats where campaign_id!='' and stats_flag='OPEN';"; $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { $rowx=mysqli_fetch_row($rslt); $ALLtotal_calls = $rowx[0]; $stmt="UPDATE vicidial_daily_max_stats SET total_calls='$ALLtotal_calls' where campaign_id='' and stats_flag='OPEN' and stats_type='TOTAL';"; $rslt=mysql_to_mysqli($stmt, $link); } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else {echo "You do not have permission to view this page";} echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day total call count in and out for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'total_calls','total call count in and out',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day total inbound call count for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'total_calls_inbound_all','total inbound call count',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day total outbound call count for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'total_calls_outbound_all','total outbound call count',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day most concurrent calls in and out for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'(max_inbound + max_outbound)','most concurrent calls in and out',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day most concurrent calls inbound total for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'max_inbound','most concurrent calls inbound total',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day most concurrent calls outbound total for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'max_outbound','most concurrent calls outbound total',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; $download_link="["._QXZ("DOWNLOAD")."]"; $temp_chart_title = "$num_graph_days " . _QXZ("Day most concurrent agents for this system"); horizontal_bar_chart($campaign_id,$num_graph_days,'system',$link,'max_agents','most concurrent agents',0,$end_date,$download_link,$temp_chart_title); echo "
\n"; } ##### END max system stats report ##### ###################### # ADD=999990 - new main landing page with system stats ###################### if ($ADD==999990) { if ( (preg_match("/Front Page System Summary/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) { $stmt="SELECT closer_campaigns from vicidial_campaigns $whereLOGallowed_campaignsSQL;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); $closer_campaigns = "'$closer_campaigns'"; $users=array("Y" => 0, "N" => 0); $campaigns=array("Y" => 0, "N" => 0); $lists=array("Y" => 0, "N" => 0); $dids=array("Y" => 0, "N" => 0); $ingroups=array("Y" => 0, "N" => 0); $stmt="SELECT status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (call_type='OUT' $LOGallowed_campaignsSQL) );"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $active_calls=mysqli_num_rows($rslt); $ringing_calls=0; if ($active_calls>0) { while ($row=mysqli_fetch_row($rslt)) { if (!preg_match("/LIVE|CLOSER/i",$row[0])) {$ringing_calls++;} } } $active_stmt="SELECT active from vicidial_users $whereLOGadmin_viewable_groupsSQL"; if ($DB) {echo "|$active_stmt|\n";} $active_rslt=mysql_to_mysqli($active_stmt, $link); while ($active_row=mysqli_fetch_array($active_rslt)) { $users[$active_row["active"]]++; } $active_stmt="SELECT active from vicidial_campaigns $whereLOGallowed_campaignsSQL"; if ($DB) {echo "|$active_stmt|\n";} $active_rslt=mysql_to_mysqli($active_stmt, $link); while ($active_row=mysqli_fetch_array($active_rslt)) { $campaigns[$active_row["active"]]++; } $active_stmt="SELECT active from vicidial_lists $whereLOGallowed_campaignsSQL"; if ($DB) {echo "|$active_stmt|\n";} $active_rslt=mysql_to_mysqli($active_stmt, $link); while ($active_row=mysqli_fetch_array($active_rslt)) { $lists[$active_row["active"]]++; } $active_stmt="SELECT did_active from vicidial_inbound_dids $whereLOGadmin_viewable_groupsSQL"; if ($DB) {echo "|$active_stmt|\n";} $active_rslt=mysql_to_mysqli($active_stmt, $link); while ($active_row=mysqli_fetch_array($active_rslt)) { $dids[$active_row["did_active"]]++; } $active_stmt="SELECT active from vicidial_inbound_groups $whereLOGadmin_viewable_groupsSQL"; if ($DB) {echo "|$active_stmt|\n";} $active_rslt=mysql_to_mysqli($active_stmt, $link); while ($active_row=mysqli_fetch_array($active_rslt)) { $ingroups[$active_row["active"]]++; } $stmt="SELECT extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents $whereLOGallowed_campaignsSQL"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $agent_incall=0; $agent_total=0; while($row=mysqli_fetch_array($rslt)) { $live_agent_status=$row[3]; $agent_total++; if ( (preg_match("/INCALL/i",$live_agent_status)) or (preg_match("/QUEUE/i",$live_agent_status)) ) {$agent_incall++; } } if (preg_match("/MXAG/",$SShosted_settings)) { $vla_set = $SShosted_settings; $vla_set = preg_replace("/.*MXAG|_BUILD_|DRA|_MXCS\d+|_MXTR\d+|VCA\d+| /",'',$vla_set); $vla_set = preg_replace('/[^0-9]/','',$vla_set); if (strlen($vla_set)>0) { $AAf=''; $AAb=''; if ($agent_total >= $vla_set) {$AAf=''; $AAb='';} $agent_total = "$AAf$agent_total / $vla_set$AAb"; } } $section_width=700; echo "
"; echo "
"; echo "\n"; echo " 0) {echo " onclick=\"window.document.location='realtime_report.php?report_display_type=HTML';\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " 0) {echo " onclick=\"window.document.location='realtime_report.php?report_display_type=HTML';\"";} echo ">"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"._QXZ("Agents Logged In")."   "._QXZ("Agents In Calls")."   "._QXZ("Active Calls")."   "._QXZ("Calls Ringing")."
$agent_total$agent_incall$agent_incall$ringing_calls
"; echo "

"; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; // New voicemailbox code $stmt="(SELECT voicemail_id,count(*),messages,old_messages,'vm','vm' from vicidial_voicemail where on_login_report='Y' $LOGadmin_viewable_groupsSQL group by voicemail_id) UNION (SELECT voicemail_id,count(*),messages,old_messages,extension,server_ip from phones where on_login_report='Y' $LOGadmin_viewable_groupsSQL group by voicemail_id) order by voicemail_id;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $vm_rows=mysqli_num_rows($rslt); if ($vm_rows>0) { echo ""; echo ""; # Padding echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; while($row=mysqli_fetch_array($rslt)) { echo "\n"; if ($row[4] == 'vm') { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } // End new voicemail box code $today=date("Y-m-d"); $yesterday=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-1,date("Y"))); $thirtydays=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-29,date("Y"))); if ($SSqc_features_active>0) { echo ""; echo ""; # Padding echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; # $stmt="SELECT campaign_id, qc_statuses from vicidial_campaigns where active = 'Y' and qc_enabled='Y' $LOGqc_allowed_campaignsSQL order by campaign_id"; $stmt="SELECT campaign_id,campaign_name,qc_statuses_id from vicidial_campaigns where active = 'Y' and qc_statuses_id!='' and qc_scorecard_id!='' $LOGqc_allowed_campaignsSQL order by campaign_name"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $vicidialconf_to_print = mysqli_num_rows($rslt); if ($vicidialconf_to_print > 0) { while ($row=mysqli_fetch_array($rslt)) { $campaign_id=$row[0]; $qc_status_list=array(); $qc_status_container_stmt="select container_entry from vicidial_settings_containers where container_id='$row[2]'"; $qc_status_container_rslt=mysql_to_mysqli($qc_status_container_stmt, $link); while ($qcsc_row=mysqli_fetch_row($qc_status_container_rslt)) { $container_text=preg_split('/\r|\n/', $qcsc_row[0]); for ($q=0; $q0) { $qc_status_list=preg_split('/,/', $line); break; } } } $total_qc_count=0; $qc_ct_stmt="select count(*) From vicidial_agent_log where campaign_id='$campaign_id' and status in ('".implode("','", $qc_status_list)."') and event_time+INTERVAL (pause_sec+wait_sec) SECOND>=now()-INTERVAL $SSqc_expire_days DAY"; if ($DB) {echo "|$qc_ct_stmt|
\n";} $qc_ct_rslt=mysql_to_mysqli($qc_ct_stmt, $link); $qc_ct_row=mysqli_fetch_row($qc_ct_rslt); $total_qc_count=$qc_ct_row[0]; $qc_grabbed_stmt="select count(*) From quality_control_queue where campaign_id='$campaign_id' and call_date>=now()-INTERVAL $SSqc_expire_days DAY and qc_status='CLAIMED'"; if ($DB) {echo "|$qc_grabbed_stmt|
\n";} $qc_grabbed_rslt=mysql_to_mysqli($qc_grabbed_stmt, $link); $qc_grabbed_row=mysqli_fetch_row($qc_grabbed_rslt); $total_inreview_count=$qc_grabbed_row[0]; $qc_finished_stmt="select count(*), sum(if(call_date>=date(now()),1,0)) as finished_today From quality_control_queue where campaign_id='$campaign_id' and call_date>=now()-INTERVAL $SSqc_expire_days DAY and qc_status='FINISHED'"; if ($DB) {echo "|$qc_finished_stmt|
\n";} $qc_finished_rslt=mysql_to_mysqli($qc_finished_stmt, $link); $qc_finished_row=mysqli_fetch_row($qc_finished_rslt); $total_finish_count=$qc_finished_row[0]; $today_finish_count=$qc_finished_row[1]; echo "
"; # echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } else { echo ""; echo ""; echo ""; } } echo "
"._QXZ("System Summary").":
  "._QXZ("Records")."    "._QXZ("Active")."    "._QXZ("Inactive")."    "._QXZ("Total")."  
"._QXZ("Users").": ".($users["Y"]+0)."".($users["N"]+0)."".($users["Y"]+$users["N"]+0)."
"._QXZ("Campaigns").": ".($campaigns["Y"]+0)."".($campaigns["N"]+0)."".($campaigns["Y"]+$campaigns["N"]+0)."
"._QXZ("Lists").": ".($lists["Y"]+0)."".($lists["N"]+0)."".($lists["Y"]+$lists["N"]+0)."
"._QXZ("In-Groups").": ".($ingroups["Y"]+0)."".($ingroups["N"]+0)."".($ingroups["Y"]+$ingroups["N"]+0)."
"._QXZ("DIDs").": ".($dids["Y"]+0)."".($dids["N"]+0)."".($dids["Y"]+$dids["N"]+0)."
 
  "._QXZ("Voicemail Box")."    "._QXZ("New")."    "._QXZ("Old")."    "._QXZ("Total")."  
$row[0]:$row[0]:$row[2]$row[3]".($row[2]+$row[3])."
 
"._QXZ("Quality Control stats").":
  "._QXZ("Campaign")."  "._QXZ("Unclaimed Calls")."  "._QXZ("In Review")."  "._QXZ("Finished today")."
".$row["campaign_id"]."".$campaign_id.":".($total_qc_count-$total_inreview_count-$total_finish_count+0)."".($total_inreview_count+0)."".($today_finish_count+0)."
*** "._QXZ("NO ACTIVITY FOR")." $today ***
\n"; echo "
\n"; $total_calls=0; $total_inbound=0; $total_outbound=0; $stmt="SELECT stats_type,sum(total_calls) from vicidial_daily_max_stats where campaign_id!='' and stats_flag='OPEN' and stats_date='$today' $LOGallowed_campaignsSQL group by stats_type;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { while ($rowx=mysqli_fetch_row($rslt)) { $total_calls += $rowx[1]; if (preg_match('/INGROUP/', $rowx[0])) {$total_inbound+=$rowx[1];} if (preg_match('/CAMPAIGN/', $rowx[0])) {$total_outbound+=$rowx[1];} } } $stmt="SELECT * from vicidial_daily_max_stats where stats_date='$today' and stats_flag='OPEN' and stats_type='TOTAL' $LOGallowed_campaignsSQL order by stats_date, campaign_id asc"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; # echo ""; echo ""; echo ""; echo ""; echo ""; if (mysqli_num_rows($rslt)>0) { while ($row=mysqli_fetch_array($rslt)) { echo ""; # echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } else { echo ""; echo ""; echo ""; } echo "
"._QXZ("Total Stats for Today").":["._QXZ("view max stats")."]
CAMPAIGN ID  "._QXZ("Total Calls")."    "._QXZ("Total Inbound Calls")."    "._QXZ("Total Outbound Calls")."    "._QXZ("Maximum Agents")."  
".$row["campaign_id"]."".($total_calls+0)."".($total_inbound+0)."".($total_outbound+0)."".($row["max_agents"]+0)."
*** "._QXZ("NO ACTIVITY FOR")." $today ***
\n"; $total_calls=0; $total_inbound=0; $total_outbound=0; $stmt="SELECT stats_type,sum(total_calls) from vicidial_daily_max_stats where campaign_id!='' and stats_flag='CLOSED' and stats_date='$yesterday' $LOGallowed_campaignsSQL group by stats_type;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $rows_to_print = mysqli_num_rows($rslt); if ($rows_to_print > 0) { while ($rowx=mysqli_fetch_row($rslt)) { $total_calls += $rowx[1]; if (preg_match('/INGROUP/', $rowx[0])) {$total_inbound+=$rowx[1];} if (preg_match('/CAMPAIGN/', $rowx[0])) {$total_outbound+=$rowx[1];} } } echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo ""; # echo ""; echo ""; echo ""; echo ""; echo ""; $stmt="SELECT * from vicidial_daily_max_stats where stats_date='$yesterday' and stats_type='TOTAL' $LOGallowed_campaignsSQL order by stats_date, campaign_id asc"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); if (mysqli_num_rows($rslt)>0) { while ($row=mysqli_fetch_array($rslt)) { echo ""; #echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } else { echo ""; echo ""; echo ""; } echo "

"; } else { $section_width=640; echo "
"; echo "
"._QXZ("Total Stats for Yesterday").":["._QXZ("view max stats")."]
CAMPAIGN ID  "._QXZ("Total Calls")."    "._QXZ("Total Inbound Calls")."    "._QXZ("Total Outbound Calls")."    "._QXZ("Maximum Agents")."  
".$row["campaign_id"]."".($row["total_calls"]+0)." / ".($total_calls+0)."".($total_inbound+0)."".($total_outbound+0)."".($row["max_agents"]+0)."
*** "._QXZ("NO ACTIVITY FOR")." $today ***
\n"; echo ""; echo ""; echo ""; echo "

"; } } ##### If report run, update the time in the vicidial_report_log table ##### if ( ($ADD==999993) or ($ADD==999992) or ($ADD==730000000000000) or ($ADD==830000000000000) ) { $endMS = microtime(); $startMSary = explode(" ",$startMS); $endMSary = explode(" ",$endMS); $runS = ($endMSary[0] - $startMSary[0]); $runM = ($endMSary[1] - $startMSary[1]); $TOTALrun = ($runS + $runM); $stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); } ###################### # ADD=999991 display server version info ###################### if ($ADD==999991) { echo "
"._QXZ("Welcome")."
\n"; echo ""; echo "
"._QXZ("Administration: Server Version Information")."

\n"; if ($LOGview_reports==1) { if ($reports_only_user < 1) { $server_id = $MT; $server_description = $MT; $server_ip = $MT; $active = $MT; $sysload = $MT; $channels_total = $MT; $cpu_idle_percent = $MT; $disk_usage = $MT; echo "
\n";

			echo "";
			echo "\n";

			$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_to_mysqli($stmt, $link);
			if ($DB) {echo "$stmt\n";}
			$servers_to_print = mysqli_num_rows($rslt);
			$i=0;
			while ($i < $servers_to_print)
				{
				$row=mysqli_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++;
				}

			$o=0;
			while ($servers_to_print > $o)
				{
				# look for server_live_partitions entries for this server
				$stmt="SELECT partition_order,use_pct from server_live_partitions where server_ip='$server_ip[$o]' and (mb_used + mb_available) >= 1000;";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$parts_to_print = mysqli_num_rows($rslt);
				$pp=0;
				$temp_disk_usage='';
				while ($parts_to_print > $pp)
					{
					$row=mysqli_fetch_row($rslt);
					$part_order = ($row[0] + 1);
					$temp_disk_usage .= "$part_order $row[1]|";
					$pp++;
					}
				if (strlen($temp_disk_usage) > 3)
					{$disk_usage[$o] = $temp_disk_usage;}

				$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 "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				echo "\n";
				if ($pp > 0)
					{
					echo "\n";
					}
				else
					{
					echo "\n";
					}

				$s_time=' ';
				$s_ver=' ';
				$s_info_print=_QXZ("no svn information");
				$stmt="SELECT last_update from server_updater where server_ip='$server_ip[$o]';";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$servertime_to_print = mysqli_num_rows($rslt);
				if ($servertime_to_print)
					{
					$row=mysqli_fetch_row($rslt);
					$s_time = $row[0];
					}
				$stmt="SELECT svn_revision,svn_info from servers where server_ip='$server_ip[$o]';";
				$rslt=mysql_to_mysqli($stmt, $link);
				if ($DB) {echo "$stmt\n";}
				$serverver_to_print = mysqli_num_rows($rslt);
				if ($serverver_to_print)
					{
					$row=mysqli_fetch_row($rslt);
					$s_ver = $row[0];
					$s_info = $row[1];
					$s_info_print = preg_replace("/\n/",'
',$s_info); } if (strlen($s_info_print) < 1) {$s_info_print='no svn information';} echo ""; echo ""; echo "\n"; $o++; } echo "
"._QXZ("SERVER").""._QXZ("DESCRIPTION").""._QXZ("IP").""._QXZ("ACT").""._QXZ("LOAD").""._QXZ("CHAN").""._QXZ("DISK").""._QXZ("TIME").""._QXZ("VER")."
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]$sysload[$o] - $cpu%$channels_total[$o]$disk$disk$s_time$s_ver
 $s_info_print
\n"; } } else { echo _QXZ("You do not have permission to view this page")."\n"; exit; } } ##### END server version info ##### ###################### # ADD=999989 - user change language page ###################### if ($ADD==999989) { $show_form=1; if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) ) { if ( (mb_strlen($selected_language,'utf-8') > 100) or (strlen($selected_language) < 1) or (strlen($PHP_AUTH_USER)<2) ) {echo _QXZ("Language has not been changed, please try again")." |1|" . strlen($selected_language);} else { $stmt="SELECT count(*) from vicidial_languages where language_id='$selected_language' and active='Y' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $lang_to_print = mysqli_num_rows($rslt); if ( ($lang_to_print < 1) and ($selected_language != 'default English') ) {echo _QXZ("Language is not valid, please try again")." |2|$selected_language";} else { $row=mysqli_fetch_row($rslt); if ( ($row[0] < 1) and ($selected_language != 'default English') ) {echo _QXZ("Language is not valid, please try again")." |3|$selected_language";} else { $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and ( (user_choose_language='1') or (user_level > 6) );"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $user_to_print = mysqli_num_rows($rslt); if ($user_to_print < 1) {echo _QXZ("You are not allowed to change your language")." |4|$PHP_AUTH_USER";} else { $row=mysqli_fetch_row($rslt); if ($row[0] < 1) {echo _QXZ("You are not allowed to change your language")." |5|$PHP_AUTH_USER";} else { $show_form=0; $VUselected_language = $selected_language; $stmt="UPDATE vicidial_users SET selected_language='$selected_language' where user='$PHP_AUTH_USER' and ( (user_choose_language='1') or (user_level > 6) );"; $rslt=mysql_to_mysqli($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = preg_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='USERS', event_type='MODIFY', record_id='$PHP_AUTH_USER', event_code='USER CHANGE LANGUAGE', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); echo _QXZ("Language has been updated, you may now continue").": $selected_language\n"; } } } } } } if ($show_form > 0) { echo "\n"; echo "
\n"; echo ""; echo "
"._QXZ("CHANGE LANGUAGE")."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"._QXZ("Current Language").": $VUselected_language
"._QXZ("New Language").": "; $stmt="SELECT language_id,language_description from vicidial_languages where active='Y' $LOGadmin_viewable_groupsSQL order by language_id"; $rslt=mysql_to_mysqli($stmt, $link); $langs_to_print = mysqli_num_rows($rslt); echo "\n"; echo "
\n"; } } ##### END user change language page ##### ###################### # ADD=999988 - available timezones display page ###################### if ($ADD==999988) { $orig_zone = date_default_timezone_get(); echo "
\n"; echo ""; echo "
"._QXZ("AVAILABLE TIMEZONES")."\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $stmt="select count(*),tz_code,GMT_offset,country,country_name,geographic_description,dst,php_tz from vicidial_phone_codes p,vicidial_country_iso_tld i where i.iso3=p.country and php_tz!='' group by country,tz_code,GMT_offset,dst,php_tz order by country,CAST(GMT_offset as SIGNED INTEGER) desc,tz_code,dst,php_tz;"; $rslt=mysql_to_mysqli($stmt, $link); $zones_to_print = mysqli_num_rows($rslt); $o=0; $row_color=0; $last_country=''; while ($zones_to_print > $o) { $rowx=mysqli_fetch_row($rslt); date_default_timezone_set("$rowx[7]"); $tz_time = date("Y-m-d H:i:s"); if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];} if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("Country").""._QXZ("Zone").""._QXZ("DST").""._QXZ("Description").""._QXZ("Offset").""._QXZ("Current Time")."
$rowx[3]$rowx[1]$rowx[6]   $rowx[4] - $rowx[5]$rowx[2]   $tz_time
\n"; date_default_timezone_set($orig_zone); } # JCJ - date_default_timezone_set($orig_zone); ##### END available timezones display page ##### ###################### # ADD=999987 - phone_codes display page ###################### if ($ADD==999987) { $orig_zone = date_default_timezone_get(); $PCfilterSQL=''; $PCfilterTEXT=''; if ( (strlen($stage) > 2) and (preg_match("/-/",$stage)) ) { $PSstage = explode('-',$stage); $PCfilterSQL = "and country_code='$PSstage[0]' and state='$PSstage[1]'"; $PCfilterTEXT = " ("._QXZ("Country Code").": $PSstage[0]   "._QXZ("State").": $PSstage[1])   "._QXZ("reset")." "; } echo "
\n"; echo ""; # country_code | country | areacode | state | GMT_offset | DST | DST_range | geographic_description | tz_code | php_tz $stmt="SELECT count(*),tz_code,GMT_offset,country_code,country,country_name,areacode,state,geographic_description,dst,php_tz FROM vicidial_phone_codes p,vicidial_country_iso_tld i where i.iso3=p.country and php_tz!='' $PCfilterSQL group by country_code,areacode,state,tz_code,GMT_offset,dst,php_tz order by country_code,areacode,CAST(GMT_offset as SIGNED INTEGER) desc,tz_code,dst,php_tz;"; $rslt=mysql_to_mysqli($stmt, $link); $zones_to_print = mysqli_num_rows($rslt); echo "
"._QXZ("PHONE CODES")."
\n"; echo "
$zones_to_print "._QXZ("RECORDS")."   $PCfilterTEXT
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o=0; $row_color=0; $last_country=''; while ($zones_to_print > $o) { $rowx=mysqli_fetch_row($rslt); date_default_timezone_set($rowx[10]); $tz_time = date("Y-m-d H:i:s"); if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];} if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("Code").""._QXZ("Country").""._QXZ("AreaCode").""._QXZ("State").""._QXZ("DST").""._QXZ("Description").""._QXZ("Offset").""._QXZ("TZ Code").""._QXZ("Current Time")."
$rowx[3]$rowx[4] - $rowx[5]$rowx[6]$rowx[7]$rowx[9]   $rowx[8] - $rowx[5]$rowx[2]$rowx[1]   $tz_time
\n"; date_default_timezone_set($orig_zone); } #JCJ - date_default_timezone_set($orig_zone); ##### END available phone_codes display page ##### ###################### # ADD=999986 - postal_codes display page ###################### if ($ADD==999986) { echo "\n"; $dtlog_rows .= "\n"; $dtlog_rows .= "\n"; $dtlog_rows .= "\n"; $dtlog_rows .= "\n"; $dtlog_rows .= "\n"; $dtlog_rows .= "\n"; $o++; $o_ct++; } echo "
"._QXZ("DETAIL PROCESS LOG ENTRIES FOR THIS SERVER PROCESS").": $server_ip - $stage\n"; echo "
\n"; echo ""; $limitSQL=''; $next_prev_HTML=''; $PCentries_per_page='2000'; $stmt="SELECT count(*) from vicidial_postal_codes;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $pc_count = $row[0]; if ( ($pc_count > $PCentries_per_page) and ($status != 'display_all') ) { if (strlen($start_count) < 1) {$start_count=0;} $next_count = ($start_count + $PCentries_per_page); $nextnext_count = ($next_count + $PCentries_per_page); if ($next_count > $pc_count) {$next_count = $pc_count;} else { if ($nextnext_count > $pc_count) { $next_temp = ($pc_count - $next_count); $nextHTML = ""._QXZ("NEXT")." $next_temp   "; } else { $nextHTML = ""._QXZ("NEXT")." $PCentries_per_page   "; } } $next_prev_HTML .= _QXZ("RECORDS")." $start_count - $next_count   "._QXZ("of")." $pc_count     "; $limitSQL="limit $PCentries_per_page"; if ($start_count > 0) { $prev_count = ($start_count - $PCentries_per_page); $limitSQL="limit $start_count,$PCentries_per_page"; $next_prev_HTML .= ""._QXZ("PREVIOUS")." $PCentries_per_page   "; } $next_prev_HTML .= $nextHTML; $next_prev_HTML .= "           "._QXZ("show all postal codes")."   "; } echo "
"._QXZ("POSTAL CODES")."
\n"; echo "
$next_prev_HTML\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # postal_code | state | GMT_offset | DST | DST_range | country | country_code $stmt="SELECT count(*),GMT_offset,country,country_name,postal_code,state,dst FROM vicidial_postal_codes p,vicidial_country_iso_tld i where i.iso3=p.country group by country_code,postal_code,state,GMT_offset,dst order by country_code,postal_code,CAST(GMT_offset as SIGNED INTEGER) desc,dst $limitSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $zones_to_print = mysqli_num_rows($rslt); $o=0; $row_color=0; $last_country=''; while ($zones_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $temp_postal_gmt_offset = $rowx[1]; if ($rowx[6] == 'Y') {$temp_postal_gmt_offset = ($temp_postal_gmt_offset + 1);} $LOCALzone=(3600 * $temp_postal_gmt_offset); $LOCALdate=gmdate("D j M Y H:i", time() + $LOCALzone); if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];} if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("Country").""._QXZ("Postal Code").""._QXZ("State").""._QXZ("DST").""._QXZ("Offset").""._QXZ("Current Time")."
$rowx[2] - $rowx[3]$rowx[4]$rowx[5]$rowx[6]$rowx[1]   $LOCALdate
\n"; } ##### END available postal_codes display page ##### ###################### # ADD=999985 - postal_codes_cities display page ###################### if ($ADD==999985) { echo "\n"; $crashed_rows .= "\n"; $crashed_rows .= "\n"; $crashed_rows .= "\n"; $crashed_rows .= "\n"; $crashed_rows .= "\n"; $o++; $o_ct++; } if ($o > 0) { echo "


"._QXZ("Your Database has crashed tables. Please contact your system administrator.")."

\n"; } else { echo "


"._QXZ("There are no Database crashed tables detected on your system currently")."

\n"; } echo "
\n"; echo ""; $limitSQL=''; $next_prev_HTML=''; $PCentries_per_page='1000'; $stageSQL=''; $stateSQL=''; $citySQL=''; $countySQL=''; $acSQL=''; if (strlen($stage) > 0) {$stageSQL = "and postal_code='$stage'";} if (strlen($state_rule) > 0) {$stateSQL = "and state='$state_rule'";} if (strlen($city_rule) > 0) {$citySQL = "and city='$city_rule'";} if (strlen($county_rule) > 0) {$countySQL = "and county='$county_rule'";} if (strlen($ac_rule) > 0) {$acSQL = "and areacode='$ac_rule'";} $stmt="SELECT count(*) from vicidial_postal_codes_cities where postal_code!='' $stageSQL $stateSQL $citySQL $countySQL $acSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $pc_count = $row[0]; if ( ($pc_count > $PCentries_per_page) and ($status != 'display_all') ) { if (strlen($start_count) < 1) {$start_count=0;} $next_count = ($start_count + $PCentries_per_page); $nextnext_count = ($next_count + $PCentries_per_page); if ($next_count > $pc_count) {$next_count = $pc_count;} else { if ($nextnext_count > $pc_count) { $next_temp = ($pc_count - $next_count); $nextHTML = ""._QXZ("NEXT")." $next_temp   "; } else { $nextHTML = ""._QXZ("NEXT")." $PCentries_per_page   "; } } $next_prev_HTML .= _QXZ("RECORDS")." $start_count - $next_count   "._QXZ("of")." $pc_count     "; $limitSQL="limit $PCentries_per_page"; if ($start_count > 0) { $prev_count = ($start_count - $PCentries_per_page); $limitSQL="limit $start_count,$PCentries_per_page"; $next_prev_HTML .= ""._QXZ("PREVIOUS")." $PCentries_per_page   "; } $next_prev_HTML .= $nextHTML; $next_prev_HTML .= "           "._QXZ("show all postal codes")."   "; } else {$next_prev_HTML .= _QXZ("RECORDS")." 1 - $pc_count   "._QXZ("of")." $pc_count     ";} echo "
"; echo "
"._QXZ("POSTAL CODES CITIES")."
\n"; echo "
 
"._QXZ("Search")."-"; echo ""; echo "  "._QXZ("postal").":"; echo "  "._QXZ("city").":"; echo "  "._QXZ("county").":"; echo "  "._QXZ("state").":"; echo "  "._QXZ("ac").":"; echo ""; echo "
"; echo "
$next_prev_HTML\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; # postal_code | state | city | county | latitude | longitude | areacode | country_code | country $stmt="SELECT count(*),city,country,country_name,postal_code,state,county,areacode,latitude,longitude FROM vicidial_postal_codes_cities p,vicidial_country_iso_tld i where i.iso3=p.country $stageSQL $stateSQL $citySQL $countySQL $acSQL group by country_code,postal_code,state,city,county,areacode,latitude,longitude order by country_code,postal_code $limitSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $zones_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "$zones_to_print|$stmt\n";} $o=0; $row_color=0; $last_country=''; while ($zones_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if ($rowx[3] != "$last_country") {$row_color++; $last_country = $rowx[3];} if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $o++; } echo "
"._QXZ("Country").""._QXZ("Postal Code").""._QXZ("State").""._QXZ("County").""._QXZ("City").""._QXZ("Areacode").""._QXZ("Latitude x Longitude")."
$rowx[2] - $rowx[3]$rowx[4]$rowx[5]$rowx[6]$rowx[1]$rowx[7]   $rowx[8] x $rowx[9] - (OpenSM | google | bing)
\n"; } ##### END available postal_codes_cities display page ##### ###################### # ADD=999984 - CRASHED DATABASE TABLES display page ###################### if ($ADD==999984) { $crashed_rows=''; $stmt="select table_name,crashed_datetime,last_check_datetime from crashed_tables order by table_name;"; $rslt=mysql_to_mysqli($stmt, $link); $crashes_to_print = mysqli_num_rows($rslt); $o=0; $o_ct=1; $row_color=0; while ($crashes_to_print > $o) { $rowx=mysqli_fetch_row($rslt); if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $crashed_rows .= "
$o_ct$rowx[0]$rowx[1]$rowx[2]
\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $partition_rows .= "\n"; $o++; $o_ct++; } if ($o > 0) { echo "

"._QXZ("This server's %1s partitions are",0,'',$o).":
\n"; } else { echo "


"._QXZ("This server has no partition details currently")."

\n"; } echo "
\n"; echo ""; echo "
"._QXZ("CRASHED DATABASE TABLES")."\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$crashed_rows"; echo "
# "._QXZ("Table Name").""._QXZ("First Crash Date-Time").""._QXZ("Last Crash Check Date-Time")."
\n"; } ##### END CRASHED DATABASE TABLES display page ##### ###################### # ADD=999983 - SERVER DRIVE PARTITIONS display page ###################### if ($ADD==999983) { $partition_rows=''; # look for server_live_partitions entries for this server $stmt="SELECT update_time,server_ip,partition_order,partition_path,partition_filesystem,use_pct,mb_used,mb_available FROM server_live_partitions where server_ip='$server_ip' order by update_time desc, partition_order;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $parts_to_print = mysqli_num_rows($rslt); $o=0; $o_ct=1; $row_color=0; $temp_disk_usage=''; while ($parts_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $tot_mb = ($rowx[6] + $rowx[7]); if ($tot_mb >= 1000) { $bgcolor='bgcolor="#'. $SSstd_row2_background .'"'; $fontcolor='color="#000000"'; } else { $bgcolor='bgcolor="#E6E6E6"'; $fontcolor='color="#666666"'; } $partition_rows .= "
$o_ct$rowx[3]$rowx[4]$rowx[5]%$tot_mb$rowx[6]$rowx[7]$rowx[0]
\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $intlog_rows .= "\n"; $o++; $o_ct++; } if ($o < 1) { echo "


"._QXZ("There are no internal log entries on your system for this day")."

\n"; } echo "
\n"; echo ""; echo "
"._QXZ("SERVER DRIVE PARTITIONS FOR SERVER").": $server_id - $server_ip\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$partition_rows"; echo "
# "._QXZ("Path").""._QXZ("Filesystem").""._QXZ("Use %").""._QXZ("Total Size(MB)").""._QXZ("Used (MB)").""._QXZ("Available (MB)").""._QXZ("Update Time")."
\n"; } ##### END SERVER DRIVE PARTITIONS display page ##### ###################### # ADD=999982 - INTERNAL PROCESS LOG display page ###################### if ($ADD==999982) { $servers=array(); $process_ct=array(); $last_time=array(); $last_process=array(); $last_action=array(); $last_stage=array(); $last_length=array(); $server_id=array(); $system_uptime=array(); $serverSQL=''; $serverURL=''; $backlink=''; $SERVERbacklink=''; if (strlen($query_date) < 4) {$query_date = 'today';} $one_day_ago=date("Y-m-d", time()-(1*86400)); $two_days_ago=date("Y-m-d", time()-(2*86400)); $three_days_ago=date("Y-m-d", time()-(3*86400)); $four_days_ago=date("Y-m-d", time()-(4*86400)); $five_days_ago=date("Y-m-d", time()-(5*86400)); $six_days_ago=date("Y-m-d", time()-(6*86400)); if (strlen($server_ip) > 6) { $serverSQL = "and server_ip='$server_ip'"; $serverURL = "&server_ip=$server_ip"; $backlink = ""._QXZ(" FOR THIS SERVER").": $server_ip - back"; $SERVERbacklink = " - back"; } $query_dateSQL = "up_time >= TIMESTAMP(CURDATE())"; if ($query_date == 'today') {$header_day = 'TODAY';} if ($query_date == 'yesterday') {$header_day = 'YESTERDAY'; $query_dateSQL = "up_time >= \"$one_day_ago 00:00:00\" and up_time <= \"$one_day_ago 23:59:59\"";} if ($query_date == $two_days_ago) {$header_day = $two_days_ago; $query_dateSQL = "up_time >= \"$two_days_ago 00:00:00\" and up_time <= \"$two_days_ago 23:59:59\"";} if ($query_date == $three_days_ago) {$header_day = $three_days_ago; $query_dateSQL = "up_time >= \"$three_days_ago 00:00:00\" and up_time <= \"$three_days_ago 23:59:59\"";} if ($query_date == $four_days_ago) {$header_day = $four_days_ago; $query_dateSQL = "up_time >= \"$four_days_ago 00:00:00\" and up_time <= \"$four_days_ago 23:59:59\"";} if ($query_date == $five_days_ago) {$header_day = $five_days_ago; $query_dateSQL = "up_time >= \"$five_days_ago 00:00:00\" and up_time <= \"$five_days_ago 23:59:59\"";} if ($query_date == $six_days_ago) {$header_day = $six_days_ago; $query_dateSQL = "up_time >= \"$six_days_ago 00:00:00\" and up_time <= \"$six_days_ago 23:59:59\"";} $internal_rows=''; $stmt="SELECT count(*),server_ip from vicidial_internal_log WHERE $query_dateSQL $serverSQL group by server_ip order by server_ip;"; $rslt=mysql_to_mysqli($stmt, $link); $intlogs_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "DEBUG: $intlogs_to_print|$stmt|\n";} $o=0; while ($intlogs_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $process_ct[$o] = $rowx[0]; $servers[$o] = $rowx[1]; $o++; } $row_color=0; $o=0; $o_ct=1; while ($intlogs_to_print > $o) { $stmt="SELECT up_time,process,action,stage,(UNIX_TIMESTAMP(up_time)-UNIX_TIMESTAMP(db_time)) from vicidial_internal_log WHERE $query_dateSQL and server_ip='$servers[$o]' order by up_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $details_to_print = mysqli_num_rows($rslt); if ($details_to_print > 0) { $rowy=mysqli_fetch_row($rslt); $last_time[$o] = $rowy[0]; $last_process[$o] = $rowy[1]; $last_action[$o] = $rowy[2]; $last_stage[$o] = $rowy[3]; $last_length[$o] = $rowy[4]; if ($last_length[$o] > 0) {$last_length[$o] = gmdate("H:i:s", $last_length[$o]);} } $stmt="SELECT server_id,system_uptime from servers WHERE server_ip='$servers[$o]' limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $details_to_print = mysqli_num_rows($rslt); if ($details_to_print > 0) { $rowy=mysqli_fetch_row($rslt); $server_id[$o] = $rowy[0]; $system_uptime[$o] = $rowy[1]; } if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $intlog_rows .= "
$o_ct   $servers[$o] - $server_id[$o]   $system_uptime[$o]   $process_ct[$o]   $last_process[$o]$last_time[$o]$last_length[$o]   $last_action[$o]   $last_stage[$o]
\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $proclog_rows .= "\n"; $o++; $o_ct++; } echo "
"._QXZ("SUMMARY PROCESS LOG ENTRIES FOR THIS SERVER").": $server_ip $SERVERbacklink\n"; echo "
\n"; echo ""; echo "
"._QXZ("INTERNAL PROCESS LOG ENTRIES FOR ")."$header_day $backlink\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$intlog_rows"; echo "
#   "._QXZ("Server IP")."   "._QXZ("uptime")."   "._QXZ("L ct")."   "._QXZ("Last Process").""._QXZ("Last Date-Time").""._QXZ("Last Length")."   "._QXZ("Last Action")."   "._QXZ("Last Notes")."
\n"; if (strlen($server_ip) > 6) { $sum_process_ct=array(); $sum_process=array(); $sum_last_time=array(); $sum_last_action=array(); $sum_last_stage=array(); $sum_last_length=array(); $proclog_rows=''; $stmt="SELECT count(*),process from vicidial_internal_log WHERE $query_dateSQL $serverSQL group by process order by process;"; $rslt=mysql_to_mysqli($stmt, $link); $proclogs_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "DEBUG: $proclogs_to_print|$stmt|\n";} $o=0; while ($proclogs_to_print > $o) { $rowx=mysqli_fetch_row($rslt); $sum_process_ct[$o] = $rowx[0]; $sum_process[$o] = $rowx[1]; $o++; } $row_color=0; $o=0; $o_ct=1; while ($proclogs_to_print > $o) { $stmt="SELECT up_time,action,stage,(UNIX_TIMESTAMP(up_time)-UNIX_TIMESTAMP(db_time)) from vicidial_internal_log WHERE $query_dateSQL and process='$sum_process[$o]' $serverSQL order by up_time desc limit 1;"; $rslt=mysql_to_mysqli($stmt, $link); $details_to_print = mysqli_num_rows($rslt); if ($details_to_print > 0) { $rowy=mysqli_fetch_row($rslt); $sum_last_time[$o] = $rowy[0]; $sum_last_action[$o] = $rowy[1]; $sum_last_stage[$o] = $rowy[2]; $sum_last_length[$o] = $rowy[3]; if ($sum_last_length[$o] > 0) {$sum_last_length[$o] = gmdate("H:i:s", $sum_last_length[$o]);} } if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $proclog_rows .= "
$o_ct   $sum_process[$o]   $sum_process_ct[$o]$sum_last_time[$o]$sum_last_length[$o]     $sum_last_action[$o]   $sum_last_stage[$o]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$proclog_rows"; echo "
#   "._QXZ("Process")."   "._QXZ("Log ct").""._QXZ("Last Date-Time").""._QXZ("Last Length")."     "._QXZ("Last Action")."   "._QXZ("Last Notes")."
\n"; if (strlen($stage) > 0) { $dt_time=array(); $dt_action=array(); $dt_stage=array(); $dt_length=array(); $dt_begin_time=array(); $dtlog_rows=''; $stmt="SELECT up_time,action,stage,(UNIX_TIMESTAMP(up_time)-UNIX_TIMESTAMP(db_time)),db_time from vicidial_internal_log WHERE $query_dateSQL and process='$stage' $serverSQL order by up_time desc limit 10000;"; $rslt=mysql_to_mysqli($stmt, $link); $dtlogs_to_print = mysqli_num_rows($rslt); if ($DB > 0) {echo "DEBUG: $dtlogs_to_print|$stmt|\n";} $o=0; while ($dtlogs_to_print > $o) { $rowz=mysqli_fetch_row($rslt); $dt_time[$o] = $rowz[0]; $dt_action[$o] = $rowz[1]; $dt_stage[$o] = $rowz[2]; $dt_length[$o] = $rowz[3]; if ($dt_length[$o] > 0) {$dt_length[$o] = gmdate("H:i:s", $dt_length[$o]);} $dt_begin_time[$o] = $rowz[4]; $o++; } $row_color=0; $o=0; $o_ct=1; while ($dtlogs_to_print > $o) { if (preg_match('/1$|3$|5$|7$|9$/i', $row_color)) {$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';} else {$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';} $dtlog_rows .= "
$o_ct   $dt_begin_time[$o] to $dt_time[$o]$dt_length[$o]   $dt_action[$o]   $dt_stage[$o]
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "$dtlog_rows"; echo "
#   "._QXZ("Date Time").""._QXZ("Length")."   "._QXZ("Action").""._QXZ("Notes")."
\n"; } } # alternate-day display options if ($query_date == 'today') {$today_link = 'TODAY | '; $header_day = 'TODAY';} else {$today_link = "TODAY | ";} if ($query_date == 'yesterday') {$yesterday_link = 'YESTERDAY | '; $header_day = 'YESTERDAY';} else {$yesterday_link = "YESTERDAY | ";} if ($query_date == $two_days_ago) {$two_days_link = "$two_days_ago | "; $header_day = $two_days_ago;} else {$two_days_link = "$two_days_ago | ";} if ($query_date == $three_days_ago) {$three_days_link = "$three_days_ago | "; $header_day = $three_days_ago;} else {$three_days_link = "$three_days_ago | ";} if ($query_date == $four_days_ago) {$four_days_link = "$four_days_ago | "; $header_day = $four_days_ago;} else {$four_days_link = "$four_days_ago | ";} if ($query_date == $five_days_ago) {$five_days_link = "$five_days_ago | "; $header_day = $five_days_ago;} else {$five_days_link = "$five_days_ago | ";} if ($query_date == $six_days_ago) {$six_days_link = "$six_days_ago"; $header_day = $six_days_ago;} else {$six_days_link = "$six_days_ago";} echo "
$today_link$yesterday_link$two_days_link$three_days_link$four_days_link$five_days_link$six_days_link\n"; echo "\n"; } ##### END INTERNAL PROCESS LOG display page ##### echo "
\n"; echo "
\n"; $ENDtime = date("U"); $RUNtime = ($ENDtime - $STARTtime); echo "
\n"; echo "

"; echo _QXZ("VERSION").": $admin_version
"; echo _QXZ("BUILD").": $build\n"; if (!preg_match("/_BUILD_/",$SShosted_settings)) {echo "
© 2026 ViciDial Group
";} echo "
\n"; ?>
>
1) and ($modify_footer_refresh > 0) and (strlen($modify_url)>10) ) ) { echo "\n"; if ($SSnocache_admin=='1') { echo "\n"; echo "\n"; echo "\n"; } if ( ($SSadmin_modify_refresh > 1) and ($modify_footer_refresh > 0) and (strlen($modify_url)>10) ) { echo "\n"; } echo "\n"; } echo "\n"; exit; ##### CALCULATE COMPLETE LEADS ##### function complete_leads($DB,$link,$dial_statuses,$camp_lists,$call_count_limit,$single_status,$campaign_id) { global $LOGallowed_campaignsSQL; if (isset($camp_lists)) { if (strlen($camp_lists)>1) { if (strlen($dial_statuses)>2) { $dial_statuses = preg_replace("/ -$/","",$dial_statuses); $Dstatuses = explode(" ", $dial_statuses); $Ds_to_print = (count($Dstatuses) - 0); $Dsql = ''; $o=0; while ($Ds_to_print > $o) { $Dsql .= "'$Dstatuses[$o]',"; $o++; } $Dsql = preg_replace("/,$/","",$Dsql); if (strlen($Dsql) < 2) {$Dsql = "''";} $CCLsql = "(called_count < 0) or"; if ($call_count_limit > 0) {$CCLsql = "(called_count >= $call_count_limit) or";} $complete_statuses=''; $stmt="SELECT status from vicidial_statuses where completed='Y';"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $q=0; while ($statuses_to_print > $q) { $rowx=mysqli_fetch_row($rslt); $complete_statuses.="'$rowx[0]',"; $q++; } $stmt="SELECT status from vicidial_campaign_statuses where completed='Y' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $statuses_to_print = mysqli_num_rows($rslt); $q=0; while ($statuses_to_print > $q) { $rowx=mysqli_fetch_row($rslt); $complete_statuses.="'$rowx[0]',"; $q++; } $complete_statuses = preg_replace("/,$/","",$complete_statuses); if (strlen($complete_statuses) < 2) {$complete_statuses = "''";} $CSsql = "status IN($complete_statuses)"; $stmt="SELECT count(*) FROM vicidial_list where ( (status IN($Dsql)) and (list_id IN($camp_lists)) and ( $CCLsql ($CSsql) ) );"; #$DB=1; if ($DB) {echo "$stmt\n";} $rslt=mysql_to_mysqli($stmt, $link); $rslt_rows = mysqli_num_rows($rslt); if ($rslt_rows) { $rowx=mysqli_fetch_row($rslt); $complete_leads = $rowx[0]; } else {$complete_leads = '0';} if ($DB > 0) {echo "|$DB|\n";} if ($single_status > 0) {return $complete_leads;} else {echo "There are $complete_leads completed leads in those lists\n";} } else { echo _QXZ("no dial statuses selected for this campaign")."\n"; } } else { echo _QXZ("no active lists selected for this campaign")."\n"; } } else { echo _QXZ("no active lists selected for this campaign")."\n"; } } ?>