<!DOCTYPE html>
<html lang="en">
<?php include('fixed/top.php');  ?>
<body>
  <div class="loader"></div>
  <div id="app">
    <div class="main-wrapper main-wrapper-1">
      <div class="navbar-bg"></div>

       <?php include('fixed/navigation.php');  ?>
      <!-- Main Content -->
      <div class="main-content">
        <section class="section">
          <div class="section-body">
            <div class="row">
              <div class="col-10">
                   <?php echo $this->session->flashdata('msg'); ?>
                <div class="card">
                  <div class="card-header">
                    <h4><?=$title?></h4>
                  </div>
                  <div class="card-body">
                   <form method="post" action="<?php echo base_url(); ?>admin/do_add_testimonial/<?php if(!empty($testimonial_data)){ echo $testimonial_data->id; } ?>" enctype="multipart/form-data">
                     
                    <div class="form-group">
                      <label>Person Name</label>
                      <input name="name" type="text" class="form-control" value="<?php if(!empty($testimonial_data)) echo $testimonial_data->name ?>">
                    </div>
                       <div class="form-group">
                      <label>Designation</label>
                      <input name="designation" type="text" class="form-control" value="<?php if(!empty($testimonial_data)) echo $testimonial_data->designation ?>">
                    </div>
                    <div class="form-group">
                      <label>Content</label>
                      <textarea name="textarea1" id="myNicEditor" class="form-control"><?php if(!empty($testimonial_data)) echo $testimonial_data->note ?></textarea>
                    </div>
                     <?php if(!empty($testimonial_data) && !empty($testimonial_data->photo)) { ?>
                    <div class="form-group">
                   <label>Photo</label>
                     <img class="d-block w-100" src="<?php echo base_url(); ?>uploads/front/testimonial/<?=$testimonial_data->photo?>" alt="<?=$testimonial_data->name?>" style="">
                    </div>
                     <?php } ?>
                    <div class="form-group">
                      <label><?php if(!empty($testimonial_data)) echo 'Upload New '; ?>Photo</label>
                      <input name="main_image" type="file" class="form-control">
                       <input name="ext_photo" type="hidden" class="form-control" value="<?php if(!empty($testimonial_data)) echo $testimonial_data->photo ?>">  
                    </div>
                   <div class="card-footer text-right">
                    <button class="btn btn-primary mr-1" type="submit"  name="submit" onclick="nicEditors.findEditor('textarea1').saveContent();">Submit</button>
                    <!--button class="btn btn-secondary" type="reset">Reset</button-->
                  </div>
                      </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>
      </div>
      <?php include('fixed/footer.php');  ?>
    </div>
  </div>
   <?php include('fixed/bottom.php');  ?>

</body>
</html>