<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
extract($_GET);

$today_date = date("Y-m-d");

$input_text = base64_decode($text);

$input_name = extract("&",$input_text);
?>

	<div class="row-fluid">
		<legend>
			<a href="#" id="back_sub_hw" >
				<img src="asset/custom/back.png" id="back" >
			</a>
			Daily Subject Wise Home Work for (Shift: <?php echo $input_name[0]; ?>, Medium: <?php echo $input_name[1]; ?>)
		</legend>
		
	</div>

</div>

<div class="row-fluid">						
	<table id="sample-table-22" class="table table-striped table-bordered table-hover">
		<thead>
			<th>Sl</th>
			<th>Subject Name</th>
			<th>Subject Code</th>
			<th>Subject Type</th>
			<th>Status</th>
		</thead>
		<tbody>
			<?php
			$i=0;
			$table_name="_int_subject";
			$column="_subject_type,_subject_code,_subject_full_name,_class_id,_id";
			$where_cond='_class_id = '.$class_id;
			
			foreach($obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond) as $value){
			
			$i++;
			?>	
			<tr>
				<td><?php echo $i; ?></td>
				<td><?php echo $value['_subject_full_name']; ?></td>
				<td><?php echo $value['_subject_code']; ?></td>
				<td><?php echo $value['_subject_type']; ?></td>
				<td style="padding: 3px; text-align: center;">
<?php 
				if($_SESSION['add']=='Y'){
?>
					<button type="button" class="btn btn-mini btn-warning no-border" onclick="Homework_Sheet_subject(this,'<?php echo $shift_id; ?>','<?php echo $section_id;?>','<?php echo $value['_id']; ?>','<?php echo $medium_id; ?>','<?php echo $value['_class_id']; ?>')" rel="<?php echo $text;?>">
						<i class="icon-beaker bigger-150"></i>
						Home Work
					</button>
<?php
					
				}
					?>
				</td>
			</tr>	
			<?php }	?>
		</tbody>	

	</table>
</div>



<script type="text/javascript">
	var oTable2 = $('#sample-table-22').dataTable( {
	"aoColumns": [
      { "bSortable": true },
      null,null,null,null,null,null,
	  { "bSortable": true }
	] } );
	
</script>

<script type="text/javascript">

$("#back_sub_hw").click(function(){
	$("#main_content_div").load("module/homework/subject_wise_homework.php");
});

</script>