<?php
$base_url = base_url();
$this->load->view('layout/frontend/header', array('base_url' => $base_url, '$username'=>@$username));
$this->load->view('layout/frontend/sidebar', array('base_url' => $base_url));
/*
$this->load->view('layout/frontend/header', array('base_url'=>base_url(), '$username'=>$username));
$base_url = base_url();
$this->load->view('layout/frontend/sidebar', array('base_url'=>base_url()));*/
?>
<div class="main-content">

	<div class="page-content">
		<div class="page-header">
			<h1>
				Thông tin cá nhân
				<small>
					<i class="icon-double-angle-right"></i>
					<?php echo @$username; ?>
				</small>
			</h1>
		</div><!-- /.page-header -->

		<div class="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->
				<div class="user-profile row" id="user-profile-3">
					<div class="col-sm-offset-1 col-sm-10">

							<div class="tabbable">
								<ul class="nav nav-tabs padding-16">
									<li class="active">
										<a href="#edit-basic" data-toggle="tab">
											<i class="green icon-edit bigger-125"></i>
											Thông tin cá nhân
										</a>
									</li>

									<li>
										<a href="#edit-password" data-toggle="tab">
											<i class="blue icon-key bigger-125"></i>
											Đổi mật khẩu
										</a>
									</li>

									<li>
										<a href="#account-info" data-toggle="tab">
											<img src="<?php echo $base_url; ?>assets/img/payment.png" width="16" class="img-responsive pull-left">
											Thông tin tài khoản
										</a>
									</li>
								</ul>

								<div class="tab-content profile-edit-tab-content">
									<div class="tab-pane in active" id="edit-basic">
										<form id="frm1" role="form" class="form-horizontal">
											<h4 class="header blue bolder smaller">Thông tin chung</h4>

											<div class="row">

												<div class="vspace-xs"></div>

												<div class="col-xs-12 col-sm-8">
													<div class="form-group">
														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tài khoản</label>

														<div class="col-sm-8">
															<input type="text" name="username" value="<?php echo @$username; ?>" placeholder="Tài khoản" id="form-field-username" class="col-xs-12 col-sm-10" disabled>
														</div>
													</div>

													<div class="space-4"></div>

													<div class="form-group">
														<label for="form-field-first" class="col-sm-4 control-label no-padding-right">Họ tên</label>

														<div class="col-sm-8">
															<input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Họ" id="form-field-first" class="col-xs-12 col-sm-10" disabled>
								
														</div>
													</div>

													<div class="space-4"></div>

													<div class="form-group">
														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Đơn vị</label>

														<div class="col-sm-8">
															<input type="text" name="school" value="<?php echo @$school; ?>" placeholder="Đơn vị" id="form-field-username" class="col-xs-12 col-sm-10">
														</div>
													</div>
													
													<div class="space-4"></div>

													<div class="form-group">
														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tỉnh / Thành phố</label>

														<div class="col-sm-8">
															<input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tỉnh / Thành phố" id="form-field-username" class="col-xs-12 col-sm-10">
														</div>
													</div>

												</div>
											</div>

											<hr>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right">Giới tính</label>

												<div class="col-sm-9">
													<label class="inline">
														<input type="radio" <?php if(@$gender=="male") echo "checked"; ?> class="ace" name="gender" value="male">
														<span class="lbl"> Nam</span>
													</label>

													&nbsp; &nbsp; &nbsp;
													<label class="inline">
														<input type="radio" <?php if(@$gender=="female") echo "checked"; ?> class="ace" name="gender" value="female">
														<span class="lbl"> Nữ</span>
													</label>
												</div>
											</div>

											<div class="space"></div>
											<h4 class="header blue bolder smaller">Thông tin liên hệ</h4>

											<div class="form-group">
												<label for="form-field-email" class="col-sm-3 control-label no-padding-right">Email</label>

												<div class="col-sm-9">
													<label class="block clearfix has-error">
														<span class="input-icon input-icon-right">
															<input name="email" type="email" value="<?php echo @$email; ?>" id="form-field-email">
															<i class="icon-envelope"></i>
														</span>
														<div class="help-block" id="email_err"> </div>
													</label>
												</div>
											</div>

											<div class="clearfix form-actions">
												<div class="col-md-offset-3 col-md-9">
													<button type="button" onclick="return updateInfo(<?php echo @$us_id; ?>);" class="btn btn-info">
														<i class="icon-ok bigger-110"></i>
														Cập nhật
													</button>
												</div>
											</div>
										</form>
									</div>

									
									<div class="tab-pane" id="edit-password">
										<div class="alert alert-block alert-success">						
											<p>
												Quí vị có thể thay đổi mật khẩu bằng cách dùng số điện thoại [SoDTKhachhang] và soạn tin theo cú pháp: <strong>SBG MK [matkhaumoi] gửi tới 8062</strong>. <br/>
												Để lấy lại mật khẩu của mình trên hệ thống SBG Online, quí vị hãy dùng số điện thoại đã đăng kí tài khoản và soạn tin theo cú pháp: <strong>SBG MK gửi tới 8062</strong>.
											</p>
										</div>
									</div>

									<div class="tab-pane" id="account-info">
										<form id="frm3" class="form-horizontal" role="form">
											<h4 class="header blue bolder smaller">Thông tin tài khoản</h4>
											<div class="col-sm-6">
												<h4>Số tiền </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND</h3>
											</div>
											<div class="col-sm-6">
												<h4>Thời bạn sử dụng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo $date_diff; ?></span></h3>
											</div>

											<h4 class="header blue bolder smaller">Nạp tiền bằng thẻ cào</h4>
											<div class="col-sm-8">
												<div class="form-group">
													<label for="form-field-pass1" class="col-sm-2 control-label no-padding-right">Mã thẻ</label>

													<div class="col-sm-10">
														<input type="text" id="form-field-pass1" class="form-control">
													</div>
												</div>

												<div class="space-4"></div>

												<div class="form-group">
													<label for="form-field-pass2" class="col-sm-2 control-label no-padding-right">Serial</label>

													<div class="col-sm-10">
														<input type="text" id="form-field-pass2" class="form-control">
													</div>
												</div>
											</div>
											<div class="col-sm-4">
												<button type="button" class="btn btn-success" data-toggle="modal" data-target="#alert-payment">
													<i class="icon-ok bigger-110"></i>
													Tiếp tục
												</button>
												<div class="space-4"></div>
												<a href="#" data-toggle="modal" data-target="#trade-history"><i class="icon-archive"></i> Lịch sử giao dịch</a>
											</div>
											<div class="clearfix">
												
											</div>
											<h4 class="header blue bolder smaller">Nạp tiền bằng tài khoản gốc</h4>
											<div class="alert alert-block alert-success">						
												<p>
													Sử dụng thuê bao <strong>016825764</strong> soạn tin nhắn: <strong>SBG NAP [sotien] gửi 8062</strong>. <br/>
													Nếu quí vị sử dụng thuê bao Viettel khác thì soạn tin nhắn: <strong>SBG NAP [tentruynhap] 
													[sotien] gửi tới 8062</strong>.
												</p>
											</div>
										</form>
									</div>

								</div>
							</div>
					</div><!-- /span -->
				</div>

				<!-- PAGE CONTENT ENDS -->
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
</div><!-- /.main-container-inner -->

