-
Notifications
You must be signed in to change notification settings - Fork 1
/
user_profile.php
117 lines (85 loc) · 3.37 KB
/
user_profile.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
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
<?php
require 'posts.php';
require 'db.php';
$usr = $_GET["user"];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Profile</title>
<link rel="stylesheet" href="css/header.css">
<link rel="stylesheet" href="css/profile.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<style>
body {
background: rgba(209, 204, 204, 0.281) !important;
}
</style>
</head>
<body>
<?php
include_once 'header.php';
?>
<section class="main">
<div class="profile_left">
<div class="edit_bar"><div class="img"></div></div>
<!-- <div class="profile_circle"></div> -->
<div class="edit_bar"><h1 class="profile_name">
<?php
$user = $db->query("SELECT * FROM `users` WHERE `username` ='$usr' ");
$row_user = $user->fetchAll(PDO::FETCH_OBJ);
// print_r($row_user);
$fname = $row_user[0]->{"fname"};
$lname = $row_user[0]->{"lname"};
echo $fname.' '.$lname;
?>
</h1></div>
<div class="edit_bar tabs">
<h3 class="friends">Friends<i class="fa fa-users" style="color:white"></i></h3>
<h3 class="friends">Photos<i class="fa fa-image" style="color:white"></i></h3>
<h3 class="friends">Messages<i class="fa fa-comment" style="color:white"></i></h3>
</div>
<div class="edit_bar"> <h3>About</h3> </div>
<div class="edit_bar"> <p>Android Developer | Web Developer | UI/UX Designer
</p> </div>
<hr>
<div class="edit_bar"> <h4>Barpeta</h4></div>
<div class="friends_section" style="">
<?php
$true = "1";
$query_frn = $db->query("SELECT * FROM `friends` WHERE `username` ='$usr' and `accepted` = '$true'");
if($query_frn->rowCount()>0)
{
$frnd_row = $query_frn->fetchAll(PDO::FETCH_OBJ);
$l = 0;
for($l=0;$l<=$query_frn->rowCount()-1;$l++)
{
echo'<div class="sects">';
echo'<div class="sect 1">
<div class="img_prof"></div>
<a href="message.php?user_to='.$frnd_row[$l]->{"friends_array"}.'" class="friends_name">'.$frnd_row[$l]->{"friends_array"}.'</a>
<a href="user_profile.php?user='.$frnd_row[$l]->{"friends_array"}.'" class="freinds">Friends</a>
</div>';
echo'</div>';
}
}
else{
echo '<h3 style="text-align:center; color:gray">No Friends Available</h3>';
}
?>
</div>
</div>
<div class="post-section">
<?php
$user_page = 'user_profile.php?user='.$usr;
$u = $_GET["user"];
post_display('$u',$user_page);
?>
</div>
</section>
</body>
</html>