<?php $this->load->view('includes/header'); ?>  
<!-- PAGE TITLE -->
<div class="page-title">                    
  <h2><span ></span><?php echo $heading_title; ?></h2>
</div>
<!-- END PAGE TITLE -->                
<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">
    <?php echo form_open_multipart(current_url(), array('id' => 'media_form', 'class' => "form-horizontal")); ?>               
        <div class="row">
        <div class="col-md-offset-1 col-md-9">
            <?= get_flash(); ?>
            
            
            <div class="form-group">
                <label>Title </label>
                <input type="text" class="form-control" name="title" placeholder="Enter Title" required value="<?= set_value('title',$dtl['title']) ?>" />
            </div>
            
            <div class="form-group">
                <div class="col-md-9 col-xs-12">
                    <label>Media</label>
                    <input type="file" <?= $req ?> class="form-control" name="media" placeholder="Select Image" />
                    
                </div>    
                <?php if(isset($dtl['img'])){ ?>
                    <div class="col-md-3 col-xs-12">
                        <label class="control-label">Image</label>
                        <div>
                            <img class="img img-thumbnail" src="<?= $dtl['img'] ?>" />
                        </div>
                    </div>
                <?php } ?>
            </div>
            
            <input type="hidden" name="type" value="<?= $media_type ?>" />
            <button class="btn btn-success">Update</button>
        </div>
      <!-- END DEFAULT DATATABLE -->
    </div>
    
    <?php echo form_close(); ?>
</div>
<?= show_err('#media_form',$errs) ?>
<!-- PAGE CONTENT WRAPPER -->                                
<?php $this->load->view('includes/footer'); ?>