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

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

.select_list{
	width: 200px;
}

.input_sub{
	width: 185px;
}
.select_list1{
	width: 100px;
	float: left;
	margin-left: 3px;
	margin-right: 3px;
}


</style>


<script src="module/attendance/js/attendance_class.js" type="text/javascript"></script>


<div class="row-fluid" id="first_part"  style="background-color:#f5f5f5;-webkit-box-shadow: 0 8px 6px -6px black; -moz-box-shadow: 0 8px 6px -6px black; box-shadow: 0 8px 6px -6px black;">
<form class="form-vertical" >
	 <input type="hidden" id="branchid" name="branchid" value="<?php echo $_SESSION['LOGIN_BRANCH'];?>"/>
	   
<legend>
<div class="widget-header header-color-green2">
<h4 class="lighter smaller" style="font-weight:bold;">Class Wise Daily Attendance</h4>
</div>
</legend>

<div class="row-fluid">
	<div class="span3">
		<div class="control-group" >
			<label class="control-label" for="form-field-1">Select Shift<font color="#FF0000">*</font></label>

			<div class="controls">
			  	<select id="shift_id" onchange="call_medium(this.value)">
				<option value="">---SELECT---</option>
				<?php 
				$table_name="_int_institute_setup";
				$column="_id,_name";
				$where_cond="_pid='".$_SESSION['LOGIN_BRANCH']."' AND _type='SH' AND _status='A'";
				$data_list=$obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond);
									
				foreach($data_list AS $index1=>$data4_institute){ echo "<option value='".$data4_institute['_id']."'>".$data4_institute['_name']."</option>";
				}
				?>
				</select>
			</div>
		</div>
			
					
	</div>	
	
	<div class="span3">
		<div class="control-group" >
				<label class="control-label" for="form-field-1">Select Medium<font color="#FF0000">*</font></label>

				<div class="controls" id="branch_control">
					<select class="select_list" id="medium_id">
			   		<option value="">- - - - - -</option>
			    </select>
				</div>
			</div>
	</div>
	<div class="span3">
		<div class="control-group">
		<label class="control-label" for="form-field-1">&nbsp;&nbsp;Session <font color="#FF0000">*</font></label>
			<div class="controls">&nbsp;&nbsp;
				<select class="select_list" id="atd_session">
					<?php
						for ($x = date('Y'); $x >= date('Y')-1; $x--) {
					?>
					<option value="<?php echo $x; ?>"><?php echo $x; ?></option>
					<?php } ?>  
				</select>
			</div>
		</div>
	</div>
    <div class="span3">
		<div class="control-group" >
				<label class="control-label" for="form-field-1">Select Date<font color="#FF0000">*</font></label>

				<div class="controls" id="branch_control">
					<input id="att_date" name="att_date" class="date-picker" type="text" data-date-format="dd-mm-yyyy" placeholder="dd-mm-yyyy" value="<?php echo date('d-m-Y')?>"  />
				</div>
			</div>
	</div>
	</div>
	<div class="row-fluid">
		<div class="span3">
			<div class="control-group">
				<label class="control-label" for="form-field-1">&nbsp;</label>
				<div class="controls">
					<button class="btn btn-small btn-success" type="button" id="class_atd_create">
						<i class="icon-ok bigger-100"></i>
						Go
					</button>
				</div>
				</div>
		</div>
</div>

<!-- ========= -->

	<!--<div class="row-fluid">
	</div>-->	
</form>
</div>


<!-- ============================================================================ -->


<div class="row-fluid data_to_show_atd"  id="second_part">
</div>

<script type="text/javascript">

/*$('.date-picker').datepicker({
    format: 'dd/mm/yyyy',
    todayHighlight:'TRUE',
    startDate: '-0d',
    autoclose: true,
})*/


	 
	  /*$(document).ready(function () {
	  alert(1);
	var pickerOptions = {
           	changeMonth:false, 
           	changeYear:false,
           	changeDate:false,
           	dateFormat:"dd-mm-yy",
           	//minDate:new Date(),
			minDate:0,
           	maxDate:'+4'
        };
	 $(".date-picker").datepicker(pickerOptions);
	});*/
	
	$('.date-picker').datepicker().next().on(ace.click_event, function(){
     $(this).prev().focus();
	  
    });
	
	/*$("#btn_search").click(function(){
   	var date = $('#date').val();
	var datast_mfs ="date="+date;
	$("#data_to_show").show();
	$('#data_to_show').html("<span style='color:#2e8965;font-size:16px;font-weight:bold;text-align:center;'>Data Generating.... Please Wait.  <img src='php_crud/img/preloader.gif' /></span>");
	if(date==""){
		alert("Select Date");
		$('#date').focus();
		return false;
	}
	$('#data_to_show').load('module/fees/fee_collection_datatable.php',{'date':date},function(data){
			//alert(data);
		}); 
   });*/
</script>