        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
                <div class="title_left">
                    <h3></h3>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">

                <div class="x_panel">
                  <div class="x_title">
                    <h2>Result SMS To Students</h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">

                    <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>SmsHajana/sendResult" method="post">

                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="branch">Branch<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="branch" id="branch" required>
                            <option value="">Select Branch</option>
                            <?php
                                foreach ($branch as $key => $value) {
                                    echo '<option value="'.$value['id'].'">'.$value['name'].'</option>';
                                }
                            ?>
                          </select>
                        </div>
                      </div>
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="class">Class<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="class" id="class" required>
                            <option value="">Select Class</option>
                          </select>
                        </div>
                      </div>
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="section">Section<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="section" id="section" required>
                            <option value="">Select Section</option>
                          </select>
                        </div>
                      </div>
                      
                       <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="session">Session<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="session" id="session" required>
                            <option value="">Select Session</option>
                            <?php
                                foreach ($session as $key => $value) {
                                    echo '<option value="'.$value->id.'">'.$value->name.'</option>';
                                }
                            ?>
                          </select>
                        </div>
                      </div>
                      
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="api">Select Students<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" multiple name="students[]" id="students" required>
                            
                          </select>
                        </div>
                      </div>
                     
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="exam">Exam Type<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="e_type" id="e_type" required>
                          </select>
                        </div>
                      </div>
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="exam">Exam<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control col-md-7 col-xs-12" name="exam" id="exam" required>
                            <option value="">Select Exam</option>
                          </select>
                        </div>
                      </div>
                      <div class="item form-group" id="examdiv">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="exam">Exam Subtype
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select id="sub_typeid" class="form-control col-md-7 col-xs-12" name="sub_typeid">
                            <option value=''>Select Exam Subtype</option>
                          </select>
                        </div>
                      </div>
                      <div class="ln_solid"></div>
                      <?php $check = @$this->db->select('is_permit')->where('id',13)->get('tsms_permission')->row()->is_permit;
                      if($check==1){
                      ?>
                      <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                          <button id="send" type="submit" class="btn btn-success pull-right">SEND</button>
                        </div>
                      </div>
                      <?php }else{?>
                      <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                          <h4 class="text-danger bold"><span style="font-weight:bolder">Warning:</span> Sms Permission is not set for this event.</h4>
                        </div>
                      </div>
                      <?php } ?>
                    </form>
                  </div>
                </div>

              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <footer>
          <div class="pull-right">
            Prudmac
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>

    <!-- jQuery -->
    <script src="<?php echo base_url(); ?>assets/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Custom JS -->
    <script src="<?php echo base_url(); ?>assets/js/main.js"></script>
    <!-- Bootstrap -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="<?php echo base_url(); ?>assets/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="<?php echo base_url(); ?>assets/vendors/nprogress/nprogress.js"></script>
    <!-- Chart.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/Chart.js/dist/Chart.min.js"></script>
    <!-- gauge.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/gauge.js/dist/gauge.min.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- iCheck -->
    <script src="<?php echo base_url(); ?>assets/vendors/iCheck/icheck.min.js"></script>
    <!-- Skycons -->
    <script src="<?php echo base_url(); ?>assets/vendors/skycons/skycons.js"></script>
    <!-- Flot -->
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.pie.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.time.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.stack.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.resize.js"></script>
    <!-- Flot plugins -->
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.orderBars.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/date.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.spline.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/curvedLines.js"></script>
    <!-- jVectorMap -->
    <script src="<?php echo base_url(); ?>assets/js/maps/jquery-jvectormap-2.0.3.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/js/moment/moment.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/datepicker/daterangepicker.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="<?php echo base_url(); ?>assets/build/js/custom.min.js"></script>
    <script src="<?php echo base_url()?>assets/select/js/select2.min.js"></script>
    <script>

        $('#class').select2({
         //selectOnClose: true,
        placeholder: "Select a class",
        allowClear:true
        });
       
        $('#section').select2({
         //selectOnClose: true,
        placeholder: "Select a section",
        allowClear:true
        });
        
         $('#branch').select2({
         //selectOnClose: true,
        placeholder: "Select a Branch",
        allowClear:true
        });
        $('#session').select2({
         //selectOnClose: true,
        placeholder: "Select a Session",
        allowClear:true
        });
        $('#exam').select2({
         //selectOnClose: true,
        placeholder: "Select a Exam",
        allowClear:true
        });
        $('#e_type').select2({
         //selectOnClose: true,
        placeholder: "Select a Exam Type",
        allowClear:true
        });
        $('#sub_typeid').select2({
         //selectOnClose: true,
        placeholder: "Select a Sub Type",
        allowClear:true
        });
    </script>
    <script>
        $(function(){
            $(document).on("change","#branch",function(){
                var val = $(this).val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+val,{},function(ret){
                    var d = '<option value="">Select Class</option>';
                    $("#class").html(d+ret);
                });
                $.get("<?php echo base_url(); ?>load/exams/role/"+val,{},function(d){
                    var pre = '<option value="">Select Exam Type</opiton>';
                    $("#e_type").html(pre+d);
                });
            });
            $(document).on("change","#class",function(){
                var val = $(this).val();
                $.get("<?php echo base_url(); ?>load/section/role/"+val,{},function(ret){
                    var d = '<option value="">Select Section</option>';
                    $("#section").html(d+ret);
                });
            });
            $(document).on("change","#section",function(){
                var val = $(this).val();
                var clas=$('#class').val();
                var session=$('#session').val();
                $.get("<?php echo base_url(); ?>load/student_session/"+clas+"/"+val+"/"+session,{},function(ret){
                    $("#students").html(ret);
                    jq('#students').multiselect('reload');
                });
            });
             $(document).on("change","#session",function(){
                var val = $('#section').val();
                var clas=$('#class').val();
                var session=$('#session').val();
                $.get("<?php echo base_url(); ?>load/student_session/"+clas+"/"+val+"/"+session,{},function(ret){
                    $("#students").html(ret);
                    jq('#students').multiselect('reload');
                });
            });
            jq('#students').multiselect({
                columns: 1,
                placeholder: 'Select Students',
                selectAll: true,
                search: true
            });
            $(document).on("change","#e_type",function(){
                var val = $(this).val();
                $.get("<?php echo base_url(); ?>load/t_exams/role/"+val,{},function(ret){
                    var d = '<option value="">Select Exam</option>';
                    $("#exam").html(d+ret);
                });
            });
            // jq('#e_type').multiselect({
            //     columns: 1,
            //     placeholder: 'Select Exam Type',
            //     selectAll: true,
            //     search: true
            // });
        });
    </script>
    <script>
        $(document).ready(function(){
            $(document).on("change","#exam",function(){
                var value = $(this).val();
                $.get("<?php echo base_url(); ?>exam/fetch_subtype/"+value,{},function(d){
                    var pre = '<option value="">Select Exam Subtype</opiton>';
                    $("#sub_typeid").html(pre+d);
                });
            });
            
        });
    </script>

  </body>
</html>