
      <div class="control-sidebar-bg"></div>
    </div><!-- ./wrapper -->


  <script src="<?=base_url('assets/adminlte/plugins/jQuery/jQuery-2.1.4.min.js');?>"></script>
     <!--   <script src="<?=base_url('assets/adminlte/jquery/jquery.3.2.1.min.js');?>"></script>-->
      <!-- <script  src="<?php //echo base_url('assets/adminlte/dist/js/jQuery.fixTableHeader.min.js');?>"></script> -->
      <!-- <script src="<?=base_url('assets/adminlte/msdropdown/jquery.dd.js');?>"></script>-->
    <script src="<?=base_url('assets/adminlte/bootstrap/js/bootstrap.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/select2/select2.full.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/input-mask/jquery.inputmask.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/input-mask/jquery.inputmask.date.extensions.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/input-mask/jquery.inputmask.extensions.js');?>"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>

    <script src="<?=base_url('assets/adminlte/plugins/daterangepicker/daterangepicker.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/datepicker/bootstrap-datepicker.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/colorpicker/bootstrap-colorpicker.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/timepicker/bootstrap-timepicker.min.js');?>"></script>
    <!--<script src="<?=base_url('assets/adminlte/plugins/slimScroll/jquery.slimscroll.min.js');?>"></script>-->
    <script src="<?=base_url('assets/adminlte/plugins/iCheck/icheck.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/fastclick/fastclick.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/dist/js/app.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/sparkline/jquery.sparkline.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/slimScroll/jquery.slimscroll.min.js');?>"></script>
    <script src="<?=base_url('assets/adminlte/plugins/chartjs/Chart.min.js');?>"></script>
    <!--  <script src="<?=base_url('assets/adminlte/dist/js/pages/dashboard2.js');?>"></script>-->
    <script src="<?=base_url('assets/adminlte/dist/js/demo.js');?>"></script>

<script>
    $('.button_collapse').on('click', function(){
  $('.wrap, .button_collapse').toggleClass('active');

  return false;
});
</script>
	<script type='text/javascript'>
        var baseURL= "<?php echo site_url();?>";

        $(document).ready(function(){

            // on category -class change
            $('#sel_category').change(function(){
                var cat = $(this).val();
                $.ajax({
                    url:'<?=site_url()?>admin/Adminlte/get_category_class',
                    method: 'post',
                    data: {category: cat},
                    dataType: 'json',
                    success: function(response){
                        $('#sel_topic').find('option').not(':first').remove();
                        $('#sel_chapter').find('option').not(':first').remove();
                        $('#sel_subject').find('option').not(':first').remove();
                        $('#sel_class').find('option').not(':first').remove();
						            $('#sel_subject').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_class').append('<option value="'+data['id']+'">'+data['class_code']+' | '+data['class']+'</option>');
                        });
                    }
                });
            });
            // on subject -faculty change
            $('#sel_class').change(function(){
                var cl = $(this).val();
                $.ajax({
                    url:'<?=site_url()?>admin/Adminlte/get_class_subject',
                    method: 'post',
                    data: {classes: cl},
                    dataType: 'json',
                    success: function(response){
                        $('#sel_topic').find('option').not(':first').remove();
                        $('#sel_chapter').find('option').not(':first').remove();
                        $('#sel_subject').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_subject').append('<option value="'+data['id']+'">'+data['subject_code']+' | '+data['subject']+'</option>');
                        });
                    }
                });
            });
            $('#sel_subject').change(function(){
                var sub = $(this).val();
                $.ajax({
                    url:'<?=site_url()?>admin/Adminlte/get_subject_chapter',
                    method: 'post',
                    data: {subject: sub},
                    dataType: 'json',
                    success: function(response){
                        $('#sel_topic').find('option').not(':first').remove();
                        $('#sel_chapter').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_chapter').append('<option value="'+data['id']+'">'+data['chapter_code']+' | '+data['chapter']+'</option>');
                        });
                    }
                });
            });

            $('#sel_chapter').change(function(){
                var ch = $(this).val();
                $.ajax({
                    url:'<?=site_url()?>admin/Adminlte/get_chapter_topic',
                    method: 'post',
                    data: {chapter: ch},
                    dataType: 'json',
                    success: function(response){
                        $('#sel_topic').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_topic').append('<option value="'+data['id']+'">'+data['topic_code']+' | '+data['topic']+'</option>');
                        });
                    }
                });
            });
            //for faculty
            $('#sel_subject').change(function(){
                var sub = $(this).val();
                $.ajax({
                    url:'<?=site_url()?>admin/Adminlte/get_class_subject_faculty',
                    method: 'post',
                    data: {subject: sub},
                    dataType: 'json',
                    success: function(response){
                        $('#sel_faculty').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_faculty').append('<option value="'+data['id']+'">'+data['userid'].toUpperCase()+' | '+data['first_name'].toUpperCase()+' '+data['last_name'].toUpperCase()+' | '+data['email'].toUpperCase()+'</option>');
                        });
                    }
                });
            });

          //for payment made course Residtration all course list
            $('#sel_subject').change(function(){
                var sub = $(this).val();

                $.ajax({
                    url           : '<?=site_url()?>admin/Adminlte/get_class_subject_course_',
                    method        : 'post',
                    data          : {subject: sub},
                    dataType      : 'json',
                    success       : function(response){
                      $('#sel_cat_class_sub_course_').find('option').not(':first').remove();
                        $.each(response,function(index,data){
                            $('#sel_cat_class_sub_course_').append('<option value="'+data['id']+'">'+data['course_name']+' | '+data['course_start_from']+' | '+data['course_duration_hours']+' Hrs | '+data['max_attendee']+' TOTAL CLASS STRENGTH'+'</option>');
                        });
                    }
                });
            });


        });

    </script>


 <script>
      $(function () {
        //Initialize Select2 Elements
        $(".select2").select2();

        //Datemask dd/mm/yyyy
        $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
        //Datemask2 mm/dd/yyyy
        $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
        //Money Euro
        $("[data-mask]").inputmask();

        //Date range picker
        $('#reservation').daterangepicker();
        //Date range picker with time picker
        $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'});
        //Date range as a button
        $('#daterange-btn').daterangepicker(
            {
              ranges: {
                'Today': [moment(), moment()],
                'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                'This Month': [moment().startOf('month'), moment().endOf('month')],
                'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
              },
              startDate: moment().subtract(29, 'days'),
              endDate: moment()
            },
        function (start, end) {
          $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
        }
        );

        //iCheck for checkbox and radio inputs
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
          checkboxClass: 'icheckbox_minimal-blue',
          radioClass: 'iradio_minimal-blue'
        });
        //Red color scheme for iCheck
        $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
          checkboxClass: 'icheckbox_minimal-red',
          radioClass: 'iradio_minimal-red'
        });
        //Flat red color scheme for iCheck
        $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
          checkboxClass: 'icheckbox_flat-green',
          radioClass: 'iradio_flat-green'
        });
        $('#datepicker').datepicker();
          $('#datepicker2').datepicker();

          $('.datepicker').datepicker();
            $('.datepicker2').datepicker();
        //Colorpicker
        $(".my-colorpicker1").colorpicker();
        //color picker with addon
        $(".my-colorpicker2").colorpicker();

        //Timepicker
        $(".timepicker").timepicker({
          showInputs: false,
          minuteStep: 5

        });
      });
    </script>

