-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnotifications.php
More file actions
115 lines (89 loc) · 3.41 KB
/
notifications.php
File metadata and controls
115 lines (89 loc) · 3.41 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
106
107
108
109
110
111
112
113
114
115
<?php
require_once "core.php";
require_once "connection.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Welcome ! $username</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Introducing Lollipop, a sweet new take on Android.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<!-- Page styles -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> -->
<link rel="stylesheet" href="css/signup_style.css">
<link rel="stylesheet" href="profile.css">
</head>
<link href="css/login_style.css" rel="stylesheet">
<link href="css/divison_style.css" rel="stylesheet">
<link href="timeline.css" rel="stylesheet">
<body style="background-color:#FFF;">
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="home.php">Home</a></li>
<li>
<a href = "create_adv.php">Create Advertisement</a></li>
<?php
if(loggedin())
{
$temp = $_SESSION['username'];
echo <<< _END
<li><a href="profile.php">Welcome ! $temp</a>
<li><a href="logout.php">Logout</a>
_END;
}
else
{
echo <<< _END
<li><a href="signup.php"><span class="glyphicon glyphicon-user"></span> Sign Up</a>
<li><a href="login.php"><span class="glyphicon glyphicon-user"></span> Sign In</a>
_END;
}
?>
</ul>
</div>
</div>
</nav>
<div class="container" >
<div class="row" >
<div class="col-md-12 col-md-offset-2 div" style="overflow:auto;" >
<p style="text-align:center;" class = phone><b> Your Notifications !</b></p>
<?php
if(loggedin())
{
$username = $_SESSION['username'];
$sql_query = "SELECT * from `negotiations` NATURAL JOIN `advertisements` WHERE `advertisements`.`username` = '$username'";
$result = mysqli_query($conn,$sql_query);
if($result)
{
$i = 1;
while($row = mysqli_fetch_assoc($result))
{
$interested_username = $row['interested_username'];
$adv_id = $row['adv_id'] ;
$title = $row['title'];
$message = $row['message'];
echo <<< _END
<p style="text-align:left;" class = phone><b>$i.$interested_username is intrested in your advertiement titled: $title , contact the buyer soon!</b><br>$interested_username's message: <i>$message</i> </br></p>
<form method="post" action="user_profile.php" id="form1">
<input type="hidden" name="username" value="$interested_username" />
<a href="user_profile.php?username=$interested_username" onclick="document.getElementById('form1').submit(); return false;"> View $interested_username's Profile</a>
</form>
<br><br>
_END;
$i = $i + 1;
}
}
}
?>
</div></div>
</div> </div>
</body>
</html>