<!-- Main content -->
                <section class="content">

                    <!-- Small boxes (Stat box) -->
                    <div class="row">
				
						
                                <form role="form" action="<?php echo site_url('aqadmin/add_gallery');?>" method="post" enctype="multipart/form-data" id="myForm">
                       <div class="col-md-6">
                            <!-- general form elements -->
                            <div class="box box-primary">
                                <div class="box-header">
                                    <h3 class="box-title">
                                        
                                    </h3>
                                </div><!-- /.box-header -->
                                <!-- form start -->
                                <?php 
   if($this->session->flashdata('success_msg')){?>
     <div style="color:green"><?php echo $this->session->flashdata('success_msg');?></div>    
    <?php  } ?>
                                    <div class="box-body">
                                        <div class="form-group">
                                            <label for="exampleInputEmail1">Client</label>
                                            <select name="client_id" class="form-control" >
                                                <?php
                                                $clients=$this->aqadmin_model->select('exp_clients');
                                                foreach($clients as $client)
                                                {
                                                    ?>
                                                    <option value="<?php echo $client->id; ?>" ><?php echo $client->client_name; ?></option>
                                                    <?php
                                                }
                                                ?>
                                                
                                                
                                            </select>
                                            
       
                                        </div>
                                        
                                    
           <div class="form-group">
                                            <label for="exampleInputEmail1">Gallery Image</label>
                                            <input type="file" class="form-control" id="inputPassword3" placeholder="Gallery Image" name="image[]" data-validation="required mime" data-validation-allowing="jpg, png, gif" data-validation-error-msg-mime="You can only upload images" data-validation-error-msg-required="No image selected" multiple>
                                            
                                                                    <?php if(form_error('image') != ""){?>     
                                                            <div style="color:red"><?php echo "Select image.";?></div>
                                                            <?php } ?>
   
                                        </div>
            
                                        
                                    </div><!-- /.box-body -->
<div class="box-footer">
    
                                        <button type="submit" class="btn btn-primary">Submit</button>
                                    </div>
                                    
                                
                            </div><!-- /.box -->

                            

                        
                    
                        </div>
                         
                               
                              
                                    
                                    
                                </form>
                            </div><!-- /.box -->

                            

                        </div>
                    
                        </div>
                    </div><!-- /.row -->

                    <!-- top row -->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
        <script>
        
        $(window).on("beforeunload", function() {
            return "Are you sure? You didn't finish the form!";
        });
        
        $(document).ready(function() {
            $("#myForm").on("submit", function(e) {
                
                $(window).off("beforeunload");
                return true;
            });
        });
        </script>             
                                        
                     
                    
                    
