-
Notifications
You must be signed in to change notification settings - Fork 0
/
getreviews.php
86 lines (80 loc) · 2.25 KB
/
getreviews.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
<?php
require_once"header.php";
session_start();
?>
<?php
if(!empty($_SESSION['acctype'])) {
$acctype=$_SESSION['acctype'];
if($acctype=="2")
{
?>
<header id="header">
<div class="container-fluid">
<div id="logo" class="pull-left">
<a href="index.php"><img src="img/Logo.png" alt="" title="" /></a>
</div>
<nav id="nav-menu-container">
<ul class="nav-menu">
<li><a href="index.php">Home</a></li>
<li ><a href="addprop.php">Add Properties</a></li>
<li><a href="MyProperties.php">Edit My Properties</a></li>
<li><a href="property.php">View all Properties</a></li>
<li class="menu-active">><a href="responsetorequest.php">Requests</a></li>
<li><a href="messages.php">Messages</a></li>
<li><a href="feedback.php">Feedbacks</a></li>
<li><a href="searchQA.php">Q & A</a></li>
<li><a href="contactus.php">Contact Us</a></li>
<li><a href="Logout.php">Log Out</a></li>
</nav><!-- #nav-menu-container -->
</div>
</header><!-- #header -->
<?php
}
else{
echo "<script>alert('You are not allowed to visit this page only pleaase register as a seller to view');</script>";
echo '<script>window.location.href= "Login.php";</script>';
}
}
?>
<br>
<br>
<br>
<br>
<div class="adminhelp">
<section id="aboutus" class="wow fadeIn">
<div class="container text-center">
<h3>Reviews</h3>
</div>
</section>
<br><br>
<?php
include("connection.php");
if(isset($_POST['review'])){
$buyerID=$_POST['buyerID'];
$sql2="SELECT feedback ,sellerid FROM feedback WHERE buyerid='$buyerID'";
if(mysqli_query($conn,$sql2)){
error_log("$sql2..",3,"databaseoperations.log");
$result2=mysqli_query($conn,$sql2);
if(mysqli_num_rows($result2)>0){
while($row2 = mysqli_fetch_assoc($result2)){
?>
<div class="containermessages">
<?php
echo "<p> Requester Username: ".$buyerID."<br>
Seller Username : ".$row2['sellerid']."<br>
Review : ".$row2['feedback']."</p>";
?>
</div>
<?php
}
}
else{echo "<p class='WelcomeText'>No Reviews<p>";}
}
else{
$errorconn=mysqli_error($conn);
trigger_error("$errorconn in getreviews.php");
}
}
include('footer.php');
mysqli_close($conn);
?>