diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index bd11250e..e00fda1c 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -739,6 +739,14 @@ OTHER CHANGES: count for each status as well as the complete-flag and call-count-limit percentage as PENETRATION. +169. Added Admin -> Contacts section(must be enabled in System Settings) which + allows for system-wide transfer contacts to be used in conjunction with + Custom Transfer being set to VIEW_CONTACTS and Enable Transfer Presets + set to CONTACTS. Able to be disabled per user. Also can be accessed from + a separate database by using the Alt Log settings in System Settings. + The purpose of this feature is to be used for a receptionist or operator + that needs to transfer calls to non-agents. + diff --git a/agc_2-X/trunk/bin/AST_email_web_report.pl b/agc_2-X/trunk/bin/AST_email_web_report.pl index 8239bcf9..664033ed 100644 --- a/agc_2-X/trunk/bin/AST_email_web_report.pl +++ b/agc_2-X/trunk/bin/AST_email_web_report.pl @@ -14,6 +14,7 @@ # CHANGES # 90225-1247 - First version # 111004-1057 - Added ftp options +# 111012-2220 - Added optional begin date flag # $txt = '.txt'; @@ -38,7 +39,7 @@ $ABIfiledate = "$mon-$mday-$year$us$hour$min$sec"; $shipdate = "$year-$mon-$mday"; $start_date = "$year$mon$mday"; $datestamp = "$year/$mon/$mday $hour:$min"; - +$hms = "$hour$min$sec"; use Time::Local; @@ -46,6 +47,12 @@ use Time::Local; $TWOAMsec = ( ($secX - ($sec + ($min * 60) + ($hour * 3600) ) ) + 7200); ### find epoch of 2AM yesterday $TWOAMsecY = ($TWOAMsec - 86400); +### find epoch of 2AM 6 days ago +$TWOAMsecF = ($TWOAMsec - 518400); +### find epoch of 2AM 7 days ago +$TWOAMsecG = ($TWOAMsec - 604800); +### find epoch of 2AM 30 days ago +$TWOAMsecH = ($TWOAMsec - 2592000); ($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TWOAMsecY); $Tyear = ($Tyear + 1900); @@ -56,6 +63,33 @@ if ($Thour < 10) {$Thour = "0$Thour";} if ($Tmin < 10) {$Tmin = "0$Tmin";} if ($Tsec < 10) {$Tsec = "0$Tsec";} +($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($TWOAMsecF); +$Fyear = ($Fyear + 1900); +$Fmon++; +if ($Fmon < 10) {$Fmon = "0$Fmon";} +if ($Fmday < 10) {$Fmday = "0$Fmday";} +if ($Fhour < 10) {$Fhour = "0$Fhour";} +if ($Fmin < 10) {$Fmin = "0$Fmin";} +if ($Fsec < 10) {$Fsec = "0$Fsec";} + +($Gsec,$Gmin,$Ghour,$Gmday,$Gmon,$Gyear,$Gwday,$Gyday,$Gisdst) = localtime($TWOAMsecG); +$Gyear = ($Gyear + 1900); +$Gmon++; +if ($Gmon < 10) {$Gmon = "0$Gmon";} +if ($Gmday < 10) {$Gmday = "0$Gmday";} +if ($Ghour < 10) {$Ghour = "0$Ghour";} +if ($Gmin < 10) {$Gmin = "0$Gmin";} +if ($Gsec < 10) {$Gsec = "0$Gsec";} + +($Hsec,$Hmin,$Hhour,$Hmday,$Hmon,$Hyear,$Hwday,$Hyday,$Hisdst) = localtime($TWOAMsecH); +$Hyear = ($Hyear + 1900); +$Hmon++; +if ($Hmon < 10) {$Hmon = "0$Hmon";} +if ($Hmday < 10) {$Hmday = "0$Hmday";} +if ($Hhour < 10) {$Hhour = "0$Hhour";} +if ($Hmin < 10) {$Hmin = "0$Hmin";} +if ($Hsec < 10) {$Hsec = "0$Hsec";} + ### begin parsing run-time options ### if (length($ARGV[0])>1) @@ -77,6 +111,7 @@ if (length($ARGV[0])>1) print " [--email-list=test@test.com:test2@test.com] = send email results to these addresses\n"; print " [--email-sender=vicidial@localhost] = sender for the email results\n"; print " [--date=YYYY-MM-DD] = date override, can also use 'today' and 'yesterday'\n"; + print " [--begin-date=YYYY-MM-DD] = begin date override, can also use '6days', '7days' and '30days', if not filled in will only use the --date\n"; print " [--ftp-server=XXXXXXXX] = FTP server to send file to\n"; print " [--ftp-login=XXXXXXXX] = FTP user\n"; print " [--ftp-pass=XXXXXXXX] = FTP pass\n"; @@ -205,6 +240,54 @@ if (length($ARGV[0])>1) { $time=$TWOAMsec; } + if ($args =~ /--begin-date=/i) + { + @data_in = split(/--begin-date=/,$args); + $begindate = $data_in[1]; + $begindate =~ s/ .*//gi; + if ($begindate =~ /6days/) + { + $begindate="$Fyear-$Fmon-$Fmday"; + $Byear = $Fyear; + $Bmon = $Fmon; + $Bmday = $Fmday; + $Btime=$TWOAMsecF; + } + else + { + if ($begindate =~ /7days/) + { + $begindate="$Gyear-$Gmon-$Gmday"; + $Byear = $Gyear; + $Bmon = $Gmon; + $Bmday = $Gmday; + $Btime=$TWOAMsecG; + } + else + { + if ($begindate =~ /30days/) + { + $begindate="$Hyear-$Hmon-$Hmday"; + $Byear = $Hyear; + $Bmon = $Hmon; + $Bmday = $Hmday; + $Btime=$TWOAMsecH; + } + else + { + @cli_date = split("-",$begindate); + $Byear = $cli_date[0]; + $Bmon = $cli_date[1]; + $Bmday = $cli_date[2]; + $cli_date[1] = ($cli_date[1] - 1); + $Btime = timelocal(0,0,2,$cli_date[2],$cli_date[1],$cli_date[0]); + } + } + } + $Bstart_date = $begindate; + $Bstart_date =~ s/-//gi; + if (!$Q) {print "\n----- DATE OVERRIDE: $begindate($Bstart_date) -----\n\n";} + } } } else @@ -213,6 +296,11 @@ else } ### end parsing run-time options ### +if (length($Bstart_date) < 8) + {$Bstart_date = $start_date;} +if (length($begindate) < 8) + {$begindate = $shipdate;} + # default path to astguiclient configuration file: $PATHconf = '/etc/astguiclient.conf'; @@ -283,7 +371,7 @@ $HTMLfile = "DISCH_SURVEY_$start_date$txt"; #$location = "http://8888:8888\@127.0.0.1/vicidial/AST_VDADstats.php?query_date=$shipdate\\&end_date=$shipdate\\&group[]=--ALL--\\&shift=ALL"; # Outbound IVR Export Report: -$location = "http://127.0.0.1/vicidial/call_report_export.php?query_date=$shipdate\\&end_date=$shipdate\\&list_id[]=--ALL--\\&status[]=--ALL--\\&campaign[]=RSIDESVY\\&run_export=1\\&ivr_export=YES\\&export_fields=EXTENDED\\&header_row=NO\\&rec_fields=NONE\\&custom_fields=NO\\&call_notes=NO"; +$location = "http://127.0.0.1/vicidial/call_report_export.php?query_date=$begindate\\&end_date=$shipdate\\&list_id[]=--ALL--\\&status[]=--ALL--\\&campaign[]=RSIDESVY\\&run_export=1\\&ivr_export=YES\\&export_fields=EXTENDED\\&header_row=NO\\&rec_fields=NONE\\&custom_fields=NO\\&call_notes=NO"; ###################################################### ###################################################### diff --git a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl index bd415fc9..54e07b0a 100644 --- a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl +++ b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl @@ -1536,8 +1536,8 @@ foreach(@FILES) # TEST01||09292011|1|5125554727||Mike||Frank|||||||||||||||||C|2145559922|TESTSURVEY|TESTSURVEY|111 if ( ($format =~ /pipe30tz/) && ($format_set < 1) ) { - $source_id = $m[0]; chomp($source_id); - $vendor_lead_code = $m[2]; chomp($vendor_lead_code); + $vendor_lead_code = $m[0]; chomp($vendor_lead_code); + $source_id = $m[2]; chomp($source_id); $phone_code = $m[3]; chomp($phone_code); $phone_code =~ s/\D//gi; $phone_number = $m[4]; chomp($phone_number); $phone_number =~ s/\D//gi; $USarea = substr($phone_number, 0, 3); diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 420cfa0e..1157ad03 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -585,7 +585,9 @@ modify_statuses ENUM('1','0') default '0', modify_voicemail ENUM('1','0') default '0', modify_audiostore ENUM('1','0') default '0', modify_moh ENUM('1','0') default '0', -modify_tts ENUM('1','0') default '0' +modify_tts ENUM('1','0') default '0', +preset_contact_search ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE', +modify_contacts ENUM('1','0') default '0' ); CREATE UNIQUE INDEX user ON vicidial_users (user); @@ -786,7 +788,7 @@ blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your ses blind_monitor_filename VARCHAR(100) default '', inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED', timer_action_destination VARCHAR(30) default '', -enable_xfer_presets ENUM('DISABLED','ENABLED') default 'DISABLED', +enable_xfer_presets ENUM('DISABLED','ENABLED','CONTACTS') default 'DISABLED', hide_xfer_number_to_dial ENUM('DISABLED','ENABLED') default 'DISABLED', manual_dial_prefix VARCHAR(20) default '', customer_3way_hangup_logging ENUM('DISABLED','ENABLED') default 'ENABLED', @@ -863,7 +865,7 @@ time_zone_setting ENUM('COUNTRY_AND_AREA_CODE','POSTAL_CODE','NANPA_PREFIX','OWN CREATE TABLE vicidial_statuses ( status VARCHAR(6) PRIMARY KEY NOT NULL, status_name VARCHAR(30), -selectable ENUM('Y','N'), +selectable ENUM('Y','N') default 'N', human_answered ENUM('Y','N') default 'N', category VARCHAR(20) default 'UNDEFINED', sale ENUM('Y','N') default 'N', @@ -1451,7 +1453,8 @@ did_agent_log ENUM('Y','N') default 'N', campaign_cid_areacodes_enabled ENUM('0','1') default '1', pllb_grouping_limit SMALLINT(5) default '100', did_ra_extensions_enabled ENUM('0','1') default '0', -expanded_list_stats ENUM('0','1') default '1' +expanded_list_stats ENUM('0','1') default '1', +contacts_enabled ENUM('0','1') default '0' ); CREATE TABLE vicidial_campaigns_list_mix ( @@ -2528,6 +2531,19 @@ index (user_start) CREATE UNIQUE INDEX didraexten on vicidial_did_ra_extensions (did_id, user_start, extension); +CREATE TABLE contact_information ( +contact_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY, +first_name VARCHAR(50) default '', +last_name VARCHAR(50) default '', +office_num VARCHAR(20) default '', +cell_num VARCHAR(20) default '', +other_num1 VARCHAR(20) default '', +other_num2 VARCHAR(20) default '' +); + +CREATE INDEX ci_first_name on contact_information (first_name); +CREATE INDEX ci_last_name on contact_information (last_name); + ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY; @@ -2680,7 +2696,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer; CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log; CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route); -UPDATE system_settings SET db_schema_version='1303',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1304',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/upgrade_2.4.sql b/agc_2-X/trunk/extras/upgrade_2.4.sql index b0d15ec8..fbb4cabb 100644 --- a/agc_2-X/trunk/extras/upgrade_2.4.sql +++ b/agc_2-X/trunk/extras/upgrade_2.4.sql @@ -1099,3 +1099,26 @@ UPDATE system_settings SET db_schema_version='1302',db_schema_update_date=NOW() CREATE UNIQUE INDEX viga_user_group_id on vicidial_inbound_group_agents (user, group_id); UPDATE system_settings SET db_schema_version='1303',db_schema_update_date=NOW() where db_schema_version < 1303; + +ALTER TABLE vicidial_campaigns MODIFY enable_xfer_presets ENUM('DISABLED','ENABLED','CONTACTS') default 'DISABLED'; + +ALTER TABLE vicidial_users ADD preset_contact_search ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE'; +ALTER TABLE vicidial_users ADD modify_contacts ENUM('1','0') default '0'; + +ALTER TABLE system_settings ADD contacts_enabled ENUM('0','1') default '0'; + +CREATE TABLE contact_information ( +contact_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY, +first_name VARCHAR(50) default '', +last_name VARCHAR(50) default '', +office_num VARCHAR(20) default '', +cell_num VARCHAR(20) default '', +other_num1 VARCHAR(20) default '', +other_num2 VARCHAR(20) default '' +); + +CREATE INDEX ci_first_name on contact_information (first_name); +CREATE INDEX ci_last_name on contact_information (last_name); + +UPDATE system_settings SET db_schema_version='1304',db_schema_update_date=NOW() where db_schema_version < 1304; + diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index efa33b6d..2de353a2 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -762,6 +762,30 @@ Report Option|| This option allows this specific shift to show up in selected reports that support this option|| There are|| completed leads in those lists|| +The VIEW_PRESET option will simply open the transfer frame and the preset frame|| +CONTACTS is an option only if contact_information is enabled on your system, that is a custom feature|| +Preset Contact Search|| +If the user is logged into a campaign that has Transfer Presets set to CONTACTS, then this setting can disable contact searching for this user only. Default is NOT_ACTIVE which will use whatever the campaign setting is|| +The VIEW_CONTACTS option will open a contacts search window, this will only work if Enable Presets is set to CONTACTS|| +Contacts Enabled|| +This setting enables the Contacts sub-section in Admin which allows a manager to add modify or delete contacts in the system that can be used as part of a Custom Transfer in a campaign where an agent can search for contacts by first name last name or office number and then select one of many numbers associated with that contact. This feature is often used by operators or in switchboard functions where the user would need to transfer a call to a non-agent phone. Default is 0 for disabled|| +CONTACTS LIST|| +Add A Contact|| +ADD NEW CONTACT|| +ADDING NEW CONTACT|| +MODIFY CONTACT|| +CONTACT NOT ADDED|| +there is already a contact in the system with this name and number|| +CONTACT ADDED|| +DELETE THIS CONTACT|| +Click here to see Admin changes to this contact|| +DELETE CONTACT|| +CONTACT NOT DELETED|| +CONTACT DELETION CONFIRMATION|| +Office Number|| +Cell Number|| +Other Number|| +CONTACT NOT MODIFIED|| lead_report_export.php @@ -824,6 +848,10 @@ Custom Transfer|| System Delay, Please try again|| Disposition Status List Hidden|| The system has received a command to log you out, you have been logged out of your session|| +Notes: when doing a search for a contact, wildcard or partial search terms are not allowed|| +Contact search requests are all logged in the system|| +SEARCH FOR A CONTACT|| +CONTACTS SEARCH RESULTS|| ############################################################ MANAGER Manual diff --git a/agc_2-X/trunk/www/agc/images/vdc_XB_contactsbutton.gif b/agc_2-X/trunk/www/agc/images/vdc_XB_contactsbutton.gif new file mode 100644 index 00000000..62e26daa Binary files /dev/null and b/agc_2-X/trunk/www/agc/images/vdc_XB_contactsbutton.gif differ diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index ae17119d..8828162c 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -291,10 +291,11 @@ # 110731-2318 - Added dispo/start call url logging to DB table # 110901-1117 - Added areacode custom cid function # 111006-1425 - Added call_count_limit campaign option +# 111015-2104 - Added SEARCHCONTACTSRESULTSview function # -$version = '2.4-194'; -$build = '111006-1425'; +$version = '2.4-195'; +$build = '111015-2104'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=425; $one_mysql_log=0; @@ -608,7 +609,7 @@ $hangup_cause_dictionary = array( ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;"; +$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -619,6 +620,11 @@ if ($qm_conf_ct > 0) $non_latin = $row[0]; $timeclock_end_of_day = $row[1]; $agentonly_callback_campaign_lock = $row[2]; + $alt_log_server_ip = $row[3]; + $alt_log_dbname = $row[4]; + $alt_log_login = $row[5]; + $alt_log_pass = $row[6]; + $tables_use_alt_log_db = $row[7]; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -8841,6 +8847,200 @@ if ($ACTION == 'SEARCHRESULTSview') +################################################################################ +### SEARCHCONTACTSRESULTSview - display search results for contacts search +################################################################################ +if ($ACTION == 'SEARCHCONTACTSRESULTSview') + { + if (strlen($stage) < 3) + {$stage = '670';} + + $stmt="select agent_lead_search_method,manual_dial_list_id from vicidial_campaigns where campaign_id='$campaign';"; + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + if ($camps_to_print > 0) + { + $row=mysql_fetch_row($rslt); + $agent_lead_search_method = $row[0]; + $manual_dial_list_id = $row[1]; + + $searchSQL=''; + $searchmethodSQL=''; + + $last_name = ereg_replace("'|\"|\\\\|;","",$last_name); + $first_name = ereg_replace("'|\"|\\\\|;","",$first_name); + $phone_number = ereg_replace("'|\"|\\\\|;","",$phone_number); + + if (strlen($phone_number) >= 2) + { + $searchSQL .= "office_num='$phone_number'"; + } + elseif (strlen($last_name) > 0) + { + $searchSQL = "last_name='$last_name'"; + if (strlen($first_name) > 0) + { + if (strlen($searchSQL) > 10) + {$searchSQL .= " and ";} + $searchSQL .= "first_name='$first_name'"; + } + } + elseif (strlen($first_name) > 0) + { + $searchSQL = "first_name='$first_name'"; + } + else + { + echo "ERROR: You must enter in search terms, one of these must be populated: office number, last name, first name\n"; + echo "

