<div class="clearfix"></div>

  <div class="content-wrapper">

    <div class="container-fluid">

      <!-- Breadcrumb-->

     <div class="row pt-2 pb-2">

        <div class="col-sm-9">

		    <h4 class="page-title">Manage Profile</h4>

	   </div>

     </div>

    <!-- End Breadcrumb-->

      <div class="row">

			<div class="col-lg-4">

			   <?php if($this->session->flashdata("msg")){echo $this->session->flashdata("msg"); }?>

               <div class="card">

                    	  <div class="card-header">Update Profile Details</div>

                    <div class="card-body">

                          <?php $admin=$this->db->get_where("admin",array("id"=>1))->row();?>

                          <form action="<?php echo base_url();?>admin/update_profile" method="post" enctype="multipart/form-data">

                          <img class="img img-responsive center-block" width="100px" src="<?php echo base_url().'adminassets/'.$admin->photo;?>" />

                          <input type="hidden" name="oldphoto" value="<?php echo $admin->photo;?>" />

                          <div class="form-group">

                            <label for="new">Change Photo</label>

                            <input type="file" class="form-control" name="photo" />

                          </div>
                          
                          <img class="img img-responsive center-block" width="100px" src="<?php echo base_url().'adminassets/'.$admin->booking_banner;?>" />

                          <input type="hidden" name="oldbooking_banner" value="<?php echo $admin->booking_banner;?>" />

                          <div class="form-group">

                            <label for="new">Home Banner</label>

                            <input type="file" class="form-control" name="booking_banner" />

                          </div>

                          <div class="form-group">

                            <label for="new">Email</label>

                            <input type="email" class="form-control" name="email" value="<?php echo $admin->email;?>" />

                          </div>

                          <div class="form-group">

                            <label for="new">Mobile</label>

                            <input type="text" class="form-control" name="mobile" value="<?php echo $admin->mobile;?>" />

                          </div> 
                          
                          <div class="form-group">

                            <label for="new">Firm/Company Name</label>

                            <input type="text" class="form-control" name="comp_name" value="<?php echo $admin->comp_name;?>" />

                          </div> 
                          
                          <div class="form-group">

                            <label for="new">Address</label>

                            <input type="text" class="form-control" name="address" value="<?php echo $admin->address;?>" />

                          </div> 
                          
                          <div class="form-group">

                            <label for="new">City</label>

                            <input type="text" class="form-control" name="city" value="<?php echo $admin->city;?>" />

                          </div> 
                          
                          <div class="form-group">

                            <label for="new">Pincode</label>

                            <input type="text" class="form-control" name="pincode" value="<?php echo $admin->pincode;?>" />

                          </div> 

                          <button type="submit" name="submit" class="btn btn-primary">Update Profile</button>

                          </form>

                    </div>

                    

               </div>                  

            </div>

            <div class="col-lg-4">

			   <?php if($this->session->flashdata("msg2")){echo $this->session->flashdata("msg2"); }?>

               <div class="card">

                    	  <div class="card-header">Change Password</div>

                    <div class="card-body">

                          <form class="form-horizontal" action="" method="post" id="changepass">

                              

                        <div class="form-group">

                                <input type="password"  name="npass" required class="form-control" id="inputPassword3" placeholder="New Password">

                            

                        </div>

                        <div class="form-group">

                                <input type="password"  name="cpass" required class="form-control" id="inputPassword3" placeholder="Confirm Password">

                                 <b class="text-warning" id="passch"></b>

                            

                            

                        </div>

                        <button type="submit" class="btn btn-primary">Change Password</button>

                    </form>

                    </div>

                    

               </div>                  

            </div>

            

        </div><!--End Row-->

	  

	  <!--End Row-->



    </div>

    <!-- End container-fluid-->

    

    </div><!--End content-wrapper-->

   <!--Start Back To Top Button-->

    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>

    <!--End Back To Top Button-->

	

	<!--Start footer-->

	<footer class="footer">

      <div class="container">

        <div class="text-center">

          Copyright © 2020 Grocery Store

        </div>

      </div>

    </footer>

	<!--End footer-->

   

  </div><!--End wrapper-->





  <!-- Bootstrap core JavaScript-->

	<script>

	$(document).ready(function(){

		$("#changepass").submit(function(e){e.preventDefault();//alert("Asdf"); 

								var formdata=$(this).serialize();

								$.ajax({

								 type: "POST",

								 url: '<?php echo base_url();?>admin/change_pass',

								 data: {formdata:formdata},

								 success: function(res){

								//alert(res);

								$("#passch").html(res);

								}

								 }); 

										});

		});

</script>

	<!-- simplebar js -->

  <script src="<?php echo base_url();?>adminassets/js/sidebar-menu.js"></script>

  <!-- Custom scripts -->

  <script src="<?php echo base_url();?>adminassets/js/app-script.js"></script>

  

  <!-- Vector map JavaScript -->

  <!-- Index js -->

  <script src="<?php echo base_url();?>adminassets/js/index.js"></script>



    

	

</body>

</html>

