Documente Academic
Documente Profesional
Documente Cultură
by
Ary a S ing h (1 84 7 21 5 )
Hi man sh u Mish ra (1847 22 7 )
J ay aram G S (18 4 72 30 )
Octob er - 20 19
CERTIFICATE
T hi s is to cer ti fy th a t th e r ep or t t it led T im e Ta bl e
Gen er ator is a bo na f id e record of wor k d o ne b y Ar ya
S ingh (1847215), Him a ns hu M i shr a (1 84 72 2 7) and
Jaya ram G S (184 7 23 0 ) o f C HRIS T (De emed to b e
Univ er si ty), Ban ga lo re, in p a rt ial fu lfi llm en t of the
r equir ement s of III S emest er M C A du r in g t he y ea r
2019 .
V a l u e d -b y :
Name :
1. Register Number :
Examination Centre : CHRIST
(Deemed to be
University)
2. Date of Exam :
Time Table Generator iii
ACKNOWLEDGEMENTS
We take this opportunity to thank all the people who have been supportive throughout
this project.
First, we would like to thank Prof. Joy Paulose, Head of the Department, Computer
Science, CHRIST (Deemed to be University), for his assistance in completion of our
project.
Second, we would like to thank our project guide, Dr. Arul Kumar N, Assistant
Professor, Department of Computer Science, who has been a constant support in the
process of completing this project.
We would also like to thank Dr. Tulasi B, Co-Ordinator, Department of Computer
Science, for her constant support in the process of completing this project.
Lastly, we would like to thank all our faculties, friends and family for their support and
guidance for the project.
ABSTRACT
In every institution, the time table is prepared either in a logbook or a computerized
system. Using the logbook is the traditional way for maintaining the time tables. There
are some computerized systems that are used in place of the logbook, but some
drawbacks still exist in those systems such as, they are time consuming, insecure and they
provide inconsistent data.
The project Time Table Generator is developed to overcome the above- mentioned
constraints. This system keeps track of all the student’s and faculty’s details such as
department, courses etc. The system is being made for online purpose so that each student
and the faculty can use it to view the time table anywhere and at any point of time. Each
person will be given a username and password to login into the system thus increasing
the security of the system. Any modifications made in the time table by the admin will
automatically be reflected in the corresponding time table that can be viewed in the
student’s or the faculty’s account. This way the users can check their time table regularly.
Time Table Generator is aimed at reducing paperwork and manipulation of data and also
ensures that the data is safe and centralized.
1. CERTIFICATE i
2. ACKNOWLEDGEMENT iii
3. ABSTRACT iv
4. TABLE OF CONTENTS v
7. CHAPTER 1: INTRODUCTION 1
1.1. BACKGROUND STUDY 2
1.1.1. LITERATURE SURVEY 2
1.1.2. TECHNOLOGY USED 3
1.1.3. DATABASE USED
4
8. CHAPTER 2: SYSTEM REQUIREMENTS 5
2.1. FUNCTIONAL REQUIREMENTS 5
2.2. MODULE DESCRIPTION 6
2.3. NON-FUNCTIONAL REQUIREMENTS 7
2.4. HARDWARE REQUIREMENTS 7
2.5. SOFTWARE REQUIREMENTS 7
9. CHAPTER 3: DESIGN SPECIFICATION 8
3.1. DIAGRAMS 8
3.1.1. DATA FLOW DIAGRAM (DFD) 8
3.1.2. ER DIAGRAM 9
10. CHAPTER 4: IMPLEMENTATION DETAILS 10
4.1. INTERFACE DESIGN 10
4.2. TABLE STRUCTURES 21
4.3. CODE IMPLEMENTATION 25
11. CHAPTER 5: TESTING 64
5.1. TEST CASES 64
12. CONCLUSION 73
13. BIBLIOGRAPHY 74
Time Table Generator vii
LIST OF FIGURES
FIGURE NO. FIGURE NAME PAGE NO.
4.1 LOGIN 11
4.2 FORGOT PASSWORD 11
4.3 RESET PASSWORD 12
4.4 DASHBOARD (HOME) 12
4.5 ADD FACULTY 13
4.6 REMOVE FACULTY 13
4.7 UPDATE FACULTY 14
4.8 ASSIGN SUBJECT 14
4.9 UNASSIGN SUBJECT 15
4.10 ASSIGN HOD 15
4.11 UNASSIGN HOD 16
4.12 ADD STUDENT 16
4.13 REMOVE STUDENT 17
4.14 ADD HOLIDAY 17
4.15 REMOVE HOLIDAY 18
4.16 VIEW HOLIDAY 18
4.17 ADD SCHEDULE 19
4.18 VIEW SCHEDULE 19
4.19 SEARCH FACULTY 20
4.20 VIEW FACULTY TIME TABLE 20
4.21 VIEW CLASS TIME TABLE 21
LIST OF TABLES
TABLE NO. TABLE NAME PAGE NO.
4.22 LOGIN 21
4.23 ADMIN DETAILS 21
4.24 ASSIGN 21
4.25 CLASSES 22
4.26 CLASS HOURS 22
4.27 COURSE 22
4.28 COURSE DETAILS 22
4.29 DEPARTMENT 23
4.30 FACULTY 23
4.31 HOURS CONDUCTED 23
4.32 NEW PASSWORD 24
4.33 SECTIONS 24
4.34 SEMESTER 24
4.35 STUDENT DETAILS 24
4.36 SUBJECTS 25
4.37 SUBJECT SCHEDULE 25
4.38 WEEK DAYS 25
CHAPTER 1
INTRODUCTION
The existing system of the time-table generator includes generating a time-table by using
either a log book or a computerized system. Using the logbook is a traditional way for
maintaining a time table. There are some computerized systems that are being used in
place of the logbook, but some drawbacks still exist in those systems such as, it is a time-
consuming method of generating a time-table, data is highly insecure or inconsistent in
some scenarios and the chance of loss of data can be high.
The Proposed system keeps track of the student’s and faculty’s details such as
department, courses etc., The system is being made for online purpose so that each
student and the faculty can use it to view the time table anywhere and at any point of
time. Each person will be given a username and password to login into the system thus
increasing the security of the system. Any modification made in the time table by the
admin will automatically be reflected in the corresponding time-table that can be viewed
in the student’s or the faculty’s account.
The system Time-Table Generator, can be used to manage all the class’s schedule and
will be helpful for any faculty, as a notification will be sent to their account regarding
their respective class hour. The system can be used to manage time-table when any
faculty is absent, arriving late or taking a leave. The strain and efforts on faculty reduces
as their class details and maximum workload is managed by the system. The students
and the faculties can use the system to apply for a leave by providing leave required date
and the reason. By this, selecting a faculty as a substitute becomes easy. The substitute
faculty can approve or reject the request. Admin and Head of the Department (HOD),
can view the request sent by faculty and view the substitute’s response. The system is a
comprehensive time-table management solution for the colleges, which helps to
overcome the challenges faced in the existing and system.
Time table generation is tedious job for educationalist with respect to time and
man power. Providing an automatic time table generator will help to generate time
table automatically. Proposed system of our project will help to generate it
automatically also helps to save time. It avoids the complexity of setting and
managing Timetable manually. The system will take various inputs like number
of subjects, teachers, workload of a teacher, semester etc., By relying on these
inputs, it will generate possible time tables for working days of the week for
teaching faculty. This will integrate by making optimal use of all resources in a
way that will best suit the constraints [1].
The manual system of preparing time table in colleges with large number of
students is very time consuming and usually ends up with various classes clashing
either at same room or with same teachers having more than one class at a time.
To overcome all these problems, propose to make an automated system. The
system will take various inputs like details of students, subjects and class rooms
and teachers available, depending upon these inputs it will generate a possible
time table, making optimal utilization of all resources in a way that will best suit
any of constraints or college rules. List of subjects may include electives as well
as core subjects [2].
solve this problem. There are still serious problems like generation of high cost
time table. Therefore, there is a great requirement for an application distributing
the course evenly and without collisions. Our aim here is to develop a simple,
easily understandable, efficient and portable application, which could
automatically generate good quality time tables within seconds. In this paper, we
have described the different techniques that have been developed for timetable
generation [3].
Many colleges use manual way of preparing timetables with large number of
students is very time consuming. This usually ends up with various courses
clashing this may be either at same room or with same teachers having more than
one course at a time. These are just due to common human errors which are very
difficult to prevent in the processes. To avoid these problems people usually
taking the previous years’ timetable and modifying it but still it is a difficult job to
do incorporate changes. To overcome all these problems, we propose this system.
This system will take various inputs like details of students, subjects and
classrooms and teachers available, depending upon these input it will generate
possible timetable, making the utilization of all of these resources in a way that
will best suit any of constrains of college rules [4].
Hyper Text Mark-Up Language (HTML) is the standard mark up language for
creating web pages and web applications. With Cascading Style Sheets (CSS)
and JavaScript, it forms a triad of cornerstone technologies for the World Wide
Web browsers receive HTML documents from a web server or from local storage
and render the documents into multimedia web pages. HTML describes the
structure of a web page semantically and originally included cues for the
appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML
constructs, images and other objects such as interactive forms may be embedded
into the rendered page. HTML provides a means to create structures
CHAPTER 2
SYSTEM REQUIREMENTS
2.1 Functional requirements
The functional requirements specify relationship between the inputs and outputs. All the
operations to be performed on the input data to obtain output are to be specified. This
includes specifying the validity checks on the input and output data, parameters affected
by the operations and the other operations, which must be used to transform the inputs
into outputs. Functional requirements specify the behaviour of the system for valid input
and outputs.
Give below are the functional requirements of the system:
Function Description
b. Report
A consolidated report of the sessions held by the faculties can be generated at any
interval of time.
c. Student
In this module student can login with the Username and Password which is uniquely
identified for every individual. After logging in into the system, the student can view
his/her respective class time-table.
d. Subject Allocation
In this module, the required faculties are assigned to their respective subjects of
different classes belonging to same or different department.
e. Faculty
In this module faculty can login with Username and Password which are given to
every faculty and it is unique for every individual faculty of the department. The
faculty members are assigned with different subjects and they can view their
respective individual time-table.
f. Login
Admin has access to all the pages and any changes or modification done by him/her
will affect the system. The Admin can add or remove HODs, faculties and students
as and when necessary.
CHAPTER 3
DESIGN SPECIFICATION
3.1 DIAGRAMS
3.1.1 Data Flow Diagram (DFD)
CHAPTER 4
IMPLEMENTATION DETAILS
4.1 Interface design
a. Login
b. Forgot password
c. Reset password
d. Dashboard (Home)
e. Add faculty
f. Remove faculty
g. Update faculty
h. Assign subject
i. Unassign subject
j. Assign HOD
k. Unassign HOD
l. Add student
m. Remove student
n. Add holiday
o. Remove holiday
p. View holiday
q. Add schedule
r. View schedule
s. Search faculty
b. Admin details
d. Classes
e. Class hours
f. Course
g. Course details
h. Department
i. Faculty
k. Hours conducted
l. New password
m. Sections
n. Semester
o. Student details
p. Subjects
q. Subject schedule
r. Week days
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" />
<link rel="stylesheet" type="text/css"
href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-
awesome.min.css">
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<link rel="stylesheet" type="text/css" href="vendor/css-
hamburgers/hamburgers.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div class="limiter">
<div class="container-login100">
<!-- <div class="wrap-login100"> -->
<div class="login100-pic js-tilt" data-tilt>
<img src="images/tt1.png" alt="IMG">
</div>
action="../verify_login.php">
<span class="login100-form-title">
Time Table Generator
</span>
<div class="container-login100-form-btn">
<button class="login100-form-btn" name='login'>
Login
</button>
</div>
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/tilt/tilt.jquery.min.js"></script>
<script>
$('.js-tilt').tilt({
scale: 1.1
})
</script>
<script src="js/main.js"></script>
</body>
</html>
<?php
if (!isset($_SESSION)) {
session_start();
}
include 'boot.php';
include 'conn.php';
include 'admin_top.php';
$flag = 0;
if (isset($_POST['submit'])) {
$fname = $_POST['fname'];
$mname = $_POST['mname'];
$lname = $_POST['lname'];
$pno = $_POST['pno'];
$email = $_POST['email'];
$exp = $_POST['exp'];
$uname = $_POST['uname'];
$pass = md5($_POST['pass']);
$conf_pass = md5($_POST['conf_pass']);
$dept = $_POST['dept'];
if ($pass != $conf_pass) {
echo "<script type='text/javascript'>alert(\"Passwords do not match. Please try
again!\");</script>";
header("refresh:0;url=add_faculty.php");
exit();
}
if ($uname == $r2['fact_id']) {
echo "<script type='text/javascript'>alert(\"Username already in use. Please enter
different ID!\");</script>";
header("refresh:0;url=add_faculty.php");
exit();
}
if ($dept == "-1") {
echo "<script type='text/javascript'>alert(\"Department is not
selected!\");</script>";
header("refresh:0;url=add_faculty.php");
exit();
if ($sql) {
//FOR FACULTY DEPARTMENT
$sql2 = mysqli_query($conn, "INSERT INTO faculty (fact_id, dept_id)
VALUES ('$uname', '$deptid[dept_id]')");
if ($sql2) {
//FOR INSERT INTO LOGIN TABLE
$sql3 = mysqli_query($conn, "INSERT INTO login (username, password,
level) VALUES ('$uname','$pass','2')");
if ($sql3) {
// echo "work";
$flag = 1;
}
}
}
}
?>
<head>
<link rel="icon" type="image/png" href="images/icons/favicon.png"/>
<title> Faculty Details </title>
<style>
body {
background-image: url("pics/black.jpg");
background-color: #1e1e1e;
background-repeat: repeat-x;
background-attachment: fixed;
color: white;
background-size: 100%;
font-family: verdana, sans-serif;
/*background-color: #2b4162;*/
/*background-image: linear-gradient(315deg, #2b4162 0%, #12100e 74%);*/
}
.txt9 {
color: white;
font-size: 18px;
}
.bo-rad-10 {
border-radius: 10px;
}
.txt10 {
font-family: Montserrat, sans-serif;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.sizefull {
width: 100%;
height: 100%;
}
</style>
<script>
function validateAlpha1() {
var textInput = document.getElementById("fname").value;
textInput = textInput.replace(/[^A-Za-z]/g, "");
document.getElementById("fname").value = textInput;
}
function validateAlpha2() {
var textInput = document.getElementById("mname").value;
function validateAlpha3() {
var textInput = document.getElementById("lname").value;
textInput = textInput.replace(/[^A-Za-z]/g, "");
document.getElementById("lname").value = textInput;
}
function isNumberKey() {
var textInput = document.getElementById("pno").value;
textInput = textInput.replace(/[^0-9]/g, "");
document.getElementById("pno").value = textInput;
function ValidateEmail() {
var email = document.getElementById("email").value;
// var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-
]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
var expr = /^([\w-.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-
]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$/;
if (!expr.test(email)) {
alert("Invalid email address.");
document.getElementById("email").value = "";
}
}
</script>
</head>
<body>
<div class="animsition" style="top: 180px; position: relative">
<div align="center">
<b>
<h1 style="font-family:Matura MT Script Capitals,sans-serif; font-
size:45px;">
Add Faculty!
</h1>
</b>
<br/><br/>
<?php
if ($flag == 1) {
?>
<div>
<h1 style="font-size:18px" class="btn btn-info"> Faculty <strong
style="text-transform: capitalize;"><?php echo $fname ?></strong>
is added successfully! :)
</h1>
</div>
<?php
header("refresh:3;url=add_faculty.php");
}
?>
<br/>
<div class="col-md-6">
<span class="txt9">
First Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10 p-
l-20" type="text"
id="fname" name="fname" oninput="validateAlpha1();" required>
</div>
<span class="txt9">
Middle Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10 p-
l-20" type="text"
id="mname" name="mname" oninput="validateAlpha2();"/>
</div>
<span class="txt9">
Last Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10 p-
l-20" type="text"
id="lname" name="lname" oninput="validateAlpha3();" required>
</div>
<span class="txt9">
Phone Number:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" maxlength="10"
type="text" name="pno"
oninput="isNumberKey()" id="pno" required>
</div>
<span class="txt9">
Email ID:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input style='text-transform:lowercase' class="bo-rad-10 sizefull txt10 p-
l-20" type="text"
name="email" id="email" onblur="ValidateEmail();" required>
</div>
</div>
<div class="col-md-6">
<span class="txt9">
Department:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<select class="bo-rad-10 sizefull txt10 p-l-20" name="dept" id="dept"
required
style='text-transform: Uppercase;'/>
<option value="-1"> ---- select ----</option>
<?php
$d1 = mysqli_query($conn, "SELECT DISTINCT dept_name from
department");
while ($d2 = mysqli_fetch_array($d1)) {
echo "<option value='" . $d2['dept_name'] . "'>" . $d2['dept_name'] .
"</option>";
}
?>
</select>
</div>
<span class="txt9">
Username:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" maxlength="10"
type="text" name="uname"
id="uname" value="<?php echo $my_array[0] . "_" . $new_id; ?>"
required
readonly="readonly">
</div>
<span class="txt9">
Password:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" type="password"
name="pass" id="pass"
required>
</div>
<span class="txt9">
Confirm Password:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" type="password"
name="conf_pass"
id="conf_pass" required>
</div>
<span class="txt9">
Experience:
</span>
</form>
</div>
<div class="end-footer bg2" style="top: 100px; position: relative">
<div class="container">
<div class="flex-sb-m flex-w p-t-22 p-b-22">
<div class="p-t-5 p-b-5">
<a href="#" class="fs-15 c-white"><i class="fa fa-tripadvisor" aria-
hidden="true"></i></a>
<a href="#" class="fs-15 c-white"><i class="fa fa-facebook m-l-18" aria-
hidden="true"></i></a>
<a href="#" class="fs-15 c-white"><i class="fa fa-twitter m-l-18" aria-
hidden="true"></i></a>
</div>
</html>
c. Remove faculty
<?php
include 'boot.php';
include 'conn.php';
include 'admin_top.php';
if (isset($_POST['submit'])) {
$username = $_POST["username"];
if ($username == "-1") {
echo "<script type='text/javascript'>alert(\"Faculty ID is not
selected!\");</script>";
header("refresh:0;url=remove_faculty.php");
exit();
}
?>
<head>
.txt9 {
color: white;
font-size: 18px;
}
.bo-rad-10 {
border-radius: 10px;
}
.txt10 {
font-family: Montserrat, sans-serif;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.sizefull {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="animsition">
<div align="center" style="position: relative; top:200px;">
<b>
<h1 style="font-family:Matura MT Script Capitals,sans-serif; font-
size:45px;">
Remove Faculty!
</h1>
</b><br/> <br/>
<form id="form1" name="form1" method="post" action="">
<span class="txt9">
Faculty ID:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-relative
txt10 m-10">
<select class="bo-rad-10 sizefull txt10 p-l-20" name="username" required
style='text - transform: Uppercase;'/>
<option value="-1"> ---- select ----</option>
<?php
$d1 = mysqli_query($conn, "SELECT fact_id from faculty");
while ($d2 = mysqli_fetch_array($d1)) {
echo "<option value='" . $d2['fact_id'] . "'>" . $d2['fact_id'] . "</option>";
}
?>
</select>
</div>
<input type="submit" name="submit" id="submit" value="Submit" class="btn
btn-success"/>
</form>
<br/>
</div>
</div>
<div class="end-footer bg2" style="position: relative; top:608px;">
<div class="container">
<div class="flex-sb-m flex-w p-t-22 p-b-22">
<div class="p-t-5 p-b-5">
<a href="#" class="fs-15 c-white"><i class="fa fa-tripadvisor" aria-
hidden="true"></i></a>
<a href="#" class="fs-15 c-white"><i class="fa fa-facebook m-l-18" aria-
hidden="true"></i></a>
<a href="#" class="fs-15 c-white"><i class="fa fa-twitter m-l-18" aria-
hidden="true"></i></a>
</div>
</div>
</div>
</body>
</html>
d. Update faculty
<?php
ob_start();
include 'boot.php';
include 'conn.php';
include 'admin_top.php';
if (isset($_POST['update'])) {
$f_id = $_SESSION["CURR_FACT_ID"];
$f_name = $_POST['fname'];
$m_name = $_POST['mname'];
$l_name = $_POST['lname'];
$pno = $_POST['pno'];
$email = $_POST['email'];
$experience = $_POST['exp'];
$dept = $_POST['dept'];
<head>
<link rel="icon" type="image/png" href="images/icons/favicon.png"/>
<title>
Faculty Update
</title>
<style>
body {
background-image: url("pics/black.jpg");
background-color: #1e1e1e;
background-repeat: repeat-x;
background-attachment: fixed;
color: white;
background-size: 100%;
font-family: verdana, sans-serif;
}
.txt9 {
color: white;
font-size: 18px;
}
.bo-rad-10 {
border-radius: 10px;
}
.txt10 {
font-family: Montserrat, sans-serif;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.sizefull {
width: 100%;
height: 100%;
}
</style>
<script>
function validateAlpha1() {
var textInput = document.getElementById("fname").value;
textInput = textInput.replace(/[^A-Za-z]/g, "");
document.getElementById("fname").value = textInput;
}
function validateAlpha2() {
var textInput = document.getElementById("mname").value;
textInput = textInput.replace(/[^A-Za-z]/g, "");
document.getElementById("mname").value = textInput;
}
function validateAlpha3() {
var textInput = document.getElementById("lname").value;
textInput = textInput.replace(/[^A-Za-z]/g, "");
document.getElementById("lname").value = textInput;
}
function isNumberKey() {
var textInput = document.getElementById("pno").value;
textInput = textInput.replace(/[^0-9]/g, "");
document.getElementById("pno").value = textInput;
function ValidateEmail() {
var email = document.getElementById("email").value;
// var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-
]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
</head>
<body class="animsition">
<div style="top: 180px; position: relative">
<div align="center">
<b>
<h1 style="font-family:Matura MT Script Capitals,serif; font-size:45px;">
Update Faculty!
</h1>
</b><br/> <br/>
<?php
if (isset($_POST["search"])) {
if ($_POST['fact_id'] == "-1") {
echo "<script type='text/javascript'>alert(\"Faculty ID is not
selected!\");</script>";
header("refresh:0;url=update_faculty.php");
exit();
}
$_SESSION['CURR_FACT_ID'] = $_POST['fact_id'];
$qu1 = mysqli_query($conn, "SELECT * from faculty_details where fact_id
= '$_POST[fact_id]'");
$qu2 = mysqli_fetch_assoc($qu1);
?>
<form name="alloc" method=post action="update_faculty.php"
class="wrap-form-reservation size22 m-l-r-auto">
<div class="col-md-6">
<span class="txt9">
First Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10
p-l-20"
type="text" value="<?php echo $qu2['f_name']; ?>"
id="fname" name="fname" oninput="validateAlpha1();"
required>
</div>
<span class="txt9">
Middle Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10
p-l-20"
type="text" value="<?php echo $qu2['m_name']; ?>"
id="mname" name="mname" oninput="validateAlpha2();"/>
</div>
<span class="txt9">
Last Name:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input style='text-transform:uppercase' class="bo-rad-10 sizefull txt10
p-l-20"
type="text" value="<?php echo $qu2['l_name']; ?>"
id="lname" name="lname" oninput="validateAlpha3();" required>
</div>
<span class="txt9">
Phone Number:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" maxlength="10"
type="text" name="pno"
oninput="isNumberKey()" id="pno" required
value="<?php echo $qu2['phone_no']; ?>">
</div>
</div>
<div class="col-md-6">
<span class="txt9">
Email ID:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input style='text-transform:lowercase' class="bo-rad-10 sizefull txt10
p-l-20"
type="text" value="<?php echo $qu2['email']; ?>"
name="email" id="email" onblur="ValidateEmail();" required>
</div>
<span class="txt9">
Department:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<select class="bo-rad-10 sizefull txt10 p-l-20" name="dept" id="dept"
required
style='text-transform: Uppercase;'/>
<?php
<span class="txt9">
Experience:
</span>
<div class="wrap-input-signup size17 bo2 bo-rad-10 bgwhite pos-
relative txt10 m-10">
<input class="bo-rad-10 sizefull txt10 p-l-20" type="text" name="exp"
id="exp"
value="<?php echo $qu2['experience']; ?>"
oninput="isNumberKey()" maxlength="2" required/>
</div>
<br>
</div>
</div>
</div>
<?php
}
?>
</body>
</html>
<?php
if (!isset($_SESSION)) {
session_start();
}
include 'boot.php';
include 'conn.php';
if ($_SESSION["level"] == 0) {
include 'admin_top.php';
}
if ($_SESSION["level"] == 2) {
include 'fact_top.php';
}
<head>
<title>Faculty Time-Table</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<style>
body {
color: white;
background-image: url(pics/black.jpg);
background-size: 100%;
background-attachment: fixed;
background-repeat: no-repeat;
overflow: hidden;
}
table {
border-radius: 6%;
}
</style>
</head>
<body class="animsition">
<div class="item-slick1 item1-slick1">
<?php
if ($_SESSION["level"] == 0) { ?>
<div align=center style="top: 180px; position: relative">
<?php
}else
if ($_SESSION["level"] == 2) { ?>
<div align=center style="top: 110px; position: relative">
<?php
} ?>
<b>
<h1 style="font-family:Matura MT Script Capitals, sans-serif; font-
size:45px;">Time-Table </h1>
</b><br/>
<div style="font-family:acme,sans-serif; font-size:24px;">
</div>
<div class="container">
<div style=text-transform:capitalize;>
<!-- <table class="table table-dark" style="font-
family:candara">-->
<table class="table table-light table-hover" style="font-family:candara, sans-
serif">
<thead><th></th>
<th>Faculty ID: <?php echo $fid ?></th>
<th></th>
<th></th>
<th></th>
<th> Faculty Name: <?php echo $ft2['f_name']." ".$ft2['m_name']."
".$ft2['l_name'] ?> </th>
<th></th>
</thead>
<thead align='center'>
<tr>
<th scope="col"> Date & Time</th>
<th> 09 : 00 AM- 10:00 AM</th>
<th> 10 : 00 AM- 11:00 AM</th>
<th> 11 : 00 AM- 12:00 PM</th>
<th> 12 : 00 PM- 01:00 PM</th>
<th> 02 : 00 PM- 03:00 PM</th>
<th> 03 : 00 PM- 04:00 PM</th>
</tr>
</thead>
<tbody align='center'>
<!-- monday code-->
<tr>
<td>Monday</td>
<td> <?php
$mon1 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='1'
and day_id='M'");
while ($mon_q1 = mysqli_fetch_array($mon1)) {
$mon_w1 = mysqli_query($conn, "select * from subjects where
sub_id = '$mon_q1[sub_id]'");
while ($mon_p1 = mysqli_fetch_array($mon_w1)) {
}
}
?>
</td>
</tr>
<!-- TUESDAY CODE-->
<tr>
<td>Tuesday</td>
<td> <?php
$tue1 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='1'
and day_id='T'");
while ($tue_q1 = mysqli_fetch_array($tue1)) {
$tue_w1 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$tue_q1[sub_id]'");
while ($tue_p1 = mysqli_fetch_array($tue_w1)) {
if (($tue_q1['day_id'] == "T") && ($tue_q1['hour_id'] == 1)) {
echo($tue_p1['sub_name']);
}
}
}
?>
</td>
<td> <?php
$tue2 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='2'
and day_id ='T'");
while ($tue_q2 = mysqli_fetch_array($tue2)) {
$tue_w2 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$tue_q2[sub_id]'");
while ($tue_p2 = mysqli_fetch_array($tue_w2)) {
if (($tue_q2['day_id'] == "T") && ($tue_q2['hour_id'] == 2)) {
echo($tue_p2['sub_name']);
}
}
}
?>
</td>
<td> <?php
$tue3 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='3'
and day_id='T'");
{
echo($wed_p2['sub_name']);
}
}
}
?>
</td>
<td> <?php
$wed3 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='3'
and day_id='W'");
while ($wed_q3 = mysqli_fetch_array($wed3)) {
$wed_w3 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$wed_q3[sub_id]'");
while ($wed_p3 = mysqli_fetch_array($wed_w3)) {
if (($wed_q3['day_id'] == "W") && ($wed_q3['hour_id'] == 3))
{
echo($wed_p3['sub_name']);
}
}
}
?>
</td>
<td> <?php
$wed4 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='4'
and day_id='W'");
while ($wed_q4 = mysqli_fetch_array($wed4)) {
$wed_w4 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$wed_q4[sub_id]'");
while ($wed_p4 = mysqli_fetch_array($wed_w4)) {
if (($wed_q4['day_id'] == "W") && ($wed_q4['hour_id'] == 4))
{
echo($wed_p4['sub_name']);
}
}
}
?>
</td>
<td> <?php
$wed5 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='5'
and day_id='W'");
while ($wed_q5 = mysqli_fetch_array($wed5)) {
$wed_w5 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$wed_q5[sub_id]'");
while ($wed_p5 = mysqli_fetch_array($wed_w5)) {
if (($wed_q5['day_id'] == "W") && ($wed_q5['hour_id'] == 5))
{
echo($wed_p5['sub_name']);
}
}
}
?>
</td>
<td> <?php
$wed6 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='6'
and day_id='W'");
while ($wed_q6 = mysqli_fetch_array($wed6)) {
$wed_w6 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$wed_q6[sub_id]'");
while ($wed_p6 = mysqli_fetch_array($wed_w6)) {
if (($wed_q6['day_id'] == "W") && ($wed_q6['hour_id'] == 6))
{
echo($wed_p6['sub_name']);
}
}
}
?>
</td>
</tr>
<tr>
<td>Thursday</td>
<td> <?php
$thur1 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='1'
and day_id='M'");
while ($thur_q1 = mysqli_fetch_array($thur1)) {
$thur_w1 = mysqli_query($conn, "select * from subjects where
sub_id = '$thur_q1[sub_id]'");
while ($thur_p1 = mysqli_fetch_array($thur_w1)) {
if (($thur_q1['day_id'] == "Th") && ($thur_q1['hour_id'] == 1))
{
echo($thur_p1['sub_name']);
}
}
}
?>
</td>
<td> <?php
$thur2 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='1'
and day_id='M'");
while ($thur_q2 = mysqli_fetch_array($thur2)) {
$thur_w2 = mysqli_query($conn, "select * from subjects where
sub_id = '$thur_q1[sub_id]'");
while ($thur_p2 = mysqli_fetch_array($thur_w2)) {
if (($thur_q2['day_id'] == "Th") && ($thur_q2['hour_id'] == 2))
{
echo($thur_p2['sub_name']);
}
}
}
?>
</td>
<td> <?php
$thur3 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='3'
and day_id='Th'");
while ($thur_q3 = mysqli_fetch_assoc($thur3)) {
$thur_w3 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$thur_q3[sub_id]'");
while ($thur_p3 = mysqli_fetch_assoc($thur_w3)) {
if (($thur_q3['day_id'] == "Th") && ($thur_q3['hour_id'] == 3))
{
echo($thur_p3['sub_name']);
}
}
}
?>
</td>
<td> <?php
$thur4 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='4'
and day_id='Th'");
while ($thur_q4 = mysqli_fetch_assoc($thur4)) {
$thur_w4 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$thur_q4[sub_id]'");
while ($thur_p4 = mysqli_fetch_assoc($thur_w4)) {
if (($thur_q4['day_id'] == "Th") && ($thur_q4['hour_id'] == 4))
{
echo($thur_p4['sub_name']);
}
}
}
?>
</td>
<td> <?php
$thur5 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='5'
and day_id='Th'");
while ($thur_q5 = mysqli_fetch_assoc($thur5)) {
$thur_w6 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$thur_q6[sub_id]'");
while ($thur_p5 = mysqli_fetch_assoc($thur_w5)) {
if (($thur_q5['day_id'] == "Th") && ($thur_q5['hour_id'] == 5))
{
echo($thur_p5['sub_name']);
}
}
}
?>
</td>
<td> <?php
$thur6 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='6'
and day_id='Th'");
while ($thur_q6 = mysqli_fetch_assoc($thur6)) {
$thur_w5 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$thur_q5[sub_id]'");
while ($thur_p6 = mysqli_fetch_assoc($thur_w6)) {
if (($thur_q6['day_id'] == "Th") && ($thur_q6['hour_id'] == 6))
{
echo($thur_p6['sub_name']);
}
}
}
?>
</td>
</tr>
<tr>
<td>Friday</td>
<td> <?php
$fri1 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='1'
and day_id='F'");
while ($fri_q1 = mysqli_fetch_assoc($fri1)) {
$fri_w1 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$fri_q1[sub_id]'");
while ($fri_p1 = mysqli_fetch_assoc($fri_w1)) {
if (($fri_q1['day_id'] == "F") && ($fri_q1['hour_id'] == 1)) {
echo($fri_p1['sub_name']);
}
}
}
?>
</td>
<td> <?php
$fri2 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='2'
and day_id='F'");
while ($fri_q2 = mysqli_fetch_assoc($fri2)) {
$fri_w2 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$fri_q2[sub_id]'");
while ($fri_p2 = mysqli_fetch_assoc($fri_w2)) {
if (($fri_q2['day_id'] == "F") && ($fri_q2['hour_id'] == 2)) {
echo($fri_p2['sub_name']);
}
}
}
?>
</td>
<td> <?php
$fri3 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='3'
and day_id='F'");
while ($fri_q3 = mysqli_fetch_assoc($fri3)) {
}
}
?>
</td>
<td> <?php
$sat3 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='3'
and day_id='S'");
while ($sat_q3 = mysqli_fetch_assoc($sat3)) {
$sat_w3 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$sat_q3[sub_id]'");
while ($sat_p3 = mysqli_fetch_assoc($sat_w3)) {
if (($sat_q3['day_id'] == "S") && ($sat_q3['hour_id'] == 3)) {
echo($sat_p3['sub_name']);
}
}
}
?>
</td>
<td> <?php
$sat4 = mysqli_query($conn, "select DISTINCT
sub_id,day_id,hour_id,fact_id from sub_schedule where fact_id = '$fid' and hour_id='4'
and day_id='S'");
while ($sat_q4 = mysqli_fetch_assoc($sat4)) {
$sat_w4 = mysqli_query($conn, "select sub_name from subjects
where sub_id = '$sat_q4[sub_id]'");
while ($sat_p4 = mysqli_fetch_assoc($sat_w4)) {
if (($sat_q4['day_id'] == "S") && ($sat_q4['hour_id'] == 4)) {
echo($sat_p4['sub_name']);
}
}
}
?>
</td>
<td> <?php
CHAPTER 5
TESTING
5.1 Test cases
a. Login page
SL TEST EXPECTED OUTPUT OBSERVED RESULT (Pass /
NO. SCENARIO OUTPUT Fail)
1. Display the The login page should be All the elements Pass
form and its loaded and all the elements are displayed
respective of the page should be successfully
controls displayed
4. Filling valid If the credential filled are The home page Pass
credentials valid, dashboard (Home is displayed
page) should be displayed to successfully
the user
b. Add faculty
SL TEST EXPECTED OUTPUT OBSERVED RESULT (Pass /
NO. SCENARIO OUTPUT Fail)
1. Display the The add faculty page should All the elements Pass
form and its be loaded and all the are displayed
respective elements of the page should successfully
controls be displayed
c. Assign subject
SL TEST EXPECTED OUTPUT OBSERVED RESULT (Pass /
NO. SCENARIO OUTPUT Fail)
1. Display the The assign subject page All the elements Pass
form and its should be loaded and all the are displayed
respective elements of the page should successfully
controls be displayed
d. Assign HOD
SL TEST EXPECTED OUTPUT OBSERVED RESULT (Pass /
NO. SCENARIO OUTPUT Fail)
1. Display the The assign HOD page All the elements Pass
form and its should be loaded and all the are displayed
respective elements of the page should successfully
controls be displayed
e. Add schedule
SL TEST EXPECTED OUTPUT OBSERVED RESULT (Pass /
NO. SCENARIO OUTPUT Fail)
1. Display the The add schedule page All the elements Pass
form and its should be loaded and all the are displayed
respective elements of the page should successfully
controls be displayed
f. Unassign HOD
SL. TEST SCENARIO EXPECTED OBSERVED RESULT
NO OUTPUT OUTPUT (PASS/FAIL)
1 Display the form and The unassign HOD All the elements Pass
its respective page is loaded and are displayed
controls number of faculty successfully
members is with faculty id
displayed
2 Select a faculty id If the faculty id is The message is Pass
and click on submit selected and after displayed
button selecting the faculty successfully
id then it unassign
the HOD
3 Select a faculty from If no faculty is The message is Pass
select box assign as a HOD displayed
then no faculty id is successfully
shown on selection
box
1 Display the form The remove faculty All the elements are Pass
and its respective page loaded and all displayed
controls the elements of successfully
page is displayed
2 Click on submit A warning message The message is Pass
button with filling is displayed displayed
the text boxes successfully
m. Update student
SL. TEST EXPECTED OBSERVED RESULT
NO SCENARIO OUTPUT OUTPUT (Pass / Fail)
1. Display the The update All the elements are Pass
form and its student page displayed successfully
respective should be loaded
controls and all the
elements of the
page should
be displayed
2. Click on update A warning The message is Pass
record button message to be displayed successfully
without selecting displayed to the
the user
select boxes
n. Update faculty
SL. TEST EXPECTED OBSERVED RESULT
NO SCENARIO OUTPUT OUTPUT (Pass / Fail)
CONCLUSION
The Time Table Generator is therefore an efficient system for the process of generating
schedules for the classes in educational institutions. It is accurate, time saving and fast in
processing.
It uses a centralized database and hence avoids data redundancy.
It is secure as unauthorized users cannot access the system and is accurate as the entire
process is computerized.
The future enhancement of the software includes, sending notifications to the faculties
and the students via mail. A temporary schedule can be prepared if the faculty is on leave.
The application can also be used to prepare an examination time table as and when
required.
Hence the system time table generator can be used in real world applications.
BIBLIOGRAPHY