<?php
session_start();
// ============
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
$base_url= $_SESSION["BASE_URL"];
extract($_GET);
$shift_id;
$medium_id;
$class_id;
$department_id;
$student_type_id;
$section_id;
$exam_term_id;
$exam_session;



?>

<div class="span6 abcd"   >
<!--PAGE CONTENT BEGINS-->

<div class="">
<div class="well" style="padding: 33px;">

<div class="row-fluid" id="first_part">
<div class="login-container">


<div class="space-6"></div>

<div class="row-fluid">
<div class="position-relative">
<div id="login-box" class="login-box visible widget-box no-border">
<div class="widget-body">
<div class="widget-main">
<h4 class="header blue lighter bigger">
<i class="icon-coffee green"></i>
Please Enter Excel File
</h4>

<div class="space-6"></div>


<div >
        <label for="exampleInputFile" style="color: red;"> </label></br>
        
		
		<button class="btn btn-small btn-success" type="button" id="subs_download_sheet">
							<i class="icon-cloud-upload"></i>
							Download   
						</button> 
</div>






</div><!--/widget-main-->



</div><!--/widget-body-->

</div><!--/login-box-->




</div><!--/position-relative-->
</div>
</div>
</div>	




</div>
</div><!--PAGE CONTENT ENDS-->

</div><!--/.span-->



<script>
$("#subs_download_sheet").click(function(){
	$this = $(this);


	
	var shift_id = <?php echo $shift_id; ?>;
	var medium_id = <?php echo $medium_id; ?>;
	var class_id = <?php echo $class_id; ?>;
	var student_type_id = <?php echo $student_type_id; ?>;
	var section_id = <?php echo $section_id; ?>;
	var department_id = <?php echo $department_id; ?>;
	var exam_term_id = <?php echo $exam_term_id; ?>;
	var exam_session = <?php echo $exam_session; ?>;
	//var class_name = $("#class_name").val();
/* 	var class_name = '<?php echo $cal; ?>';
	var dep = '<?php echo $dep; ?>';
	var s_t = '<?php echo $s_t; ?>';
	var section_name = '<?php echo $section; ?>';
	var subject_name = '<?php echo $sub_name; ?>';
	 */
	//alert(section_name);
   
	var operation="creat_xls";
	var dataSt="section_id="+section_id+"&department_id="+department_id+"&exam_term_id="+exam_term_id+"&exam_session="+exam_session+"&operation="+operation;
	/* alert(dataSt);
	exit();  */
	
	
//	$(".icon-loading").css('display','block');
//	$(this).html('<i class="icon-ok bigger-100"></i> Download');
	$this.html('<i class="icon-spinner icon-spin orange bigger-125 icon-loading" ></i> Download... ');
	
	
		$.ajax({
			type:"post",
			url:"module/exam/create_subs_xlx_sheet.php",
			data:dataSt ,
			success:function(st){
				//alert(st);
				$this.html('<i class="icon-cloud-upload"></i> Download');//$det_in['class'].'-'.$det_in['section'].'-'.$sub_name['_subject_full_name'].
				window.open('<?php echo $base_url.'/module/exam/subs_download_sheet.php?FILE=Subject_mark_entry_'; ?>.xlsx');
				
			}
		}); 
	
});

</script>