-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
90 lines (79 loc) · 3.2 KB
/
index.php
File metadata and controls
90 lines (79 loc) · 3.2 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
<?php
include("include/header.php");
?>
<title>Advert System</title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">Advert</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Homepage</a>
</li>
<li class="nav-item">
<a class="nav-link" href="create.php">Create Ads</a>
</li>
</div>
</nav>
<main role="main">
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Welcome to Advert!</h1>
<p>Design and Implementation of an Online Adertisement System. Developed by Ibrahim Surajat.</p>
<p><a class="btn btn-primary btn-lg" href="create.php" role="button">Create Advert Now »</a></p>
</div>
</div>
<div class="container-fluid">
<!-- Example row of columns -->
<?php
$select = mysqli_query($con, "SELECT * FROM myadvert order by ads_date DESC");
while ($row = mysqli_fetch_array($select)) {
?>
<div class="container shadow" style="margin-bottom: 20px; padding:10px;">
<div class="row">
<div class="col-md-4">
<img src="<?php echo 'image/' . $row['item_image']; ?>" alt="<?php echo $row['item_name']; ?>" style="width:300px; height:300px;">
</div>
<div class="col-md-8">
<div class="row">
<div class="col-md-6">
<h2><?php echo $row['item_name']; ?></h2>
<p>by: <b><?php echo $row['company']; ?></b></p>
</div>
<div class="col-md-6">
<a href="tel:<?php echo $row['seller_phone']; ?>">
<button class="btn btn-primary"><i class="fas fa-phone-alt"></i> Call me now</button>
</a>
<a href="http://wa.me/<?php echo $row['seller_phone']; ?>">
<button class="btn btn-success"><i class="fab fa-whatsapp"></i> chat me up</button>
</a>
<p>Ads created on: <?php echo date('d l M, Y', strtotime($row['ads_date'])); ?></p>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6">
<h3>Product Description</h3>
<div class="text-justify"><?php echo $row['item_description']; ?></div>
</div>
<div class="col-md-6">
<h3>Product Specification</h3>
<div><?php echo $row['item_spec']; ?></div>
</div>
</div>
</div>
</div>
</div>
<hr>
<?php } ?>
</div> <!-- /container -->
</main>
<?php
include("include/footer.php");
?>