diff --git a/UPGRADE b/UPGRADE index 4832da11..4fcba33c 100644 --- a/UPGRADE +++ b/UPGRADE @@ -330,6 +330,11 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 77. Added "Delete Voicemail After Email" options to delete messages on the server after they have been emailed +78. Added CRM Login Popup to campaign settings to allow for a custom window to + be opened on agent login, optionally using agent and campaign variables + +79. Added 5 custom fields to the user settings + diff --git a/docs/AGENT_API.txt b/docs/AGENT_API.txt index d2a1a8ae..2abc6c9a 100644 --- a/docs/AGENT_API.txt +++ b/docs/AGENT_API.txt @@ -1,4 +1,4 @@ -AGENT API DOCUMENT 2008-07-03 +AGENT API DOCUMENT Started: 2008-07-03 This document describes the functions of an API(Application Programming Interface) for the VICIDIAL Agent screen. This functionality will be rather limited at first @@ -16,6 +16,9 @@ external_status - sends command to set the disposition for one specific agent an external_pause - sends command to pause/resume an agent now if not on a call, or pause after their next call if on call external_dial - sends command to manually dial a number on the agent's screen change_ingroups - changes the selected in-groups for a logged-in agent +st_login_log - looks up the vicidial_users.custom_three field and logs event from CRM +st_get_agent_active_lead - looks up active lead info for an agent and outputs lead information + New scripts: @@ -29,14 +32,6 @@ Required variables for API calls: # agent_user - is the vicidial agent user whose session that you want to affect # source - description of what originated the API call (maximum 20 characters) -Example URL strings for API calls: -http://server/agc/api.php?function=version -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1 -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_status&value=A -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=RESUME -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES&preview=NO&focus=YES -http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES&preview=NO&focus=YES&dial_prefix=88&group_alias=DEFAULT To hangup the call, disposition it and then pause the agent, do the following in order: @@ -65,6 +60,9 @@ shows version and build of the API, along with the date/time VALUES: NONE +EXAMPLE URL: +http://server/agc/api.php?function=version + RESPONSES: VERSION: 2.0.5-2|BUILD: 90116-1229|DATE: 2009-01-15 14:59:33|EPOCH: 1222020803 @@ -79,8 +77,12 @@ Hangs up the current customer call on the agent screen VALUES: (value) 1 - the only valid value for this function +EXAMPLE URL: +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1 + RESPONSES: ERROR: external_hangup not valid - 1|6666 +ERROR: no user found - 6666 ERROR: agent_user is not logged in - 6666 SUCCESS: external_hangup function set - 1|6666 @@ -95,8 +97,12 @@ Sets the status of the current customer call on the agent dispotion screen VALUES: (value) Any valid status in the VICIDIAL system will work for this function +EXAMPLE URL: +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_status&value=A + RESPONSES: ERROR: external_status not valid - A|6666 +ERROR: no user found - 6666 ERROR: agent_user is not logged in - 6666 SUCCESS: external_status function set - A|6666 @@ -112,8 +118,13 @@ VALUES: (value) PAUSE - Pauses the agent session RESUME - Resumes the agent session +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=RESUME + RESPONSES: ERROR: external_pause not valid - PAUSE|6666 +ERROR: no user found - 6666 ERROR: agent_user is not logged in - 6666 SUCCESS: external_pause function set - PAUSE|1232020456|6666 @@ -147,15 +158,22 @@ group_alias - OPTIONAL, the outbound callerID(from an existing group-alias) that you want to use for this call vtiger_callback - OPTIONAL, YES or NO, will lookup the phone number and Vtiger account ID from the provided Event ID +alt_user - + OPTIONAL, instead of agent_user, this is to lookup the agent_user using the vicidial_users.custom_three field + +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES&preview=NO&focus=YES +http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES&preview=NO&focus=YES&dial_prefix=88&group_alias=DEFAULT RESPONSES: ERROR: external_dial not valid - 7275551212|1|YES|6666 +ERROR: no user found - 6666 ERROR: agent_user is not logged in - 6666 ERROR: agent_user is not allowed to place manual dial calls - 6666 ERROR: caller_id_number from group_alias is not valid - 6666|TESTING|123 ERROR: group_alias is not valid - 6666|TESTING ERROR: vtiger callback activity does not exist in vtiger system - 12345 -SUCCESS: external_dial function set - 7275551212|1|YES|1232020456|6666 +SUCCESS: external_dial function set - 7275551212|6666|1|YES|NO|YES|123456|1232020456|9|TESTING|7275551211 @@ -195,6 +213,52 @@ SUCCESS: change_ingroups function set - YES| TEST_IN SALESLINE -|6666 +-------------------------------------------------------------------------------- +st_login_log - + +DESCRIPTION: +Looks up the vicidial_users.custom_three field(as "agentId") to associate with a vicidial user ID. If found it will populate the custom_four field with a "teamId" value, then output the vicidial user ID + +VALUES: +value - + REQUIRED alphanumeric string for CRM AgentID +vendor_id - + REQUIRED alphanumeric string for CRM TeamID + +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&function=st_login_log&value=876543&vendor_id=207 + +RESPONSES: +ERROR: st_login_log not valid - 6666|207 +ERROR: no user found - 6666 +SUCCESS: st_login_log user found - 6666 + + + +-------------------------------------------------------------------------------- +st_get_agent_active_lead - + +DESCRIPTION: +Looks up the vicidial_users.custom_three field(as "agentId") to associate with a vicidial user ID. If found it will output the active lead_id and phone number, vendor_lead_code, province, security_phrase and source_id fields. + +VALUES: +value - + REQUIRED alphanumeric string for CRM AgentID +vendor_id - + REQUIRED alphanumeric string for CRM TeamID + +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&function=st_get_agent_active_lead&value=876543&vendor_id=207 + +RESPONSES: +ERROR: st_get_agent_active_lead not valid - 6666|207 +ERROR: no user found - 6666 +ERROR: user not logged in - 6666 +ERROR: no active lead found - 6666 +SUCCESS: st_get_agent_active_lead lead found - 6666|7275551212|123456|9987-1234765|SK|WILLIAMS|JUH764AJJJ9 + + + diff --git a/docs/QUEUEMETRICS.txt b/docs/QUEUEMETRICS.txt index d4835cab..7cca95c3 100644 --- a/docs/QUEUEMETRICS.txt +++ b/docs/QUEUEMETRICS.txt @@ -343,7 +343,7 @@ How to install Queue Metrics on OpenSuSE v.11.1 (32 or 64 bit) with a system tha - Say yes to install, and say yes to license 3) cd /usr/src -4) wget http://queuemetrics.com/download/QueueMetrics-1.5.3-trial.tar.gz +4) wget http://queuemetrics.com/download/QueueMetrics-1.5.5-trial.tar.gz 5) mkdir tars (incase it doesn't exist) 6) tar -xzf QueueMetrics-1.5.5-trial.tar.gz 7) mv QueueMetrics-1.5.5-trial.tar.gz ./tars/ @@ -370,6 +370,8 @@ How to install Queue Metrics on OpenSuSE v.11.1 (32 or 64 bit) with a system tha 23) Go to http://:8080/QM and it should tell you the schema is old, just click next or yes to everything and have fun +24) If nothing shows up, you may need to go into 'yast' and change the firewall settings: + Security --> Firewall settings, go to allowed services, type "alt-d" and add 8080 as a new port, then save and exit diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 72479bc1..9a18a762 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -525,7 +525,12 @@ email VARCHAR(100) default '', user_code VARCHAR(100) default '', territory VARCHAR(100) default '', allow_alerts ENUM('0','1') default '0', -agent_choose_territories ENUM('0','1') default '1' +agent_choose_territories ENUM('0','1') default '1', +custom_one VARCHAR(100) default '', +custom_two VARCHAR(100) default '', +custom_three VARCHAR(100) default '', +custom_four VARCHAR(100) default '', +custom_five VARCHAR(100) default '' ); @@ -687,7 +692,9 @@ agent_display_dialable_leads ENUM('Y','N') default 'N', web_form_address_two TEXT, waitforsilence_options VARCHAR(25) default '', agent_select_territories ENUM('Y','N') default 'N', -campaign_calldate DATETIME +campaign_calldate DATETIME, +crm_popup_login ENUM('Y','N') default 'N', +crm_login_address TEXT ); CREATE TABLE vicidial_lists ( @@ -1981,7 +1988,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1186',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1187',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.2.0.sql b/extras/upgrade_2.2.0.sql index 7c122c6e..98839aae 100644 --- a/extras/upgrade_2.2.0.sql +++ b/extras/upgrade_2.2.0.sql @@ -655,3 +655,14 @@ UPDATE system_settings SET db_schema_version='1185',db_schema_update_date=NOW(); ALTER TABLE vicidial_campaigns ADD campaign_calldate DATETIME; UPDATE system_settings SET db_schema_version='1186',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_users ADD custom_one VARCHAR(100) default ''; +ALTER TABLE vicidial_users ADD custom_two VARCHAR(100) default ''; +ALTER TABLE vicidial_users ADD custom_three VARCHAR(100) default ''; +ALTER TABLE vicidial_users ADD custom_four VARCHAR(100) default ''; +ALTER TABLE vicidial_users ADD custom_five VARCHAR(100) default ''; + +ALTER TABLE vicidial_campaigns ADD crm_popup_login ENUM('Y','N') default 'N'; +ALTER TABLE vicidial_campaigns ADD crm_login_address TEXT; + +UPDATE system_settings SET db_schema_version='1187',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index a977c36f..11085d25 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -350,6 +350,12 @@ Delete Voicemail After Email|| This optional setting allows you to have the voicemail messages deleted from the system after they have been emailed out. Default is N|| Last Campaign Call Date|| This is the last time that a call was handled by an agent logged into this campaign|| +Custom User Fields|| +These five fields can be used for various purposes, and they can be populated in the web form addresses and scripts as user_custom_one and so on|| +CRM Popup Login|| +If set to Y, the CRM Popup Address is used to open a new window on agent login to this campaign. Default is N|| +CRM Popup Address|| +The web address of a CRM login page, it can have variables populated just like the web form address, with the VAR in the front and using --A--user_custom_one--B-- to define variables|| add-file: user_territories.php diff --git a/www/agc/api.php b/www/agc/api.php index 7800af9f..2529bf60 100644 --- a/www/agc/api.php +++ b/www/agc/api.php @@ -26,6 +26,7 @@ # - $blended - ('YES','NO') # - $ingroup_choices - (' TEST_IN SALESLINE -') # - $set_as_default - ('YES','NO') +# - $alt_user # CHANGELOG: # 80703-2225 - First build of script @@ -37,10 +38,11 @@ # 90508-0727 - Changed to PHP long tags # 90522-0506 - Security fix # 91130-1307 - Added change_ingroups(Manager InGroup change feature) +# 91211-1805 - Added st_login_log and st_get_agent_active_lead functions, added alt_user # -$version = '2.2.0-9'; -$build = '91130-1307'; +$version = '2.2.0-10'; +$build = '91211-1805'; require("dbconnect.php"); @@ -83,6 +85,8 @@ if (isset($_GET["ingroup_choices"])) {$ingroup_choices=$_GET["ingroup_choices" elseif (isset($_POST["ingroup_choices"])) {$ingroup_choices=$_POST["ingroup_choices"];} if (isset($_GET["set_as_default"])) {$set_as_default=$_GET["set_as_default"];} elseif (isset($_POST["set_as_default"])) {$set_as_default=$_POST["set_as_default"];} +if (isset($_GET["alt_user"])) {$alt_user=$_GET["alt_user"];} + elseif (isset($_POST["alt_user"])) {$alt_user=$_POST["alt_user"];} header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 @@ -133,6 +137,7 @@ else $pass = ereg_replace("'|\"|\\\\|;","",$pass); $source = ereg_replace("'|\"|\\\\|;","",$source); $agent_user = ereg_replace("'|\"|\\\\|;","",$agent_user); + $alt_user = ereg_replace("'|\"|\\\\|;","",$alt_user); } ### date and fixed variables @@ -248,7 +253,7 @@ if ($format=='debug') ################################################################################ if ($function == 'external_hangup') { - if ( (strlen($value)<1) || (strlen($agent_user)<1) ) + if ( (strlen($value)<1) or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) ) { $result = 'ERROR'; $result_reason = "external_hangup not valid"; @@ -258,6 +263,28 @@ if ($function == 'external_hangup') } else { + if (strlen($alt_user)>1) + { + $stmt = "select count(*) from vicidial_users where custom_three='$alt_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $agent_user = $row[0]; + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $alt_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -294,7 +321,7 @@ if ($function == 'external_hangup') ################################################################################ if ($function == 'external_status') { - if ( (strlen($value)<1) || (strlen($agent_user)<1) ) + if ( (strlen($value)<1) or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) ) { $result = 'ERROR'; $result_reason = "external_status not valid"; @@ -304,6 +331,28 @@ if ($function == 'external_status') } else { + if (strlen($alt_user)>1) + { + $stmt = "select count(*) from vicidial_users where custom_three='$alt_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $agent_user = $row[0]; + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $alt_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -340,7 +389,7 @@ if ($function == 'external_status') ################################################################################ if ($function == 'external_pause') { - if ( (strlen($value)<1) || (strlen($agent_user)<1) || (!ereg("PAUSE|RESUME",$value)) ) + if ( (strlen($value)<1) or ( (strlen($agent_user)<1) and (strlen($alt_user)<1) ) or (!ereg("PAUSE|RESUME",$value)) ) { $result = 'ERROR'; $result_reason = "external_pause not valid"; @@ -350,6 +399,28 @@ if ($function == 'external_pause') } else { + if (strlen($alt_user)>1) + { + $stmt = "select count(*) from vicidial_users where custom_three='$alt_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $agent_user = $row[0]; + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $alt_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -404,17 +475,39 @@ if ($function == 'external_dial') { $value = ereg_replace("[^0-9]","",$value); - if ( (strlen($value)<2) || (strlen($agent_user)<2) || (strlen($search)<2) || (strlen($preview)<2) || (strlen($focus)<2) ) + if ( (strlen($value)<2) or ( (strlen($agent_user)<2) and (strlen($alt_user)<2) ) or (strlen($search)<2) or (strlen($preview)<2) or (strlen($focus)<2) ) { $result = 'ERROR'; $result_reason = "external_dial not valid"; $data = "$phone_code|$search|$preview|$focus"; - echo "$result: $result_reason - $value|$data|$agent_user\n"; + echo "$result: $result_reason - $value|$data|$agent_user|$alt_user\n"; api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); exit; } else { + if (strlen($alt_user)>1) + { + $stmt = "select count(*) from vicidial_users where custom_three='$alt_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $agent_user = $row[0]; + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $alt_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -841,6 +934,152 @@ if ($function == 'change_ingroups') + +################################################################################ +### BEGIN - st_login_log - looks up vicidial_users.custom_three from a CRM +################################################################################ +if ($function == 'st_login_log') + { + if ( (strlen($value)<1) or (strlen($vendor_id)<1) ) + { + $result = 'ERROR'; + $result_reason = "st_login_log not valid"; + $data = "$value|$vendor_id"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + else + { + $stmt = "select count(*) from vicidial_users where custom_three='$value';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$value' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $stmt="UPDATE vicidial_users set custom_four='$vendor_id' where user='$row[0]';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $result = 'SUCCESS'; + $result_reason = "st_login_log user found"; + $data = "$row[0]"; + echo "$result: $result_reason - $row[0]\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $value\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + } +################################################################################ +### END - st_login_log +################################################################################ + + + + +################################################################################ +### BEGIN - st_get_agent_active_lead - looks up vicidial_users.custom_three and output active lead info +################################################################################ +if ($function == 'st_get_agent_active_lead') + { + if ( (strlen($value)<1) or (strlen($vendor_id)<1) ) + { + $result = 'ERROR'; + $result_reason = "st_get_agent_active_lead not valid"; + $data = "$value|$vendor_id"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + else + { + $stmt = "select count(*) from vicidial_users where custom_three='$value';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select user from vicidial_users where custom_three='$value' order by user;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $VC_user = $row[0]; + + $stmt = "select count(*) from vicidial_live_agents where user='$VC_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select lead_id from vicidial_live_agents where user='$VC_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $lead_id = $row[0]; + + if ($lead_id > 0) + { + $stmt = "select phone_number,vendor_lead_code,province,security_phrase,source_id from vicidial_list where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $phone_number = $row[0]; + $vendor_lead_code = $row[1]; + $province = $row[2]; + $security_phrase = $row[3]; + $source_id = $row[4]; + + $result = 'SUCCESS'; + $result_reason = "st_get_agent_active_lead lead found"; + $data = "$VC_user|$phone_number|$lead_id|$vendor_lead_code|$province|$security_phrase|$source_id"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + else + { + $result = 'ERROR'; + $result_reason = "no active lead found"; + echo "$result: $result_reason - $VC_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + else + { + $result = 'ERROR'; + $result_reason = "user not logged in"; + echo "$result: $result_reason - $VC_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + else + { + $result = 'ERROR'; + $result_reason = "no user found"; + echo "$result: $result_reason - $value\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + } +################################################################################ +### END - st_get_agent_active_lead +################################################################################ + + + + + if ($format=='debug') { $ENDtime = date("U"); @@ -853,9 +1092,6 @@ exit; - - - ##### FUNCTIONS ##### ##### Logging ##### @@ -864,7 +1100,6 @@ function api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$val if ($api_logging > 0) { $NOW_TIME = date("Y-m-d H:i:s"); - # api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); $stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$agent_user',function='$function',value='$value',result='$result',result_reason='$result_reason',source='$source',data='$data',api_date='$NOW_TIME',api_script='$api_script';"; $rslt=mysql_query($stmt, $link); } diff --git a/www/agc/vdc_script_display.php b/www/agc/vdc_script_display.php index e23149c3..13775bab 100644 --- a/www/agc/vdc_script_display.php +++ b/www/agc/vdc_script_display.php @@ -9,10 +9,11 @@ # 90824-1435 - First build of script # 90827-1548 - Added list override script option # 91204-1913 - Added recording_filename and recording_id variables +# 91211-1103 - Added user_custom_... variables # -$version = '2.2.0-3'; -$build = '91204-1913'; +$version = '2.2.0-4'; +$build = '91211-1103'; require("dbconnect.php"); @@ -132,6 +133,16 @@ if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_fi elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];} if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];} elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];} +if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];} + elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];} +if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];} + elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];} +if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];} + elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];} +if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];} + elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];} +if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];} + elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];} if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];} elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];} @@ -159,14 +170,12 @@ $stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_l $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; $timeclock_end_of_day = $row[1]; $agentonly_callback_campaign_lock = $row[2]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -302,6 +311,11 @@ if (eregi("iframe src",$script_text)) $fullname = eregi_replace(' ','+',$fullname); $recording_filename = eregi_replace(' ','+',$recording_filename); $recording_id = eregi_replace(' ','+',$recording_id); + $user_custom_one = eregi_replace(' ','+',$user_custom_one); + $user_custom_two = eregi_replace(' ','+',$user_custom_two); + $user_custom_three = eregi_replace(' ','+',$user_custom_three); + $user_custom_four = eregi_replace(' ','+',$user_custom_four); + $user_custom_five = eregi_replace(' ','+',$user_custom_five); } $script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text); @@ -362,6 +376,11 @@ $script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_ $script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text); $script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text); $script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text); +$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text); +$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text); +$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); +$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); +$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); $script_text = eregi_replace("\n","
",$script_text); $script_text = stripslashes($script_text); diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 7299632a..897c5c13 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -264,10 +264,11 @@ # 91204-1638 - Added recording_filename and recording_id script variables and script refresh link # 91205-2055 - Added CONSULTATIVE checkbox in a redesigned Transfer-Conf frame # 91206-2020 - Fixed vicidial_agent_log logging bug on logout when not paused +# 91211-1412 - Added User custom variables and CRM login popup # -$version = '2.2.0-242'; -$build = '91206-2020'; +$version = '2.2.0-243'; +$build = '91211-1412'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -802,7 +803,7 @@ $VDloginDISPLAY=0; $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 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 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); @@ -825,6 +826,11 @@ $VDloginDISPLAY=0; $VU_allow_alerts = $row[16]; $VU_closer_campaigns = $row[17]; $VU_agent_choose_territories = $row[18]; + $VU_custom_one = $row[19]; + $VU_custom_two = $row[20]; + $VU_custom_three = $row[21]; + $VU_custom_four = $row[22]; + $VU_custom_five = $row[23]; if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';} else {$VU_alert_enabled = 'OFF';} @@ -1091,7 +1097,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1152,6 +1158,8 @@ $VDloginDISPLAY=0; $agent_display_dialable_leads = $row[53]; $web_form_address_two = $row[54]; $agent_select_territories = $row[55]; + $crm_popup_login = $row[56]; + $crm_login_address = $row[57]; if ($user_territories_active < 1) {$agent_select_territories = 0;} @@ -2610,6 +2618,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var delayed_script_load=''; var script_recording_delay=''; var VDRP_stage='PAUSED'; + var VU_custom_one = ''; + var VU_custom_two = ''; + var VU_custom_three = ''; + var VU_custom_four = ''; + var VU_custom_five = ''; + var crm_popup_login = ''; + var crm_login_address = ''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -4836,6 +4851,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -4919,6 +4939,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -5024,6 +5049,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -5398,6 +5428,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6078,6 +6113,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6161,6 +6201,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6249,6 +6294,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6418,6 +6468,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -6531,6 +6586,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&fullname=" + LOGfullname + '' + "&recording_filename=" + recording_filename + '' + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -8072,7 +8132,7 @@ else // ################################################################################ -// decode the scripttext and scriptname so that it can be didsplayed +// decode the scripttext and scriptname so that it can be displayed function URLDecode(encodedvar,scriptformat) { // Replace %ZZ with equivalent character @@ -8144,6 +8204,11 @@ encoded=utf8_decode(xtest); var SCscript_height = script_height; var SCrecording_filename = recording_filename; var SCrecording_id = recording_id; + var SCuser_custom_one = VU_custom_one; + var SCuser_custom_two = VU_custom_two; + var SCuser_custom_three = VU_custom_three; + var SCuser_custom_four = VU_custom_four; + var SCuser_custom_five = VU_custom_five; var SCweb_vars = LIVE_web_vars; if (encoded.match(RGiframe)) @@ -8199,6 +8264,11 @@ encoded=utf8_decode(xtest); SCscript_height = SCscript_height.replace(RGplus,'+'); SCrecording_filename = SCrecording_filename.replace(RGplus,'+'); SCrecording_id = SCrecording_id.replace(RGplus,'+'); + SCuser_custom_one = SCuser_custom_one.replace(RGplus,'+'); + SCuser_custom_two = SCuser_custom_two.replace(RGplus,'+'); + SCuser_custom_three = SCuser_custom_three.replace(RGplus,'+'); + SCuser_custom_four = SCuser_custom_four.replace(RGplus,'+'); + SCuser_custom_five = SCuser_custom_five.replace(RGplus,'+'); SCweb_vars = SCweb_vars.replace(RGplus,'+'); } @@ -8255,6 +8325,11 @@ encoded=utf8_decode(xtest); var RGscript_height = new RegExp("--A--script_height--B--","g"); var RGrecording_filename = new RegExp("--A--recording_filename--B--","g"); var RGrecording_id = new RegExp("--A--recording_id--B--","g"); + var RGuser_custom_one = new RegExp("--A--user_custom_one--B--","g"); + var RGuser_custom_two = new RegExp("--A--user_custom_two--B--","g"); + var RGuser_custom_three = new RegExp("--A--user_custom_three--B--","g"); + var RGuser_custom_four = new RegExp("--A--user_custom_four--B--","g"); + var RGuser_custom_five = new RegExp("--A--user_custom_five--B--","g"); var RGweb_vars = new RegExp("--A--web_vars--B--","g"); encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code); @@ -8310,6 +8385,11 @@ encoded=utf8_decode(xtest); encoded = encoded.replace(RGscript_height, SCscript_height); encoded = encoded.replace(RGrecording_filename, SCrecording_filename); encoded = encoded.replace(RGrecording_id, SCrecording_id); + encoded = encoded.replace(RGuser_custom_one, SCuser_custom_one); + encoded = encoded.replace(RGuser_custom_two, SCuser_custom_two); + encoded = encoded.replace(RGuser_custom_three, SCuser_custom_three); + encoded = encoded.replace(RGuser_custom_four, SCuser_custom_four); + encoded = encoded.replace(RGuser_custom_five, SCuser_custom_five); encoded = encoded.replace(RGweb_vars, SCweb_vars); } decoded=encoded; // simple no ? @@ -9014,6 +9094,17 @@ else VtigeRwin.blur(); } + if ( (crm_popup_login == 'Y') && (crm_login_address.length > 4) ) + { + var regWFAcustom = new RegExp("^VAR","ig"); + URLDecode(crm_login_address,'YES'); + var TEMP_crm_login_address = decoded; + TEMP_crm_login_address = TEMP_crm_login_address.replace(regWFAcustom, ''); + + CRMwin = window.open(TEMP_crm_login_address, 'CRMwin,toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=700,height=480'); + + CRMwin.blur(); + } if (INgroupCOUNT > 0) { HidEGenDerPulldown(); diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 4dde147e..d8f6ed3f 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1135,6 +1135,20 @@ if (isset($_GET["carrier_description"])) {$carrier_description=$_GET["carrier_ elseif (isset($_POST["carrier_description"])) {$carrier_description=$_POST["carrier_description"];} if (isset($_GET["delete_vm_after_email"])) {$delete_vm_after_email=$_GET["delete_vm_after_email"];} elseif (isset($_POST["delete_vm_after_email"])) {$delete_vm_after_email=$_POST["delete_vm_after_email"];} +if (isset($_GET["custom_one"])) {$custom_one=$_GET["custom_one"];} + elseif (isset($_POST["custom_one"])) {$custom_one=$_POST["custom_one"];} +if (isset($_GET["custom_two"])) {$custom_two=$_GET["custom_two"];} + elseif (isset($_POST["custom_two"])) {$custom_two=$_POST["custom_two"];} +if (isset($_GET["custom_three"])) {$custom_three=$_GET["custom_three"];} + elseif (isset($_POST["custom_three"])) {$custom_three=$_POST["custom_three"];} +if (isset($_GET["custom_four"])) {$custom_four=$_GET["custom_four"];} + elseif (isset($_POST["custom_four"])) {$custom_four=$_POST["custom_four"];} +if (isset($_GET["custom_five"])) {$custom_five=$_GET["custom_five"];} + elseif (isset($_POST["custom_five"])) {$custom_five=$_POST["custom_five"];} +if (isset($_GET["crm_popup_login"])) {$crm_popup_login=$_GET["crm_popup_login"];} + elseif (isset($_POST["crm_popup_login"])) {$crm_popup_login=$_POST["crm_popup_login"];} +if (isset($_GET["crm_login_address"])) {$crm_login_address=$_GET["crm_login_address"];} + elseif (isset($_POST["crm_login_address"])) {$crm_login_address=$_POST["crm_login_address"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -1152,8 +1166,7 @@ $stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integrat $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysql_num_rows($rslt); -$i=0; -while ($i < $qm_conf_ct) +if ($qm_conf_ct > 0) { $row=mysql_fetch_row($rslt); $non_latin = $row[0]; @@ -1164,7 +1177,6 @@ while ($i < $qm_conf_ct) $SSsounds_central_control_active = $row[5]; $SSenable_second_webform = $row[6]; $SSuser_territories_active = $row[7]; - $i++; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -1403,6 +1415,7 @@ if ($non_latin < 1) $active_agent_login_server = ereg_replace("[^NY]","",$active_agent_login_server); $agent_select_territories = ereg_replace("[^NY]","",$agent_select_territories); $delete_vm_after_email = ereg_replace("[^NY]","",$delete_vm_after_email); + $crm_popup_login = ereg_replace("[^NY]","",$crm_popup_login); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); $active = ereg_replace("[^0-9NY]","",$active); @@ -1691,6 +1704,11 @@ if ($non_latin < 1) $vtiger_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_dbname); $vtiger_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_login); $vtiger_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_pass); + $custom_one = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_one); + $custom_two = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_two); + $custom_three = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_three); + $custom_four = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_four); + $custom_five = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$custom_five); ### NUMERIC and comma and pipe $waitforsilence_options = ereg_replace("[^\|\,0-9]","",$waitforsilence_options); @@ -1739,6 +1757,7 @@ if ($non_latin < 1) # $qc_web_form_address # $vtiger_url # $web_form_address_two + # $crm_login_address ### VARIABLES not filtered at all ### # $script_text @@ -1995,11 +2014,12 @@ else # 91204-1652 - Added recording_filename and recording_id as script variables # 91205-2231 - Added delete_vm_after_email voicemail option to phones and extra voicemail sections # 91210-2038 - Added better logging of Campaign emergency logout +# 91211-1359 - Added custom user fields and campaign CRM login fields # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-227'; -$build = '91210-2038'; +$admin_version = '2.2.0-228'; +$build = '91211-1359'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2076,14 +2096,14 @@ $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) +if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; exit; } - else +else { if($auth>0) { @@ -3086,6 +3106,11 @@ if ($ADD==99999)
Agent Alter Customer Phone Override - This option will override whatever the option is in the campaign for altering of customer phone number. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer phone number, no matter what the campaign setting is. Default is NOT_ACTIVE. +
+ +
+ Custom User Fields - These five fields can be used for various purposes, and they can be populated in the web form addresses and scripts as user_custom_one and so on. +

