Размер файла: 1.41Kb
<?php
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// Sitchi CMS - Mobile Content Management System //
// The author: Nikoloz Sitchinava [sitchi] //
// Link: http://sitchicms.num.ge //
// Skype: SitchiCMS //
// License: LICENSE.txt (see attached file) //
// Version: VERSION.txt (see attached file) //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
defined('_SITCHICMS') or die ('Restricted access');
if (empty($_SESSION['rand'])){
$_SESSION['rand'] = mt_rand(1000, 9999);
}
/*ვეძებთ ენას*/
function load_lng($lang_module = 'lang'){
global $user, $set, $root_path;
if (isset($_GET['lang']) && !isset($user)){
$_SESSION['lang']=htmlspecialchars(trim($_GET['lang']));
header('Location: '.htmlspecialchars($_SERVER['HTTP_REFERER']).'');}
if (''.$user['set_lang'].''){
$lng_detect = ''.$user['set_lang'].'';}else
if (''.$_SESSION['lang'].''){
$lng_detect = ''.$_SESSION['lang'].'';}else
if (''.$set['set_lang'].''){
$lng_detect = ''.$set['set_lang'].'';}
$lng_file = $root_path . 'language/' . $lng_detect . '/' . $lang_module . '.lng';
if (file_exists($lng_file)){
$out = parse_ini_file($lng_file) or die('ERROR: language file');
return $out;
}
die('ERROR: Language file is missing');
}
$lng = load_lng();
/*დიზაინის შერჩევა*/
if (isset($user)){
$set['set_them'] = $user['set_them'];}
?>