<?php
//-------------------Set Base Language-----------------------
$language_qry_string = "SELECT languageName FROM {$tableprefix}language_master WHERE langActive = '1' ORDER BY nlanguageId DESC LIMIT 0,1";
$language_qry = mysql_query($language_qry_string);
$language_res = mysql_fetch_array($language_qry);

if($language_res && trim($language_res['languageName']) <> '') {
    define('LANGUAGE', strtolower($language_res['languageName']));
} else {
    define('LANGUAGE', 'english');
}

$os_string = php_uname('s');

            if (strpos(strtoupper($os_string), 'WIN')!==false)
            {
                // Windows Server
               $cur_dir = explode('\\', getcwd());
            } else {
               // Linux Server
               
               $cur_dir = explode('/', getcwd());
            }

$curentDir = $cur_dir[count($cur_dir)-1];

switch($curentDir){
    case 'sellers':
        include_once(BASE_URL.'/language/'.LANGUAGE.'/lang_seller.php');
        break;
    case 'admin':
        include_once(BASE_URL.'/language/'.LANGUAGE.'/lang_admin.php');
        break;
    case 'affiliates':
        include_once(BASE_URL.'/language/'.LANGUAGE.'/lang_affiliate.php');
        break;
    default:
    	
        include_once(BASE_URL.'/language/'.LANGUAGE.'/lang_buyer.php');
        break;
}
?>