LICENSE: AGPLv2 # # CHANGELOG: # 131019-0848 - Moved help from admin.php # 131029-2058 - Added auto-restart asterisk help # 131208-1635 - Added help for max dead, dispo and pause time campaign options # 140126-1023 - Added VMAIL_NO_INST options # 140126-2254 - Added voicemail_instructions option for phones # 140404-1104 - Added new DID filter options # 140418-0915 - Added users and campaigns max_inbound_calls # 140423-1637 - Added manual_dial_search_checkbox and hide_call_log_info # 140425-0912 - Added modify_custom_dialplans # 140425-1306 - Added queuemetrics_pause_type # 140509-2211 - Added frozen_server_call_clear # 140521-2020 - Changed alt_number_dialing and added timer_alt_seconds # 140617-2021 - Added vicidial_users wrapup_seconds_override option # 140621-2151 - Added inbound did new filtering options # 140623-2220 - Added wrapup_bypass and wrapup_message change to allow script use # 140625-1934 - Added wrapup_after_hotkey # 140705-0928 - Added custom list fields help section # 140706-0935 - Added callback_time_24hour # 140902-0815 - Added callback_active_limit and callback_active_limit_override # 141123-1019 - Added help for new campaign comments options # 141124-2144 - Added show_previous_callback # 141124-2231 - Added clear_script # 141204-0605 - Added enable_languages # 141204-2209 - Added QXZ function output # 141211-1647 - Added cpd_unknown_action and lists-na_call_url # 141212-0945 - Added user_choose_language, selected_language and language_method # 141230-1503 - Added code for on-the-fly language translations display # 150107-1954 - Added users-ignore_group_on_search # 150111-1542 - Added lists-local_call_time and manual_dial_search_filter # 150117-1439 - Added NAME option to campaigns-status_display_fields # 150120-0636 - Hide non-functional agent_extended_alt_dial campaign feature # 150204-1246 - Small fixes, issue #826 # 150210-0659 - Added LOCK options for manual_dial_search_checkbox # 150217-0657 - Added vmail show on login option # 150218-0800 - Added Callbacks Bulk Move help # 150223-1548 - Added DYN option to am_message_exten # 150307-2317 - Added custom meetme enter options # 150404-0934 - Added enable_did_entry_list_id and related DID options # 150428-1704 - Added enable_third_webform # 150429-1232 - Added new user API restrictions # 150513-2310 - Added POP3 Auth Mode # 150608-1154 - Added manual dial override field entry and updated manual dial search and filter entries # 150609-1204 - Added chat-related entries # 150609-1231 - Added new agent screen status display option entries # 150610-0938 - Added campaigns-customer_gone_seconds # 150708-2238 - Added max_queue_ingroup_ options # 150710-1124 - Added explanation of new ALT URL feature and alt_multi_urls # 150724-0047 - Added agent_debug_logging # 150725-1406 - Added agent_display_fields # 150727-1039 - Added default_language # 150728-0904 - Added state_conversion for list loader # 150804-1108 - Added agent_whisper_enabled system settings option # 150804-1631 - Added multiple in-group _lead_reset options # 150806-1346 - Added Settings Containers # 150903-1458 - Added compatibility for custom fields data options # 150925-2235 - Added user_hide_realtime and user lead filter options # 150926-1058 - Added did_carrier_description # 151006-0935 - Updated campaign_cid_areacodes entry # 151020-0704 - Added Status Groups and Custom Reports entries # 151030-0639 - Added usacan_phone_dialcode_fix entry # 151104-1541 - Added am_message_wildcards entry # 151121-1144 - Added cache_carrier_stats_realtime # 151204-0635 - Added phones-unavail_dialplan_fwd_exten # 151209-1437 - Added phones-nva entries # 151220-1553 - Added more phones nva options # 151221-0751 - Changed in-group download link to customer chat links # 151229-1659 - Added servers-gather_asterisk_output entry # 151229-2302 - Added campaigns-manual_dial_timeout entry # 151231-0839 - Added user_groups-agent_allowed_chat_groups entry # 160101-0933 - Added entries for routing_initiated_recordings in campaigns and in-groups # 160106-0700 - Added AREACODE description to the inbound_dids-filter_inbound_number entry # 160106-1348 - Added inbound_groups-on_hook_cid_number entry # 160108-2217 - Added campaigns-manual_dial_hopper_check entry # 160116-1512 - Added access_recording and log_recording_access entries # 160121-2155 - Added settings-report_default_format entry and help text for several reports # 160211-2255 - Added help text for remaining reports # 160305-2115 - Added Alt IVR(call menu) DTMF logging # 160306-1201 - Added new webphone options and server options # 160324-1940 - Added callback_useronly_move_minutes # 160407-1931 - Updated Phones Email entry # 160414-0916 - Added default_phone_code # 160429-0834 - Added settings-admin_row_click # 160508-0836 - Added screen colors # 160515-1958 - Added ofcom_uk_drop_calc entry # 160527-1359 - Added phones-outbound_alt_cid entry # 160621-1735 - Added agent_screen_colors and script_remove_js entries # 160731-1030 - Added manual_auto_next, manual_auto_show, user_nickname entries # 160731-2053 - Added POSTx description for recording filenames # 160809-1351 - Added customer_chat_screen_colors and customer_chat_survey_link/text entries # 160915-0954 - Added ---READONLY--- option for field labels # 160926-1351 - Added user_new_lead_limit entries # 161018-2245 - Added allow_required_fields # 161028-1548 - Added agent_xfer_park_3way entry for system_settings # 161031-1410 - Added users-user_new_lead_limit entry # 161105-0246 - Added web_loader_phone_length, agent soundboards and purge uncalled records # 161106-2102 - Added agent_script # 161126-1815 - Fixed several spelling errors # 161207-1958 - Added Agent DID Stats report entry # 161222-0843 - Added agent_chat_screen_colors entry # 161226-2214 - Added conf_qualify entry # 170113-1647 - Added call menu in-group option DYNAMIC_INGROUP_VAR for use with cm_phonesearch.agi # 170114-1404 - Added inbound_groups-populate_lead_province entry # 170207-1331 - Added api_only_user entry # 170217-1353 - Added dead_to_dispo entry # 170220-1811 - Added areacode_filter entries # 170301-1337 - Updated entry for custom fields required setting # 170304-1346 - Added auto_reports section # 170309-1212 - Added agent_xfer_validation and populate_state_areacode entries # 170313-2012 - Added CHAT option to inbound_queue_no_dial entry # 170320-1346 - Added phones conf_qualify entry # 170321-1130 - Added pause code limits entries # 170322-1720 - Added filter-phone-list entry # 170326-1135 - Added drop lists entries # 170327-1649 - updated the campaigns-use_custom_cid entry # 170407-0745 - Added Agents count on server page # 170409-0939 - Added IP Lists entries # 170410-1329 - Added dl_minutes drop lists entry # 170416-1620 - Added servers-routing_prefix and user/campaign ready_max_logout entries # 170428-1959 - Added Inbound and Advanced Forecasting Reports # 170429-0810 - Added callback_display_days entry # 170430-0957 - Added three_way_record_stop and hangup_xfer_record_start entries # 170516-0628 - Added rt_monitor_log_report entry # require("dbconnect_mysqli.php"); require("functions.php"); ############################################# ##### 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,enable_languages,language_method,enable_third_webform,allow_chats 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]; $SSenable_languages = $row[41]; $SSlanguage_method = $row[42]; $SSenable_third_webform = $row[43]; $SSallow_chats = $row[44]; } ##### END SETTINGS LOOKUP ##### ########################################### $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; if ($non_latin < 1) { $PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_PW); $PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_USER); } else { $PHP_AUTH_PW = preg_replace('/\'|\"|\\\\|;/', '',$PHP_AUTH_PW); $PHP_AUTH_USER = preg_replace('/\'|\"|\\\\|;/', '',$PHP_AUTH_USER); } $stmt="SELECT selected_language 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]; } $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;"; 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';"; 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';"; 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 = "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; } } else { $VDdisplayMESSAGE = "Login incorrect, please try again"; if ($auth_message == 'LOCK') { $VDdisplayMESSAGE = "Too many login attempts, try again in 15 minutes"; Header ("Content-type: text/html; charset=utf-8"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n"; exit; } Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\""); Header("HTTP/1.0 401 Unauthorized"); echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n"; exit; } ###################### # display the HELP SCREENS ###################### header ("Content-type: text/html; charset=utf-8"); echo "\n"; echo "\n"; echo "
\n"; echo "