<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
$branch_id=$_SESSION['LOGIN_BRANCH'];
/*
$table_name="_int_institute_setup shift LEFT JOIN _int_institute_setup branch ON shift._pid = branch._id LEFT JOIN _int_shift_time s ON shift._id = s._pid";
$column="shift._id,shift._name,shift._status,shift._remarks, s._in_time, s._out_time";
$where_cond="shift._type='SH' AND shift._status!='D' AND branch._id='".$branch_id."'";
*/
$table_name="_exam_service_school_add";
$column="_id,_school_name,_address,_contact_name,_contact_number, _status";
$where_cond="1=1";
$shift_list=$obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond);
//$qry4_shift=mysql_query("SELECT * FROM _int_institute_setup WHERE _type='SH'");




?>

<style type="text/css">
i{
	cursor:pointer;
}

</style>

<div class="row-fluid" >
								
								
	<table id="sample-table-22" class="table table-striped table-bordered table-hover">
	
		<thead>
			<th>Sl</th>
			<!--<th>School ID</th>-->
			<th>School Name</th>
            <th>Address</th>
            <th>Contact Name</th>
			<th>Contact No</th>
			<th>Logo</th>
			<th>Status</th>
			<th>Action</th>
		</thead>
		<tbody>
			<?php
				$sl=1;
				foreach($shift_list AS $index1=>$value1){
					
					
					
					echo "<tr>";
					echo "<td>".$sl."</td>";$sl++;
					//echo "<td>".$value1['_id']."</td>";
				//	echo "<td>".$branch_info[0]['institute']."</td>";
				//	echo "<td>".$branch_info[0]['branch']."</td>";
					echo "<td>".$value1['_school_name']."</td>";
					echo "<td>".$value1['_address']."</td>";
					echo "<td>".$value1['_contact_name']."</td>";
					echo "<td>".$value1['_contact_number']."</td>";
					echo "<td></td>";
					$selected_school_id = $value1['_id'];
					$isActive = $value1['_status'];
					if($isActive == 'A'){
						echo "<td style=\"color: green; font-weight: bold;\">Active</td>";	
					}
					else{
						echo "<td style=\"color: red; font-weight: bold;\">Inactive</td>";
					}
					echo '<td>';
								if($_SESSION['edit']=='Y'){
								echo '<i class="icon-edit bigger-170" style="hover:cursor;" href="#modal-add-school-table" data-toggle="modal" onclick="show_edit_exam_service_add_school_view('.$selected_school_id.')"></i>&nbsp;&nbsp;';
								}
								if($_SESSION['delete']=='Y'){								
								echo '<i class="icon-trash bigger-170" href="#modal-delete-add-school-table" data-toggle="modal" onclick="delete_data('.$selected_school_id.')" ></i>';
								}
							echo '</td>';
					echo "</tr>";
					
				}
			?>
		</tbody>	

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