<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <section class="content-header mb_10">
        <h1>Profile View</h1>
    </section>
    <?php
    if(!empty($admin[0]['address'])){
        $address = $admin[0]['address'];
        $variable = preg_split("/[|,]+/", $address);
    }
    
    ?>
    <section class="content">
        <div class="profile_section">
        	<form role="form" id="adminFormId" data-target="admin/admin_edit" method="post">
        		<div class="row">
        			<div class="col-lg-12 col-sm-12  col-md-12 col-xs-12 full_width">
        			     <div class="form-group text-center">						
        				  <img class="admin_profile" src="<?php if(!empty($admin[0]['userImage'])){ echo base_url('assets/uploads/users/').$admin[0]['userImage']; }else{ echo base_url('assets/images/user.jpg'); } ?>" alt="Profile">
    				    </div>
        			    <div class="form-group">	
        			      <h4 class="sub_title">Personal Information</h4>
        				  <label for="admin_pic">Select Profile Image</label>
        				  <input type="file" class="form-control" id="ItemImage" name="admin_pic" autocomplete="off">
        				  <span>Preferred size 400px*400px.</span>
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_name"> Name</label>
        				  <input type="hidden" id="userRole"  class="userType" value="<?php if(!empty($admin[0]['userType'])){ echo $admin[0]['userType']; } ?>">
        				  <input type="text" class="form-control" id="admin_name" name="admin_name" value="<?php if(!empty($admin[0]['userName'])){ echo $admin[0]['userName']; } ?>" placeholder="Name" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_email">Email</label>
        				  <input type="text" class="form-control" id="admin_email" <?php if($admin[0]['userType']!=1){ echo "readonly" ;} ?> name="admin_email" value="<?php if(!empty($admin[0]['userEmail'])){ echo $admin[0]['userEmail']; } ?>" placeholder="Email" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_mobile">Mobile No.</label>
        				  <input type="text" class="form-control" id="admin_mobile" <?php if($admin[0]['userType']!=1){ echo "readonly" ;} ?> name="admin_mobile" value="<?php if(!empty($admin[0]['userMobile'])){ echo $admin[0]['userMobile']; } ?>" placeholder="Mobile" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_pwd">Password</label>
        				  <input type="password" class="form-control" id="admin_pwd" name="admin_pwd" placeholder="Password"  autocomplete="off">
    				    </div>
        			</div>
        			<hr class="custom">
        			 <div class="col-lg-12 col-md-12 col-sm-12 cl-xs-12">
        			     <?php if(!empty($admin[0]['userType']) && $admin[0]['userType']==3){ 
                          echo "<h4 class='sub_title'>Shop Information</h4>";
        			     }else{
        			      echo "<h4 class='sub_title'>Address Information</h4>";   
        			     }?>
                          
                      </div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_wn">Ward Number</label>
        				  <input type="text" class="form-control" id="admin_wn" name="admin_wn" placeholder="Ward Number" value="<?php if(!empty($variable[1])){ echo $variable[1]; } ?>" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_hn">House Number</label>
        				  <input type="text" class="form-control" id="admin_hn" name="admin_hn" placeholder="House Number" value="<?php if(!empty($variable[3])){ echo $variable[3]; } ?>" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_town">Town</label>
        				  <input type="text" class="form-control" id="admin_town" name="admin_town" placeholder="Town" value="<?php if(!empty($variable[2])){ echo $variable[2]; } ?>" required autocomplete="off">
    				    </div>
        			</div>
        			<div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
        			    <div class="form-group"> 							
        				  <label for="admin_dis">District</label>
        				  <input type="text" class="form-control" id="admin_dis" name="admin_dis" placeholder="District" value="<?php if(!empty($variable[0])){ echo $variable[0]; } ?>" required autocomplete="off">
    				    </div>
        			</div>
        			<?php
        			 if(!empty($admin[0]['userType']) && $admin[0]['userType']==3){
        			     ?>
        			 <hr class="custom">
        			  <div class="col-lg-12 col-md-12 col-sm-12 cl-xs-12">
                          <h4 class="sub_title">Business Information</h4>
                     </div>
        			<div class="col-lg-6 col-md-6 col-sm-6 cl-xs-12">
                         <div class="form-group">
                            <label for="AadharNumber">Aadhar Number</label>
                            <input type="text" class="form-control" id="AadharNumber" name="AadharNumber" value="<?php if(!empty($admin[0]['aadharNumber'])){ echo $admin[0]['aadharNumber']; } ?>" required placeholder="Aadhar Number" autocomplete="off">
                         </div>
                    </div>
                    <div class="col-md-6">
                         <div class="form-group">
                            <label for="PanNumber">Pan Number</label>
                            <input type="text" class="form-control" id="PanNumber" value="<?php if(!empty($admin[0]['panNumber'])){ echo $admin[0]['panNumber']; } ?>" name="PanNumber" required placeholder="Pan Number" autocomplete="off">
                         </div>
                     </div>
                      <div class="col-lg-12 col-md-12 col-sm-12 cl-xs-12">
                         <div class="form-group">
                            <label for="GSTNumber">GST Number</label>
                            <input type="text" class="form-control" id="GSTNumber" value="<?php if(!empty($admin[0]['GSTNumber'])){ echo $admin[0]['GSTNumber']; } ?>" name="GSTNumber" required placeholder="GST Number" autocomplete="off">
                         </div>
                      </div>
                      <div class="col-md-6">
                         <label>Shop Image</label>
                         <div class="priview_thumb">
                             <input class="form-control" type='file' id="shopimgInp" name="ShopImage"/>
                             <span class="priview_thumb_img">
                                <a href="" data-toggle="modal" data-target="#shopBigImg" ><img id="shopblah" src="<?php if(!empty($admin[0]['shopImage'])){ echo base_url('assets/uploads/users/').$admin[0]['shopImage']; } ?>" alt="" class="prev_thumb"/></a>
                             </span>
                         </div>
                      </div>
                      <div class="col-md-6">
                          <label>Aadhar Card Image</label>
                         <div class="priview_thumb">
                             <input class="form-control" type='file' id="aadharimgInp" name="AadharImage"/>
                             <span class="priview_thumb_img">
                                <a href="" data-toggle="modal" data-target="#aadharBigImg" ><img id="aadharblah" src="<?php if(!empty($admin[0]['aadharImage'])){ echo base_url('assets/uploads/users/').$admin[0]['aadharImage']; } ?>" alt="" class="prev_thumb" /></a>
                             </span>
                         </div>
                      </div>
                       <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">
                          <label>Pan Card Image</label>
                         <div class="priview_thumb">
                             <input class="form-control" type='file' id="panimgInp" name="PanImage"/>
                             <span class="priview_thumb_img">
                                <a href="" data-toggle="modal" data-target="#panBigImg" ><img id="panblah" src="<?php if(!empty($admin[0]['panImage'])){ echo base_url('assets/uploads/users/').$admin[0]['panImage']; } ?>" alt="" class="prev_thumb"/></a>
                             </span>
                         </div>
                      </div>
                      <?php
        			 } ?>
        			<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">
        			    <div class="form-group text-center mt_30"> 							
        				  <input type="hidden" id="admin_id" name="admin_id" value="<?php if(!empty($admin[0]['userId'])){ echo $admin[0]['userId']; } ?>">
							<button type="submit" class="btn btn-primary">Submit</button>
    				    </div>
        			</div>
        			
        		</div>
        	</form>
        </div>
    </section>
    <!-- /.content -->
</div>
