-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
123 lines (100 loc) · 4.12 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
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
<?php
/**
* @Author: Shivam Singhal
*/
require_once 'inc/func.inc.php';
require_once 'inc/connection.inc.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php
include 'layout/meta.inc.php';
?>
</head>
<body class="skin-black">
<?php
include 'layout/header.inc.php';
?>
<div class="wrapper row-offcanvas row-offcanvas-left">
<?php
include 'layout/leftpanel.inc.php';
?>
<aside class="right-side">
<section class="content">
<div class="row" style="margin-bottom:5px;">
<div class="col-lg-6">
<section class="panel">
<header class="panel-heading">Websites</header>
<div class="panel-body" id="noti-box1" style="overflow: hidden; width: auto; height: 400px;">
<?php
$path = "websites";
$files = scandir($path);
$files = array_diff($files, array('..', '.', 'log.file', 'download-website.php'));
foreach ($files as $file) {
echo '<div class="alert alert-danger">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="fa fa-times"></i>
</button>
<a href="' . $path . '/' . $file . '"><strong>' . $file . '</strong></a>
</div>';
}
?>
</div>
<div class="slimScrollBar" style="width: 5px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 5px; z-index: 99; right: 1px; height: 213.333px; background: rgb(0, 0, 0);"></div>
</section>
</div>
<div class="col-lg-3">
<section class="panel">
<header class="panel-heading">bulletin board</header>
<div class="panel-body" id="noti-box2" style="overflow: hidden; width: auto; height: 400px;">
<?php
// showing latest 10 announcements
$query = "SELECT M.message, M.timestamp, U.name FROM messages M INNER JOIN users U ON M.sender_id = U.id WHERE M.reciever_id = 0 ORDER BY M.timestamp DESC LIMIT 10";
$query_run = mysqli_query($connection, $query);
while($query_row = mysqli_fetch_assoc($query_run)){
echo '<div class="alert alert-warning">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="fa fa-times"></i>
</button>
' . $query_row['message'] . '<br>
<strong>' . $query_row['name'] . '</strong> @ <small>' . return_display_time(strtotime($query_row['timestamp'])) . '</small><br>
</div>';
}
?>
</div>
<div class="slimScrollBar" style="width: 5px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 5px; z-index: 99; right: 1px; height: 213.333px; background: rgb(0, 0, 0);"></div>
</section>
</div>
<div class="col-lg-3">
<section class="panel">
<header class="panel-heading">
requests
</header>
<div class="panel-body" id="noti-box3" style="overflow: hidden; width: auto; height: 400px;">
<?php
$query = "SELECT * FROM `requests_raised`";
$query_run = mysqli_query($connection, $query);
while($query_row = mysqli_fetch_assoc($query_run)){
echo '<div class="alert alert-info">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="fa fa-times"></i>
</button>
<strong>' . $query_row['request'] . '</strong><br>
' . $query_row['request_id'] . '
</div>';
}
?>
</div>
<div class="slimScrollBar" style="width: 5px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 5px; z-index: 99; right: 1px; height: 213.333px; background: rgb(0, 0, 0);"></div>
</section>
</div>
</div>
</section>
</aside>
</div>
<?php
include 'layout/scripts.inc.php';
?>
</body>
</html>