-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.php
More file actions
45 lines (45 loc) · 1.28 KB
/
gallery.php
File metadata and controls
45 lines (45 loc) · 1.28 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
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<title>Gallery | R.E.X</title>
<?php include 'components/head.php'; ?>
</head>
<body>
<?php
include 'components/navHead.php';
include 'components/modals/image.html';
?>
<br>
<div class="container">
<h4>Here is the list of properties posted by our sellers.
For more information, try to <a data-toggle="modal" data-target="#clientLoginModal"> Login </a>
</h4>
<br>
<?php
include 'components/database.php';
include 'components/client/showProps.php';
$conn = connectDB();
if ($conn) {
$sql = "SELECT * FROM properties, clients, addresses WHERE properties.add_id=addresses.add_id AND properties.sid=clients.cid ORDER BY properties.time DESC";
$result = mysqli_query($conn, $sql);
showPropsWithResult($result, $conn, "gallery");
} else {
echo "<div class='alert alert-danger fade in'>
<a class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>Error!</b> Can't Connect to Database
</div>";
}
?>
</div>
<?php
include 'components/footer.html';
if (isset($_SESSION['log'])) {
echo '<script type="text/javascript" src="js/active.js"></script>';
} else {
echo '<script type="text/javascript" src="js/inactive.js"></script>';
}
?>
<script type="text/javascript" src="js/common.js"></script>
</body>
</html>