 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">Update Ebook</h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin/admin/dashboard">Dashboard</a></li>
              <li class="breadcrumb-item"><a href="#">Front Setting</a></li>
              <li class="breadcrumb-item active">Update Ebook</li>

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
         <div class="row">
            <div class="col-sm-12">
               <div class="card card-default">
                  <div class="card-header">
                     <h3 class="card-title">Update Ebook</h3>
                  </div>
                    <!-- /.card-header -->
                     <?php echo form_open_multipart(base_url().'admin/front_setting/update_ebook');?>
                    <div class="card-body">
                      <div class="row">
                        <div class="col-md-3">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12">Ebook Status<span>*</span></label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                 <select type="text" class="form-control"  name="ebook_status" placeholder="Enter Ebook Heading" required>
                                    <option <?php if($ebook->ebook_status == 1){echo 'selected';}?> value="1">Active</option>
                                    <option <?php if($ebook->ebook_status == 0){echo 'selected';}?> value="0">Deactive</option>
                                 </select>
                              </div>
                           </div>
                        </div>
                        <div class="col-md-9">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12">Ebook Title<span>*</span></label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                 <input type="text" class="form-control"  name="ebook_heading" placeholder="Enter Ebook Heading" required value="<?php echo $ebook->ebook_heading; ?>">
                              </div>
                           </div>
                        </div>
                        <div class="col-md-12">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12">Ebook Description<span>*</span></label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                 <textarea type="text" class="text-editor"  name="ebook_description" placeholder="Enter Ebook Heading" required><?php echo $ebook->ebook_description; ?></textarea>
                              </div>
                           </div>
                        </div>
                        <div class="col-md-6">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12">Ebook Image</label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                 <input type="file" class="form-control"  name="ebook_image" placeholder="Enter Ebook Heading">
                              </div>
                           </div>
                        </div>
                        <div class="col-md-6">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12">Ebook PDF</label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                 <input type="file" class="form-control"  name="ebook_pdf" placeholder="Enter Ebook Heading">
                              </div>
                           </div>
                        </div>
                        <div class="col-md-6">
                           <div class="item form-group">
                              <label class="col-md-12 col-sm-12 col-xs-12"> Image</label>
                              <div class="col-md-12 col-sm-12 col-xs-12">
                                <img src="<?php echo base_url(); ?><?php echo $ebook->ebook_image; ?>" width="100px">
                              </div>
                           </div>
                        </div>
                        <?php if($ebook->ebook_pdf): ?>
                           <div class="col-md-6">
                              <div class="item form-group">
                                 <label class="col-md-12 col-sm-12 col-xs-12"> PDF</label>
                                 <div class="col-md-12 col-sm-12 col-xs-12">
                                    <a href="<?php echo base_url(); ?><?php echo $ebook->ebook_pdf; ?>" download>Download PDF</a>
                                 </div>
                              </div>
                           </div>
                        <?php endif; ?>
                        <div class="col-md-12">
                          <div class="form-group">
                             <button name="form1" style="float: right" type="submit" class="btn btn-success">Update</button>
                          </div>
                        </div>
                        <?php echo form_close() ?>
                     </div>
                 </div>
               </div>   
            </div>
         </div>
      </div>
    </section>
  </div>