"; + echo "Go Back"; + echo ""; + exit; + } + + ##### BEGIN search queries and output ##### + $stmt="select count(*) from contact_information where $searchSQL;"; + + ### LOG INSERTION Search Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmtL="INSERT INTO vicidial_lead_search_log set event_date='$NOW_TIME', user='$user', source='agent', results='0', search_query=\"$SQL_log\";"; + if ($DB) {echo "|$stmtL|\n";} + $rslt=mysql_query($stmtL, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $search_log_id = mysql_insert_id($link); + + if ( (preg_match("/contact_information/",$tables_use_alt_log_db)) and (strlen($alt_log_server_ip)>4) and (strlen($alt_log_dbname)>0) ) + { + $linkALT=mysql_connect("$alt_log_server_ip", "$alt_log_login", "$alt_log_pass"); + mysql_select_db("$alt_log_dbname", $linkALT); + } + else + {$linkALT = $link;} + + $rsltALT=mysql_query($stmt, $linkALT); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkALT,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $counts_to_print = mysql_num_rows($rsltALT); + if ($counts_to_print > 0) + { + $row=mysql_fetch_row($rsltALT); + $search_result_count = $row[0]; + + $end_process_time = date("U"); + $search_seconds = ($end_process_time - $StarTtime); + + $stmtL="UPDATE vicidial_lead_search_log set results='$search_result_count',seconds='$search_seconds' where search_log_id='$search_log_id';"; + if ($DB) {echo "|$stmtL|\n";} + $rslt=mysql_query($stmtL, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + + echo "
\n"; + echo ""; + echo "Results Found: $search_result_count"; + echo "\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + if ($search_result_count) + { + $stmt="SELECT first_name,last_name,office_num,cell_num,other_num1,other_num2 from contact_information where $searchSQL order by first_name,last_name desc limit 1000;"; + $rsltALT=mysql_query($stmt, $linkALT); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkALT,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $out_logs_to_print = mysql_num_rows($rsltALT); + if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";} + + $g=0; + $u=0; + while ($out_logs_to_print > $u) + { + $row=mysql_fetch_row($rsltALT); + $ALLsort[$g] = "$row[0]-----$g"; + $ALLfirst[$g] = $row[0]; + $ALLlast[$g] = $row[1]; + $ALLoffice_num[$g] = $row[2]; + $ALLcell_num[$g] = $row[3]; + $ALLother_num1[$g] = $row[4]; + $ALLother_num2[$g] = $row[5]; + + $g++; + $u++; + } + + if ($g < 1) + {echo "";} + + $u=0; + while ($g > $u) + { + $sort_split = explode("-----",$ALLsort[$u]); + $i = $sort_split[1]; + + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + $end_process_time = date("U"); + $search_seconds = ($end_process_time - $StarTtime); + + $stmtL="UPDATE vicidial_lead_search_log set seconds='$search_seconds' where search_log_id='$search_log_id';"; + if ($DB) {echo "|$stmtL|\n";} + $rslt=mysql_query($stmtL, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + else + {echo "";} + + echo "
  #     FIRST NAME     LAST NAME     OFFICE     MOBILE     OTHER 1     OTHER 2  
No results found
$u$ALLfirst[$i] $ALLlast[$i]   $ALLoffice_num[$i]   $ALLcell_num[$i]   $ALLother_num1[$i]   $ALLother_num2[$i]
No results found
"; + echo "
"; + echo "Go Back"; + echo "
"; + } + else + { + echo "ERROR: There was a problem with your search terms\n"; + echo "

"; + echo "Go Back"; + echo ""; + exit; + } + ##### END search queries and output ##### + } + else + { + echo "ERROR: Campaign not found\n"; + echo "

"; + echo "Go Back"; + echo ""; + exit; + } + } + + + ################################################################################ ### LEADINFOview - display the information for a lead and logs for that lead ################################################################################ diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 41b0bca0..f287c39f 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -366,10 +366,11 @@ # 110911-1604 - Added API logout function # 110916-1514 - Fixed dial timeout to check for dial_timeout setting and greater than 49 seconds # 110919-1603 - Added Phone login load balancing grouping options +# 111015-2037 - Added contact search functions # -$version = '2.4-333c'; -$build = '110919-1603'; +$version = '2.4-334c'; +$build = '111015-2037'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -1013,7 +1014,7 @@ else $login=strtoupper($VD_login); $password=strtoupper($VD_pass); ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,agent_call_log_view_override,agent_choose_blended,agent_lead_search_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,agent_call_log_view_override,agent_choose_blended,agent_lead_search_override,preset_contact_search from vicidial_users where user='$VD_login' and pass='$VD_pass'"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01007',$VD_login,$server_ip,$session_name,$one_mysql_log);} $row=mysql_fetch_row($rslt); @@ -1044,6 +1045,7 @@ else $VU_agent_call_log_view_override = $row[24]; $VU_agent_choose_blended = $row[25]; $VU_agent_lead_search_override = $row[26]; + $VU_preset_contact_search = $row[27]; if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';} @@ -1585,10 +1587,16 @@ else $custom_3way_button_transfer_enabled=0; $custom_3way_button_transfer_park=0; + $custom_3way_button_transfer_view=0; + $custom_3way_button_transfer_contacts=0; if (preg_match("/PRESET_|FIELD_/",$custom_3way_button_transfer)) {$custom_3way_button_transfer_enabled=1;} if (preg_match("/PARK_/",$custom_3way_button_transfer)) - {$custom_3way_button_transfer_park=1;} + {$custom_3way_button_transfer_park=1; $custom_3way_button_transfer_enabled=1;} + if (preg_match("/VIEW_PRESET/",$custom_3way_button_transfer)) + {$custom_3way_button_transfer_view=1; $custom_3way_button_transfer_enabled=1;} + if ( (preg_match("/VIEW_CONTACTS/",$custom_3way_button_transfer)) and ($enable_xfer_presets == 'CONTACTS') and ($VU_preset_contact_search != 'DISABLED') ) + {$custom_3way_button_transfer_contacts=1; $custom_3way_button_transfer_enabled=1;} $preset_populate=''; $prepopulate_transfer_preset_enabled=0; @@ -3502,6 +3510,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var custom_3way_button_transfer=''; var custom_3way_button_transfer_enabled=''; var custom_3way_button_transfer_park=''; + var custom_3way_button_transfer_view=''; + var custom_3way_button_transfer_contacts=''; var waiting_on_dispo=0; var disable_dispo_screen=''; var disable_dispo_status=''; @@ -3739,45 +3749,58 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function custom_button_transfer() { ShoWTransferMain('ON'); - - if ( (custom_3way_button_transfer == 'PRESET_1') || (custom_3way_button_transfer == 'PARK_PRESET_1') ) - {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber; document.vicidial_form.xfername.value='D1';} - if ( (custom_3way_button_transfer == 'PRESET_2') || (custom_3way_button_transfer == 'PARK_PRESET_2') ) - {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber; document.vicidial_form.xfername.value='D2';} - if ( (custom_3way_button_transfer == 'PRESET_3') || (custom_3way_button_transfer == 'PARK_PRESET_3') ) - {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber; document.vicidial_form.xfername.value='D3';} - if ( (custom_3way_button_transfer == 'PRESET_4') || (custom_3way_button_transfer == 'PARK_PRESET_4') ) - {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber; document.vicidial_form.xfername.value='D4';} - if ( (custom_3way_button_transfer == 'PRESET_5') || (custom_3way_button_transfer == 'PARK_PRESET_5') ) - {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber; document.vicidial_form.xfername.value='D5';} - if ( (custom_3way_button_transfer == 'FIELD_address3') || (custom_3way_button_transfer == 'PARK_FIELD_address3') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.address3.value;} - if ( (custom_3way_button_transfer == 'FIELD_province') || (custom_3way_button_transfer == 'PARK_FIELD_province') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.province.value;} - if ( (custom_3way_button_transfer == 'FIELD_security_phrase') || (custom_3way_button_transfer == 'PARK_FIELD_security_phrase') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.security_phrase.value;} - if ( (custom_3way_button_transfer == 'FIELD_vendor_lead_code') || (custom_3way_button_transfer == 'PARK_FIELD_vendor_lead_code') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.vendor_lead_code.value;} - if ( (custom_3way_button_transfer == 'FIELD_email') || (custom_3way_button_transfer == 'PARK_FIELD_email') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.email.value;} - if ( (custom_3way_button_transfer == 'FIELD_owner') || (custom_3way_button_transfer == 'PARK_FIELD_owner') ) - {document.vicidial_form.xfernumber.value = document.vicidial_form.owner.value;} - - var temp_xfernumber = document.vicidial_form.xfernumber.value; - if (temp_xfernumber.length < 3) + if (custom_3way_button_transfer_contacts > 0) { - alert_box("Number to Dial invalid: " + temp_xfernumber); - ShoWTransferMain('OFF','YES'); + generate_contacts_search(); } else { - if (custom_3way_button_transfer_park > 0) + if (custom_3way_button_transfer_view > 0) { - xfer_park_dial(); + generate_presets_pulldown(); } else { - SendManualDial('YES'); + if ( (custom_3way_button_transfer == 'PRESET_1') || (custom_3way_button_transfer == 'PARK_PRESET_1') ) + {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber; document.vicidial_form.xfername.value='D1';} + if ( (custom_3way_button_transfer == 'PRESET_2') || (custom_3way_button_transfer == 'PARK_PRESET_2') ) + {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber; document.vicidial_form.xfername.value='D2';} + if ( (custom_3way_button_transfer == 'PRESET_3') || (custom_3way_button_transfer == 'PARK_PRESET_3') ) + {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber; document.vicidial_form.xfername.value='D3';} + if ( (custom_3way_button_transfer == 'PRESET_4') || (custom_3way_button_transfer == 'PARK_PRESET_4') ) + {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber; document.vicidial_form.xfername.value='D4';} + if ( (custom_3way_button_transfer == 'PRESET_5') || (custom_3way_button_transfer == 'PARK_PRESET_5') ) + {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber; document.vicidial_form.xfername.value='D5';} + if ( (custom_3way_button_transfer == 'FIELD_address3') || (custom_3way_button_transfer == 'PARK_FIELD_address3') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.address3.value;} + if ( (custom_3way_button_transfer == 'FIELD_province') || (custom_3way_button_transfer == 'PARK_FIELD_province') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.province.value;} + if ( (custom_3way_button_transfer == 'FIELD_security_phrase') || (custom_3way_button_transfer == 'PARK_FIELD_security_phrase') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.security_phrase.value;} + if ( (custom_3way_button_transfer == 'FIELD_vendor_lead_code') || (custom_3way_button_transfer == 'PARK_FIELD_vendor_lead_code') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.vendor_lead_code.value;} + if ( (custom_3way_button_transfer == 'FIELD_email') || (custom_3way_button_transfer == 'PARK_FIELD_email') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.email.value;} + if ( (custom_3way_button_transfer == 'FIELD_owner') || (custom_3way_button_transfer == 'PARK_FIELD_owner') ) + {document.vicidial_form.xfernumber.value = document.vicidial_form.owner.value;} + + var temp_xfernumber = document.vicidial_form.xfernumber.value; + if (temp_xfernumber.length < 3) + { + alert_box("Number to Dial invalid: " + temp_xfernumber); + ShoWTransferMain('OFF','YES'); + } + else + { + if (custom_3way_button_transfer_park > 0) + { + xfer_park_dial(); + } + else + { + SendManualDial('YES'); + } + } } } } @@ -5626,10 +5649,20 @@ function set_length(SLnumber,SLlength_goal,SLdirection) { AutoDial_ReSume_PauSe("VDADready"); } + ShoWGenDerPulldown(); hideDiv('SearcHForMDisplaYBox'); } +// ################################################################################ +// closes contacts search screen + function ContactSearcHVieWClose() + { + ShoWGenDerPulldown(); + hideDiv('SearcHContactsDisplaYBox'); + } + + // ################################################################################ // Open up a callback customer record as manual dial preview mode function new_callback_call(taskCBid,taskLEADid,taskCBalt) @@ -8608,6 +8641,16 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } } + +// ################################################################################ +// Generate the Contacts Search span content + function generate_contacts_search() + { + HidEGenDerPulldown(); + showDiv('SearcHContactsDisplaYBox'); + } + + // ################################################################################ // Generate the Presets Chooser span content function generate_presets_pulldown() @@ -8619,7 +8662,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) var loop_ct = 0; while (loop_ct < VD_preset_names_ct) { - Presets_HTML = Presets_HTML + "" + VARpreset_names[loop_ct]; + Presets_HTML = Presets_HTML + "" + VARpreset_names[loop_ct]; if (VARpreset_hide_numbers[loop_ct]=='N') {Presets_HTML = Presets_HTML + " - " + VARpreset_numbers[loop_ct];} Presets_HTML = Presets_HTML + "
"; @@ -8628,35 +8671,35 @@ function set_length(SLnumber,SLlength_goal,SLdirection) if ( (CalL_XC_a_NuMber.length > 0) || (CalL_XC_a_Dtmf.length > 0) ) { - Presets_HTML = Presets_HTML + "D1"; + Presets_HTML = Presets_HTML + "D1"; if (hide_xfer_number_to_dial=='DISABLED') {Presets_HTML = Presets_HTML + " - " + CalL_XC_a_NuMber;} Presets_HTML = Presets_HTML + "
"; } if ( (CalL_XC_b_NuMber.length > 0) || (CalL_XC_b_Dtmf.length > 0) ) { - Presets_HTML = Presets_HTML + "D2"; + Presets_HTML = Presets_HTML + "D2"; if (hide_xfer_number_to_dial=='DISABLED') {Presets_HTML = Presets_HTML + " - " + CalL_XC_b_NuMber;} Presets_HTML = Presets_HTML + "
"; } if (CalL_XC_c_NuMber.length > 0) { - Presets_HTML = Presets_HTML + "D3"; + Presets_HTML = Presets_HTML + "D3"; if (hide_xfer_number_to_dial=='DISABLED') {Presets_HTML = Presets_HTML + " - " + CalL_XC_c_NuMber;} Presets_HTML = Presets_HTML + "
"; } if (CalL_XC_d_NuMber.length > 0) { - Presets_HTML = Presets_HTML + "D4"; + Presets_HTML = Presets_HTML + "D4"; if (hide_xfer_number_to_dial=='DISABLED') {Presets_HTML = Presets_HTML + " - " + CalL_XC_d_NuMber;} Presets_HTML = Presets_HTML + "
"; } if (CalL_XC_e_NuMber.length > 0) { - Presets_HTML = Presets_HTML + "D5"; + Presets_HTML = Presets_HTML + "D5"; if (hide_xfer_number_to_dial=='DISABLED') {Presets_HTML = Presets_HTML + " - " + CalL_XC_e_NuMber;} Presets_HTML = Presets_HTML + "
"; @@ -8669,8 +8712,13 @@ function set_length(SLnumber,SLlength_goal,SLdirection) // ################################################################################ // Submit chosen Preset - function PresetSelect_submit(taskpresetname,taskpresetnumber,taskpresetdtmf,taskhidenumber) + function PresetSelect_submit(taskpresetname,taskpresetnumber,taskpresetdtmf,taskhidenumber,taskclosesearch) { + if (taskclosesearch=='Y') + { + hideDiv('SearcHResultSContactsBox'); + hideDiv('SearcHContactsDisplaYBox'); + } hideDiv('PresetsSelectBox'); document.vicidial_form.conf_dtmf.value = taskpresetdtmf; document.vicidial_form.xfername.value = taskpresetname; @@ -8976,6 +9024,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) CBcommentsBoxhide(); EAcommentsBoxhide(); + ContactSearchReset(); AgentDispoing = 0; @@ -10960,6 +11009,61 @@ function phone_number_format(formatphone) { } +// ################################################################################ +// Gather and display contacts search data + function ContactSearchSubmit() + { + showDiv('SearcHResultSContactsBox'); + + document.getElementById('SearcHResultSContactsSpan').innerHTML = "Searching...\n"; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + LSview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=SEARCHCONTACTSRESULTSview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&phone_number=" + document.vicidial_form.contacts_phone_number.value + "&first_name=" + document.vicidial_form.contacts_first_name.value + "&last_name=" + document.vicidial_form.contacts_last_name.value + "&campaign=" + campaign + "&stage="; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(LSview_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + document.getElementById('SearcHResultSContactsSpan').innerHTML = xmlhttp.responseText + "\n"; + } + } + delete xmlhttp; + } + } + + +// ################################################################################ +// Reset contact search form + function ContactSearchReset() + { + document.vicidial_form.contacts_phone_number.value=''; + document.vicidial_form.contacts_first_name.value=''; + document.vicidial_form.contacts_last_name.value=''; + } + // ################################################################################ // Gather and display lead search data @@ -11522,6 +11626,8 @@ function phone_number_format(formatphone) { hideDiv('CalLNotesDisplaYBox'); hideDiv('SearcHForMDisplaYBox'); hideDiv('SearcHResultSDisplaYBox'); + hideDiv('SearcHContactsDisplaYBox'); + hideDiv('SearcHResultSContactsBox'); hideDiv('LeaDInfOBox'); hideDiv('agentdirectlink'); hideDiv('blind_monitor_notice_span'); @@ -13034,15 +13140,24 @@ if ($agent_display_dialable_leads > 0) } else { - ?> - - D1 - D2 - D3 - D4 - D5 - - + Contacts Button + + + D1 + D2 + D3 + D4 + D5 + +   @@ -13379,6 +13494,45 @@ Available Agents Transfer:
+ +
      SEARCH FOR A CONTACT:             close [X]
