-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
109 lines (80 loc) · 3.09 KB
/
admin.php
File metadata and controls
109 lines (80 loc) · 3.09 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/*
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
http://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004-2017 SoftNews Media Group
=====================================================
Äàííûé êîä çàùèùåí àâòîðñêèìè ïðàâàìè
=====================================================
Ôàéë: admin.php
-----------------------------------------------------
Íàçíà÷åíèå: àäìèíïàíåëü
=====================================================
*/
@ob_start();
@ob_implicit_flush(0);
@error_reporting ( E_ALL ^ E_WARNING ^ E_DEPRECATED ^ E_NOTICE );
@ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_DEPRECATED ^ E_NOTICE );
@ini_set ( 'display_errors', true );
@ini_set ( 'html_errors', false );
define ( 'DATALIFEENGINE', true );
define ( 'ROOT_DIR', dirname ( __FILE__ ) );
define ( 'ENGINE_DIR', ROOT_DIR . '/engine' );
//#################
$check_referer = true;
//#################
require_once (ENGINE_DIR . '/inc/include/init.php');
if ($is_loged_in == false AND $_SESSION['twofactor_auth']) {
include_once (ENGINE_DIR . '/inc/twofactor.php');
} elseif ($mod == "lostpassword" AND $is_loged_in == false) {
include_once (ENGINE_DIR . '/inc/lostpassword.php');
} elseif ($is_loged_in == false) {
$m_auth = $config['auth_metod'] ? $lang['login_box_2'] : $lang['login_box_1'];
$m_auth2 = $config['auth_metod'] ? "envelope" : "user";
if( ! $handle = opendir( "./language" ) ) {
die( "Folder /language/ not found" );
}
while ( false !== ($file = readdir( $handle )) ) {
if( is_dir( ROOT_DIR . "/language/$file" ) and ($file != "." and $file != "..") ) {
$sys_con_langs_arr[$file] = $file;
}
}
closedir( $handle );
function makeDropDown($options, $name, $selected) {
$output = "<select class=\"uniform\" style=\"width:100%\" name=\"$name\">\r\n";
foreach ( $options as $value => $description ) {
$output .= "<option value=\"$value\"";
if( $selected == $value ) {
$output .= " selected ";
}
$output .= ">$description</option>\n";
}
$output .= "</select>";
return $output;
}
$select_language = makeDropDown( $sys_con_langs_arr, "selected_language", $selected_language );
include_once (ENGINE_DIR . '/skins/default.skin.php');
$skin_login = str_replace("{mauth}", $m_auth, $skin_login);
$skin_login = str_replace("{mauth2}", $m_auth2, $skin_login);
$skin_login = str_replace("{select}", $select_language, $skin_login);
$skin_login = str_replace("{result}", $result, $skin_login);
echo $skin_login;
exit ();
} elseif ($is_loged_in == true) {
// ********************************************************************************
// Ïîäêëþ÷åíèå ìîäóëåé àäìèíïàíåëè
// ********************************************************************************
if ( !$mod ) {
include_once (ENGINE_DIR . '/inc/main.php');
} elseif ( @file_exists( ENGINE_DIR . '/inc/' . $mod . '.php' ) ) {
include_once (ENGINE_DIR . '/inc/' . $mod . '.php');
} else {
msg ( "error", $lang['index_denied'], $lang['mod_not_found'] );
}
}
$db->close ();
GzipOut ();
?>