<?php
	$tuition = 0;
	$discount = 0;
	$cost = 0;
	$units=$_POST['txtUnits'];
	$course = $_POST['course'];
	$year = $_POST['year'];
	$scholar = $_POST['scholar'];
	$labFee = $_POST['txtLabFee'];
	$total = 0;
	$misce =2379.64;
	if($course == "BSIT")
		{if($year == "1ST")
			$cost = 10;
		elseif($year == "2ND")
			$cost = 20;
		elseif($year =="3RD")
			$cost = 30;
		elseif($year == "4TH")
			$cost = 5;}
	elseif($course == "BSCS")
		{if($year == "1ST")
			$cost = 11;
		elseif($year == "2ND")
			$cost = 21;
		elseif($year == "3RD")
			$cost = 31;
		elseif($year == "4TH")
			$cost = 6;}
	elseif($course == "BSEE")
		{if($year == "1ST")
			$cost = 1;
		elseif($year == "2ND")
			$cost = 2;
		elseif($year == "3RD")
			$cost = 3;
		elseif($year == "4TH")
			$cost = 4;
		elseif($year == "5TH")
			$cost = 5;}
	elseif($course == "BSCpE")
		{if($year == "1ST")
			$cost = 0.1;
		elseif($year == "2ND")
			$cost = 0.2;
		elseif($year == "3RD")
			$cost = 0.3;
		elseif($year == "4TH")
			$cost = 0.4;
		elseif($year == "5TH")
			$cost = 0.5;}
	if ($_POST['btnCompute'])
	{
		$tuition= $units * $cost;
		if($scholar == "PRESIDENTIAL")
		$discount = $tuition;
		elseif($scholar == "COLLEGE")
		$discount = $tuition / 2;
		elseif($scholar == "DEPARTMENT")
		$discount = $tuition / 4;
		$total = ($tuition - $discount) + $misce + $LabFee;
	}
?>
<HTML>
<link rel="shortcut icon" href="img/icon1.png">
<HEAD>
<TITLE>SCHEDULE</TITLE>
<META NAME="Generator" CONTENT="TextPad 4.6">
<META NAME="Author" CONTENT="?">
<META NAME="Keywords" CONTENT="?">
<META NAME="Description" CONTENT="?">
</HEAD>
<style>

table{
	border: 2px dashed #000;
	padding: 20px;
	padding-left: 30px;
	padding-right: 30px;
	background: #CCC;

}
td{
	padding-left: 20px;
	padding-right: 20px;
	padding-bottom: 10px;

}
.c1{
	width:90px;


}
.c{
	width:175px;
}
</style>
<BODY>
<br><br><br>


	1st Yr : IT 10/unit&nbsp;&nbsp;		1st Yr : EE 1/unit<br>
	2nd Yr : IT 20/unit&nbsp;&nbsp;		2nd Yr : EE 2/unit<br>
	3rd Yr : IT 30/unit&nbsp;&nbsp;		3rd Yr : EE 3/unit<br>
	4th Yr : IT 5/unit&nbsp;&nbsp;		4th Yr : EE 4/unit<br>
										5th Yr : EE 5/unit<br>


	1st Yr : CS11/unit&nbsp;&nbsp;		1st Yr : CpE 0.1/unit<br>
	2nd Yr : CS21/unit&nbsp;&nbsp;		2nd Yr : CpE 0.2/unit<br>
	3rd Yr : CS31/unit&nbsp;&nbsp;		3rd Yr : CpE 0.3/unit<br>
	4th Yr : CS6/unit&nbsp;&nbsp;		4th Yr : CpE0.4/unit<br>
										5th Yr : CPE 0.5/unit<br>

<form method="post">
<table align="center">
	<tr>
		<td>Input no. of Units</td>
		<td><input type="text" name="txtUnits" class="c"></td>
	</tr>

	<tr>
		<td>Select College</td>
		<td><Select class="c1">
								<option>CCS</option>
								<option>COE</option>
		</td>

	</tr>
	<tr>
		<td>Select Course</td>
		<td><Select class="c1" name = "course">
														<option>BSIT</option>
														<option>BSCS</option>
														<option>BSEE</option>
														<option>BSCpE</option>
			</td>
	</tr>
	<tr>
			<td>Select Year</td>
			<td><Select class="c1" name = "year">
												<option>1ST</option>
												<option>2ND</option>
												<option>3RD</option>
												<option>4TH</option>
												<option>5TH</option>
			</td>
	</tr>
	<tr>
			<td>Input Laboratory Fee</td>
			<td><input type="text" name="txtLabFee" class="c"></td>
	</tr>
	<tr>
				<td>Miscellaneous</td>
				<!--  <td><input type="text" name="txtMisc"</td>-->
				<td><b>P 2,379.64</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="CHANGE" name="btnChange"></td>
				<td></td>
	</tr>
	<tr>
	 		<td>Select Scholarship</td>
			<td><Select class="c" name="scholar">
									<option>   SELECT TYPE   </option>
									<option>PRESIDENTIAL</option>
									<option>COLLEGE</option>
									<option>DEPARTMENT</option>
			</td>

	</tr>
	<?php
	if ($_POST['btnCompute'])
	{

			echo "<tr>";
						echo "<td>Tuition Fee</td>";
						echo "<td><b>". $tuition. "</b></td>";
			echo "</tr>";
			echo "<tr>";
						echo "<td>Discount Amount</td>";
						echo "<td><b>". $discount."</b></td>";
			echo "</tr>";
			echo "<tr>";
							echo "<td>TOTAL</td>";
							echo "<td><b>". $total."</b></td>";
			echo "</tr>";
	}
	?>
	<td colspan="3"><center><input type="submit" value="Compute" name="btnCompute"><input type="button" value="Clear" name="btnClear"><input type="button" value="Exit" name="btnExit"></td>
	</tr>

</table>


</BODY>
</HTML>