-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnot_view.php
More file actions
105 lines (70 loc) · 2.48 KB
/
not_view.php
File metadata and controls
105 lines (70 loc) · 2.48 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
include 'connection.php';
//echo $_SESSION['user_id'];
$query = ("SELECT * FROM `notification` WHERE Ouserid='".$_SESSION['user_id']."'
ORDER BY notifTime DESC");
$result = mysqli_query($link , $query);
//$row = mysqli_fetch_array($result);
/*
$query2=mysql_query("
SELECT Count(*) FROM `notification` WHERE Ouserid='".$_SESSION['user_id']."'
and notifTime BETWEEN timestamp(DATE_SUB(NOW(), INTERVAL 9800 SECOND)) AND timestamp(NOW())
ORDER BY notifTime DESC");
$result2 = mysqli_query($link , $query2);
$row2 = mysqli_fetch_array($result2);
*/
$results = mysqli_num_rows($result);
//echo $results;
if($results > 0){
$i=0;
//$OUID=$row['Ouserid'];
//echo $OUID;
//$query3=("SELECT CONCAT(Ucase((user_fname)), UCase((user_lname))) as dataa,p.picture_path from users Inner Join pictures as p ON users.user_profile_picture=p.picture_id where User_id= $OUID");
//$result3 = mysqli_query($link , $query3);
//$row3 = mysqli_fetch_array($result3);
//$OUname=$row3['dataa'];
//echo$results;
while($row=mysqli_fetch_array($result))
{
$i=$i+1;
//echo "INNNN".$i;
$FUID=$row['Fuserid'];
$query3=("SELECT CONCAT(Ucase((user_fname)), UCase((user_lname))) as dataa ,
p.picture_path from users Inner Join pictures as p ON users.user_profile_picture=p.picture_id where User_id= $FUID");
$result3 = mysqli_query($link , $query3);
$row3 = mysqli_fetch_array($result3);
$FUname=$row3['dataa'];
//echo $FUname."HHEHEHHEHEH";
$FUpic='images/'.$row3['picture_path'];
$type=$row['type'];
$POST=$row['Postid'];
if($type=='0')
{
echo '
<li>
<div>
<img src="'.$FUpic.'" class="profile">
<a href="" >'.$FUname.'</a>
<span> Liked your </span>
<a href="ShowPOST.php?varname='.$POST.'<?php echo $POST ?>" >POST</a>
</div> ';
//echo $FUname." Liked your Post \n"."\n";
}
else{
echo '
<li>
<div>
<img src="'.$FUpic.'" class="profile">
<a href="" >'.$FUname.'</a>
<span> Commented ON your </span>
<a href="ShowPOST.php?varname='.$POST.'<?php echo $POST ?>" >POST</a>
</div> ';
//echo $FUname." commented on your Post\n"."\n";
}
}
//echo $i;
}
else{
echo"NO NOTIFICATION YET !";
}
?>