-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.php
executable file
·213 lines (189 loc) · 8.22 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
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
<?php
include("SfsApplication.php");
$app = new SfsApplication();
$fm = $app->getFm();
?>
<!-- View Section -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title><?php echo $app->getAppName();?></title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/grayscale.min.css" rel="stylesheet">
<link href="vendor/dropzone/dropzone.css" rel="stylesheet">
<link href="vendor/magnific/magnific-popup.css" rel="stylesheet">
<link href="vendor/DataTables/datatables.css" rel="stylesheet">
</head>
<style>
.dropzone {
min-height: 400px!important;
width: 500px;
border: 1px solid rgba(0, 0, 0, 0.3)!important;
margin-bottom: 5px;
}
.chooser-files a {
text-decoration: none!important;
}
.files-layout{
padding: 15px;
background: #fff;
margin-bottom: 15px;
margin-top: 10px;
-webkit-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
-moz-box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
box-shadow: 10px 10px 5px -4px rgba(0,0,0,0.75);
}
</style>
<body id="page-top">
<?php echo $app->getJavaScriptSettings();?>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top"><?php echo $app->getAppName();?></a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#about">Files</a>
</li>
<?php if($app->isLoggedIn()):?>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="logout.php">Logout</a>
</li>
<?php else: ?>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="login.php">Login</a>
</li>
<?php endif;?>
</ul>
</div>
</div>
</nav>
<?php if($app->isLoggedIn()):?>
<!-- Header -->
<header class="masthead">
<div class="container d-flex h-100 align-items-center">
<div class="mx-auto text-center">
<form action="upload.php"
class="dropzone"
id="file-uploader"></form>
<a href="javascript:void(0);" class="btn btn-primary js-scroll-trigger">Hi, <?php echo $app->getUserName() ?></a>
</div>
</div>
</div>
</header>
<?php else:?>
<!-- Header Login -->
<header class="masthead">
<div class="container d-flex h-100 align-items-center">
<div class="mx-auto text-center">
<h1 class="mx-auto my-0 text-uppercase">Welcome,</h1>
<h2 class="text-white-50 mx-auto mt-2 mb-5">
to <?php echo $app->getAppName();?>
</h2>
<a href="login.php" class="btn btn-primary js-scroll-trigger">Login</a>
<?php if(!$app->isInstalled()):?>
<a href="install.php" class="btn btn-primary js-scroll-trigger">Install</a>
<?php endif;?>
</div>
</div>
</div>
</header>
<?php endif;?>
<?php if($app->isLoggedIn()):?>
<!-- About Section -->
<section id="about" class="about-section text-center">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2 class="text-white mb-4">My Files</h2>
<input id="searchBar" type="text" placeholder="Search files"/>
<button id="search-button">Search</button>
<div style="" class="files-layout">
<table id="files-table" class="table table-bordered" style="text-align: left;">
<thead>
<th scope="col">File Name</th>
<th scope="col">User</th>
<th scope="col">Uploaded On</th>
<th scope="col">Actions</th>
</thead>
<tbody id="files-body">
<?php foreach($fm->getAllFiles() as $file ): ?>
<tr>
<td><a id="copy" target="_blank" href="<?php echo $file->url;?>">
<?php echo $file->name;?></a></td>
<td><?php echo $file->user;?></td>
<td><?php echo Helper::dateTime($file->dateAdded);?></td>
<td>
<a href="<?php echo $file->url;?>" class="image-link">
<i class="fa fa-eye fa-fw"></i>
</a>
<a href="javascript:void(0);"
class="copy-file"
data-clipboard-target="#copy"
data-clipboard-text="<?php echo $file->url;?>">
<i class="fa fa-copy fa-fw"></i></a>
<a data-id="<?php echo $file->getId();?>" href="javascript:void(0):" class="delete-file">
<i class="fa fa-trash fa-fw"></i>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<?php endif;?>
<!-- Contact Section -->
<section class="contact-section bg-black">
<div class="container">
<div class="social d-flex justify-content-center">
<a href="https://wftutorials.wordpress.com/" class="mx-2">
<i class="fab fa-wordpress"></i>
</a>
<a href="https://github.com/wyntonfranklin" class="mx-2">
<i class="fab fa-github"></i>
</a>
</div>
</div>
</section>
<!-- Files Popup -->
<div style="display: none;">
</div>
<!-- Footer -->
<footer class="bg-black small text-center text-white-50">
<div class="container">
Copyright © www.igestdevelopment.com
</div>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="vendor/dropzone/dropzone.js"></script>
<script src="vendor/DataTables/datatables.js"></script>
<script src="vendor/magnific/jquery.magnific-popup.js"></script>
<!-- Custom scripts for this template -->
<script src="js/clipboard.min.js"></script>
<script src="js/notify.min.js"></script>
<script src="js/grayscale.min.js"></script>
<script src="js/sfs.js"></script>
</body>
</html>