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:
@@ -15,6 +15,7 @@
|
||||
# 130901-0840 - Changed to mysqli PHP functions
|
||||
# 140328-0005 - Converted division calculations to use MathZDC function
|
||||
# 141007-2217 - Finalized adding QXZ translation to all admin files
|
||||
# 141229-1905 - Added code for on-the-fly language translations display
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -58,7 +59,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,user_territories_active FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,user_territories_active,enable_languages,language_method FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -69,6 +70,8 @@ if ($qm_conf_ct > 0)
|
||||
$webroot_writable = $row[1];
|
||||
$SSoutbound_autodial_active = $row[2];
|
||||
$user_territories_active = $row[3];
|
||||
$SSenable_languages = $row[4];
|
||||
$SSlanguage_method = $row[5];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -102,6 +105,15 @@ $NOW_TIME = date("Y-m-d H:i:s");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$invalid_record=0;
|
||||
|
||||
$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;
|
||||
|
||||
Reference in New Issue
Block a user