-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckPrioritySubjects.php~
107 lines (97 loc) · 2.72 KB
/
CheckPrioritySubjects.php~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
session_start();
$user_name = "root";
$pass_word = "";
$database = "schoolschedule";
$server = "127.0.0.1";
$db_handle = mysql_connect($server,$user_name,$pass_word);
$db_found = mysql_select_db($database,$db_handle);
$ClassID=$_POST['ClassID'];
$_SESSION['ClassID']=$ClassID;
$SQLPriorityAssignment = "SELECT * FROM assignment WHERE (SubjectID='FAB' OR SubjectID='PHE') AND ClassID='$ClassID'";
$PriorityResult = mysql_query($SQLPriorityAssignment);
$num_rows = mysql_num_rows($PriorityResult);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="MyStyle.css" type="text/css" rel="stylesheet">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Schedule Generation</title>
</head>
<body>
<ul>
<li2>
<img src="logo.png" height="46" width="40">
</li2>
<li><a href="home.php">Home</a></li>
<li><a href="InsertionMenu.php">Data Insertion</a></li>
<li><a href="assignement.php">Teacher Assignment</a></li>
<li><a class="active" href="ScheduleGeneration.php">Generate Schedule</a></li>
<li><a href="#contact">Contact</a></li>
<ul style="float: right; list-style-type: none;">
<li>
<a href="#about">About</a></li>
<li>
<a href="#login">Login</a></li>
</ul>
</ul>
<div style="text-align: center; font-family: Arial;">
<h1>Schedule Generation</h1>
<table style="width: 100%; height: 514px; text-align: left; margin-left: auto; margin-right: auto;" background="tablebackground.png" border="1" cellpadding="0" cellspacing="0">
<?php
if($num_rows!=2) {
?>
<tr><td>
<center>
<img src="triangle-spin.gif"><font color="red"><h2>Warning</h2>
<center>
Ensure that all <i>Priority Subjects</i> have been assigned for <?php echo $ClassID; ?>
</font>
</center>
<br>
<table>
<tr>
<td>
<a href="assignement.php"><button type="button" style="height:50px; width:100px">Proceed</button></a>
</td>
</tr>
<tr>
<td>
<a href="SelectClass.php"><button type="button" style="height:50px; width:100px">Cancel</button></a>
</td>
</tr>
</tr></td>
<?php
}
else {
?>
<tr><td>
<center>
<img src="check-mark.png"><font color="green"><h2>Success</h2>
<center>
All <i>Priority Subjects</i> have been assigned for <?php echo $ClassID; ?>
</font>
</center>
<br>
<table>
<tr>
<td>
<form action="GenerationMenu.php" method="post">
<input type="hidden" name="ClassID" value="<?php echo $_POST['ClassID'];?>">
<input type="submit" value="Proceed" style="height:50px; width:100px">
</td>
</tr>
<tr>
<td>
<a href="SelectClass.php"><button type="button" style="height:50px; width:100px">Cancel</button></a>
</td>
</tr>
</tr></td>
<?php
}
?>
</table>
</center>
</table>
</div>
</body></html>