<!-- <script>
$(document).ready(function() {
   $('#tableContainer2').fixTableHeader({
			fixHeader: true,
		});
	});
</script> -->

<script type="text/javascript">

$('.select-courseinfo').change(function() {
	///alert();
        $('#myModals').modal("show");
});


</script>

<script type="text/javascript">
function changeValue(){
	//alert('sdad');
    var des = $(this).val();
    if (des == 1) {
        $('.week1').show();
        $('.customdate1').hide();
    }
    else if(des == 2){
    	 $('.week1').hide();
         $('.customdate1').show();
    }
    else{
    	 $('.week1').show();
         $('.customdate1').show();
        }

}

</script>


		<script type="text/javascript">
		function addRow(tableID) {

			var table = document.getElementById(tableID);

			var rowCount = table.rows.length;
			var row = table.insertRow(rowCount);

			var colCount = table.rows[0].cells.length;

			for(var i=0; i<colCount; i++) {

				var newcell	= row.insertCell(i);

				newcell.innerHTML = table.rows[0].cells[i].innerHTML;
				//alert(newcell.childNodes);
				switch(newcell.childNodes[0].type) {
					case "text":
							newcell.childNodes[0].value = "";
							break;
					case "checkbox":
							newcell.childNodes[0].checked = false;
							break;
					case "select-one":
							newcell.childNodes[0].selectedIndex = 0;
							break;
				}
			}
		}

		function deleteRow(tableID) {
			try {
			var table = document.getElementById(tableID);
			var rowCount = table.rows.length;

			for(var i=0; i<rowCount; i++) {
				var row = table.rows[i];
				var chkbox = row.cells[0].childNodes[0];
				if(null != chkbox && true == chkbox.checked) {
					if(rowCount <= 1) {
						alert("Cannot delete all the rows.");
						break;
					}
					table.deleteRow(i);
					rowCount--;
					i--;
				}


			}
			}catch(e) {
				alert(e);
			}
		}

	</script>





<script>

 var moveLeft = 0;