@@ -3912,6 +3937,16 @@ if ($ADD==99999)
Vtiger Status Call - If Vtiger integration is enabled in the system settings then this setting will define whether the status of the Vtiger Account will be updated with the status of the VICIDIAL call after it has been dispositioned. Default is N. +
+
+
+ CRM Popup Login - If set to Y, the CRM Popup Address is used to open a new window on agent login to this campaign. Default is N. + +
+
+
+ CRM Popup Address - The web address of a CRM login page, it can have variables populated just like the web form address, with the VAR in the front and using --A--user_custom_one--B-- to define variables. +

@@ -6064,6 +6099,11 @@ if ($ADD==7111111) $script_height = '400'; $recording_filename = '20091204-1639_6666_7275551212'; $recording_id = '1235'; + $user_custom_one = 'custom one'; + $user_custom_two = 'custom two'; + $user_custom_three = 'custom three'; + $user_custom_four = 'custom four'; + $user_custom_five = 'custom five'; echo "\n"; echo "\n"; @@ -6125,6 +6165,11 @@ if ($ADD==7111111) $script_height = eregi_replace(' ','+',$script_height); $recording_filename = eregi_replace(' ','+',$recording_filename); $recording_id = eregi_replace(' ','+',$recording_id); + $user_custom_one = eregi_replace(' ','+',$user_custom_one); + $user_custom_two = eregi_replace(' ','+',$user_custom_two); + $user_custom_three = eregi_replace(' ','+',$user_custom_three); + $user_custom_four = eregi_replace(' ','+',$user_custom_four); + $user_custom_five = eregi_replace(' ','+',$user_custom_five); } $script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text); @@ -6175,6 +6220,11 @@ if ($ADD==7111111) $script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text); $script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text); $script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text); + $script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text); + $script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text); + $script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text); + $script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text); + $script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text); $script_text = eregi_replace("\n","
",$script_text); @@ -8162,7 +8212,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) 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 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) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";"; @@ -8477,7 +8527,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -10265,7 +10315,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' 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' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -10498,7 +10548,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' 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' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -11069,7 +11119,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -15410,7 +15460,7 @@ if ($ADD==3) 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 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 from vicidial_users where user='$user';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $user_id = $row[0]; @@ -15482,6 +15532,11 @@ if ($ADD==3) $territory = $row[68]; $allow_alerts = $row[69]; $agent_choose_territories = $row[70]; + $user_custom_one = $row[71]; + $user_custom_two = $row[72]; + $user_custom_three = $row[73]; + $user_custom_four = $row[74]; + $user_custom_five = $row[75]; if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -15589,6 +15644,13 @@ if ($ADD==3) echo "$RANKgroups_list"; echo "
\n"; echo "\n"; + + echo "Custom 1: $NWB#vicidial_users-custom_one$NWE\n"; + echo "Custom 2: $NWB#vicidial_users-custom_two$NWE\n"; + echo "Custom 3: $NWB#vicidial_users-custom_three$NWE\n"; + echo "Custom 4: $NWB#vicidial_users-custom_four$NWE\n"; + echo "Custom 5: $NWB#vicidial_users-custom_five$NWE\n"; + if ($SSqc_features_active > 0) { echo "QC Enabled: $NWB#vicidial_users-qc_enabled$NWE\n"; @@ -15711,7 +15773,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate from vicidial_campaigns where campaign_id='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -15842,6 +15904,8 @@ if ($ADD==31) $waitforsilence_options = $row[129]; $agent_select_territories = $row[130]; $campaign_calldate = $row[131]; + $crm_popup_login = $row[132]; + $crm_login_address = $row[133]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -16624,6 +16688,10 @@ if ($ADD==31) echo "\n"; } + echo "CRM Popup Login: $NWB#vicidial_campaigns-crm_popup_login$NWE\n"; + + echo "CRM Popup Address: $NWB#vicidial_campaigns-crm_login_address$NWE\n"; + if ($campaign_allow_inbound == 'Y') { echo "Allowed Inbound Groups:
"; @@ -16644,40 +16712,40 @@ if ($ADD==31) echo "\n"; } - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; - echo "
\n"; + echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - if ($SSoutbound_autodial_active > 0) - { - echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE\n"; + if ($SSoutbound_autodial_active > 0) + { + echo "
LISTS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_lists$NWE\n"; - echo "
\n"; - echo ""; + echo "\n"; echo "
\n"; + echo ""; - $LISTlink='stage=LISTIDDOWN'; - $TALLYlink='stage=TALLYDOWN'; - $ACTIVElink='stage=ACTIVEDOWN'; - $CAMPAIGNlink='stage=CAMPAIGNDOWN'; - $CALLDATElink='stage=CALLDATEDOWN'; - $SQLorder='order by list_id'; - if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} - if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} - if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} - if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} - if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} - if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} - if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} - if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} - if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} - if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';} + $LISTlink='stage=LISTIDDOWN'; + $TALLYlink='stage=TALLYDOWN'; + $ACTIVElink='stage=ACTIVEDOWN'; + $CAMPAIGNlink='stage=CAMPAIGNDOWN'; + $CALLDATElink='stage=CALLDATEDOWN'; + $SQLorder='order by list_id'; + if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} + if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} + if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} + if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} + if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} + if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} + if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} + if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} + if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} + if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';} $stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id and campaign_id='$campaign_id' group by list_id $SQLorder"; $rslt=mysql_query($stmt, $link); $lists_to_print = mysql_num_rows($rslt); @@ -16730,48 +16798,48 @@ if ($ADD==31) echo "

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

\n"; + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "This campaign has $active_lists active lists and $inactive_lists inactive lists

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

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

"; + } + else + { + echo "Popup Dialable Leads Count"; + echo " - SHOW

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

\n"; + echo "Click here to see what leads are in the hopper right now

\n"; + echo "Click here to see a VDAD report for this campaign

\n"; } - else + echo "Click here to see all CallBack Holds in this campaign

\n"; + if ($LOGuser_level >= 9) { - echo "Popup Dialable Leads Count"; - echo " - SHOW

"; + echo "

Click here to see Admin chages to this campaign
\n"; } - - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id' and status IN('READY')"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $hopper_leads = "$rowx[0]"; - - echo "This campaign has $hopper_leads leads in the dial hopper

\n"; - echo "Click here to see what leads are in the hopper right now

\n"; - echo "Click here to see a VDAD report for this campaign

\n"; + echo "
\n"; } - echo "Click here to see all CallBack Holds in this campaign

\n"; - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this campaign\n"; - } - echo "
\n"; - } ##### CAMPAIGN CUSTOM STATUSES #####