<?php $this->load->view('common/head')?>

<body>
<div class="page-container list-menu-view">
<!--Leftbar Start Here -->
<?php $this->load->view('common/sidebar')?>

    <div class="page-content">
    <!--Topbar Start Here -->
    <?php $this->load->view('common/header') ?>
        <div class="main-container">
            <div class="container-fluid">
                <div class="page-breadcrumb">
                    <div class="row">
                        <?php if(validation_errors()!=''){?>
                    <div class="alert alert-danger alert-dismissible">
                    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                        <?php echo validation_errors(); ?>
                    </div>
                        <?php }?>
                        <div class="col-md-7">
                            <div class="page-breadcrumb-wrap">
                                <div class="page-breadcrumb-info">
                                    
                                    <ul class="list-page-breadcrumb">
                                        <li><a href="#">Home</a>
                                        </li>
                                        <li class="active-page"> Edit Users</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">

                        </div>
                    </div>
                </div>
                 <?php 
                    if($this->session->flashdata('msg')!=''){
                        echo '<div class="alert alert-success alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('msg').'</strong> 
                            </div>';
                    }
                    if($this->session->flashdata('err')!=''){
                        echo '<div class="alert alert-danger alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('err').'</strong> 
                            </div>';
                    }
                ?>
                <div class="row">
                    <div class="col-md-12 ">
                    <div class="box-widget widget-module">
                            <div class="widget-head clearfix">
                                <span class="h-icon"><i class="fa fa-bars"></i></span>
                                <h4>Edit Users</h4>
                            </div>
                            <div class="widget-container">
                                <div class=" widget-block">
                                    <form action="<?= base_url('admin/users/edit/'.$users['id'])?>" method="post" enctype="multipart/form-data">
                                         <legend>Edit Users</legend>
                                   

                                     <div class="col-sm-12">
                                        <div class="form-group">
                                                <label for="">Title*</label>
                                                <select name="title" id="" class="form-control" required>
                                                    <option value="">Title</option>
                                                    <option <?php if($users['title']=='Mr'){ echo 'selected';}?> value="Mr">Mr</option>
                                                    <option <?php if($users['title']=='Mrs'){ echo 'selected';}?> value="Mrs">Mrs</option>
                                                    <option <?php if($users['title']=='Miss'){ echo 'selected';}?> value="Miss">Miss</option>
                                                </select>
                                            </div>
                                </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">First Name</label>
                                                <input required type="text" value="<?= $users['first_name']?>" placeholder="First Name" name="first_name" class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Last Name</label>
                                                <input required type="text" value="<?= $users['last_name']?>" placeholder="Last Name" name="last_name" class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Email</label>
                                                <input type="email" value="<?= $users['email']?>" placeholder="Email" name="email" class="form-control" required readonly>
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Phone</label>
                                                <input type="text" value="<?= $users['phone']?>" name="phone" placeholder="Phone" required class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Address 1</label>
                                                <input type="text" value="<?= $users['address']?>" name="address" placeholder="Address Line 1" class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Address 2</label>
                                                <input type="text" value="<?= $users['address2']?>" name="address2" placeholder="Address Line 2" class="form-control">
                                        </div>
                                   </div>

                                    <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Country</label>
                                                <input type="text" value="<?= $users['country']?>" placeholder="Country" name="country" class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">State</label>
                                                <input type="text" value="<?= $users['state']?>" placeholder="State" name="state" class="form-control">
                                        </div>
                                   </div>

                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">City</label>
                                                <input type="text" value="<?= $users['city']?>" placeholder="City" name="city" class="form-control">
                                        </div>
                                   </div>
                                   
                                  
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Pin Code</label>
                                                <input type="text" value="<?= $users['pincode']?>" placeholder="Pin Code" name="pincode" class="form-control">
                                        </div>
                                   </div>
                                  
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Nationality</label>
                                                <input type="text" value="<?= $users['nationality']?>" placeholder="Nationality" name="nationality" class="form-control">
                                        </div>
                                   </div>
                                   <div class="col-sm-6">
                                        <div class="form-group">
                                                <label for="">Profile Image</label>
                                                <input type="file"  placeholder="" name="profile" class="form-control">
                                        </div>
                                   </div>
                                     <input type="submit" name="" class="btn btn-primary" value="Submit">
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    </div>
                  <?php $this->load->view('common/foot'); ?>
        </div>
    </div>

    <?php $this->load->view('common/footer')?>

    <!-- <script type="text/javascript" src="<?= base_url('public /js/custom.js')?>"></script> -->

    <!-- <?php
        $this->load->view('Products/custom');
    ?> -->