+
\n";} + ?> +

+ Notes: when doing a search for a contact, wildcard or partial search terms are not allowed.
Contact search requests are all logged in the system. +

+
+ + + + + + + + + + + + + +
Office Number:
First Name:
Last Name:

SUBMIT SEARCH             reset form
+

  +
+
+ + +
      CONTACTS SEARCH RESULTS:             close [X]
+
\n";} + ?> +
Search Results
+

  +
+
+
      SEARCH FOR A LEAD:             close [X]
0) ############################################# ##### 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 FROM system_settings;"; +$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 FROM system_settings;"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); @@ -1710,6 +1736,12 @@ if ($qm_conf_ct > 0) $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]; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -1933,6 +1965,13 @@ if ($non_latin < 1) $call_count_limit = ereg_replace("[^0-9]","",$call_count_limit); $call_count_target = ereg_replace("[^0-9]","",$call_count_target); $expanded_list_stats = ereg_replace("[^0-9]","",$expanded_list_stats); + $contacts_enabled = ereg_replace("[^0-9]","",$contacts_enabled); + $contact_id = ereg_replace("[^0-9]","",$contact_id); + $office_num = ereg_replace("[^0-9]","",$office_num); + $cell_num = ereg_replace("[^0-9]","",$cell_num); + $other_num1 = ereg_replace("[^0-9]","",$other_num1); + $other_num2 = ereg_replace("[^0-9]","",$other_num2); + $modify_contacts = ereg_replace("[^0-9]","",$modify_contacts); $drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds); @@ -2314,6 +2353,7 @@ if ($non_latin < 1) $after_hours_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$after_hours_callmenu); $survey_recording = ereg_replace("[^-_0-9a-zA-Z]","",$survey_recording); $dtmf_field = ereg_replace("[^-_0-9a-zA-Z]","",$dtmf_field); + $preset_contact_search = ereg_replace("[^-_0-9a-zA-Z]","",$preset_contact_search); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -2459,6 +2499,8 @@ if ($non_latin < 1) $default_local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$default_local_gmt); $cid_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$cid_description); $description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$description); + $first_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$first_name); + $last_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$last_name); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); @@ -2926,12 +2968,13 @@ else # 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 # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.4-340a'; -$build = '111006-1403'; +$admin_version = '2.4-341a'; +$build = '111015-1914'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3045,7 +3088,7 @@ if ( ($auth > 0) or ($reports_auth > 0) ) { $office_no=strtoupper($PHP_AUTH_USER); $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,callcard_admin,force_change_password,modify_shifts,modify_phones,modify_carriers,modify_labels,modify_statuses,modify_voicemail,modify_audiostore,modify_moh,modify_tts from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,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 from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfull_name =$row[3]; @@ -3092,6 +3135,7 @@ if ( ($auth > 0) or ($reports_auth > 0) ) $LOGmodify_audiostore =$row[78]; $LOGmodify_moh =$row[79]; $LOGmodify_tts =$row[80]; + $LOGmodify_contacts =$row[81]; $stmt="SELECT allowed_campaigns,allowed_reports from vicidial_user_groups where user_group='$LOGuser_group';"; @@ -3218,6 +3262,7 @@ if ($ADD==151111111111) {$hh='admin'; $sh='tts'; echo "ADD NEW TTS ENTRY";} if ($ADD==161111111111) {$hh='admin'; $sh='moh'; echo "ADD NEW MUSIC ON HOLD ENTRY";} if ($ADD==171111111111) {$hh='admin'; $sh='vm'; echo "ADD NEW VOICEMAIL BOX";} if ($ADD==181111111111) {$hh='admin'; $sh='label'; echo "ADD NEW SCREEN LABEL";} +if ($ADD==191111111111) {$hh='admin'; $sh='cts'; echo "ADD NEW CONTACT";} if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW CONFERENCE";} if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} if ($ADD=='2') {$hh='users'; echo "New User Addition";} @@ -3261,6 +3306,7 @@ if ($ADD==251111111111) {$hh='admin'; $sh='tts'; echo "ADDING NEW TTS ENTRY";} if ($ADD==261111111111) {$hh='admin'; $sh='moh'; echo "ADDING NEW MUSIC ON HOLD ENTRY";} if ($ADD==271111111111) {$hh='admin'; $sh='vm'; echo "ADDING NEW VOICEMAIL BOX";} if ($ADD==281111111111) {$hh='admin'; $sh='label'; echo "ADDING NEW SCREEN LABEL";} +if ($ADD==291111111111) {$hh='admin'; $sh='cts'; echo "ADDING NEW CONTACT";} if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW CONFERENCE";} if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo "ADDING VICIDIAL SYSTEM STATUSES";} @@ -3330,6 +3376,7 @@ if ($ADD==351111111111) {$hh='admin'; $sh='tts'; echo "MODIFY TTS ENTRY";} if ($ADD==361111111111) {$hh='admin'; $sh='moh'; echo "MODIFY MUSIC ON HOLD ENTRY";} if ($ADD==371111111111) {$hh='admin'; $sh='vm'; echo "MODIFY VOICEMAIL BOX";} if ($ADD==381111111111) {$hh='admin'; $sh='label'; echo "MODIFY SCREEN LABEL";} +if ($ADD==391111111111) {$hh='admin'; $sh='cts'; echo "MODIFY CONTACT";} if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} @@ -3373,6 +3420,7 @@ if ($ADD==451111111111) {$hh='admin'; $sh='tts'; echo "MODIFY TTS ENTRY";} if ($ADD==461111111111) {$hh='admin'; $sh='moh'; echo "MODIFY MUSIC ON HOLD ENTRY";} if ($ADD==471111111111) {$hh='admin'; $sh='vm'; echo "MODIFY VOICEMAIL BOX";} if ($ADD==481111111111) {$hh='admin'; $sh='label'; echo "MODIFY SCREEN LABEL";} +if ($ADD==491111111111) {$hh='admin'; $sh='cts'; echo "MODIFY CONTACT";} if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} @@ -3406,6 +3454,7 @@ if ($ADD==551111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRY";} if ($ADD==561111111111) {$hh='admin'; $sh='moh'; echo "DELETE MUSIC ON HOLD ENTRY";} if ($ADD==571111111111) {$hh='admin'; $sh='vm'; echo "DELETE VOICEMAIL BOX";} if ($ADD==581111111111) {$hh='admin'; $sh='label'; echo "DELETE SCREEN LABEL";} +if ($ADD==591111111111) {$hh='admin'; $sh='cts'; echo "DELETE CONTACT";} if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} if ($ADD==6) {$hh='users'; echo "Delete User";} @@ -3442,6 +3491,7 @@ if ($ADD==651111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRY";} if ($ADD==661111111111) {$hh='admin'; $sh='moh'; echo "DELETE MUSIC ON HOLD ENTRY";} if ($ADD==671111111111) {$hh='admin'; $sh='vm'; echo "DELETE VOICEMAIL BOX";} if ($ADD==681111111111) {$hh='admin'; $sh='label'; echo "DELETE SCREEN LABEL";} +if ($ADD==691111111111) {$hh='admin'; $sh='cts'; echo "DELETE CONTACT";} if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} if ($ADD==73) {$hh='campaigns'; echo "Dialable Lead Count";} @@ -3480,6 +3530,7 @@ if ($ADD==150000000000) {$hh='admin'; $sh='tts'; echo "TTS ENTRY LIST";} if ($ADD==160000000000) {$hh='admin'; $sh='moh'; echo "MUSIC ON HOLD ENTRY LIST";} if ($ADD==170000000000) {$hh='admin'; $sh='vm'; echo "VOICEMAIL BOXES LIST";} if ($ADD==180000000000) {$hh='admin'; $sh='label'; echo "SCREEN LABELS LIST";} +if ($ADD==190000000000) {$hh='admin'; $sh='cts'; echo "CONTACTS LIST";} if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "CONFERENCE LIST";} if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL CONFERENCE LIST";} if ($ADD==550) {$hh='users'; echo "Search Form";} @@ -4150,6 +4201,11 @@ if ($ADD==99999)
Allow Alerts - This field gives you the ability to allow agent browser alerts to be enabled by the agent for when calls come into their vicidial.php session. Default is 0 for NO. +
+ +
+ Preset Contact Search - If the user is logged into a campaign that has Transfer Presets set to CONTACTS, then this setting can disable contact searching for this user only. Default is NOT_ACTIVE which will use whatever the campaign setting is. +

