Added an agent API function to update vicidial_list fields and the field values in the agent screen on-the-fly for the agent's current call.
Added timer action options to campaigns and in-groups allowing a message, webform or D1/D2-dial to happen at a specified number of seconds after the customer connects to the agent. Also, an API callw as added for this updated the Vtiger 5.1.0 patch git-svn-id: svn://192.168.202.10@1289 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -344,6 +344,13 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
ID number that will be populated in the vendor ID(vendor_lead_code)
|
||||
field.
|
||||
|
||||
83. Added an agent API function to update vicidial_list fields and the field
|
||||
values in the agent screen on-the-fly for the agent's current call
|
||||
|
||||
84. Added timer action options to campaigns and in-groups allowing a message,
|
||||
webform or D1/D2-dial to happen at a specified number of seconds after
|
||||
the customer connects to the agent. Also, an API callw as added for this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -206,8 +206,7 @@ $stmtA = "SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERN
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$DBtelnet_host = $aryA[0];
|
||||
@@ -235,7 +234,6 @@ while ($sthArows > $rec_count)
|
||||
if ($DBext_context) {$ext_context = $DBext_context;}
|
||||
if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';}
|
||||
else {$SYSLOG = '0';}
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
|
||||
@@ -128,12 +128,10 @@ $stmtB = "SELECT vd_server_logs FROM servers where server_ip = '$VARserver_ip';"
|
||||
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
|
||||
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
|
||||
$sthBrows=$sthB->rows;
|
||||
$rec_count=0;
|
||||
while ($sthBrows > $rec_count)
|
||||
if ($sthBrows > 0)
|
||||
{
|
||||
@aryB = $sthB->fetchrow_array;
|
||||
$SERVERLOG = "$aryB[0]";
|
||||
$rec_count++;
|
||||
$SERVERLOG = $aryB[0];
|
||||
}
|
||||
$sthB->finish();
|
||||
$dbhB->disconnect();
|
||||
@@ -224,16 +222,14 @@ sub process_request
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$rec_count=0;
|
||||
while ($sthArows > $rec_count)
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
$AGILOG = '0';
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$DBagi_output = "$aryA[0]";
|
||||
$DBagi_output = $aryA[0];
|
||||
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
|
||||
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
|
||||
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ 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
|
||||
update_fields - changes values for selected data fields in the agent interface
|
||||
set_timer_action - sets timer action for the current call the agent is on
|
||||
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
|
||||
|
||||
@@ -213,6 +215,89 @@ SUCCESS: change_ingroups function set - YES| TEST_IN SALESLINE -|6666
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
update_fields -
|
||||
|
||||
DESCRIPTION:
|
||||
Updates the fields that are specified with the values. This will update the data that is on the agent's screen in the customer information section.
|
||||
|
||||
VALUES:
|
||||
agent_user -
|
||||
REQUIRED alphanumeric string for agent user
|
||||
LEAD DATA (must populate at least one)
|
||||
NOTE: Only fields that are specified in the API call will be modified
|
||||
address1
|
||||
address2
|
||||
address3
|
||||
alt_phone
|
||||
city
|
||||
comments
|
||||
country_code
|
||||
date_of_birth
|
||||
email
|
||||
first_name
|
||||
gender
|
||||
gmt_offset_now
|
||||
last_name
|
||||
middle_initial
|
||||
phone_number
|
||||
phone_code
|
||||
postal_code
|
||||
province
|
||||
security_phrase
|
||||
source_id
|
||||
state
|
||||
title
|
||||
vendor_lead_code
|
||||
rank
|
||||
owner
|
||||
|
||||
EXAMPLE URLS:
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&function=update_fields&agent_user=6666&vendor_lead_code=1234567&address1=
|
||||
|
||||
RESPONSES:
|
||||
ERROR: update_fields not valid - 6666
|
||||
ERROR: agent_user is not logged in - 6666
|
||||
ERROR: user is not allowed to modify lead information - 6666|1234
|
||||
ERROR: agent_user does not have a lead on their screen - 6666|1234
|
||||
ERROR: no fields have been defined - 6666
|
||||
SUCCESS: update_fields lead updated - 6666|1234|87498|vendor_lead_code='1234567',address1=''
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
set_timer_action -
|
||||
|
||||
DESCRIPTION:
|
||||
Updates the fields that are specified with the values. This will update the data that is on the agent's screen in the customer information section.
|
||||
|
||||
VALUES:
|
||||
agent_user -
|
||||
REQUIRED, alphanumeric string for agent user
|
||||
value -
|
||||
REQUIRED, one of these choices: 'NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY','BALANCE_CHECK'
|
||||
notes -
|
||||
Optional, the message to be displayed with the timer action
|
||||
rank -
|
||||
Optional, the number of seconds into the call to display
|
||||
|
||||
|
||||
EXAMPLE URLS:
|
||||
http://server/agc/api.php?source=test&user=6666&pass=1234&function=set_timer_action&agent_user=6666&value=MESSAGE_ONLY¬es=test+message&rank=15
|
||||
|
||||
RESPONSES:
|
||||
ERROR: set_timer_action not valid - 6666
|
||||
ERROR: agent_user is not logged in - 6666
|
||||
ERROR: user is not allowed to modify campaign settings - 6666|1234
|
||||
SUCCESS: set_timer_action lead updated - 6666|1234|MESSAGE_ONLY|test message|15
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
st_login_log -
|
||||
|
||||
|
||||
@@ -355,6 +355,11 @@ external_dial VARCHAR(100) default '',
|
||||
external_ingroups TEXT,
|
||||
external_blended ENUM('0','1') default '0',
|
||||
external_igb_set_user VARCHAR(20) default '',
|
||||
external_update_fields ENUM('0','1') default '0',
|
||||
external_update_fields_data VARCHAR(255) default '',
|
||||
external_timer_action VARCHAR(20) default '',
|
||||
external_timer_action_message VARCHAR(255) default '',
|
||||
external_timer_action_seconds MEDIUMINT(7) default '-1',
|
||||
agent_log_id INT(9) UNSIGNED default '0',
|
||||
last_state_change DATETIME,
|
||||
agent_territories TEXT,
|
||||
@@ -696,7 +701,10 @@ waitforsilence_options VARCHAR(25) default '',
|
||||
agent_select_territories ENUM('Y','N') default 'N',
|
||||
campaign_calldate DATETIME,
|
||||
crm_popup_login ENUM('Y','N') default 'N',
|
||||
crm_login_address TEXT
|
||||
crm_login_address TEXT,
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action_message VARCHAR(255) default '',
|
||||
timer_action_seconds MEDIUMINT(7) default '-1'
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -832,7 +840,10 @@ default_group_alias VARCHAR(30) default '',
|
||||
no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N',
|
||||
no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE',
|
||||
no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
||||
web_form_address_two TEXT
|
||||
web_form_address_two TEXT,
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action_message VARCHAR(255) default '',
|
||||
timer_action_seconds MEDIUMINT(7) default '-1'
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -1990,7 +2001,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='1188',db_schema_update_date=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -0,0 +1,406 @@
|
||||
--- ../vtigercrm510orig/Smarty/templates/DetailViewFields.tpl 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./Smarty/templates/DetailViewFields.tpl 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -13,7 +13,7 @@
|
||||
-->*}
|
||||
|
||||
<!-- This file is used to display the fields based on the ui type in detailview -->
|
||||
- {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '255'} <!--TextBox-->
|
||||
+ {if $keyid eq '1' || $keyid eq '2' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '255'} <!--TextBox-->
|
||||
<td width=25% class="dvtCellInfo" align="left">
|
||||
{if $keyid eq '55' || $keyid eq '255'}<!--SalutationSymbol-->
|
||||
{if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE}
|
||||
@@ -71,6 +71,12 @@
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
+ {elseif $keyid eq '11'} <!--VICIDIALcall-->
|
||||
+ <td width=25% class="dvtCellInfo" align="left">
|
||||
+ <span id ="dtlview_{$label}">
|
||||
+ VCcall: <a href="javascript:VICIDIALcall({$ID},'{$keyfldname}','{$keyval}');">{$keyval}</a>
|
||||
+ </span>
|
||||
+ </td>
|
||||
{elseif $keyid eq '15' || $keyid eq '16'} <!--ComboBox-->
|
||||
<td width=25% class="dvtCellInfo" align="left">
|
||||
{foreach item=arr from=$keyoptions}
|
||||
--- ../vtigercrm510orig/Smarty/templates/DetailViewUI.tpl 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./Smarty/templates/DetailViewUI.tpl 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -13,7 +13,7 @@
|
||||
-->*}
|
||||
|
||||
<!-- This file is used to display the fields based on the ui type in detailview -->
|
||||
- {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103' || $keyid eq '255'} <!--TextBox-->
|
||||
+ {if $keyid eq '1' || $keyid eq '2' || $keyid eq '7' || $keyid eq '9' || $keyid eq '11' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103' || $keyid eq '255'} <!--TextBox-->
|
||||
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');" valign="top">
|
||||
{if $keyid eq '55' || $keyid eq '255'}<!--SalutationSymbol-->
|
||||
{if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE}
|
||||
@@ -23,11 +23,13 @@
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
- {if $keyid eq 11}
|
||||
+ {if $keyid eq '11'}
|
||||
{if $USE_ASTERISK eq 'true'}
|
||||
<span id="dtlview_{$label}"><a href='javascript:;' onclick='startCall("{$keyval}")'>{$keyval}</a></span>
|
||||
{else}
|
||||
- <span id="dtlview_{$label}">{$keyval}</span>
|
||||
+ VCcall: <span id="dtlview_{$label}">
|
||||
+ <a href="javascript:VICIDIALcall({$ID},'{$keyfldname}','{$keyval}');">{$keyval}</a>
|
||||
+ </span>
|
||||
{/if}
|
||||
{else}
|
||||
<span id="dtlview_{$label}">{$keyval}</span>
|
||||
--- ../vtigercrm510orig/include/js/dtlviewajax.js 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./include/js/dtlviewajax.js 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -293,7 +293,7 @@
|
||||
if(typeof(use_asterisk) != 'undefined' && use_asterisk == true){
|
||||
getObj(dtlView).innerHTML = "<a href=\"javascript:;\" onclick=\"startCall('"+tagValue+"')\">"+tagValue+"</a>";
|
||||
}else{
|
||||
- getObj(dtlView).innerHTML = tagValue;
|
||||
+ getObj(dtlView).innerHTML = "<a href=\"javascript:VICIDIALcall("+crmId+",'"+fieldName+"','"+tagValue+"');\">"+tagValue+" </a>";
|
||||
}
|
||||
}else if(uitype == '17')
|
||||
{
|
||||
--- ../vtigercrm510orig/include/utils/ListViewUtils.php 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./include/utils/ListViewUtils.php 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -1861,7 +1861,7 @@
|
||||
}
|
||||
//added for asterisk integration
|
||||
elseif($uitype == 11){
|
||||
- $value = "<a href='javascript:;' onclick='startCall("$temp_val", "$entity_id")'>".$temp_val."</a>";
|
||||
+ $value = "VCcall: <a href=\"javascript:VICIDIALcall($entity_id,'$fieldname','$temp_val','$current_user->user_name');\">$temp_val</a>";
|
||||
}
|
||||
//asterisk changes end here
|
||||
//Added for email status tracking
|
||||
@@ -4596,4 +4596,4 @@
|
||||
return $recordListRangeMsg;
|
||||
}
|
||||
|
||||
-?>
|
||||
\ No newline at end of file
|
||||
+?>
|
||||
--- ../vtigercrm510orig/include/utils/UserInfoUtil.php 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./include/utils/UserInfoUtil.php 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -748,6 +748,18 @@
|
||||
global $adb;
|
||||
global $current_user;
|
||||
global $seclog;
|
||||
+ if (!file_exists('user_privileges/user_privileges_'.$current_user->id.'.php'))
|
||||
+ {
|
||||
+ # create User Priviledges file
|
||||
+ require('modules/Users/CreateUserPrivilegeFile.php');
|
||||
+ createUserPrivilegesfile($current_user->id);
|
||||
+ }
|
||||
+ if (!file_exists('user_privileges/sharing_privileges_'.$current_user->id.'.php'))
|
||||
+ {
|
||||
+ # create Sharing Priviledges file
|
||||
+ require('modules/Users/CreateUserPrivilegeFile.php');
|
||||
+ createUserSharingPrivilegesfile($current_user->id);
|
||||
+ }
|
||||
require('user_privileges/user_privileges_'.$current_user->id.'.php');
|
||||
require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
|
||||
$permission = "no";
|
||||
@@ -4403,4 +4415,4 @@
|
||||
return ($fieldid !== false);
|
||||
}
|
||||
|
||||
-?>
|
||||
\ No newline at end of file
|
||||
+?>
|
||||
--- ../vtigercrm510orig/Smarty/templates/DetailView.tpl 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./Smarty/templates/DetailView.tpl 2009-12-29 11:13:21.000000000 -0500
|
||||
@@ -444,7 +444,16 @@
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
-
|
||||
+ {if $MODULE eq 'Accounts'}
|
||||
+ <a href="javascript:VICIDIALcall({$ID},'fax','');">VC fax log</a>
|
||||
+ <a href="javascript:VICIDIALcall({$ID},'email','');">VC email log</a>
|
||||
+ {/if}
|
||||
+
|
||||
+ {if $MODULE eq 'Contacts'}
|
||||
+ <a href="javascript:VICIDIALupdate({$ID},'update');">VC SELECT THIS CONTACT</a>
|
||||
+ {/if}
|
||||
+
|
||||
+
|
||||
{if $MODULE eq 'Contacts' || $EVENT_PERMISSION eq 'true'}
|
||||
<tr>
|
||||
<td align="left" style="padding-left:10px;">
|
||||
@@ -717,4 +726,4 @@
|
||||
|
||||
{if $MODULE eq 'Leads' or $MODULE eq 'Contacts' or $MODULE eq 'Accounts' or $MODULE eq 'Campaigns' or $MODULE eq 'Vendors'}
|
||||
<form name="SendMail"><div id="sendmail_cont" style="z-index:100001;position:absolute;"></div></form>
|
||||
-{/if}
|
||||
\ No newline at end of file
|
||||
+{/if}
|
||||
--- ../vtigercrm510orig/include/js/general.js 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./include/js/general.js 2009-12-29 11:16:03.000000000 -0500
|
||||
@@ -1849,6 +1849,119 @@
|
||||
openPopUp('xComposeEmail',this,url,'createemailWin',830,662,opts);
|
||||
}
|
||||
|
||||
+function VICIDIALcall(record_id,field_name,phone,user_name) {
|
||||
+//alert(record_id + "|" + field_name + "|" + phone + "|" user_name);
|
||||
+var xmlhttp=false;
|
||||
+/*@cc_on @*/
|
||||
+/*@if (@_jscript_version >= 5)
|
||||
+// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
+// and security blocked creation of the objects.
|
||||
+ try {
|
||||
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
+ } catch (e) {
|
||||
+ try {
|
||||
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
+ } catch (E) {
|
||||
+ xmlhttp = false;
|
||||
+ }
|
||||
+ }
|
||||
+@end @*/
|
||||
+if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
+ {
|
||||
+ xmlhttp = new XMLHttpRequest();
|
||||
+ }
|
||||
+if (xmlhttp)
|
||||
+ {
|
||||
+ var callback_flag='';
|
||||
+ if (field_name=='CallBack')
|
||||
+ {
|
||||
+ var log_call = record_id + '';
|
||||
+ while (log_call.length < 10)
|
||||
+ {log_call = "0" + log_call;}
|
||||
+ phone = "99" + log_call;
|
||||
+ callback_flag = '&callback=1';
|
||||
+ }
|
||||
+ if (field_name=='fax')
|
||||
+ {
|
||||
+ var log_call = record_id + '';
|
||||
+ while (log_call.length < 8)
|
||||
+ {log_call = "0" + log_call;}
|
||||
+ phone = "18" + log_call;
|
||||
+ }
|
||||
+ if (field_name=='email')
|
||||
+ {
|
||||
+ var log_call = record_id + '';
|
||||
+ while (log_call.length < 8)
|
||||
+ {log_call = "0" + log_call;}
|
||||
+ phone = "19" + log_call;
|
||||
+ }
|
||||
+ var VCcallQuery = "VCcall=1&phone=" + phone + "&vendor_id=" + record_id + '' + callback_flag;
|
||||
+ xmlhttp.open('POST', 'vtigerservice.php');
|
||||
+ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
+ xmlhttp.send(VCcallQuery);
|
||||
+ xmlhttp.onreadystatechange = function()
|
||||
+ {
|
||||
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
+ {
|
||||
+ // alert(xmlhttp.responseText);
|
||||
+ var Xoutput = null;
|
||||
+ Xoutput = xmlhttp.responseText;
|
||||
+ var regXFerr = new RegExp("ERROR","g");
|
||||
+ if (Xoutput.match(regXFerr))
|
||||
+ {
|
||||
+ alert(xmlhttp.responseText);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ delete xmlhttp;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+function VICIDIALupdate(record_id,field_name) {
|
||||
+//alert(record_id + "|" + field_name + "|");
|
||||
+var xmlhttp=false;
|
||||
+/*@cc_on @*/
|
||||
+/*@if (@_jscript_version >= 5)
|
||||
+// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
+// and security blocked creation of the objects.
|
||||
+ try {
|
||||
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
+ } catch (e) {
|
||||
+ try {
|
||||
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
+ } catch (E) {
|
||||
+ xmlhttp = false;
|
||||
+ }
|
||||
+ }
|
||||
+@end @*/
|
||||
+if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
+ {
|
||||
+ xmlhttp = new XMLHttpRequest();
|
||||
+ }
|
||||
+if (xmlhttp)
|
||||
+ {
|
||||
+ var VCupdateQuery = "VCupdate=1&contact_id=" + record_id + '';
|
||||
+ xmlhttp.open('POST', 'vtigerservice.php');
|
||||
+ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
+ xmlhttp.send(VCupdateQuery);
|
||||
+ xmlhttp.onreadystatechange = function()
|
||||
+ {
|
||||
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
+ {
|
||||
+ // alert(xmlhttp.responseText);
|
||||
+ var Xoutput = null;
|
||||
+ Xoutput = xmlhttp.responseText;
|
||||
+ var regXFerr = new RegExp("ERROR","g");
|
||||
+ if (Xoutput.match(regXFerr))
|
||||
+ {
|
||||
+ alert(xmlhttp.responseText);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ delete xmlhttp;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
function fnHide_Event(obj){
|
||||
document.getElementById(obj).style.visibility = 'hidden';
|
||||
}
|
||||
--- ../vtigercrm510orig/vtigerservice.php 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./vtigerservice.php 2009-12-29 10:53:48.000000000 -0500
|
||||
@@ -41,13 +41,115 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- echo "<h1>vtigerCRM Soap Services</h1>";
|
||||
+ if(isset($_REQUEST['VCcall']))
|
||||
+ {
|
||||
+ $CL=':';
|
||||
+ $server_name = getenv("SERVER_NAME");
|
||||
+ $server_port = getenv("SERVER_PORT");
|
||||
+ if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
+ else {$HTTPprotocol = 'http://';}
|
||||
+ if (($server_port == '80') or ($server_port == '443') ) {$server_port='';}
|
||||
+ else {$server_port = "$CL$server_port";}
|
||||
+ $URLbase = "$HTTPprotocol$server_name$server_port";
|
||||
+
|
||||
+ $callback_flag='';
|
||||
+ if(isset($_REQUEST['callback']))
|
||||
+ {
|
||||
+ $callback_flag = '&vtiger_callback=YES';
|
||||
+ }
|
||||
+ global $entityDel;
|
||||
+ global $display;
|
||||
+ global $category;
|
||||
+ header('Content-Type: text/html; charset='. $charset);
|
||||
+ session_start();
|
||||
+ require_once('include/utils/utils.php');
|
||||
+ require_once('config.inc.php');
|
||||
+ $default_config_values = Array( "allow_exports"=>"all","upload_maxsize"=>"3000000", "listview_max_textlength" => "40" );
|
||||
+ set_default_config($default_config_values);
|
||||
+ require_once('include/logging.php');
|
||||
+ require_once('modules/Users/Users.php');
|
||||
+ global $currentModule;
|
||||
+ $current_user = new Users();
|
||||
+
|
||||
+ $log =& LoggerManager::getLogger('index');
|
||||
+ global $seclog;
|
||||
+ $seclog =& LoggerManager::getLogger('SECURITY');
|
||||
+ $log->debug($_REQUEST);
|
||||
+
|
||||
+ // Check to see if there is an authenticated user in the session.
|
||||
+ if(isset($_SESSION["authenticated_user_id"]) && (isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key))
|
||||
+ {
|
||||
+ $log->debug("We have an authenticated user id: ".$_SESSION["authenticated_user_id"]);
|
||||
+ $result = $current_user->retrieveCurrentUserInfoFromFile($_SESSION['authenticated_user_id']);
|
||||
+ $log->debug('Current user is: '.$current_user->user_name);
|
||||
+ }
|
||||
+
|
||||
+ $phone = $_REQUEST['phone']; $vendor_id = $_REQUEST['vendor_id'];
|
||||
+ $user = $current_user->user_name;
|
||||
+
|
||||
+ $VCapiURL = "/agc/api.php";
|
||||
+ $VCpauseQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=external_pause&value=PAUSE";
|
||||
+ $VCcallQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=external_dial&value=$phone&phone_code=1&search=YES&preview=NO&focus=YES&vendor_id=$vendor_id$callback_flag";
|
||||
+ $replyP = file("$URLbase$VCapiURL$VCpauseQuery");
|
||||
+// sleep(1);
|
||||
+ $replyC = file("$URLbase$VCapiURL$VCcallQuery");
|
||||
+ echo "$replyP[0]|$replyC[0]\n";
|
||||
+// echo "$URLbase$VCapiURL$VCcallQuery\n";
|
||||
+ }
|
||||
+ elseif(isset($_REQUEST['VCupdate']))
|
||||
+ {
|
||||
+ $CL=':';
|
||||
+ $server_name = getenv("SERVER_NAME");
|
||||
+ $server_port = getenv("SERVER_PORT");
|
||||
+ if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
+ else {$HTTPprotocol = 'http://';}
|
||||
+ if (($server_port == '80') or ($server_port == '443') ) {$server_port='';}
|
||||
+ else {$server_port = "$CL$server_port";}
|
||||
+ $URLbase = "$HTTPprotocol$server_name$server_port";
|
||||
+ global $entityDel;
|
||||
+ global $display;
|
||||
+ global $category;
|
||||
+ header('Content-Type: text/html; charset='. $charset);
|
||||
+ session_start();
|
||||
+ require_once('include/utils/utils.php');
|
||||
+ require_once('config.inc.php');
|
||||
+ $default_config_values = Array( "allow_exports"=>"all","upload_maxsize"=>"3000000", "listview_max_textlength" => "40" );
|
||||
+ set_default_config($default_config_values);
|
||||
+ require_once('include/logging.php');
|
||||
+ require_once('modules/Users/Users.php');
|
||||
+ global $currentModule;
|
||||
+ $current_user = new Users();
|
||||
+
|
||||
+ $log =& LoggerManager::getLogger('index');
|
||||
+ global $seclog;
|
||||
+ $seclog =& LoggerManager::getLogger('SECURITY');
|
||||
+ $log->debug($_REQUEST);
|
||||
+
|
||||
+ // Check to see if there is an authenticated user in the session.
|
||||
+ if(isset($_SESSION["authenticated_user_id"]) && (isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key))
|
||||
+ {
|
||||
+ $log->debug("We have an authenticated user id: ".$_SESSION["authenticated_user_id"]);
|
||||
+ $result = $current_user->retrieveCurrentUserInfoFromFile($_SESSION['authenticated_user_id']);
|
||||
+ $log->debug('Current user is: '.$current_user->user_name);
|
||||
+ }
|
||||
+
|
||||
+ $contact_id = $_REQUEST['contact_id'];
|
||||
+ $user = $current_user->user_name;
|
||||
+
|
||||
+ $VCapiURL = "/agc/api.php";
|
||||
+ $VCupdateQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=update_fields&vendor_lead_code=$contact_id";
|
||||
+ $replyU = file("$URLbase$VCapiURL$VCupdateQuery");
|
||||
+ echo "$replyU[0]\n";
|
||||
+ }
|
||||
+ else
|
||||
+ { echo "<h1>vtigerCRM Soap Services</h1>";
|
||||
echo "<li>vtigerCRM Outlook Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=outlook'>here</a></li>";
|
||||
echo "<li>vtigerCRM Word Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=wordplugin'>here</a></li>";
|
||||
echo "<li>vtigerCRM ThunderBird Extenstion EndPoint URL -- Click <a href='vtigerservice.php?service=thunderbird'>here</a></li>";
|
||||
echo "<li>vtigerCRM Customer Portal EndPoint URL -- Click <a href='vtigerservice.php?service=customerportal'>here</a></li>";
|
||||
echo "<li>vtigerCRM WebForm EndPoint URL -- Click <a href='vtigerservice.php?service=webforms'>here</a></li>";
|
||||
echo "<li>vtigerCRM FireFox Extension EndPoint URL -- Click <a href='vtigerservice.php?service=firefox'>here</a></li>";
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--- ../vtigercrm510orig/modules/Users/Authenticate.php 2009-12-29 10:45:35.000000000 -0500
|
||||
+++ ./modules/Users/Authenticate.php 2009-12-29 10:46:20.000000000 -0500
|
||||
@@ -64,7 +64,19 @@
|
||||
//Security related entries start
|
||||
require_once('include/utils/UserInfoUtil.php');
|
||||
|
||||
- createUserPrivilegesfile($focus->id);
|
||||
+ if (file_exists('user_privileges/user_privileges_'.$focus->id.'.php'))
|
||||
+ {
|
||||
+ # delete User Priviledges file
|
||||
+ unlink('user_privileges/user_privileges_'.$focus->id.'.php');
|
||||
+ }
|
||||
+ if (file_exists('user_privileges/sharing_privileges_'.$focus->id.'.php'))
|
||||
+ {
|
||||
+ # delete Sharing Priviledges file
|
||||
+ unlink('user_privileges/sharing_privileges_'.$focus->id.'.php');
|
||||
+ }
|
||||
+ # create User Sharing Priviledges files
|
||||
+ createUserPrivilegesfile($focus->id);
|
||||
+ createUserSharingPrivilegesfile($focus->id);
|
||||
|
||||
//Security related entries end
|
||||
session_unregister('login_password');
|
||||
@@ -142,4 +154,4 @@
|
||||
header("Location: index.php");
|
||||
}
|
||||
|
||||
-?>
|
||||
\ No newline at end of file
|
||||
+?>
|
||||
@@ -672,3 +672,19 @@ ALTER TABLE vicidial_closer_log ADD queue_position SMALLINT(4) UNSIGNED default
|
||||
ALTER TABLE vicidial_auto_calls ADD queue_position SMALLINT(4) UNSIGNED default '1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1188',db_schema_update_date=NOW();
|
||||
|
||||
ALTER TABLE vicidial_live_agents ADD external_update_fields ENUM('0','1') default '0' AFTER external_igb_set_user;
|
||||
ALTER TABLE vicidial_live_agents ADD external_update_fields_data VARCHAR(255) default '' AFTER external_update_fields;
|
||||
ALTER TABLE vicidial_live_agents ADD external_timer_action VARCHAR(20) default '' AFTER external_update_fields_data;
|
||||
ALTER TABLE vicidial_live_agents ADD external_timer_action_message VARCHAR(255) default '' AFTER external_timer_action;
|
||||
ALTER TABLE vicidial_live_agents ADD external_timer_action_seconds MEDIUMINT(7) default '-1' AFTER external_timer_action_message;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE';
|
||||
ALTER TABLE vicidial_campaigns ADD timer_action_message VARCHAR(255) default '';
|
||||
ALTER TABLE vicidial_campaigns ADD timer_action_seconds MEDIUMINT(7) default '-1';
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups ADD timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE';
|
||||
ALTER TABLE vicidial_inbound_groups ADD timer_action_message VARCHAR(255) default '';
|
||||
ALTER TABLE vicidial_inbound_groups ADD timer_action_seconds MEDIUMINT(7) default '-1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW();
|
||||
|
||||
@@ -356,7 +356,15 @@ 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||
|
||||
VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attampt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attampt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign||
|
||||
If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attempt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attempt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attempt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue, VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attempt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attempt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign. Default is CID||
|
||||
UNIFIED_CONTACT- This option will use the beta Vtiger 5.1.0 feature to search by phone number and bring up a search page in Vtiger||
|
||||
Timer Action||
|
||||
This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default||
|
||||
Timer Action Message||
|
||||
This is the message that appears on the agent screen at the time the Timer Action is triggered||
|
||||
Timer Action Seconds||
|
||||
This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive||
|
||||
This setting will override the Campaign settings||
|
||||
|
||||
|
||||
add-file: user_territories.php
|
||||
@@ -378,6 +386,8 @@ YOU MUST BE PAUSED TO GRAB CALLS IN QUEUE||
|
||||
Manager ||
|
||||
has selected your in-group choices||
|
||||
CONSULTATIVE||
|
||||
Close Message||
|
||||
TIMER NOTIFICATION||
|
||||
|
||||
|
||||
add-file: vdc_script_display.php
|
||||
|
||||
@@ -39,13 +39,16 @@
|
||||
# 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
|
||||
# 91228-1059 - Added update_fields function
|
||||
#
|
||||
|
||||
$version = '2.2.0-10';
|
||||
$build = '91211-1805';
|
||||
$version = '2.2.0-11';
|
||||
$build = '91228-1059';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$query_string = getenv("QUERY_STRING");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
@@ -87,6 +90,56 @@ 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"];}
|
||||
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
|
||||
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
|
||||
if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];}
|
||||
elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];}
|
||||
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
|
||||
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
|
||||
if (isset($_GET["gmt_offset_now"])) {$gmt_offset_now=$_GET["gmt_offset_now"];}
|
||||
elseif (isset($_POST["gmt_offset_now"])) {$gmt_offset_now=$_POST["gmt_offset_now"];}
|
||||
if (isset($_GET["title"])) {$title=$_GET["title"];}
|
||||
elseif (isset($_POST["title"])) {$title=$_POST["title"];}
|
||||
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
|
||||
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
|
||||
if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];}
|
||||
elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];}
|
||||
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
|
||||
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
|
||||
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
|
||||
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
|
||||
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
|
||||
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
|
||||
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
|
||||
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
|
||||
if (isset($_GET["city"])) {$city=$_GET["city"];}
|
||||
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
|
||||
if (isset($_GET["state"])) {$state=$_GET["state"];}
|
||||
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
|
||||
if (isset($_GET["province"])) {$province=$_GET["province"];}
|
||||
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
|
||||
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
|
||||
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
|
||||
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
|
||||
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
|
||||
if (isset($_GET["gender"])) {$gender=$_GET["gender"];}
|
||||
elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];}
|
||||
if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];}
|
||||
elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];}
|
||||
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
|
||||
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
|
||||
if (isset($_GET["email"])) {$email=$_GET["email"];}
|
||||
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
|
||||
if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];}
|
||||
elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];}
|
||||
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
|
||||
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
|
||||
if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
|
||||
elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
|
||||
if (isset($_GET["owner"])) {$owner=$_GET["owner"];}
|
||||
elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
@@ -107,6 +160,7 @@ if ($qm_conf_ct > 0)
|
||||
###########################################
|
||||
|
||||
$ingroup_choices = ereg_replace("\+"," ",$ingroup_choices);
|
||||
$query_string = ereg_replace("'|\"|\\\\|;","",$query_string);
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
@@ -119,7 +173,7 @@ if ($non_latin < 1)
|
||||
$focus = ereg_replace("[^-\_0-9a-zA-Z]","",$focus);
|
||||
$preview = ereg_replace("[^-\_0-9a-zA-Z]","",$preview);
|
||||
$notes = ereg_replace("\+"," ",$notes);
|
||||
$notes = ereg_replace("[^ -\_0-9a-zA-Z]","",$notes);
|
||||
$notes = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$notes);
|
||||
$phone_code = ereg_replace("[^0-9X]","",$phone_code);
|
||||
$search = ereg_replace("[^-\_0-9a-zA-Z]","",$search);
|
||||
$group_alias = ereg_replace("[^0-9a-zA-Z]","",$group_alias);
|
||||
@@ -130,6 +184,30 @@ if ($non_latin < 1)
|
||||
$blended = ereg_replace("[^A-Z]","",$blended);
|
||||
$ingroup_choices = ereg_replace("[^ -\_0-9a-zA-Z]","",$ingroup_choices);
|
||||
$set_as_default = ereg_replace("[^A-Z]","",$set_as_default);
|
||||
$phone_number = ereg_replace("[^0-9]","",$phone_number);
|
||||
$address1 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address1);
|
||||
$address2 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address2);
|
||||
$address3 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address3);
|
||||
$alt_phone = ereg_replace("[^ -\_0-9a-zA-Z]","",$alt_phone);
|
||||
$city = ereg_replace("[^ -\_0-9a-zA-Z]","",$city);
|
||||
$comments = ereg_replace("[^ -\_0-9a-zA-Z]","",$comments);
|
||||
$country_code = ereg_replace("[^A-Z]","",$country_code);
|
||||
$date_of_birth = ereg_replace("[^ -\_0-9]","",$date_of_birth);
|
||||
$email = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$email);
|
||||
$first_name = ereg_replace("[^ -\_0-9a-zA-Z]","",$first_name);
|
||||
$gender = ereg_replace("[^A-Z]","",$gender);
|
||||
$gmt_offset_now = ereg_replace("[^ \.-\_0-9]","",$gmt_offset_now);
|
||||
$last_name = ereg_replace("[^ -\_0-9a-zA-Z]","",$last_name);
|
||||
$lead_id = ereg_replace("[^0-9]","",$lead_id);
|
||||
$middle_initial = ereg_replace("[^ -\_0-9a-zA-Z]","",$middle_initial);
|
||||
$province = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$province);
|
||||
$security_phrase = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$security_phrase);
|
||||
$source_id = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$source_id);
|
||||
$state = ereg_replace("[^ -\_0-9a-zA-Z]","",$state);
|
||||
$title = ereg_replace("[^ -\_0-9a-zA-Z]","",$title);
|
||||
$vendor_lead_code = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$vendor_lead_code);
|
||||
$rank = ereg_replace("[^ -0-9]","",$rank);
|
||||
$owner = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -935,6 +1013,344 @@ if ($function == 'change_ingroups')
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - update_fields
|
||||
################################################################################
|
||||
if ($function == 'update_fields')
|
||||
{
|
||||
if (strlen($agent_user)<1)
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "st_login_log not valid";
|
||||
$data = "$agent_user";
|
||||
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_live_agents where user='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "select count(*) from vicidial_users where user='$user' and modify_leads='1';";
|
||||
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='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$lead_id = $row[0];
|
||||
if ($lead_id > 0)
|
||||
{
|
||||
$fieldsSQL='';
|
||||
$fieldsLISTS='';
|
||||
$field_set=0;
|
||||
if (ereg('phone_code',$query_string))
|
||||
{
|
||||
if ($DB) {echo "phone_code set to $phone_code\n";}
|
||||
$fieldsSQL .= "phone_code='$phone_code',";
|
||||
$fieldsLIST .= "phone_code,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('address1',$query_string))
|
||||
{
|
||||
if ($DB) {echo "address1 set to $address1\n";}
|
||||
$fieldsSQL .= "address1='$address1',";
|
||||
$fieldsLIST .= "address1,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('address2',$query_string))
|
||||
{
|
||||
if ($DB) {echo "address2 set to $address2\n";}
|
||||
$fieldsSQL .= "address2='$address2',";
|
||||
$fieldsLIST .= "address2,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('address3',$query_string))
|
||||
{
|
||||
if ($DB) {echo "address3 set to $address3\n";}
|
||||
$fieldsSQL .= "address3='$address3',";
|
||||
$fieldsLIST .= "address3,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('alt_phone',$query_string))
|
||||
{
|
||||
if ($DB) {echo "alt_phone set to $alt_phone\n";}
|
||||
$fieldsSQL .= "alt_phone='$alt_phone',";
|
||||
$fieldsLIST .= "alt_phone,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('city',$query_string))
|
||||
{
|
||||
if ($DB) {echo "city set to $city\n";}
|
||||
$fieldsSQL .= "city='$city',";
|
||||
$fieldsLIST .= "city,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('comments',$query_string))
|
||||
{
|
||||
if ($DB) {echo "comments set to $comments\n";}
|
||||
$fieldsSQL .= "comments='$comments',";
|
||||
$fieldsLIST .= "comments,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('country_code',$query_string))
|
||||
{
|
||||
if ($DB) {echo "country_code set to $country_code\n";}
|
||||
$fieldsSQL .= "country_code='$country_code',";
|
||||
$fieldsLIST .= "country_code,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('date_of_birth',$query_string))
|
||||
{
|
||||
if ($DB) {echo "date_of_birth set to $date_of_birth\n";}
|
||||
$fieldsSQL .= "date_of_birth='$date_of_birth',";
|
||||
$fieldsLIST .= "date_of_birth,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('email',$query_string))
|
||||
{
|
||||
if ($DB) {echo "email set to $email\n";}
|
||||
$fieldsSQL .= "email='$email',";
|
||||
$fieldsLIST .= "email,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('first_name',$query_string))
|
||||
{
|
||||
if ($DB) {echo "first_name set to $first_name\n";}
|
||||
$fieldsSQL .= "first_name='$first_name',";
|
||||
$fieldsLIST .= "first_name,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('gender',$query_string))
|
||||
{
|
||||
if ($DB) {echo "gender set to $gender\n";}
|
||||
$fieldsSQL .= "gender='$gender',";
|
||||
$fieldsLIST .= "gender,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('gmt_offset_now',$query_string))
|
||||
{
|
||||
if ($DB) {echo "gmt_offset_now set to $gmt_offset_now\n";}
|
||||
$fieldsSQL .= "gmt_offset_now='$gmt_offset_now',";
|
||||
$fieldsLIST .= "gmt_offset_now,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('last_name',$query_string))
|
||||
{
|
||||
if ($DB) {echo "last_name set to $last_name\n";}
|
||||
$fieldsSQL .= "last_name='$last_name',";
|
||||
$fieldsLIST .= "last_name,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('middle_initial',$query_string))
|
||||
{
|
||||
if ($DB) {echo "middle_initial set to $middle_initial\n";}
|
||||
$fieldsSQL .= "middle_initial='$middle_initial',";
|
||||
$fieldsLIST .= "middle_initial,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('phone_number',$query_string))
|
||||
{
|
||||
if ($DB) {echo "phone_number set to $phone_number\n";}
|
||||
$fieldsSQL .= "phone_number='$phone_number',";
|
||||
$fieldsLIST .= "phone_number,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('postal_code',$query_string))
|
||||
{
|
||||
if ($DB) {echo "postal_code set to $postal_code\n";}
|
||||
$fieldsSQL .= "postal_code='$postal_code',";
|
||||
$fieldsLIST .= "postal_code,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('province',$query_string))
|
||||
{
|
||||
if ($DB) {echo "province set to $province\n";}
|
||||
$fieldsSQL .= "province='$province',";
|
||||
$fieldsLIST .= "province,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('security_phrase',$query_string))
|
||||
{
|
||||
if ($DB) {echo "security_phrase set to $security_phrase\n";}
|
||||
$fieldsSQL .= "security_phrase='$security_phrase',";
|
||||
$fieldsLIST .= "security_phrase,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('source_id',$query_string))
|
||||
{
|
||||
if ($DB) {echo "source_id set to $source_id\n";}
|
||||
$fieldsSQL .= "source_id='$source_id',";
|
||||
$fieldsLIST .= "source_id,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('state',$query_string))
|
||||
{
|
||||
if ($DB) {echo "state set to $state\n";}
|
||||
$fieldsSQL .= "state='$state',";
|
||||
$fieldsLIST .= "state,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('title',$query_string))
|
||||
{
|
||||
if ($DB) {echo "title set to $title\n";}
|
||||
$fieldsSQL .= "title='$title',";
|
||||
$fieldsLIST .= "title,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('vendor_lead_code',$query_string))
|
||||
{
|
||||
if ($DB) {echo "vendor_lead_code set to $vendor_lead_code\n";}
|
||||
$fieldsSQL .= "vendor_lead_code='$vendor_lead_code',";
|
||||
$fieldsLIST .= "vendor_lead_code,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('rank',$query_string))
|
||||
{
|
||||
if ($DB) {echo "rank set to $rank\n";}
|
||||
$fieldsSQL .= "rank='$rank',";
|
||||
$fieldsLIST .= "rank,";
|
||||
$field_set++;
|
||||
}
|
||||
if (ereg('owner',$query_string))
|
||||
{
|
||||
if ($DB) {echo "owner set to $owner\n";}
|
||||
$fieldsSQL .= "owner='$owner',";
|
||||
$fieldsLIST .= "owner,";
|
||||
$field_set++;
|
||||
}
|
||||
if ($field_set > 0)
|
||||
{
|
||||
$fieldsSQL = preg_replace("/,$/","",$fieldsSQL);
|
||||
$fieldsLIST = preg_replace("/,$/","",$fieldsLIST);
|
||||
|
||||
$stmt="UPDATE vicidial_list set $fieldsSQL where lead_id='$lead_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set external_update_fields='1',external_update_fields_data='$fieldsLIST' where user='$agent_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$result = 'SUCCESS';
|
||||
$result_reason = "update_fields lead updated";
|
||||
$data = "$user|$agent_user|$lead_id|$fieldsSQL";
|
||||
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 fields have been defined";
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "agent_user does not have a lead on their screen";
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "user is not allowed to modify lead information";
|
||||
echo "$result: $result_reason - $agent_user|$user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "agent_user is not logged in";
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END - update_fields
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - set_timer_action
|
||||
################################################################################
|
||||
if ($function == 'set_timer_action')
|
||||
{
|
||||
if ( (strlen($agent_user)<1) or (strlen($value)<2) )
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "set_timer_action not valid";
|
||||
$data = "$agent_user|$value";
|
||||
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_live_agents where user='$agent_user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "select count(*) from vicidial_users where user='$user' and modify_campaigns='1';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_live_agents set external_timer_action='$value',external_timer_action_message='$notes',external_timer_action_seconds='$rank' where user='$agent_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$result = 'SUCCESS';
|
||||
$result_reason = "set_timer_action lead updated";
|
||||
$data = "$user|$agent_user|$value|$notes|$rank";
|
||||
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 = "user is not allowed to modify campaign settings";
|
||||
echo "$result: $result_reason - $agent_user|$user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "agent_user is not logged in";
|
||||
echo "$result: $result_reason - $agent_user\n";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
}
|
||||
}
|
||||
}
|
||||
################################################################################
|
||||
### END - set_timer_action
|
||||
################################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### BEGIN - st_login_log - looks up vicidial_users.custom_three from a CRM
|
||||
################################################################################
|
||||
|
||||
@@ -48,10 +48,11 @@
|
||||
# 90706-1430 - Fixed AGENTDIRECT calls in queue display count
|
||||
# 90908-1037 - Added DEAD call logging
|
||||
# 91130-2022 - Added code for manager override of in-group selection
|
||||
# 91228-1341 - Added API fields update functions
|
||||
#
|
||||
|
||||
$version = '2.2.0-23';
|
||||
$build = '91130-2022';
|
||||
$version = '2.2.0-24';
|
||||
$build = '91228-1341';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=17;
|
||||
$one_mysql_log=0;
|
||||
@@ -248,7 +249,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$AcalleridCOUNT=$row[0];
|
||||
|
||||
@@ -259,7 +260,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
@@ -270,12 +271,12 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03020',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
##### END DEAD logging section #####
|
||||
@@ -349,15 +350,21 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
}
|
||||
|
||||
### grab the API hangup and API dispo fields in vicidial_live_agents
|
||||
$stmt="SELECT external_hangup,external_status,external_pause,external_dial from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
$stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$external_hangup = $row[0];
|
||||
$external_status = $row[1];
|
||||
$external_pause = $row[2];
|
||||
$external_dial = $row[3];
|
||||
$external_hangup = $row[0];
|
||||
$external_status = $row[1];
|
||||
$external_pause = $row[2];
|
||||
$external_dial = $row[3];
|
||||
$external_update_fields = $row[4];
|
||||
$external_update_fields_data = $row[5];
|
||||
$timer_action = $row[6];
|
||||
$timer_action_message = $row[7];
|
||||
$timer_action_seconds = $row[8];
|
||||
|
||||
if (strlen($external_status)<1) {$external_status = '::::::::::';}
|
||||
|
||||
$web_epoch = date("U");
|
||||
@@ -376,7 +383,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$manager_ingroup_set=0;
|
||||
$stmt="SELECT count(*) FROM vicidial_live_agents where user='$user' and manager_ingroup_set='SET';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03022',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$mis_record_ct = mysql_num_rows($rslt);
|
||||
if ($mis_record_ct > 0)
|
||||
@@ -389,13 +396,13 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE vicidial_live_agents SET closer_campaigns=external_ingroups, manager_ingroup_set='Y' where user='$user' and manager_ingroup_set='SET';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03023',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAMISaffected_rows_update = mysql_affected_rows($link);
|
||||
if ($VLAMISaffected_rows_update > 0)
|
||||
{
|
||||
$stmt="SELECT external_ingroups,external_blended,external_igb_set_user,outbound_autodial,dial_method FROM vicidial_live_agents vla, vicidial_campaigns vc where user='$user' and manager_ingroup_set='Y' and vla.campaign_id=vc.campaign_id;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03024',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$migs_record_ct = mysql_num_rows($rslt);
|
||||
if ($migs_record_ct > 0)
|
||||
@@ -409,7 +416,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
|
||||
$stmt="SELECT full_name FROM vicidial_users where user='$external_igb_set_user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03025',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$mign_record_ct = mysql_num_rows($rslt);
|
||||
if ($mign_record_ct > 0)
|
||||
@@ -425,7 +432,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE vicidial_live_agents SET outbound_autodial='$NEWoutbound_autodial' where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAMIBaffected_rows_update = mysql_affected_rows($link);
|
||||
|
||||
$InGroupChangeDetails = "1|$external_blended|$external_igb_set_user|$external_igb_set_name";
|
||||
@@ -433,7 +440,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="INSERT INTO vicidial_user_closer_log set user='$user',campaign_id='$Acampaign_id',event_date='$NOW_TIME',blended='$external_blended',closer_campaigns='$external_ingroups',manager_change='$external_igb_set_user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -526,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
if ($Ashift_logout > 0)
|
||||
{$Alogin='SHIFT_LOGOUT';}
|
||||
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . "\n";
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
|
||||
|
||||
if (strlen($timer_action) > 3)
|
||||
{
|
||||
$stmt="UPDATE vicidial_live_agents SET external_timer_action='' where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03028',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAETAaffected_rows_update = mysql_affected_rows($link);
|
||||
}
|
||||
}
|
||||
$total_conf=0;
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# - $pass
|
||||
# optional variables:
|
||||
# - $format - ('text','debug')
|
||||
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT')
|
||||
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
|
||||
# - $stage - ('start','finish','lookup','new')
|
||||
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
|
||||
# - $conf_exten - ('8600011',...)
|
||||
@@ -224,12 +224,13 @@
|
||||
# 91123-1801 - Added outbound_autodial field
|
||||
# 91204-1937 - Added logging of agent grab calls
|
||||
# 91213-0946 - Added queue_position to queue_log COMPLETE... records
|
||||
# 91228-1340 - Added API fields update functions
|
||||
#
|
||||
|
||||
$version = '2.2.0-133';
|
||||
$build = '91213-0946';
|
||||
$version = '2.2.0-134';
|
||||
$build = '91228-1340';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=273;
|
||||
$mysql_log_count=276;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -472,48 +473,48 @@ else
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00003',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if($SNauth==0)
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
# do nothing for now
|
||||
$stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00003',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
# do nothing for now
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($format=='debug')
|
||||
{
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build USER: $user server_ip: $server_ip-->\n";
|
||||
echo "<title>VICIDiaL Database Query Script";
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
}
|
||||
{
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build USER: $user server_ip: $server_ip-->\n";
|
||||
echo "<title>VICIDiaL Database Query Script";
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -875,7 +876,102 @@ if ($users_to_parse > 0)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
### UpdateFields - sends current vicidial_list values for fields
|
||||
################################################################################
|
||||
if ($ACTION == 'UpdateFields')
|
||||
{
|
||||
$stmt="UPDATE vicidial_live_agents set external_update_fields='0',external_update_fields_data='' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00276',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="SELECT lead_id from vicidial_live_agents where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00274',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$vla_records = mysql_num_rows($rslt);
|
||||
if ($vla_records > 0)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0] > 0) {$lead_id = $rowx[0];}
|
||||
##### grab the data from vicidial_list for the lead_id
|
||||
$stmt="SELECT vendor_lead_code,source_id,gmt_offset_now,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,rank,owner FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00275',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$vendor_id = trim("$row[0]");
|
||||
$source_id = trim("$row[1]");
|
||||
$gmt_offset_now = trim("$row[2]");
|
||||
$phone_code = trim("$row[3]");
|
||||
$phone_number = trim("$row[4]");
|
||||
$title = trim("$row[5]");
|
||||
$first_name = trim("$row[6]");
|
||||
$middle_initial = trim("$row[7]");
|
||||
$last_name = trim("$row[8]");
|
||||
$address1 = trim("$row[9]");
|
||||
$address2 = trim("$row[10]");
|
||||
$address3 = trim("$row[11]");
|
||||
$city = trim("$row[12]");
|
||||
$state = trim("$row[13]");
|
||||
$province = trim("$row[14]");
|
||||
$postal_code = trim("$row[15]");
|
||||
$country_code = trim("$row[16]");
|
||||
$gender = trim("$row[17]");
|
||||
$date_of_birth = trim("$row[18]");
|
||||
$alt_phone = trim("$row[19]");
|
||||
$email = trim("$row[20]");
|
||||
$security = trim("$row[21]");
|
||||
$comments = stripslashes(trim("$row[22]"));
|
||||
$rank = trim("$row[23]");
|
||||
$owner = trim("$row[24]");
|
||||
|
||||
$comments = eregi_replace("\r",'',$comments);
|
||||
$comments = eregi_replace("\n",'!N',$comments);
|
||||
|
||||
$LeaD_InfO = "GOOD\n";
|
||||
$LeaD_InfO .= $vendor_id . "\n";
|
||||
$LeaD_InfO .= $source_id . "\n";
|
||||
$LeaD_InfO .= $gmt_offset_now . "\n";
|
||||
$LeaD_InfO .= $phone_code . "\n";
|
||||
$LeaD_InfO .= $phone_number . "\n";
|
||||
$LeaD_InfO .= $title . "\n";
|
||||
$LeaD_InfO .= $first_name . "\n";
|
||||
$LeaD_InfO .= $middle_initial . "\n";
|
||||
$LeaD_InfO .= $last_name . "\n";
|
||||
$LeaD_InfO .= $address1 . "\n";
|
||||
$LeaD_InfO .= $address2 . "\n";
|
||||
$LeaD_InfO .= $address3 . "\n";
|
||||
$LeaD_InfO .= $city . "\n";
|
||||
$LeaD_InfO .= $state . "\n";
|
||||
$LeaD_InfO .= $province . "\n";
|
||||
$LeaD_InfO .= $postal_code . "\n";
|
||||
$LeaD_InfO .= $country_code . "\n";
|
||||
$LeaD_InfO .= $gender . "\n";
|
||||
$LeaD_InfO .= $date_of_birth . "\n";
|
||||
$LeaD_InfO .= $alt_phone . "\n";
|
||||
$LeaD_InfO .= $email . "\n";
|
||||
$LeaD_InfO .= $security . "\n";
|
||||
$LeaD_InfO .= $comments . "\n";
|
||||
$LeaD_InfO .= $rank . "\n";
|
||||
$LeaD_InfO .= $owner . "\n";
|
||||
$LeaD_InfO .= "\n";
|
||||
|
||||
echo $LeaD_InfO;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: no lead info in system: $lead_id\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: no lead active for this agent\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
@@ -889,15 +985,14 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$row=''; $rowx='';
|
||||
$channel_live=1;
|
||||
if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "HOPPER EMPTY\n";
|
||||
echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n";
|
||||
exit;
|
||||
}
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "HOPPER EMPTY\n";
|
||||
echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
##### grab number of calls today in this campaign and increment
|
||||
$stmt="SELECT calls_today FROM vicidial_live_agents WHERE user='$user' and campaign_id='$campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
@@ -1602,7 +1697,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
# DATETIME|campaign|lead_id|phone_number|user|type
|
||||
# 2007-08-22 11:11:11|TESTCAMP|65432|3125551212|1234|M
|
||||
$fp = fopen ("./xfer_log.txt", "a");
|
||||
fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|M|$MqueryCID|\n");
|
||||
fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|M|$MqueryCID||$province\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
@@ -3716,7 +3811,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$script_recording_delay = $row[0];
|
||||
}
|
||||
|
||||
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3739,9 +3834,11 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$VDCL_ingroup_rec_filename = $row[12];
|
||||
$VDCL_default_group_alias = $row[13];
|
||||
$VDCL_group_web_two = stripslashes($row[14]);
|
||||
$VDCL_timer_action = $row[15];
|
||||
$VDCL_timer_action_message = $row[16];
|
||||
$VDCL_timer_action_seconds = $row[17];
|
||||
|
||||
|
||||
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias from vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3759,6 +3856,12 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
{$VDCL_xferconf_b_number = $row[4];}
|
||||
if (strlen($VDCL_default_group_alias) < 1)
|
||||
{$VDCL_default_group_alias = $row[5];}
|
||||
if (strlen($VDCL_timer_action) < 1)
|
||||
{$VDCL_timer_action = $row[6];}
|
||||
if (strlen($VDCL_timer_action_message) < 1)
|
||||
{$VDCL_timer_action_message = $row[7];}
|
||||
if (strlen($VDCL_timer_action_seconds) < 1)
|
||||
{$VDCL_timer_action_seconds = $row[8];}
|
||||
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
|
||||
{
|
||||
$VDCL_ingroup_script = $row[0];
|
||||
@@ -3812,7 +3915,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
||||
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3820,13 +3923,16 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
if ($VDIG_cid_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDCL_ingroup_script = $row[0];
|
||||
$VDCL_get_call_launch = $row[1];
|
||||
$VDCL_xferconf_a_dtmf = $row[2];
|
||||
$VDCL_xferconf_a_number = $row[3];
|
||||
$VDCL_xferconf_b_dtmf = $row[4];
|
||||
$VDCL_xferconf_b_number = $row[5];
|
||||
$VDCL_default_group_alias = $row[6];
|
||||
$VDCL_ingroup_script = $row[0];
|
||||
$VDCL_get_call_launch = $row[1];
|
||||
$VDCL_xferconf_a_dtmf = $row[2];
|
||||
$VDCL_xferconf_a_number = $row[3];
|
||||
$VDCL_xferconf_b_dtmf = $row[4];
|
||||
$VDCL_xferconf_b_number = $row[5];
|
||||
$VDCL_default_group_alias = $row[6];
|
||||
$VDCL_timer_action = $row[7];
|
||||
$VDCL_timer_action_message = $row[8];
|
||||
$VDCL_timer_action_seconds = $row[9];
|
||||
}
|
||||
|
||||
$script_recording_delay=0;
|
||||
@@ -3870,8 +3976,8 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
}
|
||||
|
||||
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|\n";}
|
||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|\n";}
|
||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";}
|
||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";}
|
||||
|
||||
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4007,7 +4113,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
# DATETIME|campaign|lead_id|phone_number|user|type
|
||||
# 2007-08-22 11:11:11|TESTCAMP|65432|3125551212|1234|A
|
||||
$fp = fopen ("./xfer_log.txt", "a");
|
||||
fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|$Ctype|$callerid|$uniqueid\n");
|
||||
fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|$Ctype|$callerid|$uniqueid|$province\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
@@ -4232,7 +4338,7 @@ if ($ACTION == 'updateDISPO')
|
||||
else
|
||||
{
|
||||
### reset the API fields in vicidial_live_agents record
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_launch_action_timer='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00141',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
@@ -266,10 +266,11 @@
|
||||
# 91206-2020 - Fixed vicidial_agent_log logging bug on logout when not paused
|
||||
# 91211-1412 - Added User custom variables and CRM login popup
|
||||
# 91219-0657 - Set pause code automatically on ReQueue and INBOUND_MAN Dial-Next-Number
|
||||
# 91228-1339 - Added API "fields update" functions and "timer action" functions
|
||||
#
|
||||
|
||||
$version = '2.2.0-244';
|
||||
$build = '91219-0657';
|
||||
$version = '2.2.0-245';
|
||||
$build = '91228-1339';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=64;
|
||||
$one_mysql_log=0;
|
||||
@@ -1098,7 +1099,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,crm_popup_login,crm_login_address 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,timer_action,timer_action_message,timer_action_seconds 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";}
|
||||
@@ -1161,6 +1162,9 @@ $VDloginDISPLAY=0;
|
||||
$agent_select_territories = $row[55];
|
||||
$crm_popup_login = $row[56];
|
||||
$crm_login_address = $row[57];
|
||||
$timer_action = $row[58];
|
||||
$timer_action_message = $row[59];
|
||||
$timer_action_seconds = $row[60];
|
||||
|
||||
if ($user_territories_active < 1)
|
||||
{$agent_select_territories = 0;}
|
||||
@@ -2626,6 +2630,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var VU_custom_five = '<?php echo $VU_custom_five ?>';
|
||||
var crm_popup_login = '<?php echo $crm_popup_login ?>';
|
||||
var crm_login_address = '<?php echo $crm_login_address ?>';
|
||||
var update_fields=0;
|
||||
var update_fields_data='';
|
||||
var campaign_timer_action = '<?php echo $timer_action ?>';
|
||||
var campaign_timer_action_message = '<?php echo $timer_action_message ?>';
|
||||
var campaign_timer_action_seconds = '<?php echo $timer_action_seconds ?>';
|
||||
var timer_action='';
|
||||
var timer_action_message='';
|
||||
var timer_action_seconds='';
|
||||
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
|
||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
|
||||
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
|
||||
@@ -3279,6 +3291,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var InGroupChangeBlend = check_time_array[12];
|
||||
var InGroupChangeUser = check_time_array[13];
|
||||
var InGroupChangeName = check_time_array[14];
|
||||
var APIFields_array = check_time_array[15].split("APIFields: ");
|
||||
update_fields = APIFields_array[1];
|
||||
var APIFieldsData_array = check_time_array[16].split("APIFieldsData: ");
|
||||
update_fields_data = APIFieldsData_array[1];
|
||||
var APITimerAction_array = check_time_array[17].split("APITimerAction: ");
|
||||
api_timer_action = APITimerAction_array[1];
|
||||
var APITimerMessage_array = check_time_array[18].split("APITimerMessage: ");
|
||||
api_timer_action_message = APITimerMessage_array[1];
|
||||
var APITimerSeconds_array = check_time_array[19].split("APITimerSeconds: ");
|
||||
api_timer_action_seconds = APITimerSeconds_array[1];
|
||||
|
||||
if (api_timer_action.length > 2)
|
||||
{
|
||||
timer_action = api_timer_action;
|
||||
timer_action_message = api_timer_action_message;
|
||||
timer_action_seconds = api_timer_action_seconds;
|
||||
}
|
||||
|
||||
if ( (APIHanguP==1) && (VD_live_customer_call==1) )
|
||||
{
|
||||
hideDiv('CustomerGoneBox');
|
||||
@@ -4591,6 +4621,346 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
|
||||
}
|
||||
|
||||
// ################################################################################
|
||||
// Update Agent screen with values from vicidial_list record
|
||||
function UpdateFieldsData()
|
||||
{
|
||||
var fields_list = update_fields_data + ',';
|
||||
update_fields=0;
|
||||
update_fields_data='';
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
// and security blocked creation of the objects.
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (E) {
|
||||
xmlhttp = false;
|
||||
}
|
||||
}
|
||||
@end @*/
|
||||
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
{
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
UpdateFields_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=UpdateFields&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&stage=" + update_fields_data;
|
||||
// alert(manual_dial_filter + "\n" +manDiaLnext_query);
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(UpdateFields_query);
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
var UDfieldsResponse = null;
|
||||
// alert(UpdateFields_query);
|
||||
// alert(xmlhttp.responseText);
|
||||
UDfieldsResponse = xmlhttp.responseText;
|
||||
|
||||
var UDfieldsResponse_array=UDfieldsResponse.split("\n");
|
||||
|
||||
var UDresponse_status = UDfieldsResponse_array[0];
|
||||
if (UDresponse_status == 'GOOD')
|
||||
{
|
||||
var regUDvendor_lead_code = new RegExp("vendor_lead_code,","ig");
|
||||
if (fields_list.match(regUDvendor_lead_code))
|
||||
{document.vicidial_form.vendor_lead_code.value = UDfieldsResponse_array[1];}
|
||||
var regUDsource_id = new RegExp("source_id,","ig");
|
||||
if (fields_list.match(regUDsource_id))
|
||||
{source_id = UDfieldsResponse_array[2];}
|
||||
var regUDgmt_offset_now = new RegExp("gmt_offset_now,","ig");
|
||||
if (fields_list.match(regUDgmt_offset_now))
|
||||
{document.vicidial_form.gmt_offset_now.value = UDfieldsResponse_array[3];}
|
||||
var regUDphone_code = new RegExp("phone_code,","ig");
|
||||
if (fields_list.match(regUDphone_code))
|
||||
{document.vicidial_form.phone_code.value = UDfieldsResponse_array[4];}
|
||||
var regUDphone_number = new RegExp("phone_number,","ig");
|
||||
if (fields_list.match(regUDphone_number))
|
||||
{
|
||||
if ( (disable_alter_custphone=='Y') || (disable_alter_custphone=='HIDE') )
|
||||
{
|
||||
var tmp_pn = document.getElementById("phone_numberDISP");
|
||||
if (disable_alter_custphone=='Y')
|
||||
{
|
||||
tmp_pn.innerHTML = UDfieldsResponse_array[5];
|
||||
}
|
||||
}
|
||||
document.vicidial_form.phone_number.value = UDfieldsResponse_array[5];
|
||||
}
|
||||
var regUDtitle = new RegExp("title,","ig");
|
||||
if (fields_list.match(regUDtitle))
|
||||
{document.vicidial_form.title.value = UDfieldsResponse_array[6];}
|
||||
var regUDfirst_name = new RegExp("first_name,","ig");
|
||||
if (fields_list.match(regUDfirst_name))
|
||||
{document.vicidial_form.first_name.value = UDfieldsResponse_array[7];}
|
||||
var regUDmiddle_initial = new RegExp("middle_initial,","ig");
|
||||
if (fields_list.match(regUDmiddle_initial))
|
||||
{document.vicidial_form.middle_initial.value = UDfieldsResponse_array[8];}
|
||||
var regUDlast_name = new RegExp("last_name,","ig");
|
||||
if (fields_list.match(regUDlast_name))
|
||||
{document.vicidial_form.last_name.value = UDfieldsResponse_array[9];}
|
||||
var regUDaddress1 = new RegExp("address1,","ig");
|
||||
if (fields_list.match(regUDaddress1))
|
||||
{document.vicidial_form.address1.value = UDfieldsResponse_array[10];}
|
||||
var regUDaddress2 = new RegExp("address2,","ig");
|
||||
if (fields_list.match(regUDaddress2))
|
||||
{document.vicidial_form.address2.value = UDfieldsResponse_array[11];}
|
||||
var regUDaddress3 = new RegExp("address3,","ig");
|
||||
if (fields_list.match(regUDaddress3))
|
||||
{document.vicidial_form.address3.value = UDfieldsResponse_array[12];}
|
||||
var regUDcity = new RegExp("city,","ig");
|
||||
if (fields_list.match(regUDcity))
|
||||
{document.vicidial_form.city.value = UDfieldsResponse_array[13];}
|
||||
var regUDstate = new RegExp("state,","ig");
|
||||
if (fields_list.match(regUDstate))
|
||||
{document.vicidial_form.state.value = UDfieldsResponse_array[14];}
|
||||
var regUDprovince = new RegExp("province,","ig");
|
||||
if (fields_list.match(regUDprovince))
|
||||
{document.vicidial_form.province.value = UDfieldsResponse_array[15];}
|
||||
var regUDpostal_code = new RegExp("postal_code,","ig");
|
||||
if (fields_list.match(regUDpostal_code))
|
||||
{document.vicidial_form.postal_code.value = UDfieldsResponse_array[16];}
|
||||
var regUDcountry_code = new RegExp("country_code,","ig");
|
||||
if (fields_list.match(regUDcountry_code))
|
||||
{document.vicidial_form.country_code.value = UDfieldsResponse_array[17];}
|
||||
var regUDgender = new RegExp("gender,","ig");
|
||||
if (fields_list.match(regUDgender))
|
||||
{
|
||||
document.vicidial_form.gender.value = UDfieldsResponse_array[18];
|
||||
var gIndex = 0;
|
||||
if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;}
|
||||
if (document.vicidial_form.gender.value == 'F') {var gIndex = 2;}
|
||||
document.getElementById("gender_list").selectedIndex = gIndex;
|
||||
var genderIndex = document.getElementById("gender_list").selectedIndex;
|
||||
var genderValue = document.getElementById('gender_list').options[genderIndex].value;
|
||||
document.vicidial_form.gender.value = genderValue;
|
||||
}
|
||||
var regUDdate_of_birth = new RegExp("date_of_birth,","ig");
|
||||
if (fields_list.match(regUDdate_of_birth))
|
||||
{document.vicidial_form.date_of_birth.value = UDfieldsResponse_array[19];}
|
||||
var regUDalt_phone = new RegExp("alt_phone,","ig");
|
||||
if (fields_list.match(regUDalt_phone))
|
||||
{document.vicidial_form.alt_phone.value = UDfieldsResponse_array[20];}
|
||||
var regUDemail = new RegExp("email,","ig");
|
||||
if (fields_list.match(regUDemail))
|
||||
{document.vicidial_form.email.value = UDfieldsResponse_array[21];}
|
||||
var regUDsecurity_phrase = new RegExp("security_phrase,","ig");
|
||||
if (fields_list.match(regUDsecurity_phrase))
|
||||
{document.vicidial_form.security_phrase.value = UDfieldsResponse_array[22];}
|
||||
var regUDcomments = new RegExp("comments,","ig");
|
||||
if (fields_list.match(regUDcomments))
|
||||
{
|
||||
var REGcommentsNL = new RegExp("!N","g");
|
||||
UDfieldsResponse_array[23] = UDfieldsResponse_array[23].replace(REGcommentsNL, "\n");
|
||||
document.vicidial_form.comments.value = UDfieldsResponse_array[23];
|
||||
}
|
||||
var regUDrank = new RegExp("rank,","ig");
|
||||
if (fields_list.match(regUDrank))
|
||||
{document.vicidial_form.rank.value = UDfieldsResponse_array[24];}
|
||||
var regUDowner = new RegExp("owner,","ig");
|
||||
if (fields_list.match(regUDowner))
|
||||
{document.vicidial_form.owner.value = UDfieldsResponse_array[25];}
|
||||
|
||||
|
||||
var regWFAcustom = new RegExp("^VAR","ig");
|
||||
if (VDIC_web_form_address.match(regWFAcustom))
|
||||
{
|
||||
URLDecode(VDIC_web_form_address,'YES');
|
||||
TEMP_VDIC_web_form_address = decoded;
|
||||
TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, '');
|
||||
}
|
||||
else
|
||||
{
|
||||
web_form_vars =
|
||||
"lead_id=" + document.vicidial_form.lead_id.value +
|
||||
"&vendor_id=" + document.vicidial_form.vendor_lead_code.value +
|
||||
"&list_id=" + document.vicidial_form.list_id.value +
|
||||
"&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value +
|
||||
"&phone_code=" + document.vicidial_form.phone_code.value +
|
||||
"&phone_number=" + document.vicidial_form.phone_number.value +
|
||||
"&title=" + document.vicidial_form.title.value +
|
||||
"&first_name=" + document.vicidial_form.first_name.value +
|
||||
"&middle_initial=" + document.vicidial_form.middle_initial.value +
|
||||
"&last_name=" + document.vicidial_form.last_name.value +
|
||||
"&address1=" + document.vicidial_form.address1.value +
|
||||
"&address2=" + document.vicidial_form.address2.value +
|
||||
"&address3=" + document.vicidial_form.address3.value +
|
||||
"&city=" + document.vicidial_form.city.value +
|
||||
"&state=" + document.vicidial_form.state.value +
|
||||
"&province=" + document.vicidial_form.province.value +
|
||||
"&postal_code=" + document.vicidial_form.postal_code.value +
|
||||
"&country_code=" + document.vicidial_form.country_code.value +
|
||||
"&gender=" + document.vicidial_form.gender.value +
|
||||
"&date_of_birth=" + document.vicidial_form.date_of_birth.value +
|
||||
"&alt_phone=" + document.vicidial_form.alt_phone.value +
|
||||
"&email=" + document.vicidial_form.email.value +
|
||||
"&security_phrase=" + document.vicidial_form.security_phrase.value +
|
||||
"&comments=" + document.vicidial_form.comments.value +
|
||||
"&user=" + user +
|
||||
"&pass=" + pass +
|
||||
"&campaign=" + campaign +
|
||||
"&phone_login=" + phone_login +
|
||||
"&original_phone_login=" + original_phone_login +
|
||||
"&phone_pass=" + phone_pass +
|
||||
"&fronter=" + fronter +
|
||||
"&closer=" + user +
|
||||
"&group=" + group +
|
||||
"&channel_group=" + group +
|
||||
"&SQLdate=" + SQLdate +
|
||||
"&epoch=" + UnixTime +
|
||||
"&uniqueid=" + document.vicidial_form.uniqueid.value +
|
||||
"&customer_zap_channel=" + lastcustchannel +
|
||||
"&customer_server_ip=" + lastcustserverip +
|
||||
"&server_ip=" + server_ip +
|
||||
"&SIPexten=" + extension +
|
||||
"&session_id=" + session_id +
|
||||
"&phone=" + document.vicidial_form.phone_number.value +
|
||||
"&parked_by=" + document.vicidial_form.lead_id.value +
|
||||
"&dispo=" + LeaDDispO + '' +
|
||||
"&dialed_number=" + dialed_number + '' +
|
||||
"&dialed_label=" + dialed_label + '' +
|
||||
"&source_id=" + source_id + '' +
|
||||
"&rank=" + document.vicidial_form.rank.value + '' +
|
||||
"&owner=" + document.vicidial_form.owner.value + '' +
|
||||
"&camp_script=" + campaign_script + '' +
|
||||
"&in_script=" + CalL_ScripT_id + '' +
|
||||
"&script_width=" + script_width + '' +
|
||||
"&script_height=" + script_height + '' +
|
||||
"&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");
|
||||
web_form_vars = web_form_vars.replace(regWF, '');
|
||||
var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig");
|
||||
web_form_vars = web_form_vars.replace(regWFspace, '+');
|
||||
web_form_vars = web_form_vars.replace(regWF, '');
|
||||
|
||||
var regWFAvars = new RegExp("\\?","ig");
|
||||
if (VDIC_web_form_address.match(regWFAvars))
|
||||
{web_form_vars = '&' + web_form_vars}
|
||||
else
|
||||
{web_form_vars = '?' + web_form_vars}
|
||||
|
||||
TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
|
||||
}
|
||||
|
||||
if (VDIC_web_form_address_two.match(regWFAcustom))
|
||||
{
|
||||
URLDecode(VDIC_web_form_address_two,'YES');
|
||||
TEMP_VDIC_web_form_address_two = decoded;
|
||||
TEMP_VDIC_web_form_address_two = TEMP_VDIC_web_form_address_two.replace(regWFAcustom, '');
|
||||
}
|
||||
else
|
||||
{
|
||||
web_form_vars_two =
|
||||
"lead_id=" + document.vicidial_form.lead_id.value +
|
||||
"&vendor_id=" + document.vicidial_form.vendor_lead_code.value +
|
||||
"&list_id=" + document.vicidial_form.list_id.value +
|
||||
"&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value +
|
||||
"&phone_code=" + document.vicidial_form.phone_code.value +
|
||||
"&phone_number=" + document.vicidial_form.phone_number.value +
|
||||
"&title=" + document.vicidial_form.title.value +
|
||||
"&first_name=" + document.vicidial_form.first_name.value +
|
||||
"&middle_initial=" + document.vicidial_form.middle_initial.value +
|
||||
"&last_name=" + document.vicidial_form.last_name.value +
|
||||
"&address1=" + document.vicidial_form.address1.value +
|
||||
"&address2=" + document.vicidial_form.address2.value +
|
||||
"&address3=" + document.vicidial_form.address3.value +
|
||||
"&city=" + document.vicidial_form.city.value +
|
||||
"&state=" + document.vicidial_form.state.value +
|
||||
"&province=" + document.vicidial_form.province.value +
|
||||
"&postal_code=" + document.vicidial_form.postal_code.value +
|
||||
"&country_code=" + document.vicidial_form.country_code.value +
|
||||
"&gender=" + document.vicidial_form.gender.value +
|
||||
"&date_of_birth=" + document.vicidial_form.date_of_birth.value +
|
||||
"&alt_phone=" + document.vicidial_form.alt_phone.value +
|
||||
"&email=" + document.vicidial_form.email.value +
|
||||
"&security_phrase=" + document.vicidial_form.security_phrase.value +
|
||||
"&comments=" + document.vicidial_form.comments.value +
|
||||
"&user=" + user +
|
||||
"&pass=" + pass +
|
||||
"&campaign=" + campaign +
|
||||
"&phone_login=" + phone_login +
|
||||
"&original_phone_login=" + original_phone_login +
|
||||
"&phone_pass=" + phone_pass +
|
||||
"&fronter=" + fronter +
|
||||
"&closer=" + user +
|
||||
"&group=" + group +
|
||||
"&channel_group=" + group +
|
||||
"&SQLdate=" + SQLdate +
|
||||
"&epoch=" + UnixTime +
|
||||
"&uniqueid=" + document.vicidial_form.uniqueid.value +
|
||||
"&customer_zap_channel=" + lastcustchannel +
|
||||
"&customer_server_ip=" + lastcustserverip +
|
||||
"&server_ip=" + server_ip +
|
||||
"&SIPexten=" + extension +
|
||||
"&session_id=" + session_id +
|
||||
"&phone=" + document.vicidial_form.phone_number.value +
|
||||
"&parked_by=" + document.vicidial_form.lead_id.value +
|
||||
"&dispo=" + LeaDDispO + '' +
|
||||
"&dialed_number=" + dialed_number + '' +
|
||||
"&dialed_label=" + dialed_label + '' +
|
||||
"&source_id=" + source_id + '' +
|
||||
"&rank=" + document.vicidial_form.rank.value + '' +
|
||||
"&owner=" + document.vicidial_form.owner.value + '' +
|
||||
"&camp_script=" + campaign_script + '' +
|
||||
"&in_script=" + CalL_ScripT_id + '' +
|
||||
"&script_width=" + script_width + '' +
|
||||
"&script_height=" + script_height + '' +
|
||||
"&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");
|
||||
web_form_vars_two = web_form_vars_two.replace(regWF, '');
|
||||
var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig");
|
||||
web_form_vars_two = web_form_vars_two.replace(regWFspace, '+');
|
||||
web_form_vars_two = web_form_vars_two.replace(regWF, '');
|
||||
|
||||
var regWFAvars = new RegExp("\\?","ig");
|
||||
if (VDIC_web_form_address_two.match(regWFAvars))
|
||||
{web_form_vars_two = '&' + web_form_vars_two}
|
||||
else
|
||||
{web_form_vars_two = '?' + web_form_vars_two}
|
||||
|
||||
TEMP_VDIC_web_form_address_two = VDIC_web_form_address_two + "" + web_form_vars_two;
|
||||
}
|
||||
|
||||
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + TEMP_VDIC_web_form_address + "\" target=\"" + web_form_target + "\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"./images/vdc_LB_webform.gif\" border=0 alt=\"Web Form\"></a>\n";
|
||||
if (enable_second_webform > 0)
|
||||
{
|
||||
document.getElementById("WebFormSpanTwo").innerHTML = "<a href=\"" + TEMP_VDIC_web_form_address_two + "\" target=\"" + web_form_target + "\" onMouseOver=\"WebFormTwoRefresH();\"><IMG SRC=\"./images/vdc_LB_webform_two.gif\" border=0 alt=\"Web Form 2\"></a>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Update Fields Error!: " + xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Send the Manual Dial Next Number request
|
||||
function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE,mdVendorid,mdgroupalias)
|
||||
@@ -4766,6 +5136,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
// CalL_ScripT_id = MDnextResponse_array[37];
|
||||
script_recording_delay = MDnextResponse_array[38];
|
||||
|
||||
timer_action = campaign_timer_action;
|
||||
timer_action_message = campaign_timer_action_message;
|
||||
timer_action_seconds = campaign_timer_action_seconds;
|
||||
|
||||
lead_dial_number = document.vicidial_form.phone_number.value;
|
||||
var dispnum = document.vicidial_form.phone_number.value;
|
||||
@@ -5908,6 +6281,22 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
document.vicidial_form.rank.value = check_VDIC_array[44];
|
||||
document.vicidial_form.owner.value = check_VDIC_array[45];
|
||||
script_recording_delay = check_VDIC_array[46];
|
||||
var call_timer_action = check_VDIC_array[47];
|
||||
|
||||
if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) )
|
||||
{
|
||||
timer_action = campaign_timer_action;
|
||||
timer_action_message = campaign_timer_action_message;
|
||||
timer_action_seconds = campaign_timer_action_seconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
var call_timer_action_message = check_VDIC_array[48];
|
||||
var call_timer_action_seconds = check_VDIC_array[49];
|
||||
timer_action = call_timer_action;
|
||||
timer_action_message = call_timer_action_message;
|
||||
timer_action_seconds = call_timer_action_seconds;
|
||||
}
|
||||
|
||||
var gIndex = 0;
|
||||
if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;}
|
||||
@@ -8967,6 +9356,43 @@ else
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Finish the wrapup timer early
|
||||
function TimerActionRun()
|
||||
{
|
||||
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
|
||||
{
|
||||
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER NOTIFICATION: " + timer_action_seconds + " seconds<BR><BR>" + timer_action_message + "</b>";
|
||||
|
||||
showDiv('TimerSpan');
|
||||
}
|
||||
|
||||
if (timer_action == 'WEBFORM')
|
||||
{
|
||||
WebFormRefresH('NO','YES');
|
||||
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
|
||||
}
|
||||
|
||||
if (timer_action == 'WEBFORM2')
|
||||
{
|
||||
WebFormTwoRefresH('NO','YES');
|
||||
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
|
||||
}
|
||||
|
||||
if (timer_action == 'D1_DIAL')
|
||||
{
|
||||
DtMf_PreSet_a_DiaL();
|
||||
}
|
||||
|
||||
if (timer_action == 'D2_DIAL')
|
||||
{
|
||||
DtMf_PreSet_b_DiaL();
|
||||
}
|
||||
|
||||
timer_action = 'NONE';
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Finish the wrapup timer early
|
||||
function WrapupFinish()
|
||||
@@ -9014,6 +9440,7 @@ else
|
||||
hideDiv('GroupAliasSelectBox');
|
||||
hideDiv('AgentViewSpan');
|
||||
hideDiv('AgentXferViewSpan');
|
||||
hideDiv('TimerSpan');
|
||||
if (view_calls_in_queue_launch != '1')
|
||||
{hideDiv('callsinqueuedisplay');}
|
||||
if (agentonly_callbacks != '1')
|
||||
@@ -9216,6 +9643,14 @@ else
|
||||
XD_live_call_secondS++;
|
||||
document.vicidial_form.xferlength.value = XD_live_call_secondS;
|
||||
}
|
||||
if ( (update_fields > 0) && (update_fields_data.length > 2) )
|
||||
{
|
||||
UpdateFieldsData();
|
||||
}
|
||||
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) )
|
||||
{
|
||||
TimerActionRun();
|
||||
}
|
||||
if (HKdispo_display > 0)
|
||||
{
|
||||
if ( (HKdispo_display == 3) && (HKfinish==1) )
|
||||
@@ -9850,7 +10285,7 @@ echo "</head>\n";
|
||||
<BR><BR> <BR>
|
||||
</font></span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:50;" id="CallBacKsLisTBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:51;" id="CallBacKsLisTBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> CALLBACKS FOR AGENT <?php echo $VD_login ?>:<BR>Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list.
|
||||
<BR>
|
||||
<div class="scroll_callback" id="CallBacKsLisT"></div>
|
||||
@@ -9861,7 +10296,7 @@ echo "</head>\n";
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:51;" id="NeWManuaLDiaLBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:52;" id="NeWManuaLDiaLBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> NEW MANUAL DIAL LEAD FOR <?php echo "$VD_login in campaign $VD_campaign" ?>:<BR><BR>Enter information below for the new lead you wish to call.
|
||||
<BR>
|
||||
<?php
|
||||
@@ -10105,7 +10540,6 @@ if ($agent_display_dialable_leads > 0)
|
||||
<a href="#" onclick="CustomerGoneOK();return false;">Go Back</a>
|
||||
<BR><BR>
|
||||
<a href="#" onclick="CustomerGoneHangup();return false;">Finish and Disposition Call</a>
|
||||
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
@@ -10114,37 +10548,43 @@ if ($agent_display_dialable_leads > 0)
|
||||
<span id="WrapupMessage"><?php echo $wrapup_message ?></span>
|
||||
<BR><BR>
|
||||
<a href="#" onclick="WrapupFinish();return false;">Finish Wrapup and Move On</a>
|
||||
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:42;" id="AgenTDisablEBoX">
|
||||
<span style="position:absolute;left:200px;top:150px;z-index:42;" id="TimerSpan">
|
||||
<table border=1 bgcolor="#CCFFCC" width=400 height=200><TR><TD align=center>
|
||||
<BR><span id="TimerContentSpan"></span><BR><BR>
|
||||
<a href="#" onclick="hideDiv('TimerSpan');return false;">Close Message</a>
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:43;" id="AgenTDisablEBoX">
|
||||
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center>Your session has been disabled<BR><a href="#" onclick="LogouT('DISABLED');return false;">LOGOUT</a><BR><BR><a href="#" onclick="hideDiv('AgenTDisablEBoX');return false;">Go Back</a>
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:43;" id="SysteMDisablEBoX">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:44;" id="SysteMDisablEBoX">
|
||||
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center>There is a time synchronization problem with your system, please tell your system administrator<BR><BR><BR><a href="#" onclick="hideDiv('SysteMDisablEBoX');return false;">Go Back</a>
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:44;" id="LogouTBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:45;" id="LogouTBox">
|
||||
<table border=1 bgcolor="#FFFFFF" width=<?php echo $CAwidth ?> height=500><TR><TD align=center><BR><span id="LogouTBoxLink">LOGOUT</span></TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:70px;z-index:45;" id="DispoButtonHideA">
|
||||
<span style="position:absolute;left:0px;top:70px;z-index:46;" id="DispoButtonHideA">
|
||||
<table border=0 bgcolor="#CCFFCC" width=165 height=22><TR><TD align=center VALIGN=top></TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:138px;z-index:46;" id="DispoButtonHideB">
|
||||
<span style="position:absolute;left:0px;top:138px;z-index:47;" id="DispoButtonHideB">
|
||||
<table border=0 bgcolor="#CCFFCC" width=165 height=250><TR><TD align=center VALIGN=top> </TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:47;" id="DispoButtonHideC">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:48;" id="DispoButtonHideC">
|
||||
<table border=0 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=47><TR><TD align=center VALIGN=top>Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call. </TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:48;" id="DispoSelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:49;" id="DispoSelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> DISPOSITION CALL :<span id="DispoSelectPhonE"></span> <span id="DispoSelectHAspan"><a href="#" onclick="DispoHanguPAgaiN()">Hangup Again</a></span> <span id="DispoSelectMaxMin"><a href="#" onclick="DispoMinimize()"> minimize </a></span><BR>
|
||||
<span id="DispoSelectContent"> End-of-call Disposition Selection </span>
|
||||
<input type=hidden name=DispoSelection><BR>
|
||||
@@ -10157,7 +10597,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:63;" id="PauseCodeSelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:64;" id="PauseCodeSelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> SELECT A PAUSE CODE :<BR>
|
||||
<span id="PauseCodeSelectContent"> Pause Code Selection </span>
|
||||
<input type=hidden name=PauseCodeSelection>
|
||||
@@ -10165,7 +10605,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:64;" id="GroupAliasSelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:65;" id="GroupAliasSelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> SELECT A GROUP ALIAS :<BR>
|
||||
<span id="GroupAliasSelectContent"> Group Alias Selection </span>
|
||||
<input type=hidden name=GroupAliasSelection>
|
||||
@@ -10173,10 +10613,10 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:1500px;z-index:65;" id="GENDERhideFORieALT"></span>
|
||||
<span style="position:absolute;left:0px;top:1500px;z-index:66;" id="GENDERhideFORieALT"></span>
|
||||
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:49;" id="CallBackSelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:50;" id="CallBackSelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> Select a CallBack Date :<span id="CallBackDatE"></span><BR>
|
||||
<input type=hidden name=CallBackDatESelectioN ID="CallBackDatESelectioN">
|
||||
<input type=hidden name=CallBackTimESelectioN ID="CallBackTimESelectioN">
|
||||
@@ -10229,7 +10669,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:52;" id="CloserSelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:53;" id="CloserSelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> CLOSER INBOUND GROUP SELECTION <BR>
|
||||
<span id="CloserSelectContent"> Closer Inbound Group Selection </span>
|
||||
<input type=hidden name=CloserSelectList><BR>
|
||||
@@ -10247,7 +10687,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:53;" id="TerritorySelectBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:54;" id="TerritorySelectBox">
|
||||
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
|
||||
<span id="TerritorySelectContent"> Territory Selection </span>
|
||||
<input type=hidden name=TerritorySelectList><BR>
|
||||
@@ -10257,7 +10697,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
</TD></TR></TABLE>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:54;" id="NothingBox">
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
|
||||
<BUTTON Type=button name="inert_button"><img src="./images/blank.gif"></BUTTON>
|
||||
<span id="DiaLLeaDPrevieWHide">Channel</span>
|
||||
<span id="DiaLDiaLAltPhonEHide">Channel</span>
|
||||
@@ -10302,7 +10742,7 @@ else
|
||||
</span></td></tr>
|
||||
<tr><td colspan=3>
|
||||
<font class="body_small">
|
||||
<span style="position:absolute;left:0px;top:700px;z-index:66;" id="debugbottomspan"></span>
|
||||
<span style="position:absolute;left:0px;top:700px;z-index:67;" id="debugbottomspan"></span>
|
||||
</font>
|
||||
</td></tr>
|
||||
</TABLE>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,6 +19,7 @@
|
||||
# 90111-1451 - Added logging of call as activity for account/lead
|
||||
# 90112-0336 - Added create call and create lead options
|
||||
# 90323-2104 - Added deleted account/lead check and reactivation from campaign option
|
||||
# 91228-1751 - Added UNIFIED_CONTACT search option
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -190,15 +191,38 @@ mysql_select_db("$vtiger_dbname", $linkV);
|
||||
# LEAD:
|
||||
# $stmt="SELECT count(*) from vtiger_leadaddress where phone='$phone' or mobile='$phone' or fax='$phone';";
|
||||
|
||||
$lead_search=0; $account_search=0; $vendor_search=0; $acctid_search=0;
|
||||
$lead_search=0; $account_search=0; $vendor_search=0; $acctid_search=0; $unified_contact=0;
|
||||
|
||||
if (ereg('ACCTID',$vtiger_search_category)) {$acctid_search=1;}
|
||||
if (ereg('ACCOUNT',$vtiger_search_category)) {$account_search=1;}
|
||||
if (ereg('VENDOR',$vtiger_search_category)) {$vendor_search=1;}
|
||||
if (ereg('LEAD',$vtiger_search_category)) {$lead_search=1;}
|
||||
if (ereg('ACCTID',$vtiger_search_category)) {$acctid_search=1;}
|
||||
if (ereg('ACCOUNT',$vtiger_search_category)) {$account_search=1;}
|
||||
if (ereg('VENDOR',$vtiger_search_category)) {$vendor_search=1;}
|
||||
if (ereg('LEAD',$vtiger_search_category)) {$lead_search=1;}
|
||||
if (ereg('UNIFIED_CONTACT',$vtiger_search_category)) {$unified_contact=1;}
|
||||
|
||||
|
||||
|
||||
##########################################################################
|
||||
##### BEGIN - UNIFIED_CONTACT - Search using beta 5.1.0 unified search feature
|
||||
##########################################################################
|
||||
if ($unified_contact > 0)
|
||||
{
|
||||
$unified_contact_URL = "$vtiger_url/index.php?action=UnifiedSearch&module=Home&search_module=Contacts&query_string=$phone&_service=vicidial";
|
||||
|
||||
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$unified_contact_URL\">\n";
|
||||
echo "</head>\n";
|
||||
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
|
||||
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
|
||||
|
||||
echo "<PRE>";
|
||||
echo "Forwarding to Vtiger Unified Contact Search page...\n";
|
||||
echo "phone number: <a href=\"$unified_contact_URL\">$phone</a>\n";
|
||||
echo "</PRE><BR>";
|
||||
exit;
|
||||
}
|
||||
##########################################################################
|
||||
##### END - UNIFIED_CONTACT
|
||||
##########################################################################
|
||||
|
||||
|
||||
|
||||
##########################################################################
|
||||
|
||||
Reference in New Issue
Block a user