-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.php
174 lines (157 loc) · 7.26 KB
/
blog.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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto ml-5">
<?php
error_reporting(0);
session_start();
$userprofile = $_SESSION['username'];
if($userprofile)
{
echo '
<a class="nav-link" role="button" href="dashboard.php">DASHBOARD <span class="sr-only">(current)</span></a>
<a class="btn btn-danger ml-3" role="button" href="logout.php">Logout <span class="sr-only">(current)</span></a>
';
}
else{
echo '
<li class="nav-item active ml-5">
<a class="btn btn-warning" href="signup.php" onclick="audio_play()">SignUp <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active ml-3">
<a class="btn btn-primary" href="login.php" onclick="audio_play()">Login<span class="sr-only">(current)</span></a>
</li>
';
}
?>
<li class="nav-item active ml-5">
<a class="nav-link" href="index.php" onclick="audio_play()">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active ml-3">
<a class="nav-link" href="contact.php" onclick="audio_play()">Contact Us <span class="sr-only">(current)</span></a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0 mr-5" action="" method="POST">
<input class="form-control mr-sm-2 " type="search" placeholder="Search" aria-label="Search" name='search_area'>
<button class="btn btn-success my-2 my-sm-0 mr-5" name='search_btn' type="submit">Search</button>
</form>
<input id="mode" type="button" class="btn btn-light" value="Dark-Mode" onclick="change()">
</div>
</nav>
<?php
if(isset($_POST['search_btn']))
{
$search_result = $_POST['search_area'];
header("location:search.php?search_result=".$search_result);
}
?>
<br><br><br>
<div class="container review text-center">
<h2>Ratings & Reviews</h2>
<img src="images/rnr.jfif" alt="rating&review" height=150>
<p>We like to welcome your reviews and opinions Here.<br>Rate Us on the Basis of your Experience with Us</p>
<p>Please <a href="login.php"><b>Login</b></a> to give your Reviews/Opinions or to Rate Us! </p>
</div>
<br>
<div class="container user_reviews mt-4">
<?php
$con = mysqli_connect("localhost", "root", "", "minor2");
$review_query = "select * from reviews order by review_id desc";
$run_review_query = mysqli_query($con, $review_query);
while($show_data = mysqli_fetch_array($run_review_query))
{
$show_review_owner_id = $show_data['review_owner_id'];
$user_query = "select * from users where user_id = '$show_review_owner_id'";
$run_user_query = mysqli_query($con, $user_query);
$user_data = mysqli_fetch_array($run_user_query);
$show_profile_pic = $user_data['user_profile_picture'];
$show_username = $user_data['user_name'];
$show_review_body = $show_data['review_body'];
$show_review_date = $show_data['review_date'];
echo "
<div class='card user_review'>
<div class='row mb-5'>
<div class='col-sm-4'>
<img src='user_images/$show_profile_pic' alt='' height=100 style='border-radius:500px;margin-left:55%;'>
</div>
<div class='col-sm-8'>
<h4><B>$show_username</B></h4>
<p style='font-family:comic sans MS;'>$show_review_body</p>
<small style='font-family:verdana;'> added on $show_review_date</small>
</div>
</div>
<br>
</div>
";
}
?>
</div>
<br><br><br>
<br>
<p class="text-center mb-0"><b>MongersClub</b></p>
<footer class="footer" style="margin-bottom: -1%;">
<div class="container-fluid bg-dark footer" style="padding:10px;color:#fff;font-family:comic sans MS;">
<div class="row mt-3">
<div class="col-sm-4">
<div class="card text-center" style="background:none;border:none;">
<span><b>Need Help</b></span><br>
<div class="card-text">
<a href="contact.php" class="card-link">Contact Us</a>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card text-center" style="background:none;border:none;">
<span><b>Visit Us</b></span><br>
<div class="card-text">
Ranjhi, Jabalpur (M.P)-482005
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card text-center" style="background:none;border:none;">
<span><b>Share this Community</b></span><br>
<div class="card-text">
<a href="#" class="card-link">Facebook</a><br>
<a href="#" class="card-link">Instagram</a><br>
<a href="#" class="card-link">Twitter</a><br>
<a href="#" class="card-link">Quora</a><br>
</div>
</div>
</div>
</div>
<br><br><br>
<div class="footer text-center">MongersClub © copywrite 2019 <!-- copywrite symbol --></div>
</div>
</footer>
<audio src="audio/ring.mp3" id="play_audio"></audio>
<script>
function audio_play()
{
document.getElementById("play_audio").play();
}
</script>
<script src="js/dark-mode.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function()
{
$("body").animate({opacity:'1'}, 2000);
});
</script>
</body>
</html>