updated language builds

git-svn-id: svn://192.168.202.10@1295 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-01-08 02:58:21 +00:00
parent 4d204255ac
commit 47f4b21e7f
454 changed files with 238850 additions and 92551 deletions
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";}
if ($format=='table') {echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Você fez o logoff. Obrigado\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>astGUIclient web client</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_ptbr.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Gerentesends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Gerentesends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Bem vindo $LOGfullname, Você está logado no telefone : $fullname - $protocol/$extensionligado$server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">SAIR</a><BR>\n"; ?>
<?php echo "Bem vindo $LOGfullname, Você está logado no telefone : $fullname - $protocol/$extensionligado$server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">SAIR</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_ptbr.gif" ALT="Painel Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>CHAMADAS ENTRANTES:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>Versão do cliente web do astGUIClient:<? echo $version ?> CONFIGURAÇÃO:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>Versão do cliente web do astGUIClient:<?php echo $version ?> CONFIGURAÇÃO:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text">FAVORITOS</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;">editar</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent isligadois hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_SAIR';}
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 . "|\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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSÃO: $version CONFIGURAÇÃO: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSÃO: $version CONFIGURAÇÃO: $build UNIQUEID: $uniqueid
// ################################################################################
// timeout to deactivate the call action links after 30 segundos
// timeout to deactivate the call action links after 30segundos
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSÃO: $version CONFIGURAÇÃO: $build UNIQUEID: $uniqueid
</script>
<?
<?php
echo "<title>CHAMADA ENTRANDO";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid não é válido\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "O usuário ea senha que você digitou não são ativos no sistema<BR>Por favor, tente novamente:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'INICIAR') )
{
### You cannot log in or out within 30 segundos of your last login/logout
### You cannot log in or out within 30segundos of your last login/logout
$VDdisplayMESSAGE = "Você não pode efetuar login ou para fora dentro de 30 segundos do seu último login ou logout";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">ANTERIOR a tela Bem-vindo</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";}
if ($format=='table') {echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Sie haben sich abgemeldet. Danke\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>astGUIclient web client</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_de.jpg";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Managersends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Managersends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Willkommen $LOGfullname, Sie sind mit diesem Telefon angemeldet: $fullname - $protocol/$extension an $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
<?php echo "Willkommen $LOGfullname, Sie sind mit diesem Telefon angemeldet: $fullname - $protocol/$extension an $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Haupt Bedienfeld" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>INBOUND ANRUFE:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient Web-Client VERSION:<? echo $version ?> BUILD:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient Web-Client VERSION:<?php echo $version ?> BUILD:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> FAVORITEN</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> bearbeiten</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is an is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,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 . "|\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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
// ################################################################################
// timeout to deactivate the call action links after 30 Sekunden
// timeout to deactivate the call action links after 30Sekunden
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
</script>
<?
<?php
echo "<title>LIVE INBOUND ANRUF";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid ist unzulässig\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "Diese Benutzer und Passwort Kombination ist nicht gültig<BR>Bitte noch einmal:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Stechuhr</TITLE>\n";
echo"<TITLE>Agent Stechuhr</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30 Sekunden of your last login/logout
### You cannot log in or out within 30Sekunden of your last login/logout
$VDdisplayMESSAGE = "Bitte warten Sie wenigstens 30 Sekunden zwischen dem an- und abmelden und umgekehrt";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Stechuhr</TITLE>\n";
echo"<TITLE>Agent Stechuhr</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">ZURÜCK zur Einstiegsseite</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Stechuhr</TITLE>\n";
echo"<TITLE>Agent Stechuhr</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Stechuhr</TITLE>\n";
echo"<TITLE>Agent Stechuhr</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Stechuhr</TITLE>\n";
echo"<TITLE>Agent Stechuhr</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";}
if ($format=='table') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Έχετε αποσυνδεθεί. Σας ευχαριστούμε\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>χειριστής astGUIclient</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Διευθυντήςsends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Διευθυντήςsends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Χρήστης $LOGfullname, συνδεμένος με το τηλ: $fullname - $protocol/$extension στο $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">ΑΠΟΣΥΝΔΕΣΗ</a><BR>\n"; ?>
<?php echo "Χρήστης $LOGfullname, συνδεμένος με το τηλ: $fullname - $protocol/$extension στο $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">ΑΠΟΣΥΝΔΕΣΗ</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_el.gif" ALT="Κύριος Πίνακας" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>ΕΙΣΕΡΧΟΜΕΝΕΣ ΚΛΗΣΕΙΣ:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>ΈΚΔΟΣΗ astGUIclient:<? echo $version ?> ΔΗΜΙΟΥΡΓΙΑ:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>ΈΚΔΟΣΗ astGUIclient:<?php echo $version ?> ΔΗΜΙΟΥΡΓΙΑ:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> ΑΓΑΠΗΜΕΝΑ</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> διορθώστε</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is στο is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_ΑΠΟΣΥΝΔΕΣΗ';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Κατάσταση: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . "|\n";
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Κατάσταση: ' . $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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- ΕΚΔΟΣΗ: $version ΔΗΜΙΟΥΡΓΙΑ: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- ΕΚΔΟΣΗ: $version ΔΗΜΙΟΥΡΓΙΑ: $build UNIQUEID:
// ################################################################################
// timeout to deactivate the call action links after 30 δευτερόλεπτα
// timeout to deactivate the call action links after 30δευτερόλεπτα
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- ΕΚΔΟΣΗ: $version ΔΗΜΙΟΥΡΓΙΑ: $build UNIQUEID:
</script>
<?
<?php
echo "<title>ΕΝΕΡΓΗ ΕΙΣΕΡΧΟΜΕΝΗ ΚΛΗΣΗ";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid δεν ισχύει\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "Ο χρήστη και τον κωδικό πρόσβασης που πληκτρολογήσατε δεν είναι ενεργό στο σύστημα<BR>Παρακαλώ δοκιμάστε ξανά:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'ΕΝΑΡΞΗ') )
{
### You cannot log in or out within 30 δευτερόλεπτα of your last login/logout
### You cannot log in or out within 30δευτερόλεπτα of your last login/logout
$VDdisplayMESSAGE = "Δεν μπορείτε να συνδεθείτε ή να αναφέρονται μέσα σε 30 δευτερόλεπτα από την τελευταία σας login ή logout";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">ΕΠΙΣΤΡΟΦΗ στην οθόνη υποδοχής</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";}
if ($format=='table') {echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Usted ahora ha registrado hacia fuera. Gracias\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>web client astGUIclient</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_es.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Directorsends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Directorsends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Bienvenido $LOGfullname, su teléfono: $fullname - $protocol/$extension en $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">SALIR</a><BR>\n"; ?>
<?php echo "Bienvenido $LOGfullname, su teléfono: $fullname - $protocol/$extension en $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">SALIR</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main_es.gif" ALT="Pantalla Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>LLAMADAS ENTRANTES:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>versión astGUIclient del tela-cliente:<? echo $version ?> CONSTRUCCION:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>versión astGUIclient del tela-cliente:<?php echo $version ?> CONSTRUCCION:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> FAVORITOS</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> corrija</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is en is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_SALIR';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Estado: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . "|\n";
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Estado: ' . $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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSIÓN: $version CONSTRUCCION: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSIÓN: $version CONSTRUCCION: $build UNIQUEID: $uniqueid
// ################################################################################
// timeout to deactivate the call action links after 30 segundos
// timeout to deactivate the call action links after 30segundos
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSIÓN: $version CONSTRUCCION: $build UNIQUEID: $uniqueid
</script>
<?
<?php
echo "<title>LLAMADA DE ENTRADA ACTIVA";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid No es válido\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "El usuario y la contraseña que ha introducido no son activos en el sistema<BR>Por favor, inténtelo de nuevo:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'COMIENZO') )
{
### You cannot log in or out within 30 segundos of your last login/logout
### You cannot log in or out within 30segundos of your last login/logout
$VDdisplayMESSAGE = "No puede iniciar sesión o en un plazo de 30 segundos de su última conexión o desconexión";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">VOLVER a la pantalla de bienvenida</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";}
if ($format=='table') {echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Vous êtes maintenant déconnecté.\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>astGUIclient Client Web</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Gestionnairesends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Gestionnairesends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Bienvenue $LOGfullname, Vous êtes identifié via ce téléphone: $fullname - $protocol/$extension sur $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">DÉCONNEXION</a><BR>\n"; ?>
<?php echo "Bienvenue $LOGfullname, Vous êtes identifié via ce téléphone: $fullname - $protocol/$extension sur $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">DÉCONNEXION</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Ecran Principal" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>APPELS ENTRANTS:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient Client Web:<? echo $version ?> BUILD:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient Client Web:<?php echo $version ?> BUILD:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> FAVORIS</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> Modifier</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is sur is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_DÉCONNEXION';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Statut: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . "|\n";
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Statut: ' . $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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
// ################################################################################
// timeout to deactivate the call action links after 30 secondes
// timeout to deactivate the call action links after 30secondes
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
</script>
<?
<?php
echo "<title>APPEL ENTRANT EN COURS";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid est invalide\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "L'utilisateur et le mot de passe que vous avez entrés ne sont pas actifs dans le système<BR>S'il vous plaît essayez de nouveau:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'DEBUT') )
{
### You cannot log in or out within 30 secondes of your last login/logout
### You cannot log in or out within 30secondes of your last login/logout
$VDdisplayMESSAGE = "Vous ne pouvez pas vous connecter ou dans un délai de 30 secondes de votre dernière connexion ou déconnexion";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">RETOUR à l'écran de bienvenue</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Timeclock</TITLE>\n";
echo"<TITLE>AgentTimeclock</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- script runtime: $RUNtime secondi -->";}
if ($format=='table') {echo "\n<!-- script runtime: $RUNtimesecondi -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Ora non sei collegato. Grazie\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>web client astGUIclient</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Managersends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Managersends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Benvenuto $LOGfullname, Sei loggato su questo telefono: $fullname - $protocol/$extension su $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
<?php echo "Benvenuto $LOGfullname, Sei loggato su questo telefono: $fullname - $protocol/$extension su $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">LOGOUT</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Pannello Principale" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>CHIAMATE INBOUND:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>Versione di astGUIclient web-client:<? echo $version ?> BUILD:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>Versione di astGUIclient web-client:<?php echo $version ?> BUILD:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> PREFERITI</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> modifica</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is su is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,16 +295,21 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$RingCalls=$row[0];
if ($RingCalls > 0) {$RingCalls = "<font class=\"queue_text_red\">Chiede, in coda: $RingCalls</font>";}
else {$RingCalls = "<font class=\"queue_text\">Chiede, in coda: $RingCalls</font>";}
if ($RingCalls > 0) {$RingCalls = "<font class=\"queue_text_red\">Chiamate in coda: $RingCalls</font>";}
else {$RingCalls = "<font class=\"queue_text\">Chiamate in coda: $RingCalls</font>";}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,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 . '|Stato: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . "|\n";
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Stato: ' . $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';";
@@ -483,7 +616,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSIONE: $version BUILD: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSIONE: $version BUILD: $build UNIQUEID: $uniqueid server_
// ################################################################################
// timeout to deactivate the call action links after 30 secondi
// timeout to deactivate the call action links after 30secondi
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSIONE: $version BUILD: $build UNIQUEID: $uniqueid server_
</script>
<?
<?php
echo "<title>CHIAMATA INBOUND IN CORSO";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid non e` valido\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "Lutente e la password che hai inserito non sono attivi nel sistema<BR>Si prega di riprovare:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Orologio</TITLE>\n";
echo"<TITLE>AgentOrologio</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'INIZIO') )
{
### You cannot log in or out within 30 secondi of your last login/logout
### You cannot log in or out within 30secondi of your last login/logout
$VDdisplayMESSAGE = "Non è possibile accedere o entro 30 secondi del tuo ultimo accesso o il logout";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Orologio</TITLE>\n";
echo"<TITLE>AgentOrologio</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">Torna alla schermata iniziale</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Orologio</TITLE>\n";
echo"<TITLE>AgentOrologio</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Orologio</TITLE>\n";
echo"<TITLE>AgentOrologio</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL:Orologio</TITLE>\n";
echo"<TITLE>AgentOrologio</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- script runtime: $RUNtime seconden -->";}
if ($format=='table') {echo "\n<!-- script runtime: $RUNtimeseconden -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Je ben nu uitgelogd. Bedankt\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>astGUIclient web client</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Managersends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Managersends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Welkom $LOGfullname, je ben ingelogd in deze telefoon: $fullname - $protocol/$extension op $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">UITLOGGEN</a><BR>\n"; ?>
<?php echo "Welkom $LOGfullname, je ben ingelogd in deze telefoon: $fullname - $protocol/$extension op $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">UITLOGGEN</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Hoofd Paneel" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2803,12 +2805,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>INKOMENDE GESPREKKEN:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient web-client VERSIE:<? echo $version ?> BUILD:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient web-client VERSIE:<?php echo $version ?> BUILD:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> FAVORIETEN</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> bewerk</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2892,7 +2894,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;
@@ -1,7 +1,7 @@
<?
# call_log_display.php version 2.0.5
<?php
# call_log_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the inbound and outbound calls for a specific phone
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -28,6 +28,7 @@
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1202 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -187,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,5 +1,5 @@
<?
# conf_exten_check.php version 2.0.5
<?php
# conf_exten_check.php version 2.2.0
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -43,10 +43,16 @@
# 90102-1402 - Added check for system and database time synchronization
# 90120-1720 - Added compatibility for API pause/resume and dial a number
# 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 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.0.5-18';
$build = '90307-1855';
$version = '2.2.0-24';
$build = '91228-1341';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -86,15 +92,13 @@ header ("Pragma: no-cache"); // HTTP/1.0
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03001',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -192,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -203,12 +210,15 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id,campaign_id 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,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
$Acampaign_id = $row[3];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -234,8 +244,46 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is op is hung up
$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,'03018',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$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,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$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,'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,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
### grab the status of this agent to display
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
@@ -247,9 +295,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$AccampSQL=$row[2];
$AccampSQL = ereg_replace(' -','', $AccampSQL);
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
if (eregi('AGENTDIRECT', $AccampSQL))
{
$AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL);
$ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )";
}
### grab the number of calls being placed from this server and campaign
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -297,19 +350,25 @@ 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");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where 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,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -319,6 +378,72 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$time_diff = ($server_epoch - $db_epoch);
$web_diff = ($db_epoch - $web_epoch);
##### check for in-group change details
$InGroupChangeDetails = '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,'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)
{
$row=mysql_fetch_row($rslt);
$manager_ingroup_set = $row[0];
}
if ($manager_ingroup_set > 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,'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,'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)
{
$row=mysql_fetch_row($rslt);
$external_ingroups = $row[0];
$external_blended = $row[1];
$external_igb_set_user = $row[2];
$outbound_autodial = $row[3];
$dial_method = $row[4];
$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,'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)
{
$row=mysql_fetch_row($rslt);
$external_igb_set_name = $row[0];
}
$NEWoutbound_autodial='N';
if ( ($external_blended > 0) and ($dial_method != "INBOUND_MAN") and ($dial_method != "MANUAL") )
{$NEWoutbound_autodial='Y';}
$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,'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";
$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,'03027',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##### grab the shift information the agent
$stmt="SELECT user_group,agent_shift_enforcement_override from vicidial_users where user='$user';";
@@ -408,8 +533,16 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_UITLOGGEN';}
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 . "|\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';";
@@ -484,7 +617,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?
<?php
#
# dbconnect.php version 2.0.5
# dbconnect.php version 2.2.0
#
# database connection settings and some global web settings
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
if ( file_exists("/etc/astguiclient.conf") )
{
+24 -23
View File
@@ -1,7 +1,7 @@
<?
# inbound_popup.php version 2.0.5
<?php
# inbound_popup.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed to open up when a live_inbound call comes in giving the user
# options of what to do with the call or options to lookup the callerID on various web sites
@@ -30,6 +30,7 @@
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -127,16 +128,16 @@ echo "<head>\n";
echo "<!-- VERSIE: $version BUILD: $build UNIQUEID: $uniqueid server_ip: $server_ip-->\n";
?>
<script language="Javascript">
var server_ip = '<? echo $server_ip ?>';
var epoch_sec = '<? echo $StarTtime ?>';
var user_abb = '<? echo $user_abb ?>';
var vmail_box = '<? echo $vmail_box ?>';
var ext_context = '<? echo $ext_context ?>';
var ext_priority = '<? echo $ext_priority ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var session_name = '<? echo $session_name ?>';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var server_ip = '<?php echo $server_ip ?>';
var epoch_sec = '<?php echo $StarTtime ?>';
var user_abb = '<?php echo $user_abb ?>';
var vmail_box = '<?php echo $vmail_box ?>';
var ext_context = '<?php echo $ext_context ?>';
var ext_priority = '<?php echo $ext_priority ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var session_name = '<?php echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
// ################################################################################
@@ -233,7 +234,7 @@ echo "<!-- VERSIE: $version BUILD: $build UNIQUEID: $uniqueid server_ip
// ################################################################################
// timeout to deactivate the call action links after 30 seconden
// timeout to deactivate the call action links after 30seconden
function link_timeout()
{
window.focus();
@@ -249,7 +250,7 @@ echo "<!-- VERSIE: $version BUILD: $build UNIQUEID: $uniqueid server_ip
</script>
<?
<?php
echo "<title>LIVE BINNENKOMEND GESPREK";
echo "</title>\n";
echo "</head>\n";
@@ -259,22 +260,22 @@ echo "<B>$NOW_TIME</B><BR><BR>\n";
}
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
$MT[0]='';
$row=''; $rowx='';
$channel_live=1;
if (strlen($uniqueid)<9)
{
$channel_live=0;
echo "Uniqueid $uniqueid is niet geldig\n";
exit;
}
else
else
{
$stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
$stmt="SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$channels_list = mysql_num_rows($rslt);
if ($channels_list>0)
if ($channels_list>0)
{
$row=mysql_fetch_row($rslt);
# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|";
@@ -342,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# live_exten_check.php version 2.0.5
<?php
# live_exten_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send whether the client channel is live and to what channel it is connected
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -29,6 +29,7 @@
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1203 - Added variable filters to close security holes for login form
# 60825-1029 - Fixed translation variable issue ChannelA
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -269,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# park_calls_display.php version 2.0.5
<?php
# park_calls_display.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to send the details on the parked calls on the server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1205 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -116,7 +117,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
else
{
##### print parked calls from the parked_channels table
$stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
$stmt="SELECT channel,server_ip,channel_group,extension,parked_by,parked_time from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$park_calls_count = mysql_num_rows($rslt);
@@ -137,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
+11 -10
View File
@@ -1,17 +1,18 @@
<?
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
# 80524-0225 - Changed event_date to DATETIME, added timestamp field and tcid_link field
# 80525-2351 - Added an audit log that is not to be editable
# 80602-0641 - Fixed status update bug
# 90508-0727 - Changed to PHP long tags
#
$version = '2.0.5-4';
$build = '80602-0641';
$version = '2.2.0-5';
$build = '90508-0727';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -122,7 +123,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$VDdisplayMESSAGE = "De gebruiker en wachtwoord die je hebt ingevoerd zijn niet actief in het systeem<BR>Probeer aub nogmaals:";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Tijdslot</TITLE>\n";
echo"<TITLE>Agent Tijdslot</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -223,11 +224,11 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30 seconden of your last login/logout
### You cannot log in or out within 30seconden of your last login/logout
$VDdisplayMESSAGE = "Je kunt niet inloggen binnen 30 seconden na je laatste login of log-uit";
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Tijdslot</TITLE>\n";
echo"<TITLE>Agent Tijdslot</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -342,7 +343,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{$BACKlink = "<A HREF=\"$welcomeURL\"><font color=\"#003333\">TERUG naar Welkomst Scherm</font></A>";}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Tijdslot</TITLE>\n";
echo"<TITLE>Agent Tijdslot</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -381,7 +382,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Tijdslot</TITLE>\n";
echo"<TITLE>Agent Tijdslot</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
@@ -420,7 +421,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
echo"<HTML><HEAD>\n";
echo"<TITLE>VICIDIAL: Tijdslot</TITLE>\n";
echo"<TITLE>Agent Tijdslot</TITLE>\n";
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"</HEAD>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0>\n";
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,401 @@
<?php
# vdc_script_display.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed display the contents of the SCRIPT tab in the agent interface
#
# CHANGELOG:
# 90824-1435 - First build of script
# 90827-1548 - Added list override script option
# 91204-1913 - Added recording_filename and recording_id variables
# 91211-1103 - Added user_custom_... variables
#
$version = '2.2.0-4';
$build = '91211-1103';
require("dbconnect.php");
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
$vendor_lead_code = $vendor_id;
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_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["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
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["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
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"];}
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
if (isset($_GET["ScrollDIV"])) {$ScrollDIV=$_GET["ScrollDIV"];}
elseif (isset($_POST["ScrollDIV"])) {$ScrollDIV=$_POST["ScrollDIV"];}
if (isset($_GET["ignore_list_script"])) {$ignore_list_script=$_GET["ignore_list_script"];}
elseif (isset($_POST["ignore_list_script"])) {$ignore_list_script=$_POST["ignore_list_script"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
$txt = '.txt';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
$MT[0]='';
$agents='@agents';
$IFRAME=0;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$timeclock_end_of_day = $row[1];
$agentonly_callback_campaign_lock = $row[2];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
$phone_code = ereg_replace("[^0-9]","",$phone_code);
$phone_number = ereg_replace("[^0-9]","",$phone_number);
}
else
{
$user = ereg_replace("'|\"|\\\\|;","",$user);
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
}
# default optional vars if not set
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\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 Script Display Script";
echo "</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
}
if (strlen($in_script) < 1)
{$call_script = $camp_script;}
else
{$call_script = $in_script;}
if ($ignore_list_script < 1)
{
$stmt="SELECT agent_script_override from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$agent_script_override = $row[0];
if (strlen($agent_script_override) > 0)
{$call_script = $agent_script_override;}
}
$stmt="SELECT script_name,script_text from vicidial_scripts where script_id='$call_script';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$script_name = $row[0];
$script_text = stripslashes($row[1]);
if (eregi("iframe src",$script_text))
{
$IFRAME=1;
$lead_id = eregi_replace(' ','+',$lead_id);
$vendor_id = eregi_replace(' ','+',$vendor_id);
$vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code);
$list_id = eregi_replace(' ','+',$list_id);
$gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now);
$phone_code = eregi_replace(' ','+',$phone_code);
$phone_number = eregi_replace(' ','+',$phone_number);
$title = eregi_replace(' ','+',$title);
$first_name = eregi_replace(' ','+',$first_name);
$middle_initial = eregi_replace(' ','+',$middle_initial);
$last_name = eregi_replace(' ','+',$last_name);
$address1 = eregi_replace(' ','+',$address1);
$address2 = eregi_replace(' ','+',$address2);
$address3 = eregi_replace(' ','+',$address3);
$city = eregi_replace(' ','+',$city);
$state = eregi_replace(' ','+',$state);
$province = eregi_replace(' ','+',$province);
$postal_code = eregi_replace(' ','+',$postal_code);
$country_code = eregi_replace(' ','+',$country_code);
$gender = eregi_replace(' ','+',$gender);
$date_of_birth = eregi_replace(' ','+',$date_of_birth);
$alt_phone = eregi_replace(' ','+',$alt_phone);
$email = eregi_replace(' ','+',$email);
$security_phrase = eregi_replace(' ','+',$security_phrase);
$comments = eregi_replace(' ','+',$comments);
$user = eregi_replace(' ','+',$user);
$pass = eregi_replace(' ','+',$pass);
$campaign = eregi_replace(' ','+',$campaign);
$phone_login = eregi_replace(' ','+',$phone_login);
$original_phone_login = eregi_replace(' ','+',$original_phone_login);
$phone_pass = eregi_replace(' ','+',$phone_pass);
$fronter = eregi_replace(' ','+',$fronter);
$closer = eregi_replace(' ','+',$closer);
$group = eregi_replace(' ','+',$group);
$channel_group = eregi_replace(' ','+',$channel_group);
$SQLdate = eregi_replace(' ','+',$SQLdate);
$epoch = eregi_replace(' ','+',$epoch);
$uniqueid = eregi_replace(' ','+',$uniqueid);
$customer_zap_channel = eregi_replace(' ','+',$customer_zap_channel);
$customer_server_ip = eregi_replace(' ','+',$customer_server_ip);
$server_ip = eregi_replace(' ','+',$server_ip);
$SIPexten = eregi_replace(' ','+',$SIPexten);
$session_id = eregi_replace(' ','+',$session_id);
$phone = eregi_replace(' ','+',$phone);
$parked_by = eregi_replace(' ','+',$parked_by);
$dispo = eregi_replace(' ','+',$dispo);
$dialed_number = eregi_replace(' ','+',$dialed_number);
$dialed_label = eregi_replace(' ','+',$dialed_label);
$source_id = eregi_replace(' ','+',$source_id);
$rank = eregi_replace(' ','+',$rank);
$owner = eregi_replace(' ','+',$owner);
$camp_script = eregi_replace(' ','+',$camp_script);
$in_script = eregi_replace(' ','+',$in_script);
$script_width = eregi_replace(' ','+',$script_width);
$script_height = eregi_replace(' ','+',$script_height);
$fullname = eregi_replace(' ','+',$fullname);
$recording_filename = eregi_replace(' ','+',$recording_filename);
$recording_id = eregi_replace(' ','+',$recording_id);
$user_custom_one = eregi_replace(' ','+',$user_custom_one);
$user_custom_two = eregi_replace(' ','+',$user_custom_two);
$user_custom_three = eregi_replace(' ','+',$user_custom_three);
$user_custom_four = eregi_replace(' ','+',$user_custom_four);
$user_custom_five = eregi_replace(' ','+',$user_custom_five);
}
$script_text = eregi_replace('--A--lead_id--B--',"$lead_id",$script_text);
$script_text = eregi_replace('--A--vendor_id--B--',"$vendor_id",$script_text);
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
$script_text = eregi_replace('--A--list_id--B--',"$list_id",$script_text);
$script_text = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$script_text);
$script_text = eregi_replace('--A--phone_code--B--',"$phone_code",$script_text);
$script_text = eregi_replace('--A--phone_number--B--',"$phone_number",$script_text);
$script_text = eregi_replace('--A--title--B--',"$title",$script_text);
$script_text = eregi_replace('--A--first_name--B--',"$first_name",$script_text);
$script_text = eregi_replace('--A--middle_initial--B--',"$middle_initial",$script_text);
$script_text = eregi_replace('--A--last_name--B--',"$last_name",$script_text);
$script_text = eregi_replace('--A--address1--B--',"$address1",$script_text);
$script_text = eregi_replace('--A--address2--B--',"$address2",$script_text);
$script_text = eregi_replace('--A--address3--B--',"$address3",$script_text);
$script_text = eregi_replace('--A--city--B--',"$city",$script_text);
$script_text = eregi_replace('--A--state--B--',"$state",$script_text);
$script_text = eregi_replace('--A--province--B--',"$province",$script_text);
$script_text = eregi_replace('--A--postal_code--B--',"$postal_code",$script_text);
$script_text = eregi_replace('--A--country_code--B--',"$country_code",$script_text);
$script_text = eregi_replace('--A--gender--B--',"$gender",$script_text);
$script_text = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$script_text);
$script_text = eregi_replace('--A--alt_phone--B--',"$alt_phone",$script_text);
$script_text = eregi_replace('--A--email--B--',"$email",$script_text);
$script_text = eregi_replace('--A--security_phrase--B--',"$security_phrase",$script_text);
$script_text = eregi_replace('--A--comments--B--',"$comments",$script_text);
$script_text = eregi_replace('--A--user--B--',"$user",$script_text);
$script_text = eregi_replace('--A--pass--B--',"$pass",$script_text);
$script_text = eregi_replace('--A--campaign--B--',"$campaign",$script_text);
$script_text = eregi_replace('--A--phone_login--B--',"$phone_login",$script_text);
$script_text = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$script_text);
$script_text = eregi_replace('--A--phone_pass--B--',"$phone_pass",$script_text);
$script_text = eregi_replace('--A--fronter--B--',"$fronter",$script_text);
$script_text = eregi_replace('--A--closer--B--',"$closer",$script_text);
$script_text = eregi_replace('--A--group--B--',"$group",$script_text);
$script_text = eregi_replace('--A--channel_group--B--',"$channel_group",$script_text);
$script_text = eregi_replace('--A--SQLdate--B--',"$SQLdate",$script_text);
$script_text = eregi_replace('--A--epoch--B--',"$epoch",$script_text);
$script_text = eregi_replace('--A--uniqueid--B--',"$uniqueid",$script_text);
$script_text = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$script_text);
$script_text = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$script_text);
$script_text = eregi_replace('--A--server_ip--B--',"$server_ip",$script_text);
$script_text = eregi_replace('--A--SIPexten--B--',"$SIPexten",$script_text);
$script_text = eregi_replace('--A--session_id--B--',"$session_id",$script_text);
$script_text = eregi_replace('--A--phone--B--',"$phone",$script_text);
$script_text = eregi_replace('--A--parked_by--B--',"$parked_by",$script_text);
$script_text = eregi_replace('--A--dispo--B--',"$dispo",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$dialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$dialed_label",$script_text);
$script_text = eregi_replace('--A--source_id--B--',"$source_id",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$rank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$owner",$script_text);
$script_text = eregi_replace('--A--camp_script--B--',"$camp_script",$script_text);
$script_text = eregi_replace('--A--in_script--B--',"$in_script",$script_text);
$script_text = eregi_replace('--A--script_width--B--',"$script_width",$script_text);
$script_text = eregi_replace('--A--script_height--B--',"$script_height",$script_text);
$script_text = eregi_replace('--A--fullname--B--',"$fullname",$script_text);
$script_text = eregi_replace('--A--recording_filename--B--',"$recording_filename",$script_text);
$script_text = eregi_replace('--A--recording_id--B--',"$recording_id",$script_text);
$script_text = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$script_text);
$script_text = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$script_text);
$script_text = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$script_text);
$script_text = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$script_text);
$script_text = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
$script_text = stripslashes($script_text);
echo "<!-- IFRAME$IFRAME -->\n";
echo "<!-- $script_id -->\n";
echo "<TABLE WIDTH=$script_width><TR><TD>\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "<div class=\"scroll_script\" id=\"NewScriptContents\">";}
echo "<center><B>$script_name</B><BR></center>\n";
echo "$script_text\n";
if ( ($IFRAME < 1) and ($ScrollDIV > 0) )
{ echo "</div>";}
echo "</TD></TR></TABLE>\n";
exit;
?>
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<?
# voicemail_check.php version 2.0.5
<?php
# voicemail_check.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to check whether the voicemail box on the server defined has new and old messages
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -22,6 +22,7 @@
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1204 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -131,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtime seconden -->";
echo "\n<!-- script runtime: $RUNtimeseconden -->";
echo "\n</body>\n</html>\n";
}
@@ -1,7 +1,7 @@
<?
# active_list_refresh.php version 2.0.5
<?php
# active_list_refresh.php version 2.2.0
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to serve updates of the live data to the display scripts
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -38,6 +38,7 @@
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1118 - Added variable filters to close security holes for login form
# 90508-0727 - Changed to PHP long tags
#
require("dbconnect.php");
@@ -469,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";}
if ($format=='table') {echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+58 -56
View File
@@ -1,7 +1,7 @@
<?
<?php
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
@@ -56,6 +56,8 @@
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60619-1103 - Added variable filters to close security holes for login form
# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php
# 90508-0727 - Changed to PHP long tags
# 91129-2211 - Replaced SELECT STAR in SQL query
#
require("dbconnect.php");
@@ -87,8 +89,8 @@ $user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '2.0.1';
$build = '60829-1528';
$version = '2.2.0';
$build = '91129-2211';
### security strip all non-alphanumeric characters out of the variables ###
$DB=ereg_replace("[^0-9a-z]","",$DB);
@@ -99,15 +101,15 @@ $build = '60829-1528';
if ($force_logout)
{
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "Wylogowałeś się. Do zobaczenia\n";
exit;
}
}
$StarTtime = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -139,7 +141,7 @@ $agcPAGE = "$HTTPprotocol$server_name$server_port$script_name";
$agcDIR = $agcPAGE;
$agcDIR = eregi_replace('astguiclient.php','',$agcDIR);
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') )
{
header ("Content-type: text/html; charset=utf-8");
@@ -172,7 +174,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
echo "</html>\n\n";
exit;
}
else
else
{
if($auth>0)
@@ -275,7 +277,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/astguicli
else
{
echo "<title>klient astGUIclient</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -425,31 +427,31 @@ else
var last_filename = '';
var LCAcount = 0;
var LMAcount = 0;
var filedate = '<? echo $FILE_TIME ?>';
var agcDIR = '<? echo $agcDIR ?>';
var agcPAGE = '<? echo $agcPAGE ?>';
var extension = '<? echo $extension ?>';
var extension_xfer = '<? echo $extension ?>';
var dialplan_number = '<? echo $dialplan_number ?>';
var ext_context = '<? echo $ext_context ?>';
var protocol = '<? echo $protocol ?>';
var server_ip = '<? echo $server_ip ?>';
<?
var filedate = '<?php echo $FILE_TIME ?>';
var agcDIR = '<?php echo $agcDIR ?>';
var agcPAGE = '<?php echo $agcPAGE ?>';
var extension = '<?php echo $extension ?>';
var extension_xfer = '<?php echo $extension ?>';
var dialplan_number = '<?php echo $dialplan_number ?>';
var ext_context = '<?php echo $ext_context ?>';
var protocol = '<?php echo $protocol ?>';
var server_ip = '<?php echo $server_ip ?>';
<?php
if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
else {echo "\tvar refresh_interval = $fast_refresh_rate;\n";}
?>
var user_abb = '<? echo $user_abb ?>';
var voicemail_id = '<? echo $voicemail_id ?>';
var voicemail_exten = '<? echo $voicemail_exten ?>';
var voicemail_dump_exten = '<? echo $voicemail_dump_exten ?>';
var user_abb = '<?php echo $user_abb ?>';
var voicemail_id = '<?php echo $voicemail_id ?>';
var voicemail_exten = '<?php echo $voicemail_exten ?>';
var voicemail_dump_exten = '<?php echo $voicemail_dump_exten ?>';
var new_messages = 999;
var old_messages = 999;
var outbound_cid = '<? echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<? echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <? echo $StarTtime ?>;
var dtmf_send_extension = '<? echo $dtmf_send_extension ?>';
var recording_exten = '<? echo $recording_exten ?>';
var park_on_extension = '<? echo $park_on_extension ?>';
var outbound_cid = '<?php echo $outbound_cid ?>';
var local_web_callerID_URL_enc = '<?php echo $local_web_callerID_URL_enc ?>';
var epoch_sec = <?php echo $StarTtime ?>;
var dtmf_send_extension = '<?php echo $dtmf_send_extension ?>';
var recording_exten = '<?php echo $recording_exten ?>';
var park_on_extension = '<?php echo $park_on_extension ?>';
var park_count=0;
var park_refresh=0;
var check_n = 0;
@@ -457,7 +459,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var logout_stop_timeouts = 0;
var lastconf='';
var agc_dial_prefix = '91';
var monitor_prefix = '<? echo $monitor_prefix ?>';
var monitor_prefix = '<?php echo $monitor_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
var menufontsize = 8;
@@ -480,15 +482,15 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var busytrunkhangup_order='asc';
var busylocalhangup_order='asc';
var xmlhttp=false;
var admin_hangup_enabled = '<? echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<? echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<? echo $admin_monitor_enabled ?>';
var admin_hangup_enabled = '<?php echo $admin_hangup_enabled ?>';
var admin_hijack_enabled = '<?php echo $admin_hijack_enabled ?>';
var admin_monitor_enabled = '<?php echo $admin_monitor_enabled ?>';
var XfeR_channel = '';
var user = '<? echo $user ?>';
var pass = '<? echo $pass ?>';
var phone_login = '<? echo $phone_login ?>';
var phone_pass = '<? echo $phone_pass ?>';
var session_name = '<? echo $session_name ?>';
var user = '<?php echo $user ?>';
var pass = '<?php echo $pass ?>';
var phone_login = '<?php echo $phone_login ?>';
var phone_pass = '<?php echo $phone_pass ?>';
var session_name = '<?php echo $session_name ?>';
var image_livecall_OFF = new Image();
image_livecall_OFF.src="../agc/images/agc_live_call_OFF_pl.gif";
var image_livecall_ON = new Image();
@@ -505,13 +507,13 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var favoritesEDIT = new Array();
var favorites_namesEDIT = new Array();
var favlist = new Array();
var favlistCT = '<? echo $favlistCT ?>';
var favorites_count = '<? echo $favorites_count ?>';
var favorites_countEDIT = '<? echo $favorites_count ?>';
var favorites_listX = '<? echo $favorites_listX ?>';
var favorites_list = "<? echo $favorites_list ?>";
var favorites_listEDIT = "<? echo $favorites_list ?>";
<? $h=0;
var favlistCT = '<?php echo $favlistCT ?>';
var favorites_count = '<?php echo $favorites_count ?>';
var favorites_countEDIT = '<?php echo $favorites_count ?>';
var favorites_listX = '<?php echo $favorites_listX ?>';
var favorites_list = "<?php echo $favorites_list ?>";
var favorites_listEDIT = "<?php echo $favorites_list ?>";
<?php $h=0;
while ($favorites_count > $h)
{
echo "favorites['$h'] = \"$favorites[$h]\";\n";
@@ -951,7 +953,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Send Redirect command for live call to Kierowniksends phone name where call is going to
function mainxfer_send_redirect(taskvar,taskxferconf)
{
var xmlhttp=false;
@@ -1044,7 +1046,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command for local dial to Manager sends phone name where call is going to
// Send Originate command for local dial to Kierowniksends phone name where call is going to
function mainxfer_send_originate(taskvar,taskxferconf,taskentrypop)
{
var xmlhttp=false;
@@ -2704,7 +2706,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
-->
</style>
<?
<?php
echo "</head>\n";
@@ -2716,7 +2718,7 @@ echo "</head>\n";
<TR VALIGN=TOP ALIGN=LEFT><TD COLSPAN=5 VALIGN=TOP ALIGN=LEFT>
<INPUT TYPE=HIDDEN NAME=extension>
<font class="body_text">
<? echo "Witaj $LOGfullname, podłączyłeś się do telefonu: $fullname - $protocol/$extension na $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">WYLOGUJ</a><BR>\n"; ?>
<?php echo "Witaj $LOGfullname, podłączyłeś się do telefonu: $fullname - $protocol/$extension na $server_ip &nbsp; <a href=\"#\" onclick=\"LogouT();return false;\">WYLOGUJ</a><BR>\n"; ?>
</TD></TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="../agc/images/agc_tab_main.gif" ALT="Główny panel" WIDTH=83 HEIGHT=30 Border=0></A></TD>
@@ -2802,12 +2804,12 @@ echo "</head>\n";
<tr><td align=center><div class="scroll_log" id="outboundcallsspan"></div></td></tr>
<tr><td align=center><font face="Arial,Helvetica"><B>ROZMOWY PRZYCHODZĄCE:</B></font></td></tr>
<tr><td align=center><div class="scroll_log" id="inboundcallsspan"></div></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient WERSJA:<? echo $version ?> KOMPILACJA:<? echo $build ?></font></td></tr>
<tr><td align=left><font face="Arial,Helvetica" size=1>astGUIclient WERSJA:<?php echo $version ?> KOMPILACJA:<?php echo $build ?></font></td></tr>
</TABLE>
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
<table border=0 bgcolor="#DDDDFF" width=200 height=400 cellpadding=2 ALIGN=TOP><TR><TD align=center><span id="FavoriteSContent"><font class="sh_text"> ULUBIONE</font><font class="sb_text"> &nbsp; &nbsp; &nbsp; <a href="#" onclick="favorites_editor('BuilD');return false;"> edytuj</a></span></TD></TR>
<?
<?php
$h=0;
while ($favorites_count > $h)
{
@@ -2891,7 +2893,7 @@ echo "</head>\n";
</body>
</html>
<?
<?php
exit;

Some files were not shown because too many files have changed in this diff Show More