-
Notifications
You must be signed in to change notification settings - Fork 1
/
frd_request.php
88 lines (68 loc) · 1.6 KB
/
frd_request.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
<?php
session_start(0);
include("connectionclass.php");
include("header.php");
?> <div class="col-sm-6">
<br><?php
if($_REQUEST['status']!="")
{
mysqli_query($con,"update frd set status='$_REQUEST[status]' where id='$_REQUEST[tid]'") or die("error".mysqli_error($con));
//echo ",mhkjkkj";
}
echo " <table class='table'>
<tr><th>Friend Name</th><th>Status</th><th>Confirm</th><th>Cancel</th></tr>
";
$query="select * from frd where frd2_id='$_SESSION[user_id]' AND ((status='Process')||(status='Confirm')||(status='Cancel'))";
$res=mysqli_query($con,$query);
if(mysqli_num_rows($res)>0)
{
while($row=mysqli_fetch_array($res))
{
$query2="select * from profile_tb where id='$row[frd_id]'";
$res2=mysqli_query($con,$query2);
$row2=mysqli_fetch_array($res2);
?>
<tr>
<td><?php echo $row2['fname']; ?> </td>
<!-- <td><a href="profile1.php?fid=<?php echo $row2['id']; ?>">View</a></td> -->
<td><?php echo $row['status']; ?> </td>
<td>
<?php
if($row['status']=='Confirm')
{
echo "Confirmed";
}
else
{
?>
<a href="?status=Confirm&tid=<?php echo $row['id']; ?>">Confirm</a>
<?php } ?>
</td>
<td>
<?php
if($row['status']=='Cancel')
{
echo "Cancelled";
}
else
{
?>
<a href="?status=Cancel&tid=<?php echo $row['id']; ?>">Cancel</a>
<?php } ?>
</td>
</tr>
<?php
}
}
else
{
?>
<tr>
<td colspan="5" style="font-size:18px; color:#F00;" align="center"><b>No friend Requests</b></td>
</tr>
<?php } ?>
</table>
</div>
<?php
include("right.php");
?>