-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.php
163 lines (151 loc) · 6.1 KB
/
result.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
session_start();
include('includes/connection.php');
include('functions/function.php');
if(!isset($_SESSION['user_email']))
{
header("location: index.php");
}
else
{
?>
<!DOCTYPE html>
<html>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/freelancer.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<head>
<title>Welcome <?php echo $_SESSION['user_email'] ;?></title>
</head>
<style>
.contents
{
background-color: #4c5a68;
height:100vh;
}
#user_timeline
{background-color:white;
border:2px solid black;
height:100vh;
}
#post_style
{
border:1px black solid;
margin:10px;
}
hr {
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
border-style: inset;
border-width: 2px;
}
</style>
<body>
<?php include('home_header.php'); ?>
<div class="container contents">
<div class="row">
<div class="col-md-3 col-lg-offset-1" id="user_timeline">
<div id="user_details">
<?php
$user=$_SESSION['user_email'];
$get_user="select * from users where user_email='$user'";
$run_user=mysqli_query($con,$get_user) or die(mysql_error());
$row=mysqli_fetch_array($run_user) or die(mysql_error());
$user_id=$row['user_id'];
$user_name=$row['user_name'];
$user_email=$row['user_email'];
$user_gender=$row['user_gender'];
$user_b_day=$row['user_b_day'];
$user_image=$row['user_image'];
$user_register=$row['register_date'];
$user_last=$row['last_login'];
$get_user_post="select * from post where user_id='$user_id'";
$run_user_post=mysqli_query($con,$get_user_post);
$count=mysqli_num_rows($run_user_post);
$sel_msg="select * from messages where receiver='$user_id' AND status='unread' ORDER BY 1 DESC";
$run=mysqli_query($con,$sel_msg) OR die("ERROR :".mysqli_error($con));
$count_msg=mysqli_num_rows($run);
echo"
<div class='row'>
<div class='col-md-12'>
<p>
<center><img class='img-responsive' style='margin-top:10vh;' width='200' height='200' src='user/user_images/$user_image'></center>
</p>
</div>
</div>
<hr style='color:black;'>
<div class='row'>
<div class='col-md-12 '>
<h5 style='margin:3vh 2vh 2vh 2vh;'>Name :$user_name</h5>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<h5 style='margin:2vh;'>Member Since:$user_register</h5>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<h5 style='margin:2vh;'>Last Login :$user_last</h5>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<a style='margin:2vh;font-size:1.3em;text-decoration:none;' href='my_messages.php?u_id=$user_id'>Messages ($count_msg) :</a>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<a style='margin:2vh;font-size:1.3em;text-decoration:none;' href='posts.php'>Posts($count) :</a>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<a style='margin:2vh;font-size:1.3em;text-decoration:none;' href='edit.php'>Edit my Account :</a>
</div>
</div>
<div class='row'>
<div class='col-md-12 '>
<a style='margin:2vh;font-size:1.3em;text-decoration:none;' href='logout.php'>Logout</a>
</div>
</div>
"
;
?>
</div>
</div>
<div class="col-md-6 col-lg-offset-1" id="content_timeline">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<br><br>
<h2>Your Result is here :</h2>
</div>
</div>
<br>
<?php getResult(); ?>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</body>
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<!-- Theme JavaScript -->
<script src="js/freelancer.min.js"></script>
</html>