-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublicprofile.php
More file actions
132 lines (88 loc) · 3.54 KB
/
Copy pathpublicprofile.php
File metadata and controls
132 lines (88 loc) · 3.54 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
include("mysqlicon.php");
include("mylinks.php");
$id=$_GET['id'];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>homepage</title>
</head>
<body>
<nav class="">
<div class="navbar bg-dark text-light" style="height: 40px; font-size: 20px; padding:0px; border-bottom: 2px solid gray" >
<div class="navbar-brand" id='navbrand'><a href="#" class="navbar-brand"><b><div id=header><font color= gold face="magneto">.LY</div></b></a></font>
</div>
<div class="navbar-nav"><a class="nav-link" href="index.php" style="color: white;">home<i class="fa fa-home"></i></a>
</div>
<div class="navbar-nav"><a class="nav-link" href="userprofile.php" style="color: white;">Profile<i class="fa fa-user"></i></a>
</div>
<div class="navbar-nav"><a class="nav-link" href="friends.php" style="color: white;">Find Friends<i class="fa fa-group"></i></a>
</div>
<div class="navbar-nav"><a class="nav-link" href="messages.php" style="color: white;">Chat<i class="fa fa-comment"></i></a>
</div>
<div class="navbar-nav">
<a href="logout.php" class="navbar-link"><i class="fa fa-sign-out" style="color: white;"></i></a></li>
</div>
</div>
</nav>
<?php
$c=$_GET['id'];
$a="select * from tint where id=$c";
$b=mysqli_query($con, $a);
while ($row=mysqli_fetch_array($b)) {
$user=$row['username'];
$date=$row['date'];
$dp=$row['profilepic'];
}
?>
<div style="width: 100%; height: 150px; background-color:; " align="center"><img src="<?php echo $dp; ?>" height="210px" width="200px" style="border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; border:5px solid lightblue;">
</div><br><br>
<div align="center"><tt><font size="40px" color="gray"><b><?php echo $user ?><a href="delete.php?id=<?php echo $id?>"><div class="fa fa-trash"></div></a></b></tt></font></div>
<div align="center">
<form method="post">
<div class="form-group">
<input type="submit" name="message" value="Start Chat" class="btn btn-primary" style="width: 500px;">
</div>
<?php
if (isset($_POST['message'])) {
header("location:mes.php?id=$c");
}
?>
</form>
</div>
<hr>
<div class="row">
<div class="col-md-4"><h4 class="bg-dark text-light" style="border-radius: 5px; font-family: cursive; height: 40px; text-align: center; width: 100%; padding-top: 0%; border-left:2px blue;">Friends</h4>
</div>
<div class="col-md-8"><h4 class="bg-dark text-light" style="border-radius: 5px; font-family: cursive; height: 40px; text-align: center; width: 100%; padding-top: 0%; border-left:2px blue;">Posts</h4>
<?php
$c=$_GET['id'];
$a="select * from tint,posts where tint.id='$c' and posts.userid='$c'";
$b=mysqli_query($con, $a);
while ($row=mysqli_fetch_array($b)) {
$ppost=$row['article'];
$photo=$row['photo'];
$date=$row['date'];
$user=$row['username'];
echo "<br><div class='card' style='width:70%;' align='center'>";
echo "<div class=card-header><h4>$user</h4></div>";
echo "<div class=card-body>";
echo "<img src='$photo' style='width:100%; length:100%;'>";
echo "</div>";
echo "<div class=card-footer align='left'>";
echo "<blockqoute><b>$user</b> $ppost</blockqoute>";
echo "</div>";
echo "</div>";
echo "<div class='footer' style='text-align:left; color:gold; font-family:magneto; font-weight:bold;'>posted on"." ".$date."</div><hr>";
}
?>
</div>
</div>
</div>
</body>
</html>