-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponseview.php
More file actions
87 lines (68 loc) · 2.29 KB
/
responseview.php
File metadata and controls
87 lines (68 loc) · 2.29 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
<?php
session_start();
//echo $_SESSION['email'];
?>
<style>
</style>
<?php
$q = $_GET['q'];
$t = $_GET['t'];
$conn = new mysqli('localhost', 'karim', 'Karim@01', 'cfwa');
$sql = "SELECT * FROM response where concern_id='$q'";
$result = mysqli_query($conn, $sql);
if($result){
echo '<center><h3>'.$t.'</h3></center>';
echo "<fieldset style='height: 75%; overflow:scroll; border-style: none'>";
while($row = mysqli_fetch_assoc($result)){
$rid = $row['response_id'];
$sql1 = "SELECT * FROM user WHERE `uid`=(SELECT `uid` FROM response WHERE response_id='$rid')";
$result1=$conn->query($sql1);
$row1 = mysqli_fetch_assoc($result1);
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./Bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="./fontawesome/css/all.css">
<style>
body {
}
#d1, #d2 {
height: fit-content;
border-radius: 8px;
padding: 8px;
color: white;
}
#d1 {
position: relative;
width: 300px;
background-color: green;
margin: 10px;
margin-left: 60%;
border-top-right-radius: 0px;
}
#d2 {
position: relative;
width: 300px;
background-color: blue;
margin: 10px;
margin-left: 20%;
border-top-left-radius: 0px;
}
</style>
</head>
<body>';
if($_SESSION['uid']==$row['uid']){
echo "<div id='d1'><b>@".$row1['uname']."</b><b>~".$row1['status']."</b><br>".$row['response_body']."<br><p align='right'>".$row['response_date']."</p></div>";
} else {
echo "<div id='d2'><b>@".$row1['uname']."</b><b>~".$row1['status']."</b><br>".$row['response_body']."<br><p align='right'>".$row['response_date']."</p></div>";
}
'</body>
</html>';
}
echo "</fieldset>";
}
?>
<?php include './postresponse.php'; ?>