<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
</div><!-- /.main-container -->

<div class="modal fade" id="trade-history" tabindex="-1" role="dialog"aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Lịch sử giao dịch</h4>
</div>
<div class="modal-body">
<div class="table-responsive">
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center">
							<label>
								<input type="checkbox" class="ace" />
								<span class="lbl"></span>
							</label>
						</th>
						<th>Số tiền</th>

						<th>
							<i class="icon-time bigger-110 hidden-480"></i>
							Thời gian
						</th>
					</tr>
				</thead>

				<tbody>
					<tr>
						<td class="center">
							<label>
								<input type="checkbox" class="ace" />
								<span class="lbl"></span>
							</label>
						</td>
						<td>$45</td>
						<td>Feb 12</td>
					</tr>
				</tbody>
			</table>
		</div><!-- /.table-responsive -->
</div>
</div>
</div>
</div>

<div class="modal fade" id="alert-payment" tabindex="-1" role="dialog"aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Thông báo dịch vụ</h4>
</div>
<div class="modal-body">
<div class="alert alert-block alert-success">						
			<p>
				Quí vị đã nạp thành công <b>10.000 </b>VND vào tài khoản <b>0168942155</b>, tài khoản hiện tại của quí vị là <b>20.000 </b>VND.
			</p>
		</div>
</div>
</div>
</div>
</div>
		
<?php
$this->load->view('layout/frontend/footer', array('base_url' => $base_url, 'usjs' => array('assets/js/frontend/user.js')));
?>