-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
58 lines (52 loc) · 2.35 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
<?php
include("includes/header.php");
?>
<?php
include("includes/navbar.php");
?>
<div class="container-fluid">
<div class="row">
<!-- start of main content area-->
<div class="col l9 m9 s12" >
<?php
$sql="SELECT * FROM posts ORDER BY post_date DESC";
$res=mysqli_query($con,$sql);
if(mysqli_num_rows($res)>0)
{
while($row=mysqli_fetch_assoc($res))
{
?>
<!-- Card Start from here -->
<div class="col l3 m4 s6">
<div class="card small">
<div class="card-image" style="background-image: linear-gradient(#74ebd5,#acb6e5 );">
<img src="img/<?php echo $row["feature_image"]?>" alt="" style="height:150px" class="img-responsive">
<span class="card-title"><?php/* echo $row["title"]*/?></span>
</div>
<div class="card-content" style="background-image: linear-gradient(#acb6e5,#74ebd5 );"><span class="card-title"><?php echo $row["title"]?></span>
<?/*php echo $row["content"];*/?>
</div>
<div class="card-action teal center" style="background-image: linear-gradient(#74ebd5,#acb6e5 );">
<a href="post.php?id=<?php echo $row['id'];?>" class="white-text" style="background-image: linear-gradient(#74ebd5,#acb6e5 );border-radius: 5px;padding: 10px;">Read more...</a>
</div>
</div>
</div>
<!-- Card End from here -->
<?php
}
}
?>
</div>
<!-- start of main content area-->
<!-- start of sidebar content area-->
<div class="col l3 m3 s12" >
<?php
include("includes/sidebar.php");
?>
</div>
<!-- end of sidebar content area-->
</div>
</div>
<?php
include("includes/footer.php");
?>