-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmediaadmin_view.php
More file actions
115 lines (100 loc) · 3.54 KB
/
mediaadmin_view.php
File metadata and controls
115 lines (100 loc) · 3.54 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
<?php
include("connect.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>mediaadmin_view</title>
<style>
* {
background-color: #000000;
color: #ffffff;
margin-top: 20px;
}
h2 {
font-family: algerian;
}
.link {
border: 1px solid #3ff7f1d7;
border-radius: 3px;
padding: 10px 27px;
background-color: #3ff7f1d7;
width: 200px;
height: 30px;
margin-left: 20px;
text-decoration: none;
font-size: 19px;
font-weight: 550;
color: #000000;
}
.link:hover {
background-color: #0ef9f1;
}
table {
width: 100%;
justify-content: center;
align-items: center;
}
table th {
height: 50px;
font-size: 20px;
width: 45px;
}
table td {
height: 40px;
font-size: 20px;
width: 45px;
}
</style>
</head>
<body>
<div>
<a class="link" href="media_add.php">Add new photos in media gallery</a>
</div>
<div class="form">
<center>
<h2>View Photos Record</h2>
</center>
<table width="100%" border="1" style="border-collapse:collapse;">
<thead>
<tr>
<th><strong>S No.</strong></th>
<th><strong>media_id</strong></th>
<th><strong>media_title</strong></th>
<th><strong>Photo1</strong></th>
<th><strong>Photo2</strong></th>
<th><strong>Photo3</strong></th>
<th><strong>Photo4</strong></th>
<th><strong>Edit</strong></th>
<th><strong>Delete</strong></th>
</tr>
</thead>
<tbody>
<?php
$count = 1;
$sel_query = "Select * from media ORDER BY media_id desc;";
$result = mysqli_query($con, $sel_query);
while ($row = mysqli_fetch_assoc($result)) { ?>
<tr>
<td align="center"><?php echo $count; ?></td>
<td align="center"><?php echo $row["media_id"]; ?></td>
<td align="center"><?php echo $row["media_title"]; ?></td>
<td align="center"><img src="image/<?php echo $row["photo1"]; ?>" height="100" width="auto"></td>
<td align="center"><img src="image/<?php echo $row["photo2"]; ?>" height="100" width="auto"></td>
<td align="center"><img src="image/<?php echo $row["photo3"]; ?>" height="100" width="auto"></td>
<td align="center"><img src="image/<?php echo $row["photo4"]; ?>" height="100" width="auto"></td>
<td align="center">
<a href="media_edit.php?media_id=<?php echo $row["media_id"]; ?>">Edit</a>
</td>
<td align="center">
<a href="media_delete.php?media_id=<?php echo $row["media_id"]; ?>">Delete</a>
</td>
</tr>
<?php $count++;
} ?>
</tbody>
</table>
</div>
</body>
</html>