-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinformation_box.php
116 lines (115 loc) · 2.78 KB
/
information_box.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
<?php
// If the user is revising information, process it
if (isset($_POST['submit']))
{
$update = "
UPDATE users
SET
status = '".$_POST['status']."',
sex = '".$_POST['sex']."',
year = '".$_POST['year']."',
concentration = '".$_POST['concentration']."',
screenname = '".$_POST['screenname']."',
looking_for = '".$_POST['looking_for']."',
interested_in = '".$_POST['interested_in']."',
relationship = '".$_POST['relationship']."',
political_view = '".$_POST['political_view']."',
interests = '".$_POST['interests']."'
WHERE id = $user_id";
$update_member = mysql_query($update);
// reset values in info hash
$qtext = "SELECT * FROM users WHERE id = $user_id";
$query = mysql_query($qtext) or die(mysql_error());
$info = mysql_fetch_array($query);
}
else {
include("quick_data.php");
}
?>
<div id="information_box">
<div style="background-color: #4C70A0; color: white">
<table style="border-collapse: collapse; width: 100%;">
<tr>
<td>Information</td>
<?php
if (isset($_COOKIE['current_user_id']) && $user_id == $_COOKIE['current_user_id'])
{
?>
<td id="fb_link" style="text-align: right;">
<a href="profile.php?uid=<?php echo "$user_id";?>&edit=true"> [ edit ] </a></td>
<?php
}
else
{
?>
<td> </td>
<?php
}
?>
</tr>
</table>
</div>
<table>
<th>Account Info:</th>
<tr>
<td>Name:</td>
<td><?php echo $info['name']; ?></td>
</tr>
<tr>
<td>Member Since:</td>
<?php $better_time = date("F j, Y",strtotime($info['member_since']));?>
<td><?php echo $better_time; ?></td>
</tr>
</table>
<table>
<th>Basic Info:</th>
<tr>
<td>Email:</td>
<td><?php echo $info['email'] ?></td>
</tr>
<tr>
<td>Status:</td>
<td><?php echo $info['status'] ?></td>
</tr>
<tr>
<td>Sex:</td>
<td><?php echo $info['sex'] ?></td>
</tr>
<tr>
<td>Year:</td>
<td><?php echo $info['year'] ?></td>
</tr>
<tr>
<td>Concentation:</td>
<td><?php echo $info['concentration'] ?></td>
</tr>
</tr>
</table>
<table>
<th>Extended Info:</th>
<tr>
<td>Screenname:</td>
<td><?php echo $info['screenname'] ?></td>
</tr>
<tr>
<td>Looking For:</td>
<td><?php echo $info['looking_for'] ?></td>
</tr>
<tr>
<td>Interested In:</td>
<td><?php echo $info['interested_in'] ?></td>
</tr>
<tr>
<td>Relationship Status:</td>
<td><?php echo $info['relationship'] ?></td>
</tr>
<tr>
<td>Political Views:</td>
<td><?php echo $info['political_view'] ?></td>
</tr>
<tr>
<td>Interests:</td>
<td><?php echo $info['interests'] ?></td>
</tr>
</table>
</div>