
     <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Channellimo
            <small>Preview</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Forms</a></li>
            <li class="active">Brand</li>
          </ol>
        </section>
        
        <section class="content">
        	<div class="col-lg-12">
            <?php echo validation_errors('<div class="error">', '</div>'); ?>
            <?php echo form_open('admin/post/add');?>
             	<div class="box box-primary col-lg-8">
                	<div class="box-header with-border">
						<h3 class="box-title">FORM ADD</h3>
					</div>
                    
        			<div class="form-group col-lg-8">
                       <label>Title</label>
                       <input class="form-control" name="title" id="title">
                    </div>
                                   
                    <div class="form-group col-lg-8">
                       <label>Description</label>
                       <textarea class="form-control ckeditor" rows="3" name="desc" id="desc"></textarea>
                    </div>
                                   
                    <div class="form-group col-lg-8">
                        <label for="status">Status</label>
                         <div class="col-lg-12">
                         <input type="radio" name="status" class="flat-red" value="1" checked>
                         Active 
                         <input type="radio" name="status" class="flat-red" value="0">
                         DisActive
                         </div> 
                   </div>
                                    
                   
                                 
                   <div class="form-group col-lg-8">
                      <label>Category</label>
					<?php
						 $checked = NULL;
                         $stmt1 = $this->db->query("SELECT * FROM `blog_cats` WHERE `catStatus`=1");
                         foreach($stmt1->result() as $data)
                         {
							if(isset($_POST['catID']))
							{
								if(in_array($data['catID'], $_POST['catID'])){
									 $checked="checked='checked'";
								}else{
									 $checked = NULL;
								}
							}
				
                            echo'<div class="checkbox">
                                  <label><input type="checkbox" name="catID[]" value="'.$data->catID.'" '.$checked.'>'.$data->catTitle.'</label> 
                                 </div>'; 	
                          }
                      ?>
                    </div>
     
                    
                    <div class="form-group col-lg-8">
                     <input type="submit" value="Submit" class="btn btn-primary">
                     <button type="reset" class="btn btn-danger">Reset</button>
                    </div>
                    
                    
                </div>
             </form>
            </div>
        </section>
     </div>
     
     <!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>-->
     <script src="<?php echo base_url('assets/ckeditor/ckeditor.js');?>"></script>
       <?php if($msg = $this->session->flashdata("message")): ?>
        <script>
     		alert("<?php echo $msg?>");
     	</script>
      <?php endif; ?>