-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprotected_admin.php
More file actions
49 lines (40 loc) · 1.75 KB
/
Copy pathprotected_admin.php
File metadata and controls
49 lines (40 loc) · 1.75 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
<?php
/*
Copyright 2016 - 2018 Musto Technologies LLC http://www.mustotechnologies.com
-- GPLv3 License --
This file is part of MT Kestrel.
MT Kestrel is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
MT Kestrel is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MT Kestrel as the COPYING.txt file. If not,
see <http://www.gnu.org/licenses/>.
*/
include("$_SERVER[DOCUMENT_ROOT]/MT-Kestrel/mt_api/config.php");
include("$_SERVER[DOCUMENT_ROOT]/MT-Kestrel/mt_api/security_fucntions.php");
sec_session_start();
// $connect to our DB
$connect = mysqli_connect($db_host_name, $db_user_name, $db_password, $database);
if (mysqli_connect_errno()) {
die('<p>Failed to connect to MySQL, send this message to support: '.mysqli_connect_error().'</p>');
}
if(login_check($connect) == true) {
include("$_SERVER[DOCUMENT_ROOT]/MT-Kestrel/webparts/header.php");
echo '<title>Administration Page - MT Kestrel</title>';
echo '</head>';
echo '<body>';
include("webparts/navigation.php");
//Insert secure content here...
include("webparts/administration.php");
} else {
include("$_SERVER[DOCUMENT_ROOT]/MT-Kestrel/webparts/header.php");
echo '<h2>Oops!</h2><br>';
echo "<span class=\"error\">You are not authorized to access this page.</span> Please <a href=\"index.php\">login</a>.";
}
include("webparts/footer.php");
?>