-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinventory.php
68 lines (55 loc) · 1.68 KB
/
inventory.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
<?php
#Start the session
session_start();
if(!isset($_SESSION['username']) or $_SESSION['category'] !='other') {
header('Location: login.php');
}
?>
<?php include('config/setup.php'); ?>
<?php
$query = "SELECT * FROM file WHERE user_id=$_SESSION[userid]";
$result = mysqli_query($dbc,$query);
?>
<!DOCTYPE html>
<html>
<head>
<title>My Stuffs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<?php include('config/css.php'); ?>
<?php include('config/js.php'); ?>
</head>
<body class='indigo lighten-5'>
<?php include(D_TEMPLATE.'/navigation.php'); ?>
<div style='padding: 1% 1% 1% 1%;'>
<div>
<div class="row">
<table class="responsive-table hightlight col s12">
<thead>
<tr>
<th data-field="filename">File Name</th>
<th data-field="uploadtime">Upload Time</th>
<th data-field="lastdownload">Last Download Time</th>
</tr>
</thead>
<tbody>
<?php
while($table_user = mysqli_fetch_assoc($result)) {
?>
<tr>
<td><?php echo '<a href="handledownload.php?id='.$table_user['file_id'].'">'.$table_user['filename'].'</a>'; ?></td>
<td><?php echo $table_user['uploadtime']; ?></td>
<td><?php echo $table_user['lastdownloadtime']; ?></td>
<td><?php echo '<a href="delete_file.php?id='.$table_user['file_id'].'">Delete</a>' ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<?php include(D_TEMPLATE.'/footer.php'); ?>
</body>
</html>