-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadUserInfo.php
More file actions
160 lines (149 loc) · 6.06 KB
/
Copy pathreadUserInfo.php
File metadata and controls
160 lines (149 loc) · 6.06 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
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
<?php
session_start();
include('config/config1.php');
if($_SESSION['login_user_id']=="")
{
header("Location: ".SITE_URL);exit();
}
$member_ID = $_SESSION['login_user_id'];
$userInfoSql = "SELECT `member_id`,`full_name`,`job`,`education`,`address`,`relationship`,`married_to`,`url`,
`handle`,`profile_photo_name` FROM `alacut_member` WHERE member_id = '". $member_ID."' AND active = '1'";
$userInfoRes = mysql_query($userInfoSql);
$userInfo = mysql_fetch_array($userInfoRes);
$maritalStatus = 'Single';
if($userInfo['relationship'] == 'E'){
$maritalStatus = 'Engaged';
}
if($userInfo['relationship'] == 'M'){
$maritalStatus = 'Married to';
}
$handleStatus = 'Individial';
if($userInfo['handle'] == 'E'){
$handleStatus = 'Entity';
}
$totalPostsQry = "SELECT COUNT(`video_id`) AS count FROM `upload_video` WHERE `video_upload_by`='".$member_ID."' AND `status` != '2'";
$totalPostsRes = mysql_query($totalPostsQry);
$totalPostsInfo = mysql_fetch_array($totalPostsRes);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection">
<![endif]-->
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="css/colorbox.css" />
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
<script>
$(document).ready(function () {
$("#btnSearch").click(function(){
$(".popup").colorbox({scrolling: false, overlayClose: false, escKey: false, opacity: 0.8});
$("#btnSearch").attr("href","Search.php?search="+$("#txtFriendSearch").val())
});
$(".single").click(function () {
$("#txtMarried").hide();
});
$(".engaged").click(function () {
$("#txtMarried").hide();
});
$(".marriedTo").click(function () {
$("#txtMarried").show();
});
});
</script>
</head>
<body>
<form name="readProfile" method="post" action="">
<div class="wrapper">
<?php include("header.php");?>
<section class="inner">
<section class="inner_left">
<section class="left_body">
<form id="frmUserInfo" name="frmUserInfo" method="POST" action="<?php echo $PHP_SELF;?>" enctype="multipart/form-data">
<section class="user_info">
<section class="mid">
<section class="img">
<?php if($userInfo['profile_photo_name'] != ''){
echo '<img src="upload/profilePhotos/'.$userInfo['profile_photo_name'].'" alt="" width="300" height="300"/>';
}else{
echo '<img src="images/no-image.jpg" alt="" width="300" height="300"/>';
}?>
</section>
<section class="cont">
<div class="head">Name</div>
<article class="field">
<label for="textfield"></label>
<?php echo $userInfo['full_name']?>
</article>
<div class="head">Job</div>
<article class="field">
<label for="textfield6"></label>
<?php echo $userInfo['job']?>
</article>
<div class="head">Education</div>
<article class="field">
<label for="textfield7"></label>
<?php echo $userInfo['education']?>
</article>
<div class="head">Location</div>
<article class="field">
<label for="textfield8"></label>
<?php echo $userInfo['address']?>
</article>
<div class="head">Marital</div>
<article class="field">
<?php echo $maritalStatus?>
<?php if($maritalStatus=="M") echo $userInfo['married_to'];?>
</article>
<div class="head">URL</div>
<article class="field">
<div style="width: 50px; line-height: 15px;"></div>
<label for="textfield10"></label>
<?php echo "alacut.com/";echo $userInfo['url']?>
</article>
<div class="head">Handle</div>
<div class="field">
<?php echo $handleStatus?>
</div>
</section>
</section>
</section>
</form>
</section>
</section>
<aside class="inner_right">
<section class="user_img">
<section class="pic">
<?php if($userInfo['profile_photo_name'] != ''){
echo '<img src="upload/profilePhotos/'.$userInfo['profile_photo_name'].'" alt="" width="300" height="300"/>';
}else{
echo '<img src="images/no-image.jpg" alt="" width="300" height="300"/>';
}?>
</section>
<section class="detail_box">
<h1><?php echo $userInfo['full_name']?></h1>
<div class="detail"><strong><img src="images/work.jpg" width="15" height="11" />Works at:</strong><?php echo " "; echo $userInfo['job']?></div>
<div class="detail"><strong><img src="images/sudies.jpg" alt="" width="15" height="11" />Studied:</strong><?php echo " "; echo $userInfo['education']?></div>
<div class="detail"><strong><img src="images/livesin.jpg" alt="" width="15" height="11" />Lives in:</strong><?php echo " "; echo $userInfo['address']?></div>
<div class="detail"><strong><img src="images/married.jpg" alt="" width="15" height="11" />Married to:</strong><?php echo " "; echo $userInfo['married_to']?></div>
</section>
</section><section class="user_btn">
<nav class="button"><a href="#">Find Friends</a></nav>
<nav class="button"><a href="myFriends.php">Friends</a></nav>
<nav class="button"><a href="allPosts.php"><?php echo $totalPostsInfo['count']?> Posts</a></nav>
<nav class="button"><a href="editUserInfo.php" style="margin: 0;">Edit Info</a></nav>
</section>
</aside>
</section><?php include("footer.php");?>
</div>
</form>
</body>
</html>