<!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_why/<?php if(!empty($why)){ echo $why->id; } ?>" enctype="multipart/form-data">
                    <div class="form-group">
                      <label>Icon</label>
                      <input name="icon" type="text" class="form-control" value="<?php if(!empty($why)) echo $why->icon ?>">
                    </div>
                    <div class="form-group">
                      <label>Title</label>
                      <input name="title" type="text" class="form-control" value="<?php if(!empty($why)) echo $why->title ?>">
                    </div>
                    <div class="form-group">
                      <label>Content</label>
                      <textarea name="textarea1" id="myNicEditor" class="form-control"><?php if(!empty($why)) echo $why->content ?></textarea>
                    </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>