-
Notifications
You must be signed in to change notification settings - Fork 0
/
core.php
215 lines (170 loc) · 6.46 KB
/
core.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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php
include 'config.php';
$config = include 'config.php';
if ($config['username'] == '' || $config['password'] == '') {
echo '<meta http-equiv="refresh" content="0; url=install" />';
exit();
}
session_start();
if (isset($_SESSION['sec-username'])) {
$uname = $_SESSION['sec-username'];
if ($uname != $config['username']) {
echo '<meta http-equiv="refresh" content="0; url=index.php" />';
exit;
}
} else {
echo '<meta http-equiv="refresh" content="0; url=index.php" />';
exit;
}
function head()
{
include 'config.php';
$config = include 'config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="assets/img/favicon.png">
<title>Malware Scanner › Admin Panel</title>
<!--STYLESHEET-->
<!--=================================================-->
<!--Bootstrap Stylesheet-->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/skin-purple.min.css">
<!--Font Awesome-->
<link href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" rel="stylesheet">
<!--Stylesheet-->
<link href="assets/css/admin.min.css" rel="stylesheet">
<!--DataTables-->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.11.4/b-2.2.2/b-html5-2.2.2/r-2.2.9/datatables.min.css"/>
<!--DatePicker-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker3.min.css"/>
<!--SCRIPT-->
<!--=================================================-->
<!--jQuery-->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<!--DatePicker-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.en-CA.min.js"></script>
</head>
<body class="hold-transition skin-purple sidebar-mini fixed">
<div class="wrapper">
<header class="main-header">
<a href="dashboard.php" class="logo">
<span class="logo-mini">Malware<strong>Scanner</strong></span>
<span class="logo-lg"><i class="fas fa-search"></i> Malware <strong>Scanner</strong></span>
</a>
<nav class="navbar navbar-static-top">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span><i class="fas fa-bars"></i>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<?php
$uname = $_SESSION['sec-username'];
?>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user"></i> Account
</a>
<ul class="dropdown-menu">
<li class="user-footer">
<div class="pull-left">
<a href="account.php" class="btn btn-default btn-flat"><i class="fa fa-user fa-fw fa-lg"></i> Edit Profile</a>
</div>
<div class="pull-right">
<a href="logout.php" class="btn btn-default btn-flat"><i class="fas fa-sign-out-alt"></i> Logout</a>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</header>
<aside class="main-sidebar">
<section class="sidebar">
<div class="user-panel">
<div class="pull-left image">
<img src="assets/img/avatar.png" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<br /><p><?php
echo $_SESSION['sec-username'];
?></p>
</div>
</div>
<ul class="sidebar-menu">
<li class="header">NAVIGATION</li>
<li <?php
if (basename($_SERVER['SCRIPT_NAME']) == 'dashboard.php') {
echo 'class="active"';
}
?>>
<a href="dashboard.php">
<i class="fa fa-home"></i> <span>Dashboard</span>
</a>
</li>
<li <?php
if (basename($_SERVER['SCRIPT_NAME']) == 'account.php') {
echo 'class="active"';
}
?>>
<a href="account.php">
<i class="fa fa-user"></i> <span>Account</span>
</a>
</li>
<li class="header">SECURITY</li>
<li <?php
if (basename($_SERVER['SCRIPT_NAME']) == 'malware-scanner.php') {
echo 'class="active"';
}
?>>
<a href="malware-scanner.php">
<i class="fa fa-search"></i> <span>Malware Scanner</span>
</a>
</li>
<li class="header">TOOLS</li>
<li <?php
if (basename($_SERVER['SCRIPT_NAME']) == 'security-check.php') {
echo 'class="active"';
}
?>>
<a href="security-check.php">
<i class="fa fa-check"></i> <span>Security Check</span>
</a>
</li>
</ul>
</section>
</aside>
<?php
}
function footer()
{
?>
<footer class="main-footer">
<strong>© <?php
echo date("Y");
?> <a href="https://codecanyon.net/item/shell-scanner/5609275?ref=Antonov_WEB" target="_blank">Malware Scanner</a></strong>
</footer>
</div>
<!--JAVASCRIPT-->
<!--=================================================-->
<!--Bootstrap-->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!--Admin-->
<script src="assets/js/admin.min.js"></script>
<!--SlimScroll-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.8/jquery.slimscroll.min.js"></script>
<!--DataTables-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jszip-2.5.0/dt-1.11.4/b-2.2.2/b-html5-2.2.2/r-2.2.9/datatables.min.js"></script>
</body>
</html>
<?php
}
?>