	<!----Banner Start---->
    <div class="fd_bread_wrapper">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="fd_bread">
                        <h1 class="fd_page_title"><span>USER PROFILE</span></h1>
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>">Home</a></li>
                                <li class="breadcrumb-item active" aria-current="page">Profile</li>
                            </ol>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!----Booking Section Start---->
	<div class="fd_user_info_wrapper">
		<div class="container">
			<div class="row">
				<div class="col-lg-12">
					<div class="fd_user_table">
						<ul class="nav nav-tabs">
						  <li><a data-toggle="tab" href="#paid_dwn"  class="active">Orders <i class="fa fa-cart-arrow-down" aria-hidden="true"></i></a></li>
						  <li><a data-toggle="tab" href="#free_dwn">Wallet <i class="fa fa-cloud-download" aria-hidden="true"></i></a></li>
						  <li><a data-toggle="tab" href="#u_profile">profile <i class="fa fa-user" aria-hidden="true"></i></a></li>
						</ul>
						<div class="tab-content">
							<div id="paid_dwn" class="tab-pane fade  in show active">		    <div class="fd_paid_dwn_wrapper">
											<div class="row">
												<div class="col-md-12">
													<table class="table table-bordered example" >
														<thead>
															<tr>
																<th>#</th>
																<th>Order Date</th>
																<th>Products</th>
																<th>Order Amount</th>
																<th>Payment Type</th>
																<th>Order Status</th>
															</tr>
														 </thead>
														 <tbody>
														    <?php
															$i= 0;
															 if(!empty($all_uorders)){ 
														    foreach($all_uorders as $order_details){
														  ?>
															<tr>
																<td><?php echo ++$i; ?></td>
																<td><?php echo $order_details->order_date; ?></td>
																<td><?php $prod_details = json_decode($order_details->order_pid);
																	foreach($prod_details as $prodinfo){
																	echo $prodinfo->name.' X '.$prodinfo->qty.' = '.$this->hs->getwebsettings('currency_symbol').' '.$prodinfo->subtotal;
																	echo "<br>";
																}

																?>
																</td>
																<td><?php echo $this->hs->getwebsettings('currency_symbol'); ?><?php echo $order_details->order_amount; ?></td>
																<td><?php  if($order_details->payment_mode == 1){
																				echo 'Paypal';
																}else if($order_details->payment_mode == 2){
																				echo 'Payumoney';
																}else if($order_details->payment_mode == 3){
																				echo 'Wallet';
																}else if($order_details->payment_mode == 4){
																				echo 'COD';
																}
																
																?></td>
																<td><?php   
																	if($order_details->order_status == 0){
																				echo 'Pending';
																	}else if($order_details->order_status == 1){
																				echo 'In Trasit';
																	}else if($order_details->order_status == 2){
																				echo 'Delivered';
																	}else if($order_details->order_status == 3){
																				echo 'Canceled';
																	}
																?>
																</td>
															</tr>  
														<?php 
															}
														}
														?>
														</tbody>
															<tfoot>
																<tr>
																	<th>#</th>
																	<th>Order Date</th>
																	<th>Product Quantity</th>
																	<th>Order Amount</th>
																	<th>Payment Type</th>
																	<th>Order Status</th>
																</tr>
															</tfoot>
													</table>
												</div>
											</div>
										</div>								
							</div>
						  <div id="free_dwn" class="tab-pane fade">
							<div class="fd_free_dwn_wrapper">
								<div class="row">
									<div class="col-md-12">
											<table class="table table-bordered example">
												<thead>
													<tr>
														<th>#</th>
														<th>Wallet Credit Amount</th>
														<th>Note</th>
														<th>Credit Date</th>
													</tr>
												</thead>
												<tbody>
												<?php
												$i= 0;
												if(!empty($wallet_transactions)){ 
												   foreach($wallet_transactions as $wallet_details){
												?>
													<tr>
														<td><?php echo ++$i; ?></td>
														<td><?php echo $this->hs->getwebsettings('currency_symbol'); ?><?php echo $wallet_details->wcredit_amount; ?></td> 
														<td><?php echo $wallet_details->wcredit_note; ?></td>
														<td><?php echo $wallet_details->wcredit_date; ?></td>
													</tr>  
												<?php 
													}
												 }
												?>				
												</tbody>
													<tfoot>
														<tr>
															<th>#</th>
															<th>Wallet Credit Amount</th>
															<th>Note</th>
															<th>Credit Date</th>
														</tr>
													</tfoot>
											</table>
											<p> Your Current Wallet Amount = <?php echo $this->hs->getwebsettings('currency_symbol'); ?><?php if(!empty($current_wallet)){ echo $current_wallet[0]->wallet_amount; } ?></p>
									 </div>
								</div>
							</div>
						</div>
						  <div id="u_profile" class="tab-pane fade">
								<div class="fd_u_pro_wrapper">
									<div class="fd_pro_title">
										<h1>basic information</h1>
									</div>	
									<div class="fd_pro_inputs">
										<div class="row">
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
												<form id="update_ubasic_info" method="post">
												<input type="hidden" name="up_user_id" id="up_user_id"  value="<?php if(isset($_SESSION['userid'])){ echo $_SESSION['userid']; } ?>">
													<label>user name</label>
													<div class="input-group">
														<input type="text" class="form-control"   value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_name',$_SESSION['userid']); } ?>" <?php if(isset($_SESSION['userid'])){ echo "disabled"; } ?> name="update_uname" id="update_uname" >
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>email</label>
													<div class="input-group">
														<input type="email" class="form-control" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_email',$_SESSION['userid']); } ?>" <?php if(isset($_SESSION['userid'])){ echo "disabled"; } ?> name="update_uemail" id="update_uemail">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>first name</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="First Name" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_fname',$_SESSION['userid']); } ?>" name="user_fname" id="user_fname">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>Last name</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="Last Name" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_lname',$_SESSION['userid']); } ?>" name="user_lname" id="user_lname">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>Upload profile pic</label>
													<div class="input-group">
														<input type="file" class="form-control" name="user_pic" id="user_pic">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
												<?php if(isset($_SESSION['userid'])){ 
												 $userpic =$this->hs->get_userdetails('user_image',$_SESSION['userid']);
													if(!empty($userpic)){ 
												?>
												<img src="<?php echo base_url().$userpic; ?>" alt="">
											<?php }else{ ?>
													<img src="<?php echo base_url(); ?>themeassets/images/user_info.png" alt="">
											<?php }
                                              }
											 ?>
												</div>
											</div>
											<div class="col-lg-12 col-md-12">
												<div class="fd_u_input_group">
													<button class="fd_btn">update</button>
												</div>
											</div>
											</form>
										</div>
									</div>
									<div class="fd_pro_title">
										<h1>billing information</h1>
									</div>
									<div class="fd_pro_inputs">
										<div class="row">
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
												<form id="update_ubilling_info" method="post">
												<input type="hidden" name="billing_user_id" id="billing_user_id"  value="<?php if(isset($_SESSION['userid'])){ echo $_SESSION['userid']; } ?>">
													<label>mobile</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="Mobile" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_mobile',$_SESSION['userid']); } ?>" name="update_umobile" id="update_umobile">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>Address</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="Address" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_address',$_SESSION['userid']); } ?>" name="update_uaddress" id="update_uaddress">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>Country</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="Country" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_country',$_SESSION['userid']); } ?>" name="update_ucountry" id="update_ucountry">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>State</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="State" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_state',$_SESSION['userid']); } ?>" name="update_ustate" id="update_ustate">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>City</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="City" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_city',$_SESSION['userid']); } ?>" name="update_ucity" id="update_ucity">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>Zip Code</label>
													<div class="input-group">
														<input type="text" class="form-control" placeholder="Zip Code" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_zipcode',$_SESSION['userid']); } ?>" name="update_uzip" id="update_uzip">
													</div>
												</div>
											</div>
											<div class="col-lg-12 col-md-12">
												<div class="fd_u_input_group">
													<button class="fd_btn">update</button>
												</div>
												</form>
											</div>
										</div>
									</div>
									<div class="fd_pro_title">
										<h1>change password</h1>
									</div>
									<div class="fd_pro_inputs">
										<div class="row">
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
												<form id="reset_userpassword_form" method="post">
												<input type="hidden" name="reset_userpwd_id" id="reset_userpwd_id" value="<?php if(isset($_SESSION['userid'])){ echo $_SESSION['userid']; } ?>">  
													<label>password</label>
													<div class="input-group">
														<input type="password" class="form-control" placeholder="Password" name="update_npwd" id="update_npwd">
													</div>
												</div>
											</div>
											<div class="col-lg-6 col-md-6">
												<div class="fd_u_input_group">
													<label>reset password</label>
													<div class="input-group">
														<input type="password" class="form-control" placeholder="Reset Password" name="update_confpwd" id="update_confpwd">
													</div>
												</div>
											</div>
											<div class="col-lg-12 col-md-12">
												<div class="fd_u_input_group">
													<button class="fd_btn">update</button>
												</div>
												</form>
											</div>
										</div>
									</div>	
								</div>							
						  </div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>