 <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"><?php echo $title ?></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="#"><?php echo ucwords(str_replace("_", " ", $this->uri->segment(2))); ?></a></li>
              <li class="breadcrumb-item active"><?php echo ucwords(str_replace("_", " ", $title)); ?></li>

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
  <?php
    $errors = $this->session->userdata('errors');
    if (isset($errors)) {
        ?>
        <script>
            swal ( "Oops" ,  "<?php echo $errors ?>" ,  "error" )
        </script>
        <?php echo $errors ?>
        <?php
        $this->session->unset_userdata('errors');
    }
    $error = $this->session->userdata('error');
    if (isset($error)) {
        ?>
         <script>
            swal ( "Oops" ,  "<?php echo $error ?>" ,  "error" )
        </script>
        <?php
        $this->session->unset_userdata('error');
    }
    $success = $this->session->userdata('success');
    if (isset($success)) {
        ?>
         <script>
            swal({
          title: "Done!",
          text: "<?php echo $success ?>",
          icon: "success",
        });
        </script>
        <?php
        $this->session->unset_userdata('success');
    }
    ?>
        <!-- Main content -->
    <section class="content">
      <div class="container-fluid">

        <!-- Info boxes -->
        <div class="row">
          <div class="col-sm-12">
            <div class="card card-default">
              <div class="card-header">
                <h3 class="card-title">Update Testimonials Heading </h3>
              </div>
              <!-- /.card-header -->
              <?php echo form_open('admin/branch/update_testi_headigng'); 
              $testi = $this->branch->get_alltesti();?>
              <div class="card-body">
                <div class="row">

                  <div class="col-md-12">
                    <div class="form-group">
                       <label for="inputEmail" class="col-sm-12 col-form-label">Heading<span class="required">*</span></label>
                       <div class="col-sm-12">
                          <input class="form-control"  name="testi_heading" placeholder="Enter Heading" required="required" type="text" value="<?php echo $testi->testi_heading; ?>">
                       </div>
                    </div>
                  </div>
                  
                  <div class="col-md-12">
                    <div class="form-group">
                       <label for="inputEmail" class="col-sm-12 col-form-label">Description <span class="required">*</span></label>
                       <div class="col-sm-12">
                          <textarea class="form-control"  name="testi_des" placeholder="Enter Description" required="required" type="text"><?php echo $testi->testi_des; ?></textarea>
                       </div>
                    </div>
                  </div>

                  <div class="col-md-12">
                    <div class="form-group">
                       <button name="submit" style="float: right" type="submit" class="btn btn-success">Update</button>
                    </div>
                  </div>

                   <?php echo form_close() ?>
                   

                  <!-- /.col -->
                </div>
                <!-- /.row -->
              </div>
              <!-- /.card-body -->
            </div>
          </div>
            <!-- /.row -->
      </div><!--/. container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">

        <!-- Info boxes -->
        <div class="row">
          <div class="col-sm-6">
            <div class="card card-default">
              <div class="card-header">
                <h3 class="card-title">Add <?php echo $title ?></h3>

                <div class="card-tools">
                  <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button>
                </div>
              </div>
              <!-- /.card-header -->
              <?php echo form_open('admin/branch/add_students_testimonial'); ?>
              <div class="card-body">
                <div class="row">

                  <div class="col-md-12">
                    <div class="form-group">
                       <label for="inputEmail" class="col-sm-12 col-form-label">Select Branch</label>
                       <div class="col-sm-12">
                          <select id="showing" class="form-control"  name="branch" required="">
                            <option value="">Select Branch</option>
                              <?php foreach ($all_branch as $key => $branch):?>
                                <option value="<?php echo $branch->id ?>"><?php echo $branch->name ?></option>
                              <?php endforeach; ?>
                          </select>
                       </div>
                    </div>
                  </div>

                  <div class="col-md-12">
                    <div class="form-group">
                       <label for="inputEmail" class="col-sm-12 col-form-label">Video Link <span class="required">*</span></label>
                       <div class="col-sm-12">
                          <input class="form-control"  name="link" placeholder="Enter Video Link" required="required" type="text">
                       </div>
                    </div>
                  </div>

                  <div class="col-md-12">
                    <div class="form-group">
                       <button name="submit" style="float: right" type="submit" class="btn btn-success">Add</button>
                    </div>
                  </div>

                   <?php echo form_close() ?>
                   

                  <!-- /.col -->
                </div>
                <!-- /.row -->
              </div>
              <!-- /.card-body -->
            </div>
          </div>
          <div class="col-sm-6">
            <div class="row">

          <div class="col-sm-12">
            <div class="card card-default">
              <div class="card-header">
                <h4>All Testimonials</h4>
                
              </div>
                <div class="card-body">
                  <table id="example" class="table table-bordered table-striped">
                    <thead>
                    <tr>
                      <th>id</th>
                      <th>Branch</th>
                      <th>Video Link</th>
                      <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php $i=1; foreach ($get_all_students_testimonial as $key => $testimonial):
                    $branch = $this->branch->get_branch_by_id_id($testimonial->branch);?>
                    <tr>
                      <td><?php echo $i ?></td>
                      <td><?php echo $branch->name ?></td>
                      <td><?php echo $testimonial->link ?></td>
                      <td>

                        <a class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')" href="<?php echo base_url() ?>admin/branch/delete_testimonials/<?php echo $testimonial->id ?>"><i class="fa fa-trash" aria-hidden="true"></i></a>
                      </td>
                    </tr>
                    <?php $i++; ?>
                    <?php endforeach; ?>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
          </div>
        </div>
            <!-- /.row -->
      </div><!--/. container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  