diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
index af8ae768..90dabf5c 100644
--- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php
@@ -87,10 +87,11 @@
# 140213-1705 - Fixed division by zero bug
# 140328-0006 - Converted division calculations to use MathZDC function
# 140624-1424 - Added droppedOFtotal options.php option
+# 140918-1614 - Added QXZ function formatting of output
#
-$version = '2.10-76';
-$build = '140624-1424';
+$version = '2.10-77';
+$build = '140918-1614';
header ("Content-type: text/html; charset=utf-8");
@@ -168,6 +169,7 @@ if (isset($_GET["droppedOFtotal"])) {$droppedOFtotal=$_GET["droppedOFtotal"];
elseif (isset($_POST["droppedOFtotal"])) {$droppedOFtotal=$_POST["droppedOFtotal"];}
+#$report_name = _QXZ('Real-Time Main Report');
$report_name = 'Real-Time Main Report';
$db_source = 'M';
@@ -321,7 +323,7 @@ if ($auth > 0)
if ($reports_auth < 1)
{
- $VDdisplayMESSAGE = "You are not allowed to view reports";
+ $VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
@@ -334,10 +336,10 @@ if ($auth > 0)
}
else
{
- $VDdisplayMESSAGE = "Login incorrect, please try again";
+ $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
if ($auth_message == 'LOCK')
{
- $VDdisplayMESSAGE = "Too many login attempts, try again in 15 minutes";
+ $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
@@ -451,7 +453,7 @@ if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL
{
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
- echo "You are not allowed to view this report: |$PHP_AUTH_USER|$report_name|\n";
+ echo _QXZ("You are not allowed to view this report:")." |$PHP_AUTH_USER|$report_name|"._QXZ("$report_name")."|\n";
exit;
}
@@ -601,7 +603,7 @@ $NFB = '';
$NFE = '';
$F=''; $FG=''; $B=''; $BG='';
-$select_list = "
Select Campaigns: ";
+$select_list = "
"._QXZ("Select Campaigns:")." ";
$select_list .= "";
-$select_list .= " (To select more than 1 campaign, hold down the Ctrl key and click)";
+$select_list .= " "._QXZ("(To select more than 1 campaign, hold down the Ctrl key and click)")."";
-$select_list .= "
Select User Groups: ";
+$select_list .= "
"._QXZ("Select User Groups:")." ";
$select_list .= "";
$select_list .= "
";
$stmtB="select preset_name,xfer_count from vicidial_xfer_stats where preset_name!='' and preset_name is not NULL $group_SQLand order by preset_name;";
if ($DB > 0) {echo "\n|$stmtB|\n";}
@@ -1508,7 +1510,7 @@ if ($PRESETstats > 0)
}
if ($ctp < 1)
{
- $PRESETstatsHTML .= "
";
if ($drpctTODAY >= $DROPmax)
{$MAIN.="$drpctTODAY%";}
else
{$MAIN.="$drpctTODAY%";}
$MAIN.="
";
-$MAIN.="
DIFF:
$diffpctONEMIN%
";
-$MAIN.="
ORDER:
$DIALorder
";
+$MAIN.="
"._QXZ("DIFF:")."
$diffpctONEMIN%
";
+$MAIN.="
"._QXZ("ORDER:")."
$DIALorder
";
$MAIN.="
";
$CSV_text.="\"LEADS IN HOPPER:\",\"$VDhop\",\"DROPPED PERCENT:\",\"$drpctTODAY%\",\"DIFF:\",\"$diffpctONEMIN%\",\"ORDER:\",\"$DIALorder\"\n";
@@ -440,10 +442,10 @@ if ($VSCagentcalls > 0)
$avgacwTODAY = sprintf("%01.0f", $avgacwTODAY);
$MAIN.="
";
- $MAIN.="
AGENT AVG WAIT:
$avgwaitTODAY
";
- $MAIN.="
AVG CUSTTIME:
$avgcustTODAY
";
- $MAIN.="
AVG ACW:
$avgacwTODAY
";
- $MAIN.="
AVG PAUSE:
$avgpauseTODAY
";
+ $MAIN.="
"._QXZ("AGENT AVG WAIT:")."
$avgwaitTODAY
";
+ $MAIN.="
"._QXZ("AVG CUSTTIME:")."
$avgcustTODAY
";
+ $MAIN.="
"._QXZ("AVG ACW:")."
$avgacwTODAY
";
+ $MAIN.="
"._QXZ("AVG PAUSE:")."
$avgpauseTODAY
";
$MAIN.="
";
$CSV_text.="\"AGENT AVG WAIT:\",\"$avgwaitTODAY\",\"AVG CUSTTIME:\",\"$avgcustTODAY\",\"AVG ACW:\",\"$avgacwTODAY\",\"AVG PAUSE:\",\"$avgpauseTODAY\"\n";
}
@@ -518,24 +520,24 @@ $parked_to_print = mysqli_num_rows($rslt);
if ($campaign_allow_inbound > 0)
{
- $MAIN.="$NFB$out_total$NFE current active calls \n";
- $CSV_text.="\"$out_total current active calls\",\"\"\n";
+ $MAIN.="$NFB$out_total$NFE "._QXZ("current active calls")." \n";
+ $CSV_text.="\"$out_total "._QXZ("current active calls")."\",\"\"\n";
}
else
{
- $MAIN.="$NFB$out_total$NFE calls being placed \n";
- $CSV_text.="\"$NFB$out_total$NFE calls being placed\",\"\"\n";
+ $MAIN.="$NFB$out_total$NFE "._QXZ("calls being placed")." \n";
+ $CSV_text.="\"$NFB$out_total$NFE "._QXZ("calls being placed")."\",\"\"\n";
}
- $MAIN.="$NFB$out_ring$NFE calls ringing \n";
- $MAIN.="$NFB$F $out_live $FG$NFE calls waiting for agents \n";
- $MAIN.="$NFB $in_ivr$NFE calls in IVR \n";
- $CSV_text.="\"$out_ring calls ringing\",\"$out_live calls waiting for agents\",\"$in_ivr calls in IVR\"\n";
+ $MAIN.="$NFB$out_ring$NFE "._QXZ("calls ringing")." \n";
+ $MAIN.="$NFB$F $out_live $FG$NFE "._QXZ("calls waiting for agents")." \n";
+ $MAIN.="$NFB $in_ivr$NFE "._QXZ("calls in IVR")." \n";
+ $CSV_text.="\"$out_ring "._QXZ("calls ringing")."\",\"$out_live "._QXZ("calls waiting for agents")."\",\"$in_ivr "._QXZ("calls in IVR")."\"\n";
}
else
{
- $MAIN.=" NO LIVE CALLS WAITING \n";
- $CSV_text.="\"NO LIVE CALLS WAITING\"\n";
+ $MAIN.=" "._QXZ("NO LIVE CALLS WAITING")." \n";
+ $CSV_text.="\""._QXZ("NO LIVE CALLS WAITING")."\"\n";
}
@@ -605,19 +607,19 @@ $talking_to_print = mysqli_num_rows($rslt);
$MAIN.="\n \n";
- $MAIN.="$NFB$agent_total$NFE agents logged in \n";
- $MAIN.="$NFB$agent_incall$NFE agents in calls \n";
- $MAIN.="$NFB$B $agent_ready $BG$NFE agents waiting \n";
- $MAIN.="$NFB$agent_paused$NFE paused agents \n";
- $CSV_text.="\"$agent_total agents logged in\",\"$agent_incall agents in calls\",\"$agent_ready agents waiting\",\"$agent_paused paused agents\"\n\n";
+ $MAIN.="$NFB$agent_total$NFE "._QXZ("agents logged in")." \n";
+ $MAIN.="$NFB$agent_incall$NFE "._QXZ("agents in calls")." \n";
+ $MAIN.="$NFB$B $agent_ready $BG$NFE "._QXZ("agents waiting")." \n";
+ $MAIN.="$NFB$agent_paused$NFE "._QXZ("paused agents")." \n";
+ $CSV_text.="\"$agent_total "._QXZ("agents logged in")."\",\"$agent_incall "._QXZ("agents in calls")."\",\"$agent_ready "._QXZ("agents waiting")."\",\"$agent_paused "._QXZ("paused agents")."\"\n\n";
$MAIN.="
";
$MAIN.="";
}
else
{
- $MAIN.=" NO AGENTS ON CALLS \n";
- $CSV_text.="\"NO AGENTS ON CALLS\"\n\n";
+ $MAIN.=" "._QXZ("NO AGENTS ON CALLS")." \n";
+ $CSV_text.="\""._QXZ("NO AGENTS ON CALLS")."\"\n\n";
}
################################################################################
diff --git a/agc_2-X/trunk/www/vicidial/functions.php b/agc_2-X/trunk/www/vicidial/functions.php
index f2750456..90a4c625 100644
--- a/agc_2-X/trunk/www/vicidial/functions.php
+++ b/agc_2-X/trunk/www/vicidial/functions.php
@@ -1,6 +1,6 @@
0)
+ {
+ if ($align=="r")
+ {
+ $fmt="%".$sprintf."s";
+ }
+ else
+ {
+ $fmt="%-".$sprintf."s";
+ }
+ $English_text=sprintf($fmt, $English_text);
+ }
+ return $English_text;
+ }
+
?>
diff --git a/agc_2-X/trunk/www/vicidial/realtime_report.php b/agc_2-X/trunk/www/vicidial/realtime_report.php
index e2632f12..480475db 100644
--- a/agc_2-X/trunk/www/vicidial/realtime_report.php
+++ b/agc_2-X/trunk/www/vicidial/realtime_report.php
@@ -27,12 +27,13 @@
# 130901-0858 - Changed to mysqli PHP functions
# 140108-0722 - Added webserver and hostname to report logging
# 140624-1423 - Added droppedOFtotal options.php option
+# 140918-1628 - Added QXZ function formatting of output
#
$startMS = microtime();
-$version = '2.10-15';
-$build = '140624-1423';
+$version = '2.10-16';
+$build = '140918-1628';
header ("Content-type: text/html; charset=utf-8");
@@ -130,7 +131,7 @@ $webphone_top = '27';
$webphone_bufw = '250';
$webphone_bufh = '1';
$webphone_pad = '10';
-$webphone_clpos = " webphone -";
+$webphone_clpos = " "._QXZ("webphone")." -";
if (file_exists('options.php'))
{
@@ -313,7 +314,7 @@ if ($auth > 0)
if ($reports_auth < 1)
{
- $VDdisplayMESSAGE = "You are not allowed to view reports";
+ $VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
@@ -326,10 +327,10 @@ if ($auth > 0)
}
else
{
- $VDdisplayMESSAGE = "Login incorrect, please try again";
+ $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
if ($auth_message == 'LOCK')
{
- $VDdisplayMESSAGE = "Too many login attempts, try again in 15 minutes";
+ $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
@@ -500,7 +501,7 @@ if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL
{
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
- echo "You are not allowed to view this report: |$PHP_AUTH_USER|$report_name|\n";
+ echo _QXZ("You are not allowed to view this report:")." |$PHP_AUTH_USER|$report_name|"._QXZ("$report_name")."|\n";
exit;
}
@@ -636,7 +637,7 @@ if ($DB) {echo "$stmt\n";}
$usergroups_to_print = mysqli_num_rows($rslt);
$i=0;
$usergroups[$i]='ALL-GROUPS';
-$usergroupnames[$i] = 'All user groups';
+$usergroupnames[$i] = _QXZ('All user groups');
$i++;
$usergroups_to_print++;
while ($i < $usergroups_to_print)
@@ -653,7 +654,7 @@ $NFB = '';
$NFE = '';
$F=''; $FG=''; $B=''; $BG='';
-$select_list = "
Select Campaigns: ";
+$select_list = "
"._QXZ("Select Campaigns:")." ";
$select_list .= "";
$o=0;
while ($groups_to_print > $o)
@@ -665,9 +666,9 @@ while ($groups_to_print > $o)
$o++;
}
$select_list .= "";
-$select_list .= " (To select more than 1 campaign, hold down the Ctrl key and click)";
+$select_list .= " ("._QXZ("To select more than 1 campaign, hold down the Ctrl key and click").")";
-$select_list .= "
Select User Groups: ";
+$select_list .= "
"._QXZ("Select User Groups:")." ";
$select_list .= "";
$o=0;
while ($o < $usergroups_to_print)
@@ -686,59 +687,59 @@ while ($o < $usergroups_to_print)
$select_list .= "";
$select_list .= "