This repository was archived by the owner on Apr 16, 2021. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
266 lines (226 loc) · 7.15 KB
/
Copy pathindex.php
File metadata and controls
266 lines (226 loc) · 7.15 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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html>
<title>Project ALLAN - 2017 Hackathon</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="stylesheet" href="w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="chatbox.js"></script>
<style>
body,h1 {font-family: "Raleway", sans-serif}
body, html {height: 100%}
/**
* Bootstrap navbar
*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 1.3 / 1), only screen and (min-resolution: 125dpi), only screen and (min-resolution: 1.3dppx) {
.navbar-fixed-top .container .navbar-header .navbar-brand {
background-image: url("/images/logos/western-region@2x.png");
background-size: contain; } }
@media (min-width: 768px) {
.navbar-fixed-top .container .navbar-header .navbar-brand {
width: 240px; } }
.navbar-fixed-top .container ul.navbar-nav > li > a {
border: none;
color: inherit;
text-decoration: none;
padding-top: 10px;
margin-top: 10px;
padding-bottom: 10px;
margin-bottom: 10px; }
.navbar-fixed-top .container ul.navbar-nav > li > a:hover {
background: none; }
.navbar-fixed-top .container ul.navbar-nav > li:hover > a {
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
background-color: rgba(219, 183, 128, 0.2); }
.navbar-fixed-top .container .sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #36454F;
overflow-x: hidden;
transition: 0.5s;
padding-top: 50px; }
.navbar-fixed-top .container .sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 15px;
color: #999;
display: block;
transition: 0.3s;
border-bottom: 0px;
white-space: nowrap; }
.navbar-fixed-top .container .sidenav a:hover {
color: #fff; }
.navbar-fixed-top .container .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px !important;
margin-left: 50px; }
@media screen and (max-height: 480px) {
.navbar-fixed-top .container .sidenav {
padding-top: 15px; }
.navbar-fixed-top .container .sidenav a {
font-size: 18px; } }
.navbar-toggle {
margin-right: 15px;
padding: 9px 10px;
margin-top: 13px;
margin-bottom: 13px;
color: white;
background-color: transparent;
background-image: none;
border: 0px solid transparent;
border-radius: 0;
}
.navbar-toggle:hover {
border: 0px solid transparent;
}
#siginInButt {
background-color:white;
border:0px solid white;
}
#chatBox{
max-height: 200px;
overflow-y: scroll;
overflow-wrap: break-word;
}
#serverRes{
display: none;
}
.page-footer {
position: relative;
display: block;
height: auto;
width: 100% !important;
margin-top: 25px;
padding-top: 50px;
padding-bottom: 50px;
text-align: center;
font-size: 11px;
background: #e31837;
color: #f8f8f2;
text-transform: uppercase;
}
.page-footer a {
color: #f8f8f2 !important;
}
.all-items {
display: none;
}
.show-all {
display: none;
}
label::before {
content: "Login";
}
.show-all:checked ~ .all-items {
display: block;
}
.show-all:checked + label:before {
content: "Hide";
}
</style>
<body onbeforeunload="signInForm.signInButt.name='signOut';signInOut()" onload="hideShow('hide')">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" onclick="openNav()" aria-expanded="false" aria-controls="navbar" style="float:left;"><i class="fa fa-comments"></i> Tools</button>
<a class="navbar-brand" href="/"></a>
</div>
<div id="navbar" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">x</a>
<div class="w3-text-white w3-margin-bottom">
<div class="w3-container">
<input type="checkbox" class="show-all" id="show-all">
<label class="w3-btn" for="show-all"></label>
<div class="all-items">
<?php echo $_COOKIE["adminLogin"]; ?>
<form action="login.php" id="login">
<input id="usr" name="usr" type="text" placeholder="Username">
<input id="pwd" name="pwd" type="password" placeholder="Password">
<input id="send" type="submit" value="Login">
</form>
</div>
<h2>Shared Files</h2>
<?php
$path = 'upload/';
$files = scandir($path);
$files = array_diff(scandir($path), array('.', '..'));
foreach ($files as $value) {
echo "<a href=\"upload/$value\" target=\"_blank\">$value</a>\n";
}
$my_file = 'url.txt';
$handle = fopen($my_file, 'r');
$data = fread($handle,filesize($my_file));
?>
<hr>
</div>
<div class="w3-text-white">
<div class="w3-container">
<h2>Chat App</h2>
<form onsubmit="signInOut();return false" id="signInForm">
<input id="userName" type="text">
<input id="signInButt" name="signIn" type="submit" value="Sign in">
<span id="signInName">User name</span>
</form>
<hr>
<div id="chatBox"></div>
<form onsubmit="sendMessage();return false" id="messageForm">
<input id="message" type="text">
<input id="send" type="submit" value="Send">
<div id="serverRes"></div></form>
</div><br>
</div>
</div>
<script>
function openNav() {
document.getElementById("navbar").style.width = "250px";
}
function closeNav() {
document.getElementById("navbar").style.width = "0";
}
</script>
</div>
</nav>
<div class="row" style="background-color:#e31837;">
<h1>Project ALLAN</h1>
</div>
<!-- Page Container -->
<div class="w3-content w3-margin-top" style="max-width:1400px;">
<!-- The Grid -->
<div class="w3-row-padding">
<!-- Right Column -->
<div class="w3-col">
<div class="w3-container w3-card-2 w3-white w3-margin-bottom">
<iframe src="<?php echo $data; ?>" scrolling="auto" class="wrapper" width="100%" height="700" frameborder="0">
This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe>
<div class="w3-container">
</div>
<!-- End Right Column -->
</div>
<!-- End Grid -->
</div>
<!-- Left Column -->
<div class="w3-third w3-margin-bottom">
<!-- End Left Column -->
</div>
<!-- End Page Container -->
</div>
<footer class="page-footer">
<div style="text-align:center; color:white; font-size:12px;">
Copyright © 2017 Order of the Arrow, Boy Scouts of America. All Rights Reserved.<br><br>
</div>
</footer>
</body>
</html>