@@ -4972,7 +5028,7 @@ if ($ADD==99999)

- Custom 3-Way Button Transfer - This option will add a Custom Transfer button to the agent screen below the Transfer-Conf button that will allow one click three way calls using the selected preset or field. The PRESET_ options will place calls using the defined preset value. The FIELD_ options will place calls using the number in the selected field from the lead. DISABLED will not show the button on the agent screen. The PARK_ options will park the customer before dialing. Default is DISABLED. + Custom 3-Way Button Transfer - This option will add a Custom Transfer button to the agent screen below the Transfer-Conf button that will allow one click three way calls using the selected preset or field. The PRESET_ options will place calls using the defined preset value. The FIELD_ options will place calls using the number in the selected field from the lead. DISABLED will not show the button on the agent screen. The PARK_ options will park the customer before dialing. Default is DISABLED. The VIEW_PRESET option will simply open the transfer frame and the preset frame. The VIEW_CONTACTS option will open a contacts search window, this will only work if Enable Presets is set to CONTACTS.
@@ -4982,7 +5038,12 @@ if ($ADD==99999)

- Enable Transfer Presets - This option will enable the Presets sub menu to appear at the top of the Campaign Modification page, and also you will have the ability to specify Preset dialing numbers for Agents to use in the Transfer-Conference frame of the agent interface. Default is DISABLED. + Enable Transfer Presets - This option will enable the Presets sub menu to appear at the top of the Campaign Modification page, and also you will have the ability to specify Preset dialing numbers for Agents to use in the Transfer-Conference frame of the agent interface. Default is DISABLED. CONTACTS is an option only if contact_information is enabled on your system, that is a custom feature. + +
+
+
+ Enable Transfer Presets - This option will enable the Presets sub menu to appear at the top of the Campaign Modification page, and also you will have the ability to specify Preset dialing numbers for Agents to use in the Transfer-Conference frame of the agent interface. Default is DISABLED. CONTACTS is an option only if contact_information is enabled on your system, that is a custom feature.
@@ -7797,6 +7858,12 @@ if ($ADD==99999)
Enable Remote Agent Extension Overrides - This setting enables DIDs to have extension overrides for remote agent routed calls through in-groups. Default is 0 for disabled. +
+
+ +
+ Contacts Enabled - This setting enables the Contacts sub-section in Admin which allows a manager to add modify or delete contacts in the system that can be used as part of a Custom Transfer in a campaign where an agent can search for contacts by first name last name or office number and then select one of many numbers associated with that contact. This feature is often used by operators or in switchboard functions where the user would need to transfer a call to a non-agent phone. Default is 0 for disabled. +