var moveDown = 0;
$('a.popper').hover(function (e) {

    var target = '#' + ($(this).attr('data-popbox'));
    $(target).show();
    //moveLeft = $(this).outerWidth();
   // moveDown = ($(target).outerHeight() / 2);
}, function () {
    var target = '#' + ($(this).attr('data-popbox'));
    if (!($("a.popper").hasClass("show"))) {
        $(target).hide();
    }
});

$('a.popper').click(function (e) {
    var target = '#' + ($(this).attr('data-popbox'));
    if (!($(this).hasClass("show"))) {
        $(target).show();
    }
    $(this).toggleClass("show");
});

 </script>



<script type="text/javascript">
$(document).ready(function(){
$(document).on("submit", '.exconvert', function(event) {
        $("#expo1").val( $("<div>").append( $("#reportsummary").eq(0).clone() ).html() )
     });
  });
</script>
<script>
// $('form#add_name tr').each(function(){
//   //  var a =  $(this).parent().find('select.status_check option:selected').length;
// //  var a =  $(this).parent().find('select.status_check option').filter(":selected").val();
//     var a = $(this).parent().find("select.status_check option").filter(":selected").val();
//     //alert(a);
//     var b = parseInt(a);
//     var c = parseInt(a)+parseInt(b);
//     delete a;
//     delete b;
//   //  delete c;
//     alert(c);
//
//      });
// $('.final_active_submit').click(function(){
//   $('form#add_name tr').each(function(){
//     var a =  $(this).parent().find('select.status_check option:selected').length;
//      });
//      alert(a);
// });

        // $('form#add_name tr').each(function(){
        //   var a =  $(this).parent().find('select.status_check option:selected').length;
        //    });
// var rowCount = $('#dynamic_field >tbody >tr').length;
// alert(rowCount);
</script>

<script type="text/javascript">
    $(document).ready(function(){
     //var postURL = "/addmore.php";
      var i=1;
      var limit= "<?php echo $course->attendee_limit;?>";
      $('#adds').click(function(){
var rowCount = $('#dynamic_field >tbody >tr').length;
        if(i>=limit){
   				alert("This course can't exceed more than "+limit+" active students");
   			}
        else{
           i++;
           // $('#dynamic_field').append('<tr id="row'+i+'" class="dynamic-added"><td><input type="text" name="name[]" placeholder="Enter your Name" class="form-control name_list" required /></td><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td></tr>');
                      $('#dynamic_field').append('<tr id="row'+i+'" class="dynamic-added"> \
					  <td><select name="student[]" class="form-control  name_list" data-placeholder="Select Student" style="" tabindex="-1" aria-hidden="true" required> \
					  <?php foreach($student as $p=>$b){ ?>\
                        <option value="<?=$p?>"> <?=$b?></option>\
                        <?php }?>\
					  </select></td> \
					  <td><input type="text" name="joining_date[]"  class="form-control datepick"  placeholder="Joining Date" required autocomplete="off"> </td> \
                      <td> \
                      <select name="status[]" class="form-control status_check" data-placeholder="Select status" style="width: 100%;" tabindex="-1" aria-hidden="true" required> \
                      <option value="1" selected="selected">Active</option> \
                      <option value="0">Inactive</option> \
                      </select>\
                      </td>\
                      <td> <textarea name="remarks[]" cols="10" rows="1" class="form-control" id="" placeholder="Remarks" autocomplete="off"></textarea></td> \
                      <td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn_remove">X</button></td></tr>');

              $('.datepick').each(function(){
                $(this).datepicker();
              });
            }
      });
      $(document).on('click', '.btn_remove', function(){
           var button_id = $(this).attr("id");
           $('#row'+button_id+'').remove();
      });
      $('#submit').click(function(){
           $.ajax({
                url:postURL,
                method:"POST",
                data:$('#add_name').serialize(),
                type:'json',
                success:function(data)
                {
                  	i=1;
                  	$('.dynamic-added').remove();
                  	$('#add_name')[0].reset();
    				        alert('Record Inserted Successfully.');
                }
           });
      });

    });
</script>


 <style>
 .popbox {
    display: none;
    /*position:absolute;*/
	position:fixed;
	top: 23%;
    right: 19%;
    z-index: 99999;
    width: 1000px;
    padding: 0px;
    background: #fff;
    color: #000000;
    margin-top: -160px;
    -webkit-box-shadow: 0px 0px 5px 0px rgba(164, 164, 164, 1);
    box-shadow: 0px 0px 5px 0px rgba(164, 164, 164, 1);
}
.popbox h2 {
   color: #fff;
    font-size: 14px;
    display: block;
    width: 100%;
    margin: -3px 0px 0px 0px;
    padding: 5px 7px;
    background: linear-gradient(45deg,#FFa500,#ff869a);
}
 </style>


<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-3d.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
