-
Notifications
You must be signed in to change notification settings - Fork 0
/
k.php
executable file
·81 lines (73 loc) · 2.04 KB
/
k.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
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
include_once 'dbConfig.php';
$query = $con->query("SELECT * FROM blog WHERE approved='1'");
$i=0;
$no0fBlogs=0;
if ($query->num_rows > 0)
{
while($row = $query->fetch_assoc())
{
$no0fBlogs++;
$id[$i] = $row['id'];
$title[$i] = $row['title'];
$name[$i] = $row['member_name'];
$content[$i] = $row['content'];
$created[$i] = $row['created'];
$i++;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Robotics Club MNNIT</title>
<style>
body
{
background-image: url("bg.jpg");
background-size: cover;
margin-top: 0;
overflow-x: hidden;
}
h1
{
text-align:center;
color: black;
font-family: 'Times New Roman';
font-size: 50px;
font-weight: bold;
text-shadow: 4px 1px gray;
}
.content
{
border-top: 1px solid #15365f;
border-bottom: 1px solid #15365f;
border-right: 1px solid #15365f;
border-radius: 15px;
text-align: left;
padding-top: 10px;
padding-left: 8px;
padding-bottom: 20px;
margin-top: 20px;
line-height: 25px;
}
</style>
</head>
<body>
<h1>Blogs</h1>
<?php
for($i=0;$i<$no0fBlogs;$i++)
{
echo '<div class="blog" id="id',$i,'">',
'<h2>',$title[$i],'</h2>
<i>written by </i>',$name[$i],
'<br>',$created[$i],
'<div class="content">',$content[$i],
'</div>
</div><br>';
}
?>
</body>
</html>