@@ -10233,6 +10300,39 @@ if ($ADD==181111111111) } +###################### +# ADD=191111111111 display the ADD NEW CONTACT SCREEN +###################### + +if ($ADD==191111111111) + { + if ( ($LOGmodify_servers==1) or ($LOGmodify_contacts==1) ) + { + echo "
\n"; + echo ""; + + echo "
ADD NEW SCREEN LABEL
\n"; + echo "\n"; + echo "
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
First Name: $NWB#contact_information$NWE
Last Name: $NWB#contact_information$NWE
Office Number: $NWB#contact_information$NWE
Cell Number: $NWB#contact_information$NWE
Other Number 1: $NWB#contact_information$NWE
Other Number 2: $NWB#contact_information$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + ###################### # ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN ###################### @@ -10665,7 +10765,7 @@ if ($ADD=="2A") $stmt="UPDATE system_settings SET auto_user_add_value='$user';"; $rslt=mysql_query($stmt, $link); } - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,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) 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 from vicidial_users where user=\"$source_user_id\";"; + $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) 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 from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";"; @@ -12963,6 +13063,50 @@ if ($ADD==281111111111) } +###################### +# ADD=291111111111 adds new contact to the system +###################### + +if ($ADD==291111111111) + { + if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) ) + { + $linkALT=mysql_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass"); + mysql_select_db("$SSalt_log_dbname", $linkALT); + } + 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_query($stmt, $linkALT); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CONTACT NOT ADDED - there is already a contact in the system with this name and number\n";} + else + { + if (strlen($last_name) < 2) + {echo "
CONTACT NOT ADDED - Please go back and look at the data you entered\n";} + else + { + echo "
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';"; + $rslt=mysql_query($stmt, $linkALT); + $contact_id = mysql_insert_id($linkALT); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='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_query($stmt, $link); + } + } + $ADD=391111111111; + } + + ###################### # ADD=2111111111111 adds new conference to the system ###################### @@ -13191,7 +13335,7 @@ if ($ADD=="4A") } echo "
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',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',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' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',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' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -13434,7 +13578,7 @@ if ($ADD=="4B") } echo "
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',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',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' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts',agent_choose_territories='$agent_choose_territories',custom_one='$custom_one',custom_two='$custom_two',custom_three='$custom_three',custom_four='$custom_four',custom_five='$custom_five',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' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -16393,6 +16537,50 @@ if ($ADD==481111111111) } +###################### +# 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 "
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=mysql_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass"); + mysql_select_db("$SSalt_log_dbname", $linkALT); + } + 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' where contact_id='$contact_id';"; + $rslt=mysql_query($stmt, $linkALT); + + echo "
CONTACT MODIFIED: $contact_id\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='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_query($stmt, $link); + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=391111111111; # go to contact entry modification form below + } + + ###################### # ADD=4111111111111 modify conference record in the system ###################### @@ -16500,7 +16688,7 @@ if ($ADD==411111111111111) } $tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value); - $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',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',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',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';"; + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',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',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',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';"; $rslt=mysql_query($stmt, $link); if ($reload_dialplan_on_servers > 0) @@ -17344,6 +17532,28 @@ if ($ADD==581111111111) } +###################### +# ADD=591111111111 confirmation before deletion of contact record +###################### + +if ($ADD==591111111111) + { + echo ""; + + if (strlen($contact_id) < 1) + { + echo "
CONTACT NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Contact ID must be at least 1 character in length\n"; + } + else + { + echo "
CONTACT DELETION CONFIRMATION: $contact_id - $first_name - $last_name\n"; + echo "

