<div class="row">
  <div class="col-lg-12 mt-4">
    <div class="card">
      <div class="card-header form-card-header">
        <h4 class="m-b-0 text-light">UPDATE ADVERTISE</h4>
      </div>
      <div class="card-body">
        <form id="update_advertise" class="form-material">
          <div class="form-body">
            <div class="row">
              <div class="col-md-12">
                <div class="form-group">
                  <label class="control-label"><strong>IMAGE</strong></label>
                  <input type="file" name="image" id="image" class="form-control" autocomplete="off" maxlength="100" required="" />
                  <label> Note : image size ( 274 x 196 pixels) </label>
                  <div>
                    <img src="<?php echo base_url().$advertise[0]->image; ?>" height="250px" width="300px">  
                  </div>
                  <label for="image" class="error"></label> 
                </div>
              </div>
              
              <div class="col-md-12">
                <div class="form-group">
                  <label class="control-label"><strong>URL</strong></label>
                  <input type="text" name="url" id="url" value="<?php echo $advertise[0]->url; ?>" class="form-control"   autocomplete="off" maxlength="100"/>
                  <label for="url" class="error"></label> 
                </div>
              </div>

              <div class="col-md-4">
                <div class="form-group">
                  <label class="control-label"><strong>STATUS</strong></label>
                  <select name="status" id="status" class="form-control">
                    <option value="1" <?php if($advertise[0]->status == '1'){echo 'selected'; }?>>ACTIVE</option>
                    <option value="0" <?php if($advertise[0]->status == '0'){echo 'selected'; }?>>DEACTIVE</option>
                  </select>
                  <label for="status" class="error"></label> 
                </div>
              </div>
            </div>
          </div>
          
          <input type="hidden" id="id" name="id" value="<?php echo $advertise[0]->id; ?>">
          <input type="hidden" id="imgpath" name="imgpath" value="<?php echo $advertise[0]->image; ?>">

          <div class="form-actions m-t-10 d-flex justify-content-center">
            <button type="submit" class="btn btn-rounded btn-outline-success col-md-3 m-r-10" >SAVE</button>  
            <button type="button" class="btn btn-rounded btn-outline-danger col-md-3"  onclick="window.location.href='<?php echo base_url(); ?>advertise/list'">CANCEL</button>  
          </div>
        </form>
      </div>
    </div>
  </div>
</div>