<style>
.control-label {  
  padding-top: 0 !important;
}
</style>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">View User</div>                                
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=manage_user">Users</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">View User</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header>View User</header>  
                                    <div style="margin-left:20px;">
	                                	<a class="btn btn-info" href="index.php?page=manage_user&p=<?php echo $p;?>">Back</a>&nbsp;
	                                	<a class="btn btn-info" href="index.php?page=add_user&id=<?php echo $editId; ?>">Edit</a>
	                                	<a class="btn btn-info" href="index.php?page=send_mail&user_id=<?php echo $editId; ?>">Send Mail</a>
	                                	<a class="btn btn-info" href="index.php?page=send_sms_user&user_id=<?php echo $editId; ?>">Send SMS</a>
                                        <a class="btn btn-info" href="index.php?page=user_tasks&user_id=<?php echo $editId; ?>">Job History</a>
                                        <a class="btn btn-info" href="index.php?page=user_payments&user_id=<?php echo $editId; ?>">Payments</a>
	                                	<a class="btn btn-info" href="index.php?page=user_reviews&user_id=<?php echo $editId; ?>">Reviews</a>
	                                	<?php if($resEdit['status']=='Active'){ ?>
	                                		<a class="btn btn-info" href="index.php?page=view_user&id=<?php echo $editId; ?>&action=disable">Disable</a>
	                                	<?php } else { ?>                   
	                                		<a class="btn btn" href="index.php?page=view_user&action=enable&id=<?php echo $editId; ?>">Enable</a>          	
	                                	<?php } ?>
	                                	<a target="_blank" class="btn btn-info" href="index.php?page=admin_login&action=admin_login&user_id=<?php echo $editId; ?>">Login</a>
	                                </div>                                  
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($error) && $error!=''){ ?>
									<div class="alert alert-danger mt-1" role="alert"><?php echo $error; ?></div>
									<?php } else if(isset($success) && $success!=''){ ?>
									<div class="alert alert-success mt-1" role="alert"><?php echo $success; ?></div>
									<?php } else if(isset($_REQUEST['success']) && $_REQUEST['success']!=''){ ?>
									<div class="alert alert-success mt-1" role="alert"><?php echo urldecode($_REQUEST['success']); ?></div>
									<?php } ?>                                		
                                		                                      	                          	                                	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post">
                                    	<div class="form-body div-right">                                        	
                                            <div class="form-group row">                                            	
		                                        <div class="col-md-4">
		                                        	<?php if(isset($resEdit['image']) && $resEdit['image']!=''){ ?>
		                                        		<img src="<?php echo USER_IMG_URL.$resEdit['image']; ?>" style="width:150px;image-orientation: from-image;" >		
		                                        	<?php } else { ?>    
		                                        		<img src="<?php echo USER_IMG_URL.'dummy_user.png'; ?>" style="width:150px;image-orientation: from-image;" >	
		                                        	<?php } ?>                                    	
		                                        </div>
		                                    </div>		                                    
                                        </div>
                                        <div class="form-body div-left">                                        	                                        	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Name</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['name'];?>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Email Address</label>
                                                <div class="col-md-4">                                                                                                                                                                   
                                                    <?php echo $resEdit['email'];?>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Referral Code</label>
                                                <div class="col-md-4">                                                    
                                                    <b><?php echo $resEdit['ref_val'];?></b>   
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Phone Number</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['phone'];?>
                                                </div>
                                            </div>                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">House Name</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['house_name'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Street</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['street'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Place</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['place'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">PIN</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['pin'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">City</label>
                                                <div class="col-md-4">        
                                                	<?php echo getCityName($resEdit['city']);?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Lat-Long</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['latitude'].','.$resEdit['longitude'];?>   
                                                </div>
                                            </div>
                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Joined On</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo getFormattedDate($resEdit['date']);?>   
                                                </div>
                                            </div>
                                            <?php if($resEdit['added_by']>0){ ?>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Added By</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo getAdminUserName($resEdit['added_by']);?>   
                                                </div>
                                            </div>  
                                            <?php } ?>  
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Added From</label>
                                                <div class="col-md-4">                                                    
                                                    <?php if($resEdit['added_from']=='web'){ echo 'Website'; } else if($resEdit['added_from']=='app'){ echo 'App'; } else { echo 'Admin Panel'; }?>   
                                                </div>
                                            </div>                                                                                    
                                            
                                        </div>  
                                                                              
                                      	
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