Click here to delete contact $contact_id - $first_name - $last_name


\n"; + } + $ADD='391111111111'; # go to contact entry modification below + } + + ###################### # ADD=5111111111111 confirmation before deletion of conference record ###################### @@ -18981,6 +19191,46 @@ if ($ADD==681111111111) } +###################### +# ADD=691111111111 delete contact record +###################### + +if ($ADD==691111111111) + { + echo ""; + + if ( (strlen($contact_id) < 1) or ($CoNfIrM != 'YES') ) + { + echo "
CONTACT NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Contact ID 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=mysql_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass"); + mysql_select_db("$SSalt_log_dbname", $linkALT); + } + else + {$linkALT = $link;} + $stmt="DELETE from contact_information where contact_id='$contact_id';"; + $rslt=mysql_query($stmt, $linkALT); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='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_query($stmt, $link); + + echo "
CONTACT DELETION COMPLETED: $contact_id\n"; + echo "

\n"; + } + $ADD='190000000000'; # go to contacts entry list + } + + ###################### # ADD=6111111111111 delete conference record ###################### @@ -19078,7 +19328,7 @@ if ($ADD==3) echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -30457,6 +30783,51 @@ if ($ADD==180000000000) } +###################### +# ADD=190000000000 display all contacts entries +###################### +if ($ADD==190000000000) + { + 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 from vicidial_users where user='$user';"; + $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 from vicidial_users where user='$user';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $user_id = $row[0]; @@ -19172,7 +19422,8 @@ if ($ADD==3) $modify_audiostore = $row[90]; $modify_moh = $row[91]; $modify_tts = $row[92]; - + $preset_contact_search = $row[93]; + $modify_contacts = $row[94]; if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -19282,6 +19533,8 @@ if ($ADD==3) echo "
Allow Alerts: $NWB#vicidial_users-allow_alerts$NWE
Preset Contact Search: $NWB#vicidial_users-preset_contact_search$NWE
Campaign Ranks: $NWB#vicidial_users-campaign_ranks$NWE
\n"; echo "\n"; echo "$RANKcampaigns_list"; @@ -19376,6 +19629,7 @@ if ($ADD==3) echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -20431,13 +20685,13 @@ if ($ADD==31) echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; @@ -28068,6 +28322,75 @@ if ($ADD==381111111111) } + +###################### +# 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 "
Modify Audio Store: $NWB#vicidial_users-modify_sections$NWE
Modify Music On Hold: $NWB#vicidial_users-modify_sections$NWE
Modify TTS: $NWB#vicidial_users-modify_sections$NWE
Modify Contacts: $NWB#vicidial_users-modify_sections$NWE
CallCard Access: $NWB#vicidial_users-modify_sections$NWE
Agent API Access: $NWB#vicidial_users-vdc_agent_api_access$NWE
Transfer-Conf Number 5: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE
Enable Transfer Presets: $NWB#vicidial_campaigns-enable_xfer_presets$NWE
Enable Transfer Presets: $NWB#vicidial_campaigns-enable_xfer_presets$NWE
Hide Transfer Number to Dial: $NWB#vicidial_campaigns-hide_xfer_number_to_dial$NWE
Quick Transfer Button: $NWB#vicidial_campaigns-quick_transfer_button$NWE
Custom 3-Way Button Transfer: $NWB#vicidial_campaigns-custom_3way_button_transfer$NWE
Custom 3-Way Button Transfer: $NWB#vicidial_campaigns-custom_3way_button_transfer$NWE
PrePopulate Transfer Preset: $NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE
\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=mysql_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass"); + mysql_select_db("$SSalt_log_dbname", $linkALT); + } + else + {$linkALT = $link;} + $stmt="SELECT first_name,last_name,office_num,cell_num,other_num1,other_num2 from contact_information where contact_id='$contact_id';"; + $rslt=mysql_query($stmt, $linkALT); + $row=mysql_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]; + + echo "
MODIFY CONTACT: $tts_id\n"; + echo "\n"; + echo "\n"; + + echo "
First Name: $NWB#contact_information$NWE
Last Name: $NWB#contact_information$NWE
Office Number: $NWB#contact_information$NWE
Cell Number: $NWB#contact_information$NWE
Other Number 1: $NWB#contact_information$NWE
Other Number 2: $NWB#contact_information$NWE
\n"; + + echo "
\n"; + + + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONTACT\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin changes to this contact\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + + + ###################### # ADD=3111111111111 modify conference record in the system ###################### @@ -28202,7 +28525,7 @@ if ($ADD==311111111111111) $row=mysql_fetch_row($rslt); $vicidial_nanpa_prefix_codes_count = $row[0]; - $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 from system_settings;"; + $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 from system_settings;"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $version = $row[0]; @@ -28309,6 +28632,7 @@ if ($ADD==311111111111111) $pllb_grouping_limit = $row[101]; $did_ra_extensions_enabled = $row[102]; $expanded_list_stats = $row[103]; + $contacts_enabled = $row[104]; echo "
MODIFY VICIDIAL SYSTEM SETTINGS\n"; echo "\n"; @@ -28486,6 +28810,8 @@ if ($ADD==311111111111111) echo "
Enable Remote Agent Extension Overrides: $NWB#settings-did_ra_extensions_enabled$NWE
Enable Contacts: $NWB#settings-contacts_enabled$NWE
First Login Trigger: $first_login_trigger   $NWB#settings-first_login_trigger$NWE
Default Phone Registration Password: $NWB#settings-default_phone_registration_password$NWE     Strength:
> @@ -1388,6 +1391,14 @@ $SScustom_fields_enabled = $row[3]; 0) + { ?> + > + + + @@ -1474,6 +1485,10 @@ $SScustom_fields_enabled = $row[3]; ?> > 1) { + ?> + > + 1) and (!eregi('campaign',$hh) ) ) { ?> >
\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=mysql_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass"); + mysql_select_db("$SSalt_log_dbname", $linkALT); + } + else + {$linkALT = $link;} + $stmt="SELECT contact_id,first_name,last_name,office_num from contact_information order by first_name,last_name,office_num limit 20000;"; + $rslt=mysql_query($stmt, $linkALT); + $lb_to_print = mysql_num_rows($rslt); + + echo "
Contacts:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + + $o=0; + while ($lb_to_print > $o) + { + $row=mysql_fetch_row($rslt); + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo "\n"; + $o++; + } + + echo "
NAMEOffice NumberMODIFY
$row[1] $row[2]$row[3]MODIFY
\n"; + } + + ###################### # ADD=1000000000000 display all conferences ###################### @@ -31179,6 +31550,10 @@ if ($ADD==999998) { echo "
  • CallCard Admin \n"; } + if ($SScontacts_enabled > 0) + { + echo "
  • Contacts \n"; + } echo "\n"; echo "
  •   \n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php index c98c282f..0df13de6 100644 --- a/agc_2-X/trunk/www/vicidial/admin_header.php +++ b/agc_2-X/trunk/www/vicidial/admin_header.php @@ -33,6 +33,7 @@ # 110624-1439 - Added Screen Labels sub-section to Admin # 110831-2048 - Added AC-CID to campaign submenu # 110922-1707 - Added RA-EXTEN to campaign submenu +# 111015-2305 - Added Contacts menu to Admin # @@ -1338,6 +1339,8 @@ $SScustom_fields_enabled = $row[3]; else {$tts_sh=''; $tts_fc='BLACK';} if ($sh=='cc') {$cc_sh="bgcolor=\"$cc_color\""; $cc_fc="$cc_font";} else {$cc_sh=''; $cc_fc='BLACK';} + if ($sh=='cts') {$cts_sh="bgcolor=\"$cts_color\""; $cts_fc="$cc_font";} + else {$cts_sh=''; $cts_fc='BLACK';} ?>
    >   + SIZE=> Contacts
      > Screen Labels   |   > Add A Screen Label
      > Contacts   |   > Add A Contact
      > System Statuses   |   > Status Categories   |   > QC Status Codes