<?php
session_start();
// ============ this file shows data in form for user to update in _exam_service_school_add table
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
$branch_id=$_SESSION['LOGIN_BRANCH'];
$selected_id_to_reg_edit=addslashes(trim($_GET['school_reg_id']));
$table_name="_exam_service_school_add a left join _exam_service_registration b on a._id=b._pid";
$column="a._id,a._school_name,b._exam_name,b._no_of_student,b._cost_per_student,b._total_amount,b._session, b._due_amount, b._paid_amount, b._discount_amount, b._last_paid_amount, b._status";
$where_cond="b._id=".$selected_id_to_reg_edit;
//echo $where_cond;
$shift_list=$obj->View_all_data_row_column_By_Cond($table_name,$column,$where_cond);
foreach($shift_list AS $index1=>$value1){
	$selected_school_name_reg_edit_input = $value1['_school_name'];
	$selected_exam_name_reg_edit_input = $value1['_exam_name'];
	$selected_num_of_student_reg_edit_input = $value1['_no_of_student'];
	$selected_cost_per_student_reg_edit_input = $value1['_cost_per_student'];
	$selected_total_amount_reg_edit_input = $value1['_total_amount'];
	$selected_session_reg_edit_input = $value1['_session'];
	$selected_due_amount_reg_edit_input = $value1['_due_amount'];
	$selected_paid_amount_reg_edit_input = $value1['_paid_amount'];
	$selected_discount_amount_reg_edit_input = $value1['_discount_amount'];
	$selected_last_paid_amount_reg_edit_input = $value1['_last_paid_amount'];
	$selected_payment_status_reg_edit_input = $value1['_status'];
}
?>
<script src="module/finance/js/exam_service_add_school.js" type="text/javascript"></script>
<?php if($_SESSION['add']=='Y'){ ?>
<div class="row-fluid">

	<form class="form-vertical" >
		
	<input type="hidden" id="branchid" name="branchid" value="<?php echo $_SESSION['LOGIN_BRANCH'];?>"/>
	<input type="hidden" id="selected_id_to_reg_edit" name="selectedidtoedit" value="<?php echo $selected_id_to_reg_edit;?>"/>		
	<input type="hidden" id="selected_payment_status_reg_edit" name="selectedidtoedit" value="<?php echo $selected_payment_status_reg_edit_input;?>"/>
	
	<div class="row-fluid" 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;">

		<div class="span3">
			<div class="control-group">
					<label class="control-label" for="form-field-1">School Name<font color="#FF0000">*</font></label>

				<div class="controls">
					<input type="text" class="small" id="edit_school_name_for_reg"  value="<?php echo $selected_school_name_reg_edit_input;?>" readonly="readonly" style="width: 200px;"/>
	  
				</div>
			</div>
		</div>
		<div class="span3">
			<div class="control-group">
				<label class="control-label" for="form-field-1" style="margin-left: 150px;">session<font color="#FF0000">*</font></label>
				<div class="controls">
					<input type="text" class="small" id="edit_session_for_reg"  value="<?php echo $selected_session_reg_edit_input;?>" readonly="readonly" style="width: 200px; margin-left: 150px;"/>
				</div>
			</div>
		</div>
	</div>		
	<div class="row-fluid" 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;">			
			<div class="span3">
				<div class="control-group">
					<label class="control-label" for="form-field-1">Exam Name<font color="#FF0000">*</font></label>
					<div class="controls">
						<input type="text" class="small" id="edit_exam_name_for_reg"  value="<?php echo $selected_exam_name_reg_edit_input;?>" readonly="readonly" style="width: 200px;"/>
					</div>
					
				</div>
				</div>
				<div class="span6">
				<div class="control-group">
				<label class="control-label" for="form-field-1" style="margin-left: 150px;">Due Amount<font color="#FF0000">*</font></label>
				<div class="controls">
					<input type="text" class="small" id="edit_due_amount_for_reg"  value="<?php echo $selected_due_amount_reg_edit_input;?>" readonly="readonly" style="width: 200px; margin-left: 150px;"/>
	  
				</div>
				</div>
		</div>
				
	</div>		
	<div class="row-fluid" 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;">		
			<div class="span3">
				<div class="control-group">
					<label class="control-label" for="form-field-1">No Of Student<font color="#FF0000">*</font></label>

					<div class="controls">
						<input type="text" class="small" id="edit_no_of_std_for_reg" value="<?php echo $selected_num_of_student_reg_edit_input;?>" style="width: 200px;"/> <!--onchange="update_total_with_updated_no_of_std()"-->
					</div>
				</div>
			</div>
			<div class="span6">
				<div class="control-group">
					<label class="control-label" for="form-field-1" style="margin-left: 150px;">Paid Amount<font color="#FF0000">*</font></label>

				<div class="controls">
					<input type="text" class="small" id="edit_paid_amount_for_reg"  value="<?php echo $selected_paid_amount_reg_edit_input;?>" readonly="readonly" style="width: 200px; margin-left: 150px;"/>
	  
				</div>							
				</div>			
			</div>
	</div>		
	<div class="row-fluid" 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;">						  
			<div class="span3">
				<div class="control-group">
					<label class="control-label" for="form-field-1">per student cost<font color="#FF0000">*</font></label>

					<div class="controls">
						<input type="text" class="small" id="edit_per_std_cost_for_reg"  value="<?php echo $selected_cost_per_student_reg_edit_input;?>" style="width: 200px;"/> <!--onchange="update_total_with_updated_cost_per_std()"-->
					</div>
				</div>
			</div>
			<div class="span6">
			<div class="control-group">
					<label class="control-label" for="form-field-1" style="width: 200px; margin-left: 150px;">Discount Amount<font color="#FF0000">*</font></label>

				<div class="controls">
					<input type="text" class="small" id="edit_discount_amount_for_reg"  value="<?php echo $selected_discount_amount_reg_edit_input;?>" readonly="readonly" style="width: 200px; margin-left: 150px;"/>
	  
				</div>
				</div>
			
			</div>						  
	</div>
								  
		<div class="row-fluid" 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;">
			<div class="span3">
				<div class="control-group">
					<label class="control-label" for="form-field-1" style="width: 200px;">Total Amount<font color="#FF0000">*</font></label>

				<div class="controls">
					<input type="text" class="small" id="edit_total_amount_for_reg" value="<?php echo $selected_total_amount_reg_edit_input;?>" style="width: 200px;"/>
				</div>
			</div>
		</div>
		<div class="span6" >
			<div class="control-group">
				<label class="control-label" for="form-field-1" style="width: 200px; margin-left: 150px;">Last Paid Amount<font color="#FF0000">*</font></label>

				<div class="controls">
					<input type="text" class="small" id="edit_last_paid_amount_for_reg"  value="<?php echo $selected_last_paid_amount_reg_edit_input;?>" readonly="readonly" style="width: 200px; margin-left: 150px;"/>
	  
				</div>
			</div>
		</div>						  
	</div>			
</form>
</div>
<?php } ?>
<script>
$('#timepicker1').timepicker({
					minuteStep: 1,
					showSeconds: false,
					showMeridian: false
				})
</script>