Added code for on-the-fly language translations display for all admin and reporting scripts
Changed all single-quote QXZ values to double-quote Added "change language" page to admin.php git-svn-id: svn://192.168.202.10@2233 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
# 130901-2006 - Changed to mysqli PHP functions
|
||||
# 140328-0005 - Converted division calculations to use MathZDC function
|
||||
# 141001-2200 - Finalized adding QXZ translation to all admin files
|
||||
# 141230-0038 - Added code for on-the-fly language translations display
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -54,13 +55,13 @@ if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
|
||||
if (!isset($RR)) {$gRRroup=4;}
|
||||
if (!isset($types)) {$types='SHOW ALL CAMPAIGNS';}
|
||||
|
||||
#$report_name = _QXZ('Real-Time Campaign Summary');
|
||||
|
||||
$report_name = 'Real-Time Campaign Summary';
|
||||
$db_source = 'M';
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -71,6 +72,8 @@ if ($qm_conf_ct > 0)
|
||||
$outbound_autodial_active = $row[1];
|
||||
$slave_db_server = $row[2];
|
||||
$reports_use_slave_db = $row[3];
|
||||
$SSenable_languages = $row[4];
|
||||
$SSlanguage_method = $row[5];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -95,6 +98,16 @@ else
|
||||
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||
}
|
||||
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
|
||||
$auth=0;
|
||||
$reports_auth=0;
|
||||
$admin_auth=0;
|
||||
|
||||
Reference in New Issue
Block a user