-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
66 lines (55 loc) · 2.57 KB
/
index.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
//--- CMS White Lion 1.3 ---//
$https = false;
if($https && (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"))
{
$request = '/';
if(isset($_SERVER['REQUEST_URI'])) $request = $_SERVER['REQUEST_URI'];
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $request;
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
if(false && empty($_COOKIE['security_close']))
{
$authenticated = false;
$Authenticate = ['user' => 'test', 'password' => 'dinmark'];
if(isset($_GET['authorization']))
{
if(preg_match('/^Basic\s+(.*)$/i', $_GET['authorization'], $user_pass))
{
list($user,$pass)=explode(':',base64_decode($user_pass[1]));
if($user == $Authenticate['user'] && $pass == $Authenticate['password'])
{
setcookie('security_close', 'test_dinmark', time() + 3600*24*31, '/');
$authenticated = true;
}
}
}
if(!$authenticated)
{
header('WWW-Authenticate: Basic realm="security close"');
header('HTTP/1.1 401 Unauthorized');
exit('Access denied: bad login or password');
}
}
$time_start = microtime(true);
$mem_start = memory_get_usage();
session_start();
error_reporting(E_ALL);
//Після інсталяції НЕ ЗМІНЮВАТИ!
define('WL_VERSION', '1.3');
define('SITE_EMAIL', 'info@kond'); // Від даної пошти сайт відправляє листи
define('SYS_PASSWORD', 'cb93b19c8bf8'); // Сіль для кешування критичних даних (паролі)
$useWWW = false; // Автовиправлення ОСНОВНОЇ адреси (не мультомовної якщо використовується піддомен)
$multilanguage_type = false; // Якщо false то сайт НЕ мультимовний! може бути: false, "*.domain.com.ua" (адреса по головному домену, існування піддоменів мов на роботу не впливає), 'main domain' (мультимовність site.com/en/link..)
$_SESSION['all_languages'] = array(); // Список всіх мов в масиві, перша мова - мова по замовчуванню
$_SESSION['cache'] = false; // використання кешованих даних
$images_folder = 'images';
//задаєм системні константи
define('DIRSEP', DIRECTORY_SEPARATOR);
define('SYS_PATH', getcwd() . DIRSEP.'system'.DIRSEP);
define('APP_PATH', getcwd() . DIRSEP.'app'.DIRSEP);
define('CACHE_PATH', getcwd() . DIRSEP.'cache'.DIRSEP);
require SYS_PATH.'base'.DIRSEP.'framework.php';
?>