-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathset_lang.php
More file actions
40 lines (29 loc) · 1.44 KB
/
set_lang.php
File metadata and controls
40 lines (29 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/******************************************************************************/
// //
// InstantCMS v1.10.6 //
// http://www.instantcms.ru/ //
// //
// written by InstantCMS Team, 2007-2015 //
// produced by InstantSoft, (www.instantsoft.ru) //
// //
// LICENSED BY GNU/GPL v2 //
// //
/******************************************************************************/
header('Content-Type: text/html; charset=utf-8');
Error_Reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
session_start(); // 1111
define('PATH', dirname(__FILE__));
define("VALID_CMS", 1);
include(PATH.'/core/cms.php');
cmsCore::getInstance();
if(!cmsConfig::getConfig('is_change_lang')){
cmsCore::error404();
}
$set_lang = cmsCore::request('lang', 'str', 'ru');
$langs = cmsCore::getDirsList('/languages');
if(!in_array($set_lang, $langs)){
cmsCore::error404();
}
$_SESSION['lang'] = $set_lang;
cmsCore::redirectBack();