-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAccount.php
177 lines (171 loc) · 7.54 KB
/
Account.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
require('db_fetch.php');
# Bool values for Options in the form
$is_male = $account_res[0]['user_gender']=="Male";
$is_female = $account_res[0]['user_gender']=="Female";
$is_others = $account_res[0]['user_gender']=="Others";
?>
<html>
<head>
<title>My account</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/responsive.css">
</head>
<body>
<!-- The top UI component that displays a welcome message and the MY ACCOUNT link. -->
<header class="top-bar">
<div class="container">
<div class="clearfix">
<div class="col-left float_left">
<ul class="top-bar-info">
<li>
<h3>Good morning </h3>
</li>
<li><?php echo $name?></li>
</ul>
</div>
<div class="col-right float_right">
<div class="link">
<a href="Account.php" class="thm-btn">My account</a>
</div>
</div>
</div>
</div>
</header>
<section class="theme_menu stricky slideIn animated">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="main-logo">
<a href="Main.php"><img src="image/logo_small.PNG" alt=""></a>
</div>
</div>
</div>
</div>
</section>
<!-- Main body -->
<div class="container">
<br>
<section>
<h2>My Account</h2>
<caption class="accessible">Personal information</caption>
</section>
<hr>
<!-- General info edit -->
<div class="default-form-area">
<form id="contact-form" name="contact_form" class="default-form" method="post" action ="account_update.php" novalidate="novalidate">
<div class="row clearfix">
<!-- First Name -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<h3>First Name</h3>
<input type="text" name="fname" class="form-control" value="<?php echo $account_res[0]['user_fname']?>"
placeholder="First name" required="" aria-required="true">
</div>
</div>
<!-- Last Name -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<h3>Last Name</h3>
<input type="text" name="lname" class="form-control" value="<?php echo $account_res[0]['user_lname']?>"
placeholder="Last name" required="" aria-required="true">
</div>
</div>
<!-- Gendder -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<h3>Gender</h3>
<select name="gender" value = "Female">
<option value="Male" <?php if($is_male){echo "selected";}?>>Male</option>
<option value="Female" <?php if($is_female){echo "selected";}?>>Female</option>
<option value="Others" <?php if($is_others){echo "selected";}?>>Others</option>
</select>
</div>
</div>
<!-- Telephone -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<h3>Telephone</h3>
<input type="text" name="tel" class="form-control" value="<?php echo $account_res[0]['user_tel']?>">
</div>
</div>
<!-- Address -->
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="form-group">
<H3>Address</H3>
<input type="text" name="addr" class="form-control" value="<?php echo $account_res[0]['user_address']?>"
placeholder="0.0">
</div>
</div>
<!-- Email -->
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<h3>Email</h3>
<input type="email" name="email" class="form-control" value="<?php echo $account_res[0]['user_email']?>"
placeholder="Email Address">
</div>
</div>
</div>
<button class="thm-btn2" type="submit">Save</button>
</form>
</div>
<!-- Card info -->
<section>
<table>
<tr>
<td><h2>My Cards</h2></td>
<td style="width:1000px;text-align:right">
<a href="Card_Edit.php?card=NEW" class="thm-btn">add</a></td>
</tr>
</table>
<caption class="accessible">Card link to my account</caption>
</section>
<hr>
<table class="table">
<tbody>
<tr class="accessible">
<th scope="col">Card Name</th>
<th scope="col">Balance</th>
</tr>
<tr>
<!-- Build a list to display all the cards -->
<?php
for ($i=0; $i<sizeof($summary); $i++)
{
echo '
<tr>
<th scope="row">
<a href="Detail.php?card='.$summary[$i]['id'] .'">
'.$summary[$i]['name'].'</span></a>
<br>
<span> '. $summary[$i]['number'].' </span>
</th>
<td>
<ul>
<li> <span class=""> $'. $summary[$i]['balance']. ' </span> </li>
</ul>
</td>
</tr>';
}
?>
</tr>
</tbody>
</table>
</div>
<!-- Footer, copyright, etc -->
<section class="footer-bottom">
<div class="container">
<div class="pull-left copy-text">
<p>Copyright © 20XX. Some Company name All rights reserved.</p>
</div>
<div class="pull-right get-text">
<ul>
<li><a href="#" onclick="alert('Work in progress')">Support | </a></li>
<li><a href="#" onclick="alert('Work in progress')">Privacy & Policy |</a></li>
<li><a href="#" onclick="alert('Work in progress')"> Terms & Conditions</a></li>
</ul>
</div>
</div>
</section>
</body>
</html>