File: /home/thehunarfound/public_html/sms/lib/old_config.php
<?php error_reporting(0);session_start();
header("Content-Type: text/html; charset=utf-8");
//ob_start();
$dir = "lib/";
if(file_exists($dir."DB.php"))
{
include_once($dir."DB.php");
$db = new DB();
include_once($dir."functions.php");
include_once($dir."constants.php");
include_once($dir."common_function.php");
//include_once($dir."Jfunctions.php");
$db_old = new connect();
}
else
{
include_once("../".$dir."DB.php");
$db = new DB();
include_once("../".$dir."functions.php");
include_once("../".$dir."constants.php");
include_once("../".$dir."common_function.php");
//include_once("../".$dir."Jfunctions.php");
$db_old = new connect();
}
$sql="SELECT cofig_name,default_value FROM sg_settings WHERE id=1";
$lngRS=$db->ExecuteQuery($sql);
list($cofig_name,$default_value)=$lngRS->FetchAsArray();
if(!isset($_SESSION['sg_lang']) && empty($_SESSION['sg_lang']))
$_SESSION['sg_lang']=$default_value;
elseif(isset($_SESSION['sg_lang']) && $_SESSION['sg_lang']!="en" && $_SESSION['sg_lang']!="es" )
{
$_SESSION['sg_lang']=$default_value;
}
if(isset($_GET['lang']) && ($_GET['lang']=="en" || $_GET['lang']=="es") )
$_SESSION['sg_lang']=makeClean($_GET['lang']);
elseif(!isset($_SESSION['sg_lang']))
$_SESSION['sg_lang']=$default_value;
$sql_utf1="SET CHARACTER SET utf8";
$db->ExecuteQuery($sql_utf1);
$sql_utf2="SET NAMES utf8";
$db->ExecuteQuery($sql_utf2);
?>