<?php
/*
*
* @author (Макс) Freedom <by_freedom@bk.ru>
* ICQ 286-0-666
*
*/
$lan = func::check($_GET['lang']);
$url = $_SERVER['DOCUMENT_ROOT'].'/system/lang/'.$lan.'.ini';
if (empty($lan)) {
header('location: /');
die();
} elseif (!file_exists($url)) {
header('location: /');
die();
} else {
setcookie('lang', $lan, time() + 3600 * 24 * 365, '/');
header('location: /');
}
die();
?>