Updated QXZ output code in agent interface to allow for ordered PHP variables and other code cleanup
QXZanalyzer.pl update for better parsing and more stats Added LANGUAGES_QXZ_notes.txt file for documentation git-svn-id: svn://192.168.202.10@2193 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -89,7 +89,7 @@ OTHER CHANGES:
|
||||
13. Changed all Agent and Administrative interface text output to use a function
|
||||
instead of echo.(for future dynamic other-language interfaces)
|
||||
|
||||
14. Added Admin Utility to split bug lists into smaller lists
|
||||
14. Added Admin Utility to split lead lists into smaller lists
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
Notes on the non-English language translations(QXZ process) 2014-11-18
|
||||
|
||||
|
||||
Summary:
|
||||
|
||||
In the 2.10 branch, we started converting from a static build process for non-English languages of the agent and admin web interfaces, to a dynamic load-time process. This necessitated creating a new function in the agent and admin web interface functions.php files to facilitate the printing or echoing of text and image names within PHP. We call this function QXZ.
|
||||
|
||||
The end goal, is to complete a new Database schema and Adminsitrative web interface to allow for the dynamic editing of non-English languages within the system.
|
||||
|
||||
|
||||
|
||||
Example PHP Code:
|
||||
|
||||
echo _QXZ("Closer In Group Choice %1s has been registered to user %2s",0,'',$closer_choice,$user)."\n";
|
||||
|
||||
The function call options in order are: "English text", "fixed legth", "l=left or r=right or blank for left", <list of up to 9 PHP variables>
|
||||
|
||||
The QXZ function allows for up to 9 defined and ordered variables to be placed in the output using a "Percent-sign, digit, lower-case-s" format (i.e. "%1s") where the digit is the place that the variable is defined at the end of the QXZ function call.
|
||||
|
||||
|
||||
|
||||
|
||||
Utilities:
|
||||
|
||||
/usr/share/astguiclient/QXZanalyzer.pl --debug --QXZvalues --QXZvaronly --file=/srv/www/htdocs/agc/astguiclient.php
|
||||
|
||||
There is a new utility stored in the /extras/ directory of the source tree called "QXZanalyzer.pl". This perl script can analyze the PHP scripts one at a time and print out various different types of output to help gather the phrases necessary for future translations as well as to help debug any issues with the PHP code itself
|
||||
|
||||
/usr/share/astguiclient/QXZanalyzer.pl --help
|
||||
QXZanalyzer.pl - analyze php scripts for QXZ functions and contents
|
||||
|
||||
options:
|
||||
[--help] = this help screen
|
||||
[--debug] = verbose debug messages
|
||||
[--QXZlines] = print full lines that include QXZ functions
|
||||
[--QXZvalues] = print only QXZ function values
|
||||
[--QXZvaronly] = print only QXZ function values with PHP variables in them
|
||||
[--QXZlengthonly] = print only QXZ function values that include a length spec
|
||||
[--QXZplaceonly] = print only QXZ function values with placeholder variables in them
|
||||
[--file=/path/from/root] = define PHP file to analyze
|
||||
|
||||
Sample output:
|
||||
|
||||
ANALYSIS FINISHED!
|
||||
File path: /srv/www/htdocs/agc/manager_send.php
|
||||
Lines in file: 2256
|
||||
QXZ line count: 130
|
||||
QXZ count: 130
|
||||
QXZ with length set: 101
|
||||
QXZ with PHP vars: 101
|
||||
QXZ with var place set: 101
|
||||
QXZ with PHP vars inst: 149
|
||||
QXZ with var place inst: 149
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
# CHANGES
|
||||
# 141117-1734 - First build
|
||||
# 141118-1326 - Added more counts and fixed parsing issues
|
||||
#
|
||||
|
||||
############################################
|
||||
@@ -96,9 +97,11 @@ if (length($PATHconf)<2)
|
||||
|
||||
$QXZlinecount=0;
|
||||
$QXZcount=0;
|
||||
$QXZcount_var=0;
|
||||
$QXZcount_length=0;
|
||||
$QXZcount_var=0;
|
||||
$QXZcount_place=0;
|
||||
$QXZcount_var_ct=0;
|
||||
$QXZcount_place_ct=0;
|
||||
|
||||
if (-e "$PATHconf")
|
||||
{
|
||||
@@ -113,7 +116,7 @@ if (-e "$PATHconf")
|
||||
$line = $conf[$i];
|
||||
$line =~ s/\n|\r|\t//gi;
|
||||
|
||||
if ( ($line =~ /QXZ/))
|
||||
if ($line =~ /\_QXZ\(/)
|
||||
{
|
||||
$QXZlinecount++;
|
||||
$QXZ_in_line = () = $line =~ /\_QXZ\(/g;
|
||||
@@ -125,26 +128,45 @@ if (-e "$PATHconf")
|
||||
if ($each_ct > 0)
|
||||
{
|
||||
@eachQXZvalue = split(/\)/,$eachQXZ[$each_ct]);
|
||||
|
||||
if ( ($QXZvalues > 0) && ($QXZvaronly < 1) && ($QXZlengthonly < 1) && ($QXZplaceonly < 1) )
|
||||
{print "$eachQXZvalue[0]\n";}
|
||||
if ($eachQXZvalue[0] =~ /\$/)
|
||||
if ( ($eachQXZvalue[0] =~ /\(/) && (length($eachQXZvalue[1])>0) )
|
||||
{
|
||||
$QXZcount_var++;
|
||||
if ($QXZvaronly > 0)
|
||||
{print "$eachQXZvalue[0]\n";}
|
||||
$temp_QXZval_str = $eachQXZvalue[0].")".$eachQXZvalue[1];
|
||||
if ( ($eachQXZvalue[1] =~ /\(/) && (length($eachQXZvalue[2])>0) )
|
||||
{
|
||||
$temp_QXZval_str .= ")".$eachQXZvalue[2];
|
||||
if ( ($eachQXZvalue[2] =~ /\(/) && (length($eachQXZvalue[3])>0) )
|
||||
{
|
||||
$temp_QXZval_str .= ")".$eachQXZvalue[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($eachQXZvalue[0] =~ /\d$|\d $/)
|
||||
else
|
||||
{
|
||||
$temp_QXZval_str = $eachQXZvalue[0];
|
||||
}
|
||||
if ( ($QXZvalues > 0) && ($QXZvaronly < 1) && ($QXZlengthonly < 1) && ($QXZplaceonly < 1) )
|
||||
{print "$temp_QXZval_str\n";}
|
||||
if ($temp_QXZval_str =~ /,\d|, \d/)
|
||||
{
|
||||
$QXZcount_length++;
|
||||
if ($QXZlengthonly > 0)
|
||||
{print "$eachQXZvalue[0]\n";}
|
||||
{print "$temp_QXZval_str\n";}
|
||||
}
|
||||
if ($eachQXZvalue[0] =~ /%/)
|
||||
if ($temp_QXZval_str =~ /\$/)
|
||||
{
|
||||
$QXZcount_var++;
|
||||
$var_ct_in_line = () = $temp_QXZval_str =~ /\$/g;
|
||||
$QXZcount_var_ct = ($QXZcount_var_ct + $var_ct_in_line);
|
||||
if ($QXZvaronly > 0)
|
||||
{print "$temp_QXZval_str\n";}
|
||||
}
|
||||
if ($temp_QXZval_str =~ /%\ds/)
|
||||
{
|
||||
$QXZcount_place++;
|
||||
$place_ct_in_line = () = $temp_QXZval_str =~ /\$/g;
|
||||
$QXZcount_place_ct = ($QXZcount_place_ct + $place_ct_in_line);
|
||||
if ($QXZplaceonly > 0)
|
||||
{print "$eachQXZvalue[0]\n";}
|
||||
{print "$temp_QXZval_str\n";}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,12 +193,14 @@ else
|
||||
print "\n";
|
||||
print "ANALYSIS FINISHED!\n";
|
||||
print "File path: $PATHconf\n";
|
||||
print "Lines in file: $i\n";
|
||||
print "QXZ line count: $QXZlinecount\n";
|
||||
print "QXZ count: $QXZcount\n";
|
||||
print "QXZ with PHP vars: $QXZcount_var\n";
|
||||
print "QXZ with length set: $QXZcount_length\n";
|
||||
print "QXZ with var place set: $QXZcount_place\n";
|
||||
print "Lines in file: $i\n";
|
||||
print "QXZ line count: $QXZlinecount\n";
|
||||
print "QXZ count: $QXZcount\n";
|
||||
print "QXZ with length set: $QXZcount_length\n";
|
||||
print "QXZ with PHP vars: $QXZcount_var\n";
|
||||
print "QXZ with var place set: $QXZcount_place\n";
|
||||
print "QXZ with PHP vars inst: $QXZcount_var_ct\n";
|
||||
print "QXZ with var place inst: $QXZcount_place_ct\n";
|
||||
print "\n";
|
||||
|
||||
$secy = time(); $secz = ($secy - $secX); $minz = ($secz/60); # calculate script runtime so far
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
# 130603-2220 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
# 130802-1002 - Changed to PHP mysqli functions
|
||||
# 140811-0848 - Changed to use QXZ function for echoing text
|
||||
# 141118-1230 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
@@ -96,7 +97,7 @@ while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
|
||||
{$user_abb = preg_replace("/^./","",$user_abb); $forever_stop++;}
|
||||
|
||||
$version = '2.2.6-1';
|
||||
$build = '130802-1002';
|
||||
$build = '141118-1230';
|
||||
|
||||
### security strip all non-alphanumeric characters out of the variables ###
|
||||
$DB=preg_replace("/[^0-9a-z]/","",$DB);
|
||||
@@ -113,7 +114,7 @@ if ($force_logout)
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
}
|
||||
echo _QXZ("You have now logged out. Thank you\n");
|
||||
echo _QXZ("You have now logged out. Thank you")."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -269,7 +270,7 @@ if (!$authphone)
|
||||
echo "<TR><TD ALIGN=RIGHT>"._QXZ("Phone Password:")." </TD>";
|
||||
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 MAXLENGTH=20 VALUE=\"$phone_pass\"></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE="._QXZ("SUBMIT")."></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>"._QXZ("VERSION: $version BUILD: $build:")."</TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>"._QXZ("VERSION: %1s BUILD: %2s:",0,'',$version,$build)."</TD></TR>\n";
|
||||
echo "</TABLE>\n";
|
||||
echo "</FORM>\n\n";
|
||||
echo "</body>\n\n";
|
||||
@@ -2719,7 +2720,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">
|
||||
<?php echo _QXZ("Welcome $LOGfullname, you are logged into this phone: $fullname - $protocol/$extension on $server_ip")." <a href=\"#\" onclick=\"LogouT();return false;\">"._QXZ("LOGOUT")."</a><BR>\n"; ?>
|
||||
<?php echo _QXZ("Welcome %1s, you are logged into this phone: %2s - %3s/%4s on %5s",0,'',$LOGfullname,$fullname,$protocol,$extension,$server_ip)." <a href=\"#\" onclick=\"LogouT();return false;\">"._QXZ("LOGOUT")."</a><BR>\n"; ?>
|
||||
</TD></TR>
|
||||
<TR VALIGN=TOP ALIGN=LEFT>
|
||||
<TD><A HREF="#" onclick="MainPanelToFront();"><IMG SRC="./images/<?php echo _QXZ("agc_tab_main.gif") ?>" ALT="Main Panel" WIDTH=83 HEIGHT=30 BORDER=0></A></TD>
|
||||
@@ -2805,7 +2806,7 @@ 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><?php echo _QXZ("INBOUND CALLS:"); ?></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><?php echo _QXZ("astGUIclient web-client VERSION: $version BUILD: $build"); ?></font></td></tr>
|
||||
<tr><td align=left><font face="Arial,Helvetica" size=1><?php echo _QXZ("astGUIclient web-client VERSION: %1s BUILD: %2s",0,'',$version,$build); ?></font></td></tr>
|
||||
</TABLE>
|
||||
|
||||
<span style="position:absolute;left:640px;top:0px;z-index:33;" id="FavoriteSBox">
|
||||
@@ -2816,7 +2817,7 @@ echo "</head>\n";
|
||||
{
|
||||
if (strlen($favorites[$h])>1)
|
||||
{
|
||||
echo "<TR id=\"$favorites[$h]\" bgcolor=\"#90EE90\"><TD> <A HREF=\"#\" onclick=\"mainxfer_send_originate('DiaL','','$favorites[$h]');return false;\"><font class=\"sb_text\">"._QXZ("$favorites[$h] - $favorites_names[$h]")."</font></A> </TD></TR>\n";
|
||||
echo "<TR id=\"$favorites[$h]\" bgcolor=\"#90EE90\"><TD> <A HREF=\"#\" onclick=\"mainxfer_send_originate('DiaL','','$favorites[$h]');return false;\"><font class=\"sb_text\">$favorites[$h] - $favorites_names[$h]</font></A> </TD></TR>\n";
|
||||
}
|
||||
$h++;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
# 130705-1524 - Added optional encrypted passwords compatibility
|
||||
# 130802-1005 - Changed to PHP mysqli functions
|
||||
# 140811-0847 - Changed to use QXZ function for echoing text
|
||||
# 141118-1232 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
@@ -68,7 +69,7 @@ $number_dialed = 'number_dialed';
|
||||
#$number_dialed = 'extension';
|
||||
|
||||
$version = '0.0.10';
|
||||
$build = '130328-0028';
|
||||
$build = '141118-1232';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -88,7 +89,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -127,7 +128,7 @@ if ($format=='debug')
|
||||
if ( (strlen($exten)<1) or (strlen($protocol)<3) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Exten $exten is not valid or protocol $protocol is not valid\n");
|
||||
echo _QXZ("Exten %1s is not valid or protocol %2s is not valid\n",0,'',$exten,$protocol);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -63,10 +63,11 @@
|
||||
# 130802-1015 - Changed to use PHP mysqli functions
|
||||
# 140126-0659 - Added external_pause_code function
|
||||
# 140810-2136 - Changed to use QXZ function for echoing text
|
||||
# 141118-1233 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-38';
|
||||
$build = '140810-2136';
|
||||
$version = '2.10-39';
|
||||
$build = '141118-1233';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=39;
|
||||
$one_mysql_log=0;
|
||||
@@ -173,7 +174,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -215,7 +216,7 @@ if ($ACTION == 'refresh')
|
||||
if (strlen($conf_exten)<1)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Conf Exten $conf_exten is not valid\n");
|
||||
echo _QXZ("Conf Exten %1s is not valid\n",0,'',$conf_exten);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -755,7 +756,7 @@ if ($ACTION == 'register')
|
||||
if ( (strlen($conf_exten)<1) || (strlen($exten)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Conf Exten $conf_exten is not valid or Exten $exten is not valid\n");
|
||||
echo _QXZ("Conf Exten %1s is not valid or Exten %2s is not valid\n",0,'',$conf_exten,$exten);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -765,7 +766,7 @@ if ($ACTION == 'register')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03013',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
echo _QXZ("Conference $conf_exten has been registered to $exten\n");
|
||||
echo _QXZ("Conference %1s has been registered to %2s\n",0,'',$conf_exten,$exten);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
# 130603-2217 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
# 130802-1006 - Changed to PHP mysqli functions
|
||||
# 140811-0845 - Changed to use QXZ function for echoing text
|
||||
# 141118-1234 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$api_script = 'deactivate';
|
||||
@@ -169,7 +170,7 @@ if (preg_match("/$TD$dispo$TD/",$sale_status))
|
||||
$stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='deactivate_lead',value='$lead_id',result='$affected_rows',result_reason='$search_field',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
$MESSAGE = _QXZ("DONE: $search_count duplicates found,")." $affected_rows updated to $new_status from $dispo";
|
||||
$MESSAGE = _QXZ("DONE: %1s duplicates found,",0,'',$search_count)." $affected_rows updated to $new_status from $dispo";
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
else
|
||||
@@ -186,13 +187,13 @@ if (preg_match("/$TD$dispo$TD/",$sale_status))
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: $search_field is empty for lead")." $lead_id");
|
||||
$MESSAGE = _QXZ("DONE: %1s is empty for lead %2s",0,'',$search_field,$lead_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: dispo is not a sale status:")." $dispo");
|
||||
$MESSAGE = _QXZ("DONE: dispo is not a sale status:")." $dispo";
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
# 130603-2216 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
# 130802-1007 - Changed to PHP mysqli functions
|
||||
# 140811-0844 - Changed to use QXZ function for echoing text
|
||||
# 141118-1235 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$api_script = 'deactivate';
|
||||
@@ -209,24 +210,24 @@ if ($match_found > 0)
|
||||
$stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='deactivate_lead',value='$lead_id',result='$affected_rows',result_reason='$lead_id',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
$MESSAGE = _QXZ("DONE: $search_count match found, $affected_rows updated to $new_list_id with $dispo status");
|
||||
$MESSAGE = _QXZ("DONE: %1s match found, %2s updated to %3s with %4s status",0,'',$search_count,$affected_rows,$new_list_id,$dispo);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: no match found within $lead_id |$new_list_id|");
|
||||
$MESSAGE = _QXZ("DONE: no match found within %1s |%2s|",0,'',$lead_id,$new_list_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: $search_field is empty for lead $lead_id");
|
||||
$MESSAGE = _QXZ("DONE: %1s is empty for lead %2s",0,'',$search_field,$lead_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: dispo is not a sale status: $dispo");
|
||||
$MESSAGE = _QXZ("DONE: dispo is not a sale status: %1s",0,'',$dispo);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# 140429-2035 - Added TABLEper_call_notes display script variable for form display
|
||||
# 140521-1314 - Added more agent login error messages
|
||||
# 140811-2024 - Changed to use QXZ function for echoing text, for use in future translations
|
||||
# 141118-0909 - Added options for up to 9 ordered variables within QXZ function output
|
||||
#
|
||||
|
||||
# $mysql_queries = 19
|
||||
@@ -326,7 +327,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DB) {echo _QXZ("ERROR: no custom data for this lead: $lead_id\n");}
|
||||
if ($DB) {echo _QXZ("ERROR: no custom data for this lead: ")."$lead_id\n";}
|
||||
}
|
||||
##### END grab the data from custom table for the lead_id
|
||||
|
||||
@@ -1815,13 +1816,39 @@ function mysql_to_mysqli($stmt, $link) {
|
||||
}
|
||||
|
||||
|
||||
function _QXZ($English_text)
|
||||
# function to print/echo content, options for length, alignment and ordered internal variables are included
|
||||
function _QXZ($English_text, $sprintf=0, $align="l", $v_one='', $v_two='', $v_three='', $v_four='', $v_five='', $v_six='', $v_seven='', $v_eight='', $v_nine='')
|
||||
{
|
||||
# $English_text = str_repeat('*', strlen($English_text));
|
||||
# $fp = fopen ("./QXZdebug.txt", "a");
|
||||
# fwrite ($fp, "|$English_text\n");
|
||||
# fclose($fp);
|
||||
if (preg_match("/%\ds/",$English_text))
|
||||
{
|
||||
$English_text = preg_replace("/%1s/", $v_one, $English_text);
|
||||
$English_text = preg_replace("/%2s/", $v_two, $English_text);
|
||||
$English_text = preg_replace("/%3s/", $v_three, $English_text);
|
||||
$English_text = preg_replace("/%4s/", $v_four, $English_text);
|
||||
$English_text = preg_replace("/%5s/", $v_five, $English_text);
|
||||
$English_text = preg_replace("/%6s/", $v_six, $English_text);
|
||||
$English_text = preg_replace("/%7s/", $v_seven, $English_text);
|
||||
$English_text = preg_replace("/%8s/", $v_eight, $English_text);
|
||||
$English_text = preg_replace("/%9s/", $v_nine, $English_text);
|
||||
}
|
||||
### uncomment to test output
|
||||
# $English_text = str_repeat('*', strlen($English_text));
|
||||
# $fp = fopen ("./QXZdebug.txt", "a");
|
||||
# fwrite ($fp, "|$English_text\n");
|
||||
# fclose($fp);
|
||||
|
||||
if ($sprintf>0)
|
||||
{
|
||||
if ($align=="r")
|
||||
{
|
||||
$fmt="%".$sprintf."s";
|
||||
}
|
||||
else
|
||||
{
|
||||
$fmt="%-".$sprintf."s";
|
||||
}
|
||||
$English_text=sprintf($fmt, $English_text);
|
||||
}
|
||||
return $English_text;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
# 130705-1522 - Added optional encrypted passwords compatibility
|
||||
# 130802-1009 - Changed to PHP mysqli functions
|
||||
# 140811-0841 - Changed to use QXZ function for echoing text
|
||||
# 141118-1236 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
@@ -68,8 +69,8 @@ $server_ip = preg_replace("/\'|\"|\\\\|;/","",$server_ip);
|
||||
# default optional vars if not set
|
||||
if (!isset($format)) {$format="text";}
|
||||
|
||||
$version = '2.6-13';
|
||||
$build = '130328-0027';
|
||||
$version = '2.10-14';
|
||||
$build = '141118-1236';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -89,7 +90,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -138,7 +139,7 @@ $channel_live=1;
|
||||
if ( (strlen($exten)<1) or (strlen($protocol)<3) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Exten $exten is not valid or protocol $protocol is not valid\n");
|
||||
echo _QXZ("Exten %1s is not valid or protocol %2s is not valid\n",0,'',$exten,$protocol);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -170,10 +171,10 @@ while($loop_count > $counter)
|
||||
if ($trunk_count>0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
echo _QXZ("Conversation: $counter ~");
|
||||
echo _QXZ("ChannelA: $ChanneLA[$counter] ~");
|
||||
echo _QXZ("ChannelB: $ChanneLB[$counter] ~");
|
||||
echo _QXZ("ChannelBtrunk: $row[0]|");
|
||||
echo "Conversation: $counter ~";
|
||||
echo "ChannelA: $ChanneLA[$counter] ~";
|
||||
echo "ChannelB: $ChanneLB[$counter] ~";
|
||||
echo "ChannelBtrunk: $row[0]|";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,10 +185,10 @@ while($loop_count > $counter)
|
||||
if ($trunk_count>0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
echo _QXZ("Conversation: $counter ~");
|
||||
echo _QXZ("ChannelA: $ChanneLA[$counter] ~");
|
||||
echo _QXZ("ChannelB: $ChanneLB[$counter] ~");
|
||||
echo _QXZ("ChannelBtrunk: $row[0]|");
|
||||
echo "Conversation: $counter ~";
|
||||
echo "ChannelA: $ChanneLA[$counter] ~";
|
||||
echo "ChannelB: $ChanneLB[$counter] ~";
|
||||
echo "ChannelBtrunk: $row[0]|";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -198,10 +199,10 @@ while($loop_count > $counter)
|
||||
if ($trunk_count>0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
echo _QXZ("Conversation: $counter ~");
|
||||
echo _QXZ("ChannelA: $ChanneLA[$counter] ~");
|
||||
echo _QXZ("ChannelB: $ChanneLB[$counter] ~");
|
||||
echo _QXZ("ChannelBtrunk: $row[0]|");
|
||||
echo "Conversation: $counter ~";
|
||||
echo "ChannelA: $ChanneLA[$counter] ~";
|
||||
echo "ChannelB: $ChanneLB[$counter] ~";
|
||||
echo "ChannelBtrunk: $row[0]|";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -212,17 +213,17 @@ while($loop_count > $counter)
|
||||
if ($trunk_count>0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
echo _QXZ("Conversation: $counter ~");
|
||||
echo _QXZ("ChannelA: $ChanneLA[$counter] ~");
|
||||
echo _QXZ("ChannelB: $ChanneLB[$counter] ~");
|
||||
echo _QXZ("ChannelBtrunk: $row[0]|");
|
||||
echo "Conversation: $counter ~";
|
||||
echo "ChannelA: $ChanneLA[$counter] ~";
|
||||
echo "ChannelB: $ChanneLB[$counter] ~";
|
||||
echo "ChannelBtrunk: $row[0]|";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo _QXZ("Conversation: $counter ~");
|
||||
echo _QXZ("ChannelA: $ChanneLA[$counter] ~");
|
||||
echo _QXZ("ChannelB: $ChanneLB[$counter] ~");
|
||||
echo _QXZ("ChannelBtrunk: $ChanneLA[$counter]|");
|
||||
echo "Conversation: $counter ~";
|
||||
echo "ChannelA: $ChanneLA[$counter] ~";
|
||||
echo "ChannelB: $ChanneLB[$counter] ~";
|
||||
echo "ChannelBtrunk: $ChanneLA[$counter]|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,10 +120,11 @@
|
||||
# 130926-1755 - Added queuemetrics_record_hold option
|
||||
# 140215-2057 - Added several variable options for QM socket URL
|
||||
# 140810-2125 - Changed to use QXZ function for echoing text
|
||||
# 141118-1101 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-67';
|
||||
$build = '140810-2125';
|
||||
$version = '2.10-68';
|
||||
$build = '141118-1101';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=128;
|
||||
$one_mysql_log=0;
|
||||
@@ -284,7 +285,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -313,12 +314,12 @@ if ($format=='debug')
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build ACTION: $ACTION server_ip: $server_ip-->\n";
|
||||
echo "<title>"._QXZ("Manager Send: ");
|
||||
if ($ACTION=="Originate") {echo _QXZ("Originate");}
|
||||
if ($ACTION=="Redirect") {echo _QXZ("Redirect");}
|
||||
if ($ACTION=="RedirectName") {echo _QXZ("RedirectName");}
|
||||
if ($ACTION=="Hangup") {echo _QXZ("Hangup");}
|
||||
if ($ACTION=="Command") {echo _QXZ("Command");}
|
||||
if ($ACTION==99999) {echo _QXZ("HELP");}
|
||||
if ($ACTION=="Originate") {echo "Originate";}
|
||||
if ($ACTION=="Redirect") {echo "Redirect";}
|
||||
if ($ACTION=="RedirectName") {echo "RedirectName";}
|
||||
if ($ACTION=="Hangup") {echo "Hangup";}
|
||||
if ($ACTION=="Command") {echo "Command";}
|
||||
if ($ACTION==99999) {echo "HELP";}
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
@@ -349,7 +350,7 @@ if ($ACTION=="SysCIDOriginate")
|
||||
{
|
||||
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) )
|
||||
{
|
||||
echo _QXZ("Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n");
|
||||
echo _QXZ("Exten %1s is not valid or queryCID %2s is not valid, Originate command not inserted",0,'',$exten,$queryCID)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,7 +358,7 @@ if ($ACTION=="SysCIDOriginate")
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02004',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo _QXZ("Originate command sent for Exten $exten Channel $channel on $server_ip\n");
|
||||
echo _QXZ("Originate command sent for Exten %1s Channel %2s on %3s",0,'',$exten,$channel,$server_ip)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,13 +372,13 @@ if ($ACTION=="OriginateName")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nOriginateName Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("OriginateName Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -400,14 +401,14 @@ if ($ACTION=="OriginateNameVmail")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nOriginateNameVmail Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("OriginateNameVmail Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -447,13 +448,13 @@ if ($ACTION=="Originate")
|
||||
{
|
||||
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or ( (strlen($queryCID)<10) and ($alertCID < 1) ) )
|
||||
{
|
||||
echo _QXZ("ERROR Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n");
|
||||
echo "ERROR"._QXZ(" Exten %1s is not valid or queryCID %2s is not valid, Originate command not inserted",0,'',$exten,$queryCID)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (preg_match('/MANUAL/i',$agent_dialed_type)) and ( (preg_match("/^\d860\d\d\d\d$/i",$exten)) or (preg_match("/^860\d\d\d\d$/i",$exten)) ) )
|
||||
{
|
||||
echo _QXZ("ERROR You are not allowed to dial into other agent sessions $exten\n");
|
||||
echo "ERROR"._QXZ(" You are not allowed to dial into other agent sessions")." $exten\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -475,7 +476,7 @@ if ($ACTION=="Originate")
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02007',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo _QXZ("Originate command sent for Exten $exten Channel $channel on $server_ip |$account|$variable|\n");
|
||||
echo _QXZ("Originate command sent for Exten %1s Channel %2s on %3s",0,'',$exten,$channel,$server_ip)." |$account|$variable|\n";
|
||||
|
||||
### log outbound call in the dial log
|
||||
$stmt = "INSERT INTO vicidial_dial_log SET caller_code='$queryCID',lead_id='$lead_id',server_ip='$server_ip',call_date='$NOW_TIME',extension='$exten',channel='$channel',timeout='0',outbound_cid='$outCID',context='$ext_context';";
|
||||
@@ -529,7 +530,7 @@ if ($ACTION=="HangupConfDial")
|
||||
if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n");
|
||||
echo _QXZ("conference %1s is not valid or ext_context %2s or queryCID %3s is not valid, Hangup command not inserted",0,'',$exten,$ext_context,$queryCID)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -573,7 +574,7 @@ if ($ACTION=="Hangup")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not valid or queryCID %2s is not valid, Hangup command not inserted",0,'',$channel,$queryCID)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -604,7 +605,7 @@ if ($ACTION=="Hangup")
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
echo _QXZ("Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\n");
|
||||
echo _QXZ("Call %1s %2s is not live on %3s, Checking Live Channel",0,'',$CalLCID,$channel,$call_server_ip)."...\n";
|
||||
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
@@ -614,7 +615,7 @@ if ($ACTION=="Hangup")
|
||||
if ($row[0]==0)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Hangup command not inserted",0,'',$channel,$call_server_ip)." $rowx[0]\n$stmt\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -632,7 +633,7 @@ if ($ACTION=="Hangup")
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel in use by another agent on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n");
|
||||
echo _QXZ("Channel %1s in use by another agent on %2s, Hangup command not inserted",0,'',$channel,$call_server_ip)." $rowx[0]\n$stmt\n";
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
$fp = fopen ("./vicidial_debug.txt", "a");
|
||||
@@ -829,7 +830,7 @@ if ($ACTION=="Hangup")
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02020',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo _QXZ("Hangup command sent for Channel $channel on $call_server_ip\n");
|
||||
echo _QXZ("Hangup command sent for Channel %1s on %2s",0,'',$channel,$call_server_ip)."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -845,17 +846,17 @@ if ($ACTION=="RedirectVD")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("auto_dial_level $auto_dial_level must be set\n");
|
||||
echo _QXZ("campaign $campaign must be set\n");
|
||||
echo _QXZ("uniqueid $uniqueid must be set\n");
|
||||
echo _QXZ("lead_id $lead_id must be set\n");
|
||||
echo _QXZ("\nRedirectVD Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n";
|
||||
echo _QXZ("auto_dial_level %1s must be set",0,'',$auto_dial_level)."\n";
|
||||
echo _QXZ("campaign %1s must be set",0,'',$campaign)."\n";
|
||||
echo _QXZ("uniqueid %1s must be set",0,'',$uniqueid)."\n";
|
||||
echo _QXZ("lead_id %1s must be set",0,'',$lead_id)."\n\n";
|
||||
echo _QXZ("RedirectVD Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -921,15 +922,15 @@ if ($ACTION=="RedirectToPark")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("parkedby $parkedby must be set\n");
|
||||
echo _QXZ("\nRedirectToPark Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n";
|
||||
echo _QXZ("parkedby %1s must be set",0,'',$parkedby)."\n\n";
|
||||
echo _QXZ("RedirectToPark Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1027,13 +1028,13 @@ if ($ACTION=="RedirectFromPark")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirectFromPark Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("RedirectFromPark Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1156,15 +1157,15 @@ if ($ACTION=="RedirectToParkIVR")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("parkedby $parkedby must be set\n");
|
||||
echo _QXZ("\nRedirectToPark Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n";
|
||||
echo _QXZ("parkedby %1s must be set",0,'',$parkedby)."\n";
|
||||
echo _QXZ("RedirectToPark Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1266,13 +1267,13 @@ if ($ACTION=="RedirectFromParkIVR")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirectFromPark Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("RedirectFromPark Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1401,13 +1402,13 @@ if ($ACTION=="RedirectName")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirectName Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("RedirectName Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1430,14 +1431,14 @@ if ($ACTION=="RedirectNameVmail")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("extenName $extenName must be set\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirectNameVmail Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("extenName %1s must be set",0,'',$extenName)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("RedirectNameVmail Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1459,7 +1460,6 @@ if ($ACTION=="RedirectNameVmail")
|
||||
|
||||
|
||||
|
||||
|
||||
if ($ACTION=="RedirectXtraCXNeW")
|
||||
{
|
||||
$DBout='';
|
||||
@@ -1470,14 +1470,14 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
{
|
||||
$channel_liveX=0;
|
||||
$channel_liveY=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("ExtraChannel $extrachannel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirect Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("ExtraChannel %1s must be greater than 2 characters",0,'',$extrachannel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("Redirect Action not sent")."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename))
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
@@ -1557,7 +1557,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
else
|
||||
{
|
||||
$channel_liveX=0;
|
||||
echo _QXZ("Cannot find empty vicidial_conference on $server_ip, Redirect command not inserted\n|$stmt|");
|
||||
echo _QXZ("Cannot find empty vicidial_conference on %1s, Redirect command not inserted",0,'',$server_ip)."\n|$stmt|";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1579,7 +1579,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_liveX=0;
|
||||
echo _QXZ("Channel $channel is not live on $call_server_ip, Redirect command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Redirect command not inserted",0,'',$channel,$call_server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel is not live on $call_server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1598,7 +1598,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_liveY=0;
|
||||
echo _QXZ("Channel $channel is not live on $server_ip, Redirect command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Redirect command not inserted",0,'',$channel,$server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel is not live on $server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1612,7 +1612,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
if ($rowx[0] < 1)
|
||||
{
|
||||
$channel_liveY=0;
|
||||
echo _QXZ("No Local agent to send call to, Redirect command not inserted\n");
|
||||
echo _QXZ("No Local agent to send call to, Redirect command not inserted")."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "No Local agent to send call to";}
|
||||
}
|
||||
else
|
||||
@@ -1648,7 +1648,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02044',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n");
|
||||
echo _QXZ("RedirectXtraCX command sent for Channel %1s on %2s and \nHungup %3s on %4s",0,'',$channel,$call_server_ip,$extrachannel,$server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel on $call_server_ip, Hungup $extrachannel on $server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1677,11 +1677,6 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($ACTION=="RedirectXtraNeW")
|
||||
{
|
||||
if ($channel=="$extrachannel")
|
||||
@@ -1695,15 +1690,16 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
{
|
||||
$channel_liveX=0;
|
||||
$channel_liveY=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("ExtraChannel $extrachannel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("session_id $session_id must be set\n");
|
||||
echo _QXZ("\nRedirect Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("ExtraChannel %1s must be greater than 2 characters",0,'',$extrachannel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n";
|
||||
echo _QXZ("session_id %1s must be set",0,'',$session_id)."\n\n";
|
||||
echo _QXZ("Redirect Action not sent")."\n";
|
||||
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename))
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
@@ -1796,7 +1792,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_liveX=0;
|
||||
echo _QXZ("Channel $channel is not live on $call_server_ip, Redirect command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Redirect command not inserted",0,'',$channel,$call_server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel is not live on $call_server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1815,7 +1811,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_liveY=0;
|
||||
echo _QXZ("Channel $channel is not live on $server_ip, Redirect command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Redirect command not inserted",0,'',$channel,$server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel is not live on $server_ip";}
|
||||
}
|
||||
}
|
||||
@@ -1828,7 +1824,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n");
|
||||
echo _QXZ("RedirectXtra command sent for Channel %1s and \nExtraChannel %2s\n to %3s on %4s",0,'',$channel,$extrachannel,$exten,$server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel and $extrachannel to $exten on $server_ip";}
|
||||
}
|
||||
else
|
||||
@@ -1855,7 +1851,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n");
|
||||
echo _QXZ("RedirectXtra command sent for Channel %1s on %2s and \nExtraChannel %3s\n to %4s on %5s",0,'',$channel,$call_server_ip,$extrachannel,$exten,$server_ip)."\n";
|
||||
if (preg_match("/SECOND|FIRST|DEBUG/",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
|
||||
}
|
||||
}
|
||||
@@ -1916,13 +1912,13 @@ if ($ACTION=="Redirect")
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("One of these variables is not valid:\n");
|
||||
echo _QXZ("Channel $channel must be greater than 2 characters\n");
|
||||
echo _QXZ("queryCID $queryCID must be greater than 14 characters\n");
|
||||
echo _QXZ("exten $exten must be set\n");
|
||||
echo _QXZ("ext_context $ext_context must be set\n");
|
||||
echo _QXZ("ext_priority $ext_priority must be set\n");
|
||||
echo _QXZ("\nRedirect Action not sent\n");
|
||||
echo _QXZ("One of these variables is not valid:")."\n";
|
||||
echo _QXZ("Channel %1s must be greater than 2 characters",0,'',$channel)."\n";
|
||||
echo _QXZ("queryCID %1s must be greater than 14 characters",0,'',$queryCID)."\n";
|
||||
echo _QXZ("exten %1s must be set",0,'',$exten)."\n";
|
||||
echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n";
|
||||
echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n";
|
||||
echo _QXZ("Redirect Action not sent")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1942,7 +1938,7 @@ if ($ACTION=="Redirect")
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not live on $server_ip, Redirect command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, Redirect command not inserted",0,'',$channel,$server_ip)."\n";
|
||||
}
|
||||
}
|
||||
if ($channel_live==1)
|
||||
@@ -1952,7 +1948,7 @@ if ($ACTION=="Redirect")
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02064',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("Redirect command sent for Channel $channel on $server_ip\n");
|
||||
echo _QXZ("Redirect command sent for Channel %1s on %2s",0,'',$channel,$server_ip)."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1974,7 +1970,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not valid or queryCID %2s is not valid or filename: %3s is not valid, %4s command not inserted",0,'',$channel,$queryCID,$filename,$ACTION)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1993,7 +1989,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not live on $server_ip, $ACTION command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not live on %2s, %3s command not inserted",0,'',$channel,$server_ip,$ACTION)."\n";
|
||||
}
|
||||
}
|
||||
if ($channel_live==1)
|
||||
@@ -2039,7 +2035,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02071',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
echo _QXZ("$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n");
|
||||
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2061,7 +2057,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n");
|
||||
echo _QXZ("Channel %1s is not valid or exten %2s is not valid or filename: %3s is not valid, %4s command not inserted",0,'',$channel,$exten,$filename,$ACTION)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2210,7 +2206,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
echo _QXZ("$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n");
|
||||
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2225,7 +2221,7 @@ if ($ACTION=="VolumeControl")
|
||||
{
|
||||
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) )
|
||||
{
|
||||
echo _QXZ("Conference $exten, Stage $stage is not valid or queryCID $queryCID is not valid, Originate command not inserted\n");
|
||||
echo _QXZ("Conference %1s, Stage %2s is not valid or queryCID %3s is not valid, Originate command not inserted",0,'',$exten,$stage,$queryCID)."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2242,7 +2238,7 @@ if ($ACTION=="VolumeControl")
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02082',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo _QXZ("Volume command sent for Conference $exten, Stage $stage Channel $channel on $server_ip\n");
|
||||
echo _QXZ("Volume command sent for Conference %1s, Stage %2s Channel %3s on %4s",0,'',$exten,$stage,$channel,$server_ip)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
# 130603-2213 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
# 130802-1024 - Changed to PHP mysqli functions
|
||||
# 140811-0839 - Changed to use QXZ function for echoing text
|
||||
# 141118-1237 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
@@ -58,7 +59,7 @@ if (!isset($format)) {$format="text";}
|
||||
if (!isset($park_limit)) {$park_limit="1000";}
|
||||
|
||||
$version = '0.0.4';
|
||||
$build = '60619-1205';
|
||||
$build = '141118-1237';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -78,7 +79,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -117,7 +118,7 @@ $channel_live=1;
|
||||
if ( (strlen($exten)<1) or (strlen($protocol)<3) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Exten $exten is not valid or protocol $protocol is not valid\n");
|
||||
echo _QXZ("Exten %1s is not valid or protocol %2s is not valid",0,'',$exten,$protocol)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
# 130718-0946 - Fixed login bug
|
||||
# 130802-1139 - Changed to PHP mysqli functions
|
||||
# 140810-2113 - Changed to use QXZ function for echoing text
|
||||
# 141118-1238 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-9p';
|
||||
$build = '140810-2113';
|
||||
$version = '2.10-10p';
|
||||
$build = '141118-1238';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=73;
|
||||
$one_mysql_log=0;
|
||||
@@ -64,7 +65,7 @@ $forever_stop=0;
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
echo _QXZ("You have now logged out. Thank you\n");
|
||||
echo _QXZ("You have now logged out. Thank you")."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -896,7 +897,7 @@ $zi=2;
|
||||
|
||||
echo "<body bgcolor=\"white\">\n";
|
||||
|
||||
echo _QXZ(" Phone: $original_phone_login - $server_ip")." <a href=\"$PHP_SELF?relogin=YES&session_epoch=1234567890&session_id=&session_name=$session_name&VD_login=$VD_login&phone_login=$original_phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">"._QXZ("Logout")."</a><BR>\n";
|
||||
echo _QXZ(" Phone: ")."$original_phone_login - $server_ip <a href=\"$PHP_SELF?relogin=YES&session_epoch=1234567890&session_id=&session_name=$session_name&VD_login=$VD_login&phone_login=$original_phone_login&phone_pass=$phone_pass&VD_pass=$VD_pass\">"._QXZ("Logout")."</a><BR>\n";
|
||||
|
||||
if ($webphone_location == 'bar')
|
||||
{
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
# 130802-1031 - Changed to PHP mysqli functions
|
||||
# 131208-2155 - Added user log TIMEOUTLOGOUT event status
|
||||
# 140810-2138 - Changed to use QXZ function for echoing text
|
||||
# 141118-1239 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-11';
|
||||
$build = '140810-2138';
|
||||
$version = '2.10-12';
|
||||
$build = '141118-1239';
|
||||
|
||||
$StarTtimE = date("U");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -274,7 +275,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
|
||||
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') or ($status=='TIMEOUTLOGOUT') ) and ($stage=='login') )
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You have now logged-in");
|
||||
$LOGtimeMESSAGE = _QXZ("You logged in at $NOW_TIME");
|
||||
$LOGtimeMESSAGE = _QXZ("You logged in at")." $NOW_TIME";
|
||||
|
||||
### Add a record to the timeclock log
|
||||
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGIN', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', event_date='$NOW_TIME';";
|
||||
@@ -302,7 +303,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
|
||||
if ( ($status=='LOGIN') and ($stage=='logout') )
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You have now logged-out");
|
||||
$LOGtimeMESSAGE = _QXZ("You logged out at $NOW_TIME")."<BR>"._QXZ("Amount of time you were logged-in: $totTIME_HMS");
|
||||
$LOGtimeMESSAGE = _QXZ("You logged out at")." $NOW_TIME<BR>"._QXZ("Amount of time you were logged-in:")." $totTIME_HMS";
|
||||
|
||||
### Add a record to the timeclock log
|
||||
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
|
||||
@@ -377,17 +378,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
|
||||
|
||||
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') or ($status=='TIMEOUTLOGOUT') )
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Time since you were last logged-in: $totTIME_HMS");
|
||||
$VDdisplayMESSAGE = _QXZ("Time since you were last logged-in:")." $totTIME_HMS";
|
||||
$log_action = 'login';
|
||||
$button_name = 'LOGIN';
|
||||
$LOGtimeMESSAGE = _QXZ("You last logged-out at: $last_action_date")."<BR><BR>"._QXZ("Click LOGIN below to log-in");
|
||||
$LOGtimeMESSAGE = _QXZ("You last logged-out at:")." $last_action_date<BR><BR>"._QXZ("Click LOGIN below to log-in");
|
||||
}
|
||||
if ($status=='LOGIN')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Amount of time you have been logged-in: $totTIME_HMS");
|
||||
$VDdisplayMESSAGE = _QXZ("Amount of time you have been logged-in:")." $totTIME_HMS";
|
||||
$log_action = 'logout';
|
||||
$button_name = 'LOGOUT';
|
||||
$LOGtimeMESSAGE = _QXZ("You logged-in at: $last_action_date")."<BR>"._QXZ("Amount of time you have been logged-in: $totTIME_HMS")."<BR><BR>"._QXZ("Click LOGOUT below to log-out");
|
||||
$LOGtimeMESSAGE = _QXZ("You logged-in at:")." $last_action_date<BR>"._QXZ("Amount of time you have been logged-in:")." $totTIME_HMS<BR><BR>"._QXZ("Click LOGOUT below to log-out");
|
||||
}
|
||||
|
||||
echo"<HTML><HEAD>\n";
|
||||
|
||||
@@ -362,10 +362,11 @@
|
||||
# 140908-1031 - Fixed issues with logging of non-answered calls, user_group and call notes
|
||||
# 141024-0851 - Fixed issues with filtering of manual dial calls from call log or callbacks
|
||||
# 141111-0658 - Removed several AJAX text outputs from QXZ output
|
||||
# 141118-1231 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-258';
|
||||
$build = '141111-0658';
|
||||
$version = '2.10-259';
|
||||
$build = '141118-1231';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=597;
|
||||
$one_mysql_log=0;
|
||||
@@ -846,7 +847,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -1090,7 +1091,7 @@ if ($ACTION == 'regCLOSER')
|
||||
if ( (strlen($closer_choice)<1) || (strlen($user)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Group Choice $closer_choice is not valid\n");
|
||||
echo _QXZ("Group Choice is not valid").": $closer_choice\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -1307,7 +1308,7 @@ if ($ACTION == 'regCLOSER')
|
||||
}
|
||||
|
||||
}
|
||||
echo _QXZ("Closer In Group Choice $closer_choice has been registered to user $user\n");
|
||||
echo _QXZ("Closer In Group Choice %1s has been registered to user %2s",0,'',$closer_choice,$user)."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1325,7 +1326,7 @@ if ($ACTION == 'regTERRITORY')
|
||||
if ( (strlen($agent_territories)<1) || (strlen($user)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("Territory Choice $agent_territories is not valid\n");
|
||||
echo _QXZ("Territory Choice is not valid")."$agent_territories\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -1365,7 +1366,7 @@ if ($ACTION == 'regTERRITORY')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00256',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
echo _QXZ("Territory Choice $agent_territories has been registered to user $user\n");
|
||||
echo _QXZ("Territory Choice %1s has been registered to user %2s",0,'',$agent_territories,$user)."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1484,7 +1485,7 @@ if ($ACTION == 'UpdateFields')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("no lead info in system: $lead_id\n");
|
||||
echo "ERROR: "._QXZ("no lead info in system:")." $lead_id\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1587,8 +1588,8 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("HOPPER EMPTY\n");
|
||||
echo _QXZ("Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n");
|
||||
echo "HOPPER EMPTY\n";
|
||||
echo _QXZ("Conf Exten %1s or campaign %2s or ext_context %3s is not valid",0,'',$conf_exten,$campaign,$ext_context)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -1734,7 +1735,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00355',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAEDaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
echo _QXZ("OUTSIDE OF LOCAL CALL TIME $VMDQaffected_rows|$VLAEDaffected_rows\n");
|
||||
echo "OUTSIDE OF LOCAL CALL TIME $VMDQaffected_rows|$VLAEDaffected_rows\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -1768,7 +1769,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00357',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAEDaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
echo _QXZ("DNC NUMBER\n");
|
||||
echo "DNC NUMBER\n";
|
||||
exit;
|
||||
}
|
||||
if ( (preg_match("/Y/",$use_campaign_dnc)) or (preg_match("/AREACODE/",$use_campaign_dnc)) )
|
||||
@@ -1808,7 +1809,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00359',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAEDaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
echo _QXZ("DNC NUMBER\n");
|
||||
echo "DNC NUMBER\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -1861,7 +1862,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00361',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VLAEDaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
echo _QXZ("NUMBER NOT IN CAMPLISTS\n");
|
||||
echo "NUMBER NOT IN CAMPLISTS\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -2592,9 +2593,9 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
{
|
||||
$post_phone_time_diff_alert_message='';
|
||||
if ($PHONEdialable < 1)
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Phone Area Code Outside Dialable Zone $PHONEgmt_offset ");}
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Phone Area Code Outside Dialable Zone")." $PHONEgmt_offset ";}
|
||||
if ($POSTdialable < 1)
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Postal Code Outside Dialable Zone $POSTgmt_offset");}
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Postal Code Outside Dialable Zone")." $POSTgmt_offset";}
|
||||
}
|
||||
}
|
||||
if ( ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_PHONE') or ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_POSTAL') or ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_BOTH') )
|
||||
@@ -2603,12 +2604,12 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ( ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_PHONE') or ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_BOTH') )
|
||||
{
|
||||
if ($PHONEdialable < 1)
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Phone Area Code Outside Dialable Zone $PHONEgmt_offset ");}
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Phone Area Code Outside Dialable Zone")." $PHONEgmt_offset ";}
|
||||
}
|
||||
if ( ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_POSTAL') or ($post_phone_time_diff_alert == 'OUTSIDE_CALLTIME_BOTH') )
|
||||
{
|
||||
if ($POSTdialable < 1)
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Postal Code Outside Dialable Zone $POSTgmt_offset ");}
|
||||
{$post_phone_time_diff_alert_message .= _QXZ(" Postal Code Outside Dialable Zone")." $POSTgmt_offset ";}
|
||||
}
|
||||
}
|
||||
##### END check for postal_code and phone time zones if alert enabled
|
||||
@@ -3248,7 +3249,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo _QXZ("HOPPER EMPTY\n");
|
||||
echo "HOPPER EMPTY\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3266,8 +3267,8 @@ if ($ACTION == 'alt_phone_change')
|
||||
if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) || (strlen($phone_number)<1) )
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("ALT PHONE NUMBER STATUS NOT CHANGED\n");
|
||||
echo _QXZ("$phone_number $stage $lead_id or $called_count is not valid\n");
|
||||
echo _QXZ("ALT PHONE NUMBER STATUS NOT CHANGED")."\n";
|
||||
echo _QXZ("%1s %2s %3s or %4s is not valid",0,'',$phone_number,$stage,$lead_id,$called_count)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -3277,7 +3278,7 @@ if ($ACTION == 'alt_phone_change')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00041',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("ALT PHONE NUMBER STATUS CHANGED\n");
|
||||
echo _QXZ("ALT PHONE NUMBER STATUS CHANGED")."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3291,8 +3292,8 @@ if ($ACTION == 'AlertControl')
|
||||
if (strlen($stage)<1)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("AGENT ALERT SETTING NOT CHANGED\n");
|
||||
echo _QXZ("$stage is not valid\n");
|
||||
echo _QXZ("AGENT ALERT SETTING NOT CHANGED")."\n";
|
||||
echo _QXZ("%1s is not valid",0,'',$stage)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -3305,7 +3306,7 @@ if ($ACTION == 'AlertControl')
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00185',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo _QXZ("AGENT ALERT SETTING CHANGED $stage\n");
|
||||
echo _QXZ("AGENT ALERT SETTING CHANGED %1s",0,'',$stage)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3323,7 +3324,7 @@ if ($ACTION == 'manDiaLskip')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "LEAD NOT REVERTED\n";
|
||||
echo _QXZ("Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n");
|
||||
echo _QXZ("Conf Exten %1s or campaign %2s or ext_context %3s is not valid",0,'',$conf_exten,$campaign,$ext_context)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -3371,7 +3372,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo " CALL NOT PLACED\n";
|
||||
echo _QXZ("Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n");
|
||||
echo _QXZ("Conf Exten %1s or campaign %2s or ext_context %3s is not valid",0,'',$conf_exten,$campaign,$ext_context)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -4075,7 +4076,7 @@ if ($stage == "start")
|
||||
}
|
||||
|
||||
echo "LOG NOT ENTERED\n";
|
||||
echo _QXZ("uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n");
|
||||
echo _QXZ("uniqueid %1s or lead_id: %2s or list_id: %3s or phone_number: %4s or campaign: %5s is not valid",0,'',$uniqueid,$lead_id,$list_id,$phone_number,$campaign)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -4233,7 +4234,7 @@ if ($stage == "end")
|
||||
if ( (strlen($uniqueid)<1) or (strlen($lead_id)<1) )
|
||||
{
|
||||
echo "LOG NOT ENTERED\n";
|
||||
echo _QXZ("uniqueid $uniqueid or lead_id: $lead_id is not valid\n");
|
||||
echo _QXZ("uniqueid %1s or lead_id: %2s is not valid",0,'',$uniqueid,$lead_id)."\n";
|
||||
$log_no_enter=1;
|
||||
}
|
||||
else
|
||||
@@ -5433,8 +5434,8 @@ if ($ACTION == 'VDADREcheckINCOMING')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "0\n";
|
||||
echo _QXZ("Campaign $campaign is not valid\n");
|
||||
echo _QXZ("lead_id $lead_id is not valid\n");
|
||||
echo _QXZ("Campaign %1s is not valid",0,'',$campaign)."\n";
|
||||
echo _QXZ("lead_id %1s is not valid",0,'',$lead_id)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -5486,7 +5487,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "0\n";
|
||||
echo _QXZ("Campaign $campaign is not valid\n");
|
||||
echo _QXZ("Campaign %1s is not valid",0,'',$campaign)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -6729,7 +6730,7 @@ if ($ACTION == 'VDADcheckINCOMINGemail')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "0\n";
|
||||
echo _QXZ("Campaign $campaign is not valid\n");
|
||||
echo _QXZ("Campaign %1s is not valid",0,'',$campaign)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -7655,7 +7656,7 @@ if ($ACTION == 'LeaDSearcHSelecTUpdatE')
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "0\n";
|
||||
echo _QXZ("Campaign $campaign is not valid or lead_id $lead_id is not valid\n");
|
||||
echo _QXZ("Campaign %1s is not valid or lead_id %2s is not valid",0,'',$campaign,$lead_id)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -8343,7 +8344,7 @@ if ($ACTION == 'userLOGout')
|
||||
if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) )
|
||||
{
|
||||
echo "NO\n";
|
||||
echo _QXZ("campaign $campaign or conf_exten $conf_exten is not valid\n");
|
||||
echo _QXZ("campaign %1s or conf_exten %2s is not valid",0,'',$campaign,$conf_exten)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -8624,7 +8625,7 @@ if ($ACTION == 'updateDISPO')
|
||||
$MAN_vl_insert=0;
|
||||
if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) )
|
||||
{
|
||||
echo _QXZ("Dispo Choice $dispo or lead_id $lead_id is not valid\n");
|
||||
echo _QXZ("Dispo Choice %1s or lead_id %2s is not valid",0,'',$dispo,$lead_id)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -10198,7 +10199,7 @@ if ($ACTION == 'updateDISPO')
|
||||
# debug testing sleep
|
||||
# sleep(5);
|
||||
|
||||
echo _QXZ('Lead ') . $lead_id . _QXZ(' has been changed to ') . $dispo_choice . _QXZ(" Status\n")."Next agent_log_id:\n" . $agent_log_id . "\n";
|
||||
echo _QXZ("Lead %1s has been changed to %2s Status",0,'',$lead_id,$dispo_choice)."\nNext agent_log_id:\n" . $agent_log_id . "\n";
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@@ -10213,7 +10214,7 @@ if ($ACTION == 'updateLEAD')
|
||||
$DO_NOT_UPDATE_text='';
|
||||
if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) )
|
||||
{
|
||||
echo _QXZ("phone_number $phone_number or lead_id $lead_id is not valid\n");
|
||||
echo _QXZ("phone_number %1s or lead_id %2s is not valid",0,'',$phone_number,$lead_id)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -10300,7 +10301,7 @@ if ($ACTION == 'updateLEAD')
|
||||
}
|
||||
|
||||
}
|
||||
echo _QXZ("Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n");
|
||||
echo _QXZ("Lead %1s information has%2s been updated",0,'',$lead_id,$DO_NOT_UPDATE_text)."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -10314,7 +10315,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
|
||||
$row=''; $rowx='';
|
||||
if ( (strlen($stage)<2) || (strlen($server_ip)<1) )
|
||||
{
|
||||
echo _QXZ("stage $stage is not valid\n");
|
||||
echo _QXZ("stage %1s is not valid",0,'',$stage)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -10532,7 +10533,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
|
||||
}
|
||||
else
|
||||
{
|
||||
echo _QXZ('Agent ') . $user . _QXZ(' is now in status ') . $stage . "\nNext agent_log_id:\n$agent_log_id\n";
|
||||
echo _QXZ("Agent %1s is now in status %2s",0,'',$user,$stage)."\nNext agent_log_id:\n$agent_log_id\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10546,7 +10547,7 @@ if ($ACTION == 'UpdatEFavoritEs')
|
||||
$channel_live=1;
|
||||
if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) )
|
||||
{
|
||||
echo _QXZ("favorites list $favorites_list is not valid\n");
|
||||
echo _QXZ("favorites list %1s is not valid",0,'',$favorites_list)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -10572,7 +10573,7 @@ if ($ACTION == 'UpdatEFavoritEs')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00174',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
echo _QXZ("Favorites list has been updated to $favorites_list for $exten\n");
|
||||
echo _QXZ("Favorites list has been updated to %1s for %2s",0,'',$favorites_list,$exten)."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -10584,7 +10585,7 @@ if ($ACTION == 'PauseCodeSubmit')
|
||||
$row=''; $rowx='';
|
||||
if ( (strlen($status)<1) || (strlen($agent_log_id)<1) )
|
||||
{
|
||||
echo _QXZ("agent_log_id $agent_log_id or pause_code $status is not valid\n");
|
||||
echo _QXZ("agent_log_id %1s or pause_code %2s is not valid",0,'',$agent_log_id,$status)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -10704,7 +10705,7 @@ if ($ACTION == 'PauseCodeSubmit')
|
||||
}
|
||||
}
|
||||
}
|
||||
echo _QXZ(' Pause Code ') . $status . _QXZ(" has been recorded\n")."Next agent_log_id:\n" . $agent_log_id . "\n";
|
||||
echo _QXZ(" Pause Code %1s has been recorded",0,'',$status)."\nNext agent_log_id:\n" . $agent_log_id . "\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -10925,7 +10926,7 @@ if ($ACTION == 'CALLSINQUEUEview')
|
||||
|
||||
if (preg_match('/NONE/i',$view_calls_in_queue))
|
||||
{
|
||||
echo _QXZ("Calls in Queue View Disabled for this campaign\n");
|
||||
echo _QXZ("Calls in Queue View Disabled for this campaign")."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -11357,7 +11358,7 @@ if ($ACTION == 'SEARCHRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("You must enter in search terms, one of these must be populated: lead ID, vendor ID, phone number, last name\n");
|
||||
echo "ERROR: "._QXZ("You must enter in search terms, one of these must be populated: lead ID, vendor ID, phone number, last name")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSDisplaYBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -11506,7 +11507,7 @@ if ($ACTION == 'SEARCHRESULTSview')
|
||||
|
||||
echo "<CENTER>\n";
|
||||
echo "<font style=\"font-size:14px;font-family:sans-serif;\"><B>";
|
||||
echo _QXZ("Results Found: $search_result_count");
|
||||
echo _QXZ("Results Found:")." $search_result_count";
|
||||
echo "</B></font>\n";
|
||||
echo "<BR>\n";
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=$stage>";
|
||||
@@ -11608,7 +11609,7 @@ if ($ACTION == 'SEARCHRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("There was a problem with your search terms\n");
|
||||
echo "ERROR: "._QXZ("There was a problem with your search terms")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSDisplaYBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -11618,7 +11619,7 @@ if ($ACTION == 'SEARCHRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("Campaign not found\n");
|
||||
echo "ERROR: "._QXZ("Campaign not found")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSDisplaYBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -11797,7 +11798,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("You must enter in search terms, one of these must be populated: office number, last name, first name\n");
|
||||
echo "ERROR: "._QXZ("You must enter in search terms, one of these must be populated: office number, last name, first name")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSContactsBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -11843,7 +11844,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
|
||||
|
||||
echo "<CENTER>\n";
|
||||
echo "<font style=\"font-size:14px;font-family:sans-serif;\"><B>";
|
||||
echo _QXZ("Results Found: $search_result_count");
|
||||
echo _QXZ("Results Found:")." $search_result_count";
|
||||
echo "</B></font>\n";
|
||||
echo "<BR>\n";
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=$stage>";
|
||||
@@ -11936,7 +11937,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("There was a problem with your search terms\n");
|
||||
echo "ERROR: "._QXZ("There was a problem with your search terms")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSContactsBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -11946,7 +11947,7 @@ if ($ACTION == 'SEARCHCONTACTSRESULTSview')
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("Campaign not found\n");
|
||||
echo "ERROR: "._QXZ("Campaign not found")."\n";
|
||||
echo "<BR><BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('SearcHResultSContactsBox');return false;\">"._QXZ("Go Back")."</a>";
|
||||
echo "</CENTER>";
|
||||
@@ -12567,7 +12568,7 @@ if ($ACTION == 'CALLSINQUEUEgrab')
|
||||
|
||||
if ( (preg_match('/NONE/i',$view_calls_in_queue)) or (preg_match('/N/i',$grab_calls_in_queue)) )
|
||||
{
|
||||
echo "ERROR: "._QXZ("Calls in Queue View Disabled for this campaign\n");
|
||||
echo "ERROR: "._QXZ("Calls in Queue View Disabled for this campaign")."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -12601,11 +12602,11 @@ if ($ACTION == 'CALLSINQUEUEgrab')
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
}
|
||||
|
||||
echo "SUCCESS: "._QXZ("Call $stage grabbed for $user");
|
||||
echo "SUCCESS: "._QXZ("Call %1s grabbed for %2s",0,'',$stage,$user);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR: "._QXZ("Call $stage could not be grabbed for $user\n");
|
||||
echo "ERROR: "._QXZ("Call %1s could not be grabbed for %2s",0,'',$stage,$user)."\n";
|
||||
}
|
||||
|
||||
$stmtD="SELECT * from vicidial_auto_calls where auto_call_id='$stage';";
|
||||
|
||||
@@ -447,10 +447,11 @@
|
||||
# 141105-1153 - Fixed issue with AGENTDIRECT transfers to agents with IDs over 7 characters long
|
||||
# 141113-1431 - Added admin_test option to allow login on active_agent=N servers
|
||||
# 141116-1805 - Fixed issue #801
|
||||
# 141118-1229 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
$version = '2.10-418c';
|
||||
$build = '141116-1805';
|
||||
$version = '2.10-419c';
|
||||
$build = '141118-1229';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=80;
|
||||
$one_mysql_log=0;
|
||||
@@ -514,7 +515,7 @@ $forever_stop=0;
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
echo _QXZ("You have now logged out. Thank you\n");
|
||||
echo _QXZ("You have now logged out. Thank you")."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -15080,7 +15081,7 @@ $zi=2;
|
||||
<font class="queue_text">
|
||||
<a href="#" onclick="start_all_refresh();"><font class="queue_text"><?php echo _QXZ("Logged in as User"); ?></font></a>
|
||||
<?php
|
||||
echo _QXZ(": $VD_login on Phone: $SIP_user");
|
||||
echo _QXZ(": %1s on Phone: %2s",0,'',$VD_login,$SIP_user);
|
||||
if ($on_hook_agent == 'Y')
|
||||
{echo "(<a href=\"#\" onclick=\"NoneInSessionCalL();return false;\">"._QXZ("ring")."</a>)";}
|
||||
echo " to campaign: $VD_campaign \n";
|
||||
@@ -15943,7 +15944,7 @@ class="cust_form_text" value=""></TEXTAREA><input type="hidden" class="cust_form
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:<?php $zi++; echo $zi ?>;" id="CallBacKsLisTBox">
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> <?php echo _QXZ("CALLBACKS FOR AGENT $VD_login:<br />To see information on one of the callbacks below, click on the INFO link. To call the customer back now, click on the DIAL link. If you click on a record below to dial it, it will be removed from the list."); ?>
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> <?php echo _QXZ("CALLBACKS FOR AGENT %1s:<br />To see information on one of the callbacks below, click on the INFO link. To call the customer back now, click on the DIAL link. If you click on a record below to dial it, it will be removed from the list.",0,'',$VD_login); ?>
|
||||
<br />
|
||||
<?php
|
||||
if ($webphone_location == 'bar')
|
||||
@@ -15958,7 +15959,7 @@ class="cust_form_text" value=""></TEXTAREA><input type="hidden" class="cust_form
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:<?php $zi++; echo $zi ?>;" id="NeWManuaLDiaLBox">
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> <?php echo _QXZ("NEW MANUAL DIAL LEAD FOR $VD_login in campaign $VD_campaign:"); ?><br /><br /><?php echo _QXZ("Enter information below for the new lead you wish to call."); ?>
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> <?php echo _QXZ("NEW MANUAL DIAL LEAD FOR %1s in campaign %2s:",0,'',$VD_login,$VD_campaign); ?><br /><br /><?php echo _QXZ("Enter information below for the new lead you wish to call."); ?>
|
||||
<br />
|
||||
<?php
|
||||
if (!preg_match("/X/i",$manual_dial_prefix))
|
||||
@@ -15966,7 +15967,7 @@ class="cust_form_text" value=""></TEXTAREA><input type="hidden" class="cust_form
|
||||
echo "Note: a dial prefix of $manual_dial_prefix will be added to the beginning of this number<br />\n";
|
||||
}
|
||||
?>
|
||||
<?php echo _QXZ("Note: all new manual dial leads will go into list $manual_dial_list_id"); ?><br /><br />
|
||||
<?php echo _QXZ("Note: all new manual dial leads will go into list %1s",0,'',$manual_dial_list_id); ?><br /><br />
|
||||
<table><tr>
|
||||
<td align="right"><font class="body_text"> <?php echo _QXZ("Dial Code:"); ?> </font></td>
|
||||
<td align="left"><font class="body_text"><input type="text" size="7" maxlength="10" name="MDDiaLCodE" id="MDDiaLCodE" class="cust_form" value="1" /> <?php echo _QXZ("(This is usually a 1 in the USA-Canada)"); ?></font></td>
|
||||
@@ -16139,7 +16140,7 @@ class="cust_form_text" value=""></TEXTAREA><input type="hidden" class="cust_form
|
||||
{echo "<br /><img src=\"./images/"._QXZ("pixel.gif")."\" width=\"1px\" height=\"".$webphone_height."px\" /><br />\n";}
|
||||
?>
|
||||
<br /><br />
|
||||
<?php echo _QXZ("Notes: when doing a search for a lead, the phone number, lead ID or $label_vendor_lead_code are the best fields to use."); ?> <br /><?php echo _QXZ("Using the other fields may be slower. Lead searching does not allow for wildcard or partial search terms."); ?> <br /><?php echo _QXZ("Lead search requests are all logged in the system."); ?>
|
||||
<?php echo _QXZ("Notes: when doing a search for a lead, the phone number, lead ID or %1s are the best fields to use.",0,'',$label_vendor_lead_code); ?> <br /><?php echo _QXZ("Using the other fields may be slower. Lead searching does not allow for wildcard or partial search terms."); ?> <br /><?php echo _QXZ("Lead search requests are all logged in the system."); ?>
|
||||
<br /><br />
|
||||
<center>
|
||||
<table border="0">
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
# 130603-2202 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
# 130802-1038 - Changed to PHP mysqli functions
|
||||
# 140811-0801 - Changed to use QXZ function for echoing text
|
||||
# 141118-1240 - Formatting changes for QXZ output
|
||||
#
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
@@ -55,7 +56,7 @@ $server_ip = preg_replace("/\'|\"|\\\\|;/","",$server_ip);
|
||||
if (!isset($format)) {$format="text";}
|
||||
|
||||
$version = '0.0.7';
|
||||
$build = '130328-0025';
|
||||
$build = '141118-1240';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -75,7 +76,7 @@ else
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo _QXZ("Invalid server_ip:")." |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
echo _QXZ("Invalid server_ip: |%1s| or Invalid session_name: |%2s|",0,'',$server_ip,$session_name)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -113,7 +114,7 @@ $row=''; $rowx='';
|
||||
if (strlen($vmail_box)<1)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo _QXZ("voicemail box $vmail_box is not valid\n");
|
||||
echo _QXZ("voicemail box %1s is not valid",0,'',$vmail_box)."\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user