-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
49 lines (34 loc) · 882 Bytes
/
Copy pathindex.php
File metadata and controls
49 lines (34 loc) · 882 Bytes
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
<?php
require_once( dirname(__FILE__) . '/core.php' );
$error = false;
if (!checkAuth()) // Check if login session exist
{
// Check if remember me cookie exist
if (isset($_COOKIE['MSH_USER_REMEMBER'])) {
$result = $objAuth->doCookieLogin(); // Do login with cookie
// Refresh page if cookie auth success
if ($result['status'] == 'success') {
//echo '<meta http-equiv="refresh" content="0">';
header('Location: index.php');
exit();
}
// Set error flag if not reponse is 'success'
else {
$error = true;
}
}
// Set error flag if cookie does not exist
else {
$error = true;
}
}
// If error-flag == true -> Send to login page
if ($error == true) {
header('Location: '.URL.'login/');
exit();
}
// If auth OK, fetch theme
if (checkAuth()) {
include(ABSPATH . "themes/{$config['theme']}/index.php");
}
?>