Fixed mysqli connect error reporting
Added option to change drop perccentage calculation in VDAD stats report other minor fixes git-svn-id: svn://192.168.202.10@2337 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -82,9 +82,10 @@
|
||||
# 150313-0825 - Allow for single quotes in vicidial_list and custom data fields
|
||||
# 150429-1717 - Added user allowed function restrictions
|
||||
# 150512-2027 - Added filtering of hash sign on some input variables, Issue #851
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
|
||||
$version = '2.12-48';
|
||||
$build = '150512-2027';
|
||||
$version = '2.12-49';
|
||||
$build = '150626-2120';
|
||||
|
||||
$startMS = microtime();
|
||||
|
||||
@@ -1621,7 +1622,7 @@ if ($function == 'external_dial')
|
||||
|
||||
### connect to your vtiger database
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
||||
if (!$linkV) {die(_QXZ("Could not connect: ")."$vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error($linkV));}
|
||||
if (!$linkV) {die(_QXZ("Could not connect: ")."$vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkV, "$vtiger_dbname");
|
||||
|
||||
# make sure the ID is present in Vtiger database as an account
|
||||
@@ -3161,6 +3162,7 @@ if ($function == 'ra_call_control')
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$stmt = "SELECT time_id from queue_log where call_id='$value' and queue='$campaign_id' and agent='Agent/$ra_user' and verb='CONNECT';";
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
# CHANGES:
|
||||
# 130328-0022 - Converted ereg to preg functions
|
||||
# 130802-0957 - Changed to PHP mysqli functions
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
if ( file_exists("/etc/astguiclient.conf") )
|
||||
@@ -49,7 +50,7 @@ else
|
||||
$link=mysqli_connect("$VARDB_server", "$VARDB_user", "$VARDB_pass", "$VARDB_database", $VARDB_port);
|
||||
if (!$link)
|
||||
{
|
||||
die('MySQL connect ERROR: ' . mysqli_error($link));
|
||||
die('MySQL connect ERROR: ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
|
||||
@@ -124,10 +124,11 @@
|
||||
# 141128-0851 - Code cleanup for QXZ functions
|
||||
# 141216-2107 - Added language settings lookups and user/pass variable standardization
|
||||
# 150307-1837 - Added leave 3way custom sound context
|
||||
# 150701-1208 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$version = '2.12-71';
|
||||
$build = '150307-1837';
|
||||
$version = '2.12-72';
|
||||
$build = '150701-1208';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=129;
|
||||
$one_mysql_log=0;
|
||||
@@ -584,6 +585,7 @@ if ($ACTION=="HangupConfDial")
|
||||
######################
|
||||
if ($ACTION=="Hangup")
|
||||
{
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents SET external_hangup='0' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -705,6 +707,7 @@ if ($ACTION=="Hangup")
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$stmt="SELECT count(*) from queue_log where call_id='$CalLCID' and verb='CONNECT';";
|
||||
@@ -994,6 +997,7 @@ if ($ACTION=="RedirectToPark")
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$time_id=0;
|
||||
@@ -1107,6 +1111,7 @@ if ($ACTION=="RedirectFromPark")
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$time_id=0;
|
||||
@@ -1233,6 +1238,7 @@ if ($ACTION=="RedirectToParkIVR")
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$time_id=0;
|
||||
|
||||
@@ -380,10 +380,11 @@
|
||||
# 150608-1051 - Added alt and addr3 options for manual dial search and filtering
|
||||
# 150609-1400 - Added script color
|
||||
# 150609-1857 - Added list_description web url variable
|
||||
# 150701-1205 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$version = '2.12-275';
|
||||
$build = '150609-1857';
|
||||
$version = '2.12-276';
|
||||
$build = '150701-1205';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=616;
|
||||
$one_mysql_log=0;
|
||||
@@ -1352,6 +1353,7 @@ if ($ACTION == 'regCLOSER')
|
||||
if ( ($enable_queuemetrics_logging > 0) and ($queuemetrics_addmember_enabled > 0) )
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
}
|
||||
|
||||
@@ -3841,6 +3843,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
# UNPAUSEALL
|
||||
@@ -4733,6 +4736,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
# UNPAUSEALL
|
||||
@@ -5277,6 +5281,7 @@ if ($stage == "end")
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
}
|
||||
}
|
||||
@@ -9992,7 +9997,7 @@ if ($ACTION == 'updateDISPO')
|
||||
|
||||
### connect to your vtiger database
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error($linkV));}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
|
||||
$stmt = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$lead_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -10345,6 +10350,7 @@ if ($ACTION == 'updateDISPO')
|
||||
if ( ($enable_queuemetrics_logging > 0) and ( ( ($queuemetrics_callstatus > 0) or ($queuemetrics_callstatus_override=='YES') ) and ($queuemetrics_callstatus_override!='NO') ) )
|
||||
{
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
if (strlen($stage) < 2)
|
||||
@@ -11169,6 +11175,7 @@ if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger ==
|
||||
if ( (preg_match('/READY/',$stage)) or (preg_match('/CLOSER/',$stage)) ) {$QMstatus='UNPAUSEALL';}
|
||||
if ( (preg_match('/PAUSE/',$stage)) or ($pause_trigger == 'PAUSE') ) {$QMstatus='PAUSEALL';}
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$user_group='';
|
||||
@@ -11481,6 +11488,7 @@ if ($ACTION == 'userLOGout')
|
||||
{$QM_LOGOFF = 'AGENTCALLBACKLOGOFF';}
|
||||
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
# $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';";
|
||||
@@ -11746,6 +11754,7 @@ if ($ACTION == 'PauseCodeSubmit')
|
||||
$pause_call_id='NONE';
|
||||
if (strlen($campaign_cid) > 12) {$pause_call_id = $campaign_cid;}
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$pause_typeSQL='';
|
||||
@@ -12880,6 +12889,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
|
||||
if ( (preg_match("/contact_information/",$tables_use_alt_log_db)) and (strlen($alt_log_server_ip)>4) and (strlen($alt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$alt_log_server_ip", "$alt_log_login", "$alt_log_pass");
|
||||
if (!$linkALT) {die(_QXZ("Could not connect: ")."$alt_log_server_ip|$alt_log_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkALT, "$alt_log_dbname");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -490,10 +490,11 @@
|
||||
# 150609-1736 - Added status_display_ingroup option
|
||||
# 150609-1917 - Added list_description web url variable
|
||||
# 150610-0940 - Added customer_gone_seconds campaign option
|
||||
# 150701-1211 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$version = '2.12-462c';
|
||||
$build = '150610-0940';
|
||||
$version = '2.12-463c';
|
||||
$build = '150701-1211';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=85;
|
||||
$one_mysql_log=0;
|
||||
@@ -3071,6 +3072,7 @@ else
|
||||
$QM_PHONE = "$SIP_user_DiaL";
|
||||
}
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($qm_phone_environment)>0) )
|
||||
@@ -3137,6 +3139,7 @@ else
|
||||
$QM_PHONE = "$SIP_user_DiaL";
|
||||
}
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
if ($queuemetrics_loginout!='NONE')
|
||||
@@ -3263,6 +3266,7 @@ else
|
||||
{
|
||||
$StarTtimEpause = ($StarTtimE + 1);
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
mysqli_select_db($linkB, "$queuemetrics_dbname");
|
||||
|
||||
$pause_typeSQL='';
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
# 141114-0705 - Finalized adding QXZ translation to all admin files
|
||||
# 141230-1353 - Added code for on-the-fly language translations display
|
||||
# 150516-1306 - Fixed Javascript element problem, Issue #857
|
||||
# 150619-0137 - Added option to calculate 'Percent of DROP Calls taken out of Answers' differently
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -118,6 +119,12 @@ if ($qm_conf_ct > 0)
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
$DROPANSWERpercent_adjustment=0;
|
||||
if (file_exists('options.php'))
|
||||
{
|
||||
require('options.php');
|
||||
}
|
||||
|
||||
##### SERVER CARRIER LOGGING LOOKUP #####
|
||||
$stmt = "SELECT count(*) FROM servers where carrier_logging_active='Y' and max_vicidial_trunks > 0;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -861,7 +868,8 @@ else
|
||||
$DROPpercent = (MathZDC($DROPcallsRAW, $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 2);
|
||||
|
||||
$DROPANSWERpercent = (MathZDC($DROPcallsRAW, $ANSWERcalls) * 100);
|
||||
# Change $DROPANSWERpercent_adjustment to '1' in options.php if you want to include the drop call count in addition to the answer call count when calculating the DROPANSWERpercent, although you really don't need to
|
||||
$DROPANSWERpercent = (MathZDC($DROPcallsRAW, ($ANSWERcalls+($DROPcallsRAW*$DROPANSWERpercent_adjustment))) * 100);
|
||||
$DROPANSWERpercent = round($DROPANSWERpercent, 2);
|
||||
|
||||
$average_hold_seconds = MathZDC($DROPseconds, $DROPcallsRAW);
|
||||
@@ -869,7 +877,7 @@ else
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
$OUToutput .= _QXZ("Total Outbound DROP Calls",44).": $DROPcalls $DROPpercent%\n";
|
||||
$OUToutput .= _QXZ("Percent of DROP Calls taken out of Answers",44).": $DROPcalls / $ANSWERcalls $DROPANSWERpercent%\n";
|
||||
$OUToutput .= _QXZ("Percent of DROP Calls taken out of Answers",44).": $DROPcalls / ".($ANSWERcalls+($DROPcallsRAW*$DROPANSWERpercent_adjustment))." $DROPANSWERpercent%\n";
|
||||
|
||||
if (preg_match("/YES/i",$include_rollover))
|
||||
{
|
||||
|
||||
@@ -3513,12 +3513,13 @@ else
|
||||
# 150609-1216 - Added in-group and script display settings
|
||||
# 150609-2142 - Changes for different types of in-groups
|
||||
# 150610-0934 - Added customer_gone_seconds campaign setting
|
||||
# 150701-1131 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.12-491a';
|
||||
$build = '150610-0934';
|
||||
$admin_version = '2.12-492a';
|
||||
$build = '150701-1131';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -7764,7 +7765,7 @@ if ($ADD=="2")
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
$user_name = $user;
|
||||
@@ -8077,7 +8078,7 @@ if ($ADD=="2A")
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
|
||||
@@ -10006,7 +10007,7 @@ if ($ADD==211111)
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
|
||||
@@ -11035,6 +11036,10 @@ if ($ADD==291111111111)
|
||||
if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname");
|
||||
if (!$linkALT)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
}
|
||||
else
|
||||
{$linkALT = $link;}
|
||||
@@ -11351,7 +11356,7 @@ if ($ADD=="4A")
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
$user_name = $user;
|
||||
@@ -11613,7 +11618,7 @@ if ($ADD=="4B")
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
|
||||
@@ -11870,7 +11875,7 @@ if ($ADD==4)
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
$user_name = $user;
|
||||
@@ -13924,7 +13929,7 @@ if ($ADD==411111)
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
if (!$linkV)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_error($linkV));
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
|
||||
######################################
|
||||
@@ -14862,6 +14867,10 @@ if ($ADD==491111111111)
|
||||
if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname");
|
||||
if (!$linkALT)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
}
|
||||
else
|
||||
{$linkALT = $link;}
|
||||
@@ -16266,7 +16275,10 @@ if ($ADD==62)
|
||||
{$QM_LOGOFF = 'AGENTCALLBACKLOGOFF';}
|
||||
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass","$queuemetrics_dbname");
|
||||
|
||||
if (!$linkB)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
$agents='@agents';
|
||||
$agent_logged_in='';
|
||||
$time_logged_in='0';
|
||||
@@ -17721,6 +17733,10 @@ if ($ADD==691111111111)
|
||||
if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname");
|
||||
if (!$linkALT)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
}
|
||||
else
|
||||
{$linkALT = $link;}
|
||||
@@ -26068,7 +26084,7 @@ if ($ADD==3311)
|
||||
echo "<tr bgcolor=#CCFFFF><td align=right>"._QXZ("Filter User Route Settings In-Group").": </td><td align=left><select size=1 name=filter_user_route_settings_ingroup>";
|
||||
echo "$FXgroups_menu";
|
||||
echo "</select>$NWB#inbound_dids-user_route_settings_ingroup$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3111&group_id=$filter_phone_group_id\">"._QXZ("Filter In-Group ID")."</a>: </td><td align=left><select size=1 name=filter_group_id>";
|
||||
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3111&group_id=$filter_group_id\">"._QXZ("Filter In-Group ID")."</a>: </td><td align=left><select size=1 name=filter_group_id>";
|
||||
echo "$FDgroups_menu";
|
||||
echo "</select>$NWB#inbound_dids-group_id$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#CCFFFF><td align=right>"._QXZ("Filter In-Group Call Handle Method").": </td><td align=left><select size=1 name=filter_call_handle_method><option value='CID'>"._QXZ("CID")."</option><option value='CIDLOOKUP'>"._QXZ("CIDLOOKUP")."</option><option value='CIDLOOKUPRL'>"._QXZ("CIDLOOKUPRL")."</option><option value='CIDLOOKUPRC'>"._QXZ("CIDLOOKUPRC")."</option><option value='CIDLOOKUPALT'>"._QXZ("CIDLOOKUPALT")."</option><option value='CIDLOOKUPRLALT'>"._QXZ("CIDLOOKUPRLALT")."</option><option value='CIDLOOKUPRCALT'>"._QXZ("CIDLOOKUPRCALT")."</option><option value='CIDLOOKUPADDR3'>"._QXZ("CIDLOOKUPADDR3")."</option><option value='CIDLOOKUPRLADDR3'>"._QXZ("CIDLOOKUPRLADDR3")."</option><option value='CIDLOOKUPRCADDR3'>"._QXZ("CIDLOOKUPRCADDR3")."</option><option value='CIDLOOKUPALTADDR3'>"._QXZ("CIDLOOKUPALTADDR3")."</option><option value='CIDLOOKUPRLALTADDR3'>"._QXZ("CIDLOOKUPRLALTADDR3")."</option><option value='CIDLOOKUPRCALTADDR3'>"._QXZ("CIDLOOKUPRCALTADDR3")."</option><option value='ANI'>"._QXZ("ANI")."</option><option value='ANILOOKUP'>"._QXZ("ANILOOKUP")."</option><option value='ANILOOKUPRL'>"._QXZ("ANILOOKUPRL")."</option><option value='VIDPROMPT'>"._QXZ("VIDPROMPT")."</option><option value='VIDPROMPTLOOKUP'>"._QXZ("VIDPROMPTLOOKUP")."</option><option value='VIDPROMPTLOOKUPRL'>"._QXZ("VIDPROMPTLOOKUPRL")."</option><option value='VIDPROMPTLOOKUPRC'>"._QXZ("VIDPROMPTLOOKUPRC")."</option><option value='CLOSER'>"._QXZ("CLOSER")."</option><option value='3DIGITID'>"._QXZ("3DIGITID")."</option><option value='4DIGITID'>"._QXZ("4DIGITID")."</option><option value='5DIGITID'>"._QXZ("5DIGITID")."</option><option value='10DIGITID'>"._QXZ("10DIGITID")."</option><option value='$filter_call_handle_method' SELECTED>"._QXZ("$filter_call_handle_method")."</option></select>$NWB#inbound_dids-call_handle_method$NWE</td></tr>\n";
|
||||
@@ -29811,6 +29827,10 @@ if ($ADD==391111111111)
|
||||
if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname");
|
||||
if (!$linkALT)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
}
|
||||
else
|
||||
{$linkALT = $link;}
|
||||
@@ -32745,6 +32765,10 @@ if ($ADD==190000000000)
|
||||
if ( (preg_match("/contact_information/",$SStables_use_alt_log_db)) and (strlen($SSalt_log_server_ip)>4) and (strlen($SSalt_log_dbname)>0) )
|
||||
{
|
||||
$linkALT=mysqli_connect("$SSalt_log_server_ip", "$SSalt_log_login", "$SSalt_log_pass", "$SSalt_log_dbname");
|
||||
if (!$linkALT)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': ' . mysqli_connect_error());
|
||||
}
|
||||
}
|
||||
else
|
||||
{$linkALT = $link;}
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
# 140811-2110 - Fixes for issues with default fields
|
||||
# 141006-0903 - Finalized adding QXZ translation to all admin files
|
||||
# 141230-0018 - Added code for on-the-fly language translations display
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$admin_version = '2.10-25';
|
||||
$build = '141230-0018';
|
||||
$admin_version = '2.10-26';
|
||||
$build = '150626-2120';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -393,7 +394,7 @@ if ( ($action == "COPY_FIELDS_SUBMIT") and ($list_id > 99) and ($source_list_id
|
||||
$linkCUSTOM=mysqli_connect("$VARDB_server", "$VARDB_custom_user", "$VARDB_custom_pass", "$VARDB_database", "$VARDB_port");
|
||||
if (!$linkCUSTOM)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_error($linkCUSTOM));
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_connect_error());
|
||||
}
|
||||
|
||||
# if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysqli_error());}
|
||||
@@ -648,11 +649,10 @@ if ( ($action == "DELETE_CUSTOM_FIELD") and ($list_id > 99) and ($field_id > 0)
|
||||
#$linkCUSTOM=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_custom_user","$VARDB_custom_pass");
|
||||
#if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysqli_error());}
|
||||
#mysql_select_db("$VARDB_database", $linkCUSTOM);
|
||||
|
||||
$linkCUSTOM=mysqli_connect("$VARDB_server", "$VARDB_custom_user", "$VARDB_custom_pass", "$VARDB_database", "$VARDB_port");
|
||||
if (!$linkCUSTOM)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_error($linkCUSTOM));
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_connect_error());
|
||||
}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_lists_fields where list_id='$list_id' and field_label='$field_label';";
|
||||
@@ -756,7 +756,7 @@ if ( ($action == "ADD_CUSTOM_FIELD") and ($list_id > 99) )
|
||||
$linkCUSTOM=mysqli_connect("$VARDB_server", "$VARDB_custom_user", "$VARDB_custom_pass", "$VARDB_database", "$VARDB_port");
|
||||
if (!$linkCUSTOM)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_error($linkCUSTOM));
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_connect_error());
|
||||
}
|
||||
|
||||
$stmt="SHOW TABLES LIKE \"custom_$list_id\";";
|
||||
@@ -798,7 +798,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELD_SUBMIT") and ($list_id > 99) and ($field_i
|
||||
$linkCUSTOM=mysqli_connect("$VARDB_server", "$VARDB_custom_user", "$VARDB_custom_pass", "$VARDB_database", "$VARDB_port");
|
||||
if (!$linkCUSTOM)
|
||||
{
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_error($linkCUSTOM));
|
||||
die('MySQL '._QXZ("connect ERROR").': '. mysqli_connect_error());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# 131210-1746 - Added ability to define slave server with port number, issue #687
|
||||
# 150216-1529 - Removed non-latin set to 0
|
||||
# 150313-0913 - Added ExpectedDBSchema conf file value
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
if ( file_exists("/etc/astguiclient.conf") )
|
||||
@@ -78,7 +79,7 @@ $link=mysqli_connect($server_string, "$VARDB_user", "$VARDB_pass", "$VARDB_datab
|
||||
if (!$link)
|
||||
{
|
||||
// die("MySQL connect ERROR: |$server_string|$VARDB_user|$VARDB_pass|$VARDB_database|$VARDB_port|$temp_slave_db[0]|$temp_slave_db[1]|$slave_db_server|$use_slave_server|" . mysqli_error('mysqli'));
|
||||
die("MySQL connect ERROR: " . mysqli_error('mysqli'));
|
||||
die("MySQL connect ERROR: " . mysqli_connect_error());
|
||||
}
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# 130124-1735 - Added option to display first and last name in user stats results
|
||||
# 140124-1003 - Removed extra newline at end of file
|
||||
# 140624-1422 - Added droppedOFtotal options.php option
|
||||
# 150619-0135 - Added DROPANSWERpercent_adjustment options.php option for AST_VDADstats.php
|
||||
#
|
||||
|
||||
# used by the realtime_report.php script
|
||||
@@ -81,4 +82,6 @@ $firstlastname_display_user_stats = 0;
|
||||
# agent time detail report login/logout link for user
|
||||
$atdr_login_logout_user_link = 0;
|
||||
|
||||
# alternate calculation of 'Percent of DROP Calls taken out of Answers' in AST_VDADstats.php
|
||||
$DROPANSWERpercent_adjustment = 0;
|
||||
?>
|
||||
@@ -14,10 +14,11 @@
|
||||
# 140706-0834 - Incorporated into standard admin code
|
||||
# 141007-2120 - Finalized adding QXZ translation to all admin files
|
||||
# 141229-2015 - Added code for on-the-fly language translations display
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$version = '2.10-6';
|
||||
$build = '141229-2015';
|
||||
$version = '2.10-7';
|
||||
$build = '150626-2120';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -506,7 +507,7 @@ if ($function == 'external_dial_lead')
|
||||
### connect to your vtiger database
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error());}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
echo "Connected successfully\n<BR>\n";
|
||||
|
||||
# make sure the ID is present in Vtiger database as an account
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# user_status.php
|
||||
#
|
||||
# Copyright (C) 2014 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -33,6 +33,7 @@
|
||||
# 141007-2214 - Finalized adding QXZ translation to all admin files
|
||||
# 141114-1702 - Fixed issue #800
|
||||
# 141229-1829 - Added code for on-the-fly language translations display
|
||||
# 150701-1250 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -506,7 +507,7 @@ if ($stage == "log_agent_out")
|
||||
#$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
|
||||
#mysql_select_db("$queuemetrics_dbname", $linkB);
|
||||
$linkB=mysqli_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass", "$queuemetrics_dbname");
|
||||
|
||||
if (!$linkB) {die(_QXZ("Could not connect: ")."$queuemetrics_server_ip|$queuemetrics_login" . mysqli_connect_error());}
|
||||
|
||||
$agents='@agents';
|
||||
$agent_logged_in='';
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
# 130901-0834 - Changed to mysqli PHP functions
|
||||
# 141007-2050 - Finalized adding QXZ translation to all admin files
|
||||
# 141229-1850 - Added code for on-the-fly language translations display
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
$version = '2.10-9';
|
||||
$build = '141229-1850';
|
||||
$version = '2.10-10';
|
||||
$build = '150626-2120';
|
||||
|
||||
$MT[0]='';
|
||||
|
||||
@@ -157,7 +158,7 @@ if ($enable_vtiger_integration > 0)
|
||||
#$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error());}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
#mysql_select_db("$vtiger_dbname", $linkV);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
# 100806-0653 - First Build
|
||||
# 130610-1124 - Finalized changing of all ereg instances to preg
|
||||
# 130902-0756 - Changed to mysqli PHP functions
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -62,7 +63,7 @@ if ( ($enable_vtiger_integration > 0) and (strlen($vtiger_server_ip) > 5) and (s
|
||||
#$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error());}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
if ($DB) {echo 'Connected successfully';}
|
||||
#mysql_select_db("$vtiger_dbname", $linkV);
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ if (strlen($vtiger_search_category)<1)
|
||||
#$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error());}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
echo 'Connected successfully';
|
||||
#mysql_select_db("$vtiger_dbname", $linkV);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
# 100127-0616 - Added Vtiger ViciDial user_level role lookup
|
||||
# 130610-1126 - Finalized changing of all ereg instances to preg
|
||||
# 130902-0756 - Changed to mysqli PHP functions
|
||||
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -99,7 +100,7 @@ while ($i < $VD_users_ct)
|
||||
#$linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass");
|
||||
$linkV=mysqli_connect("$vtiger_server_ip", "$vtiger_login", "$vtiger_pass", "$vtiger_dbname");
|
||||
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_error());}
|
||||
if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysqli_connect_error());}
|
||||
echo "Connected successfully\n<BR>\n";
|
||||
#mysql_select_db("$vtiger_dbname", $linkV);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user