<?php
date_default_timezone_set("Africa/Lagos");
$dbServerName = 'localhost';
$dbUserName = 'taobald1_admin';
$dbPassword = 'Adeyinka@0036';
$dbName = "taobald1_vtu";
$conn=mysqli_connect("$dbServerName","$dbUserName","$dbPassword","$dbName");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?><?php
 if(session_status()== PHP_SESSION_NONE){
     session_start();
 }
 if(empty($webConfig["LANG"]) && !empty($_SESSION["LANG"])){
     $webConfig["LANG"] = $_SESSION["LANG"];
 }elseif(empty($webConfig["LANG"]) && !empty($_COOKIE["LANG"])){
     $webConfig["LANG"] = $_COOKIE["LANG"];
 }elseif(empty($webConfig["LANG"])){
        $result = $conn->query("SELECT value FROM web_config WHERE array_key = 'webLang' LIMIT 1");
        if ($result->num_rows > 0) {
        $webConfig["LANG"] = $result->fetch_assoc()["value"];
      }  else {
          $webConfig["LANG"] = "en";
        
   }
}